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

Ouput program issue updating PO using BAPI_PO_CHANGE

Former Member
0 Likes
996

I have developed an output program , Inside the program im using BAPI_PO_CHANGE to update Your reference(IHREZ) field. Issue is the output will be processed only when PO is in change mode. So BAPI is not working as the some PO is being changed. How to handle this.

I have developed an output program , Inside the program im using BAPI_PO_CHANGE to update Your reference(IHREZ) field. Issue is the output will be processed only when PO is in change mode. So BAPI is not working as the some PO is being changed. How to handle this.

3 REPLIES 3
Read only

former_member186660
Participant
0 Likes
793

Good day DJ,

May I suggest you lock the PO to your session, if the PO is locked you wait until is unlocked to proceed further.

FM - ENQUEUE_EMEKKOE

if you managed to lock it to you session, call BAPI_PO_CHANGE then unlock it when you done.

FM - DEQUEUE_EMEKKOE

Thanks.

Regards,

Tumelo Modise

Read only

Former Member
0 Likes
793

May I know what is reason you are trying to update the same PO in the output program? No wonder you are having trouble.

You should use BADI ME_PROCESS_PO_CUST METHOD PROCESS_HEADER to change the IHREZ value and let the Output Program to issue output nothing else.

R

Read only

0 Likes
793

Hi Roy,

Thanks for reply,

How to capture the things in badi method so that it triggers only when my output is processed?

It should update PO only when i process the particular output type and output is succesfully processed.