I will try to explain about my question very basically.
In advance, i recommend you not to go further if you are not familiar with the terms like Transportation Cockpit, FU, FO, Planning, Return Pallets, Stop Sequence. Otherwise it is possible that i see some comments below, which claim that my question is not so obvious and understandable.
The problem is so basic. In our Transportation Cockpit (with custom layout) there is no problem when i assign any FU to a FO. Stop sequence is being created in a true order.
But we have another custom layout in which we do also some manual planning for leftover pallets. This time we have a button called 'Create Road Freight Order'. (Technical name of this button is AID_REQDOC_CREATE_FOROAD). When user selects a FU and hits this button (below picture), a new FO is created and at the same time this selected FU is assigned to this newly created FO.
And during this process, the stop sequence is created wrong. At least i think so. If i am wrong please let me know.
Here is the stop sequence of a newly created FO with 1 FU inside.
It is even worse when there are also return pallets (coming to warehouse from store).
I have the feeling that, the root cause of this problem is that, creation of the FO and assignment to it are being held at the same time.
I can also give you some class names just as a clue. Here they are:
Please never hesitate to write if you have any idea or knowledge.