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

Delivery BADI after commit

Former Member
0 Likes
2,052

The delivery BADI DELIVERY_PUBLISH, method PUBLISH_AFTER_SAVE is excuted after the commit in the VL01/VL02 transaction.

In this method, i extract the delivery number and pass it to an external ABAP with submit and return.

The issue i have is that in many cases, it appears the commit is not fully completed, as often times, the delivery is not yet in LIKP or the delivery text has not yet been written when my program is called. I have created a loop around the likp issue, waiting for it, and it appears that the LIPS entries are written either all together or not at all, as i am not getting any partial deliveries, but i still have the text issue.

Are there lock entries i can check for? would enqueuing the delivery and waiting help? would i even be able to enqueue a likp that wasn't there yet?

I know the submit starts a new program group, but i need a way to tell it to wait until the commit has finished.

it is VL01's commit, so i cannot change it. Also, i cannot add an additional commit, as this seems to cause additional very bad things to happen.

Any ideas?

1 ACCEPTED SOLUTION
Read only

sagar-acharya
Participant
0 Likes
1,274

Hi David,

Try IMPORTing from the memory. When you save the delivery, put the breakpoint on EXPORT statements. 99% you will find that LIKP/LIPS/Texts are exported to some memory area.

Hope it helps

Sagar

3 REPLIES 3
Read only

sagar-acharya
Participant
0 Likes
1,275

Hi David,

Try IMPORTing from the memory. When you save the delivery, put the breakpoint on EXPORT statements. 99% you will find that LIKP/LIPS/Texts are exported to some memory area.

Hope it helps

Sagar

Read only

0 Likes
1,274

Did not find anything in EXPORTS. I did find that the program will do a synchronous update (commit work and wait) if a field called V50AGL-SYNCHRON is an "X". I plugged this into the DOCUMENT_SAVE_PREPARE user exit, and viola... it did a synchronous update. I am testing this now.

Read only

0 Likes
1,274

Hi David,

Could you please explain me how you extracted the delivery number in PUBLISH_AFTER_SAVE method.

Thanks in Advance