BAPI_PO_CHANGE not working

@StefanSchnell
@thomasEndt
@ordo
@gabi_verzea
HI Team ,

I am trying to use BAPI_PO_CHANGE to change PO quantity and execution ran successul but it is not changing PO quantity .
when i checked Src logs this are two messages i received

  1. Field= Id=MMPUR_BASE LogMessageNumber=000000 LogNumber= Message=Function “Change Purchase Order” Performed in Test Run MessageVariable1= MessageVariable2= MessageVariable3= MessageVariable4= Number=053 Parameter=POHEADER Row=1 System=DS4CLNT120 Type=I

  2. Field= Id=06 LogMessageNumber=000000 LogNumber= Message=Document 1 does not exist MessageVariable1=1 MessageVariable2= MessageVariable3= MessageVariable4= Number=019 Parameter=POHEADER Row=1 System=DS4CLNT120 Type=E

Log message 1 seems to be ok but Log message 2 says Document1 doesnt not exist .

I am passing PO number and every other details but still it keep saying that

Please help me and guide me where i am wrong

this is how my BAPI Excel looks, only mentioning POHeader sheet here

regards
Pratik Mehta

Hi Pratik,

the first message does not indicate things are o.k. It just tells you which line in your Excel the second message with Type=E relates to. In your case this means there is no PO in SAP which can be changes.
This is an error which depends purely on the dat in your SAP system, therefore I can only give some general advise.

  • Check that the PO exists for the company specified.
  • To minimize the risk of a missmatch for an update besides the PO number you should only provide data which should be changed. Means for which you did set the X flag in e.g. POHEADERX. SAP will dissregard data provided in all other columns, except of course the PO_NUMBER.
1 Like

Quick question!

if i have nothing to change at PO header level , i can leave sheet POHEADER and POHEADERX unchanged?

my requirment is to change only Quantity at line level item no 10

I am getting below error now when i am keeping only Po number at POheader and Poheaderx

image

this is how my excel sheet looks,

Hi Pratik,

please try to clear all values from your Excel and keep just PURCHASEORDER on the sheet BAPI_PO_CHANGE plus the quantity information on POITEM, plus of course the flag on the sheet POITEMX.

A sample is attached.
SRC_BAPI_PO_CHANGE_v2.2_EN.xlsx (123.1 KB)

Hi Thomas,

Thanks for resolving again!
yes you were correct , it was data issue .
after i followed your sample excel sheet , it worked fine.

regards
Pratik

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.