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

user exit when PGI

Former Member
0 Likes
1,114

Hi

I need to generate an XML file when PGI is done for a delivery. I need to create this file when 'Total good movement start' is changed to C ( completed).

please let me know if you have any idea about user exit or a badi at this point.

I tried LE_SHP_GOODSMOVEMENT' but its not helpful.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,043

Expanding a little on Naresh's 2nd suggestion: You could also create a new output type (see trans NACE) with an associated requirement (see trans VOFM again) which will prevent the message from being sent if PGI is not complete.

Hi

I need to generate an XML file when PGI is done for a delivery. I need to create this file when 'Total good movement start' is changed to C ( completed).

please let me know if you have any idea about user exit or a badi at this point.

I tried LE_SHP_GOODSMOVEMENT' but its not helpful.

Thanks

6 REPLIES 6
Read only

Former Member
0 Likes
1,043

MV50AFZ1

FORM USEREXIT_SAVE_DOCUMENT should be triggered for PGI scenario as well.

Also try transaction code VOFM

Menu

Requirements->Subsequent Functions->Goods Issue routine.

Read only

Former Member
0 Likes
1,044

Expanding a little on Naresh's 2nd suggestion: You could also create a new output type (see trans NACE) with an associated requirement (see trans VOFM again) which will prevent the message from being sent if PGI is not complete.

Read only

0 Likes
1,043

If using VOFM, go to Requirements->Output control. The requirements under "Requirements->Subsequent functions->Goods issue" control when a GI is allowed, not what you can do after a GI has been posted.

Read only

0 Likes
1,043

All i need to do is generate an XML once and only once when the PGI is done that is updated in database ( completed status).

I am trying my best to find a user exit or badi. but so far all of them are before database update.

please let me know any info on this

Thanks

Read only

Former Member
0 Likes
1,043

You can do something like this within

FORM USEREXIT_SAVE_DOCUMENT.

IF not xlikp-wadat_ist is initial

AND ylikp-wadat_ist IS INITIAL.

*- Also check for Total Good Movement start is changed to 'C'

*-insert your logic

endif.

Read only

0 Likes
1,043

The solution provided by Naresh is fine as long as there isn't a problem processing the save. If something were to happen with the processing after this user-exit, the transaction would roll back and you would have generated the XML output.