2006 Sep 05 4:51 PM
Hi all
I need to generate an XML file when PGI is done for a delivery. I need an user exit or BADI to do this.
I need to generate XML file when Total goods movement status changes to Completely picked.
I am using BADI LE_SHP_GOODSMOVEMENT. But by the time I stop here Total goods movement status did not change to Completely picked.
Please let me know how to handle this.
Thank you
2006 Sep 05 5:18 PM
2006 Sep 05 5:18 PM
2006 Sep 05 5:25 PM
2006 Sep 05 5:28 PM
up to my knowledge outtype will be executed every time i change the delivery. I just need to generate XML file only once when PGI is done
2006 Sep 05 8:08 PM
Part of defining the output type is to assign it to a determination procedure. In this assignment you can specify a requirement routine. The requirement routine can be coded to check order status. In this case, if the order has been post goods issued, you would set SY-SUBRC = 0. Your output is then proposed. If SY-SUBRC <> 0, it is not proposed.
Also, while defining the output type you specify a processing routine. In the processing routine, add your code to generate the XML output.
In SPRO go to Logistics Execution->Shipping->Basic Shipping Functions->Output Control->Output Determination->Maintain Output Determination for Outbound Deliveries->Maintain Output Types. This allows you to create the output type and assign a processing routine.
In SPRO go to Logistics Execution->Shipping->Basic Shipping Functions->Output Control->Output Determination->Define Requirements. This allows you to create the requirement routine.
In SPRO go to Logistics Execution->Shipping->Basic Shipping Functions->Output Control->Output Determination->Maintain Output Determination for Outbound Deliveries->Maintain Output Determination Procedure. This allows you to assign your output type and requirement routine to an output procedure.
Take a look and let me know if you have specific questions.
2006 Sep 05 8:12 PM
In this case, I believe requirement routine 1 is used for GI notification, so you wouldn't need to create it.
2006 Sep 06 1:22 AM
Thank you very much for your time.
If i create output type , I am just trying to understand, will it be done every time I change delivery. I just need this file when PGI is done.
So I am trying to find a exit or badi when PGI is done saved to database.( status complete).
or trying to write a function and execute it on commit.
2006 Sep 06 2:40 PM
That's what the requirement routine is for. Each time a delivery is changed, the requirement routine will determine whether or not the output should be processed. In this case, if there is a change to the delivery, but it is not yet PGI, the requirement routine will prevent the output from processing.
Once the delivery is PGI, the requirement routine will allow processing of the output. The output then runs your custom program to create the XML.
Once a delivery is PGI, it is no longer available to be changed.