Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML file when PGI is done

Former Member
0 Likes
1,109

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
991

Have you considered using output determination for this?

7 REPLIES 7
Read only

Former Member
0 Likes
992

Have you considered using output determination for this?

Read only

0 Likes
991

could you please let me know to do that

Read only

0 Likes
991

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

Read only

0 Likes
991

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.

Read only

0 Likes
991

In this case, I believe requirement routine 1 is used for GI notification, so you wouldn't need to create it.

Read only

0 Likes
991

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.

Read only

0 Likes
991

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.