Hi! I believe this can't be done through expressions but looping. I would appreciate if someone can help me on this 'coz I have never tried looping in script.
Below is a sample table that I need to create a new field for the proposed delivery date (per material and country) for the demand keyfig ...This new field will be committed based on Enter date. IF enter date is the same , then commit by Request date....
The logic is :
1. First row in order qty is Commit through the 1st available supplyqty through its ETA. If the supply qty is not enough, go to the next row of supply until the order qty can be fully supported....then go to the next order qty row, and commit to next available supply...until all the order qty will have a proposed delivery date.
2. If there is no supply, it will be committed based on the LT...Request date +LT