Hello friends,
I actually need to post the IDoc to create or update the TU based on TU status depending on the shipment details coming from the ECC.
Below is the logic which can be used to do so. But im totally new to EWM hence cannot find the technical details to implement the logic.
Can someone please help me to explain the Pseudocode atleast for this logic?? Please help.. I am thankful for your time to look into this...
When there is change done to the shipment and a SHPMNT05 IDOC is created with EIEDT18-QUALF = CHA the program should delink all associated deliveries from the existing TU in EWM and delete the TU and create a new TU with same ECC shipment reference with the data from the IDOC.
- Pass E1EDT20-TKNUM to /SCWM/TUNIT- TU_NUM_EXT to check for any existing TU against the shipment number.
- If shipment exist check for the shipment status. If status set is Loading Complete (ISR09), no change is possible, the IDOC will fail to post. If status is ISR07 (Loading started) or ISR19 (CHKI (arrival at checkpoint)) store the existing status to internal table.
- Revert back the status to ISR38 (planned).
- Remove the delivery linkage from the TU.
- Delete the TU.
- Post the IDOC to create a new TU object referring the ECC shipment.
- Compare the status of the new TU with the status in internal table. If difference found set the status to the status in the internal table.
- If EIEDT18-QUALF = ORI, the above check is not required. The IDOC can be posted to create the TU.