cancel
Showing results for 
Search instead for 
Did you mean: 

"Document does not exist" exception when updating a Purchase Order, Agentry

Former Member
0 Kudos

Hello Gurus,

I updated a PO in SAP by calling the Bapi. It displays the error:

com.syclo.sap.mm.steplet.POUpdateSteplet::throwExceptionToClient::1513::POUpdateSteplet - Document  does not exist |

I checked on SAP and found the PO there. And in the log file, the PONumber, Company code are sent to the server. Then  why It throws the above exception.

I spent a day but cannot find out what happen to the PO. Please help me. Thank you very much.

Edit: Even though I hard coded the PO Number, it still display the error.


JCO.Structure header = _imports.getStructure("IS_POHEADER");

  String poNumber = user.getString("transaction.PONumber");

  setValue(header, log, "PO_NUMBER", poNumber);

  String companyCode = user.getString("transaction.CompanyCode");

  setValue(header, log, "COMP_CODE", companyCode);

  String purchaseOrg = user.getString("transaction.PurchaseOrganization");

JCO.Structure headerX = _imports.getStructure("IS_POHEADERX");

setValue(headerX, log, "PO_NUMBER", poNumber);

setValue(headerX, log, "COMP_CODE", "X");

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

PH Ngu,

What product and version are you customizing?  What BAPI are you running to do the update?

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason,

I didnt customize anything. I write the java backend code from the scratch.

The BAPI wrapper is writen and deployed on SAP agentry framework. It receives ES_poheader structure as an input and update the PO based on PONumber. It seems that the bapi cannot read the PONumber sent by Agentry app.

we run the BAPI on SAP agentry framework and it can update the PO correctly with the parameters input manually.

I dont know why it cannor recognize the PONumber sent from Agentry.

jason_latko
Advisor
Advisor
0 Kudos

PH Ngu,

I thought you said it didn't work even when you hard-coded the PO number in the java?

Are you saying that user.getString("transaction.PONumber"); is returning a blank string?  If that is the case, then your transaction properties are set up incorrectly in the editor.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Jason,

I checked the SAP error log and found the issue in the log. I am not sure if it is the cause of "Document doesnt exists. Please help me figure it out. Thank you very much.

Former Member
0 Kudos

Hello Jason,

The parameter I send to SAP server and the input parameter in BAPI are different. That's why the BAPI cannot recognize the the PONumber. We edit BAPI input parameter and now it works. Thanks for your support.

Answers (0)