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

Edit PO number in EBAN

khllatifi
Explorer
0 Kudos
773

Hello,


I have managed to create a PO from PR using BAPI_PO_CREATE1, but the 'Closed' indicator (EBAN-EBAKZ), processing status (EBAN-STATU) or PO number (EBAN-EBELN) do not seem to be updated after committing the BAPI. I have passed the PR number and PR item number to BAPIMEPOITEM-PREQ_NO and BAPIMEPOITEM-PREQ_ITEM respectively in hope that it would automatically update EBELN in EBAN after commit

From what I have explored, BAPI_PR_CHANGE and BAPI_REQUISITION_CHANGE cannot change STATU or EBELN (unless if I have missed it), but BAPI_PR_CHANGE can edit EBAKZ.

Is there a way to update EBAN-EBELN to act as another indicator that the PR item is still open? Although I could've just used BAPI_PR_CHANGE to edit EBAKZ to indicate the PR is unavailable, I still need to display EBELN

P/S: The issue has been resolved by adding the highlighted lines in the image


1 ACCEPTED SOLUTION
Read only

ankurch
Active Contributor
670

Hi There,

I am checking the same in my system and after commit its updated by BAPI_PO_CREATE1, can you share the screenshot of successful execution.

2 REPLIES 2
Read only

ankurch
Active Contributor
671

Hi There,

I am checking the same in my system and after commit its updated by BAPI_PO_CREATE1, can you share the screenshot of successful execution.

Read only

0 Kudos
670

Hello!

I am very happy to say that I have just resolved this issue minutes ago. Turns out I forgot to flag the PR number and PR item in Table POITEMX of BAPI_PO_CREATE1, therefore the PO was not properly referencing the PR. The issue was resolved by adding the following:

LT_POITEMX-PREQ_NO = 'X'.

LT_POITEMX-PREQ_ITEM = 'X'.

Thank you for your response! It is very encouraging for me to ask more questions on the forum, especially considering this is my first.