cancel
Showing results for 
Search instead for 
Did you mean: 

How to add GSR reference to Supplier Invoice WebService + Document date problem

adriansmolinski
Explorer
0 Kudos

My process is as follows. First, I add a purchase order using standard WebService. Then I add GSR document associated with the purchase order using the standard WebService. The problems occurs when I want to add a SupplierInvoce linked to a Purchase Order and GSR. Using <PurchaseOrderReference> in WebService Manage Supplier Invoice.

Web service returns two messages:

<Item>
<TypeID>452(//SRMAP/LSIV_SIV/)</TypeID>
<CategoryCode>ENV.CBM</CategoryCode>
<SeverityCode>2</SeverityCode>
<ReferenceObjectNodeSenderTechnicalID>1</ReferenceObjectNodeSenderTechnicalID>
<Note>Document date should not be before the date of order 70</Note>
</Item>
<Item>
<TypeID>023(//SRMAP/LSIV_SIV/)</TypeID>
<CategoryCode>ENV.CBM</CategoryCode>
<SeverityCode>2</SeverityCode>
<ReferenceObjectNodeSenderTechnicalID>2</ReferenceObjectNodeSenderTechnicalID>
<Note>The receipt document is missing or invalid.</Note>
</Item>

Question 1. How can I remove messege about Document date should not be before the date of order when I want to add supplier invoice with PO reference in which the invoice dates is earlier than today's date?

Next problem:

Document is created with Exception status.

Second message from WS response also shows in Exception tab.

I do not know why when I add supplier invoice from Web Service generate problems. My sample Supplier Invoice Webservie requests looks like this:

<glob:SupplierInvoiceBundleMaintainRequest_sync xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader/>
<SupplierInvoice actionCode="01" ItemListCompleteTransmissionIndicator="true">
<ObjectNodeSenderTechnicalID>1</ObjectNodeSenderTechnicalID>
<BusinessTransactionDocumentTypeCode>004</BusinessTransactionDocumentTypeCode>
<Date>2022-11-18</Date>
<ReceiptDate>2022-11-18</ReceiptDate>
<TransactionDate>2022-11-18</TransactionDate>
<DocumentItemGrossAmountIndicator>true</DocumentItemGrossAmountIndicator>
<Status>
<DataEntryProcessingStatusCode>3</DataEntryProcessingStatusCode>
</Status>
<CustomerInvoiceReference>
<BusinessTransactionDocumentReference actionCode="01">
<ID>TEST030101</ID>
<TypeCode>28</TypeCode>
</BusinessTransactionDocumentReference>
</CustomerInvoiceReference>
<GrossAmount currencyCode="PLN">275520.000000</GrossAmount>
<Item actionCode="01">
<ObjectNodeSenderTechnicalID>2</ObjectNodeSenderTechnicalID>
<BusinessTransactionDocumentItemTypeCode>002</BusinessTransactionDocumentItemTypeCode>
<PurchaseOrderReference actionCode="01">
<ObjectNodePartyTechnicalID>3</ObjectNodePartyTechnicalID>
<BusinessTransactionDocumentReference>
<ID>70</ID>
<TypeCode>001</TypeCode>
<ItemID>1</ItemID>
</BusinessTransactionDocumentReference>
</PurchaseOrderReference>
</Item>
</SupplierInvoice>
</glob:SupplierInvoiceBundleMaintainRequest_sync>

As You can see there is reference to PO from <PurchaseOrderReference>, but somehow GSR is not linked. You can see document flow below. This problem does not occur when I want to run identical process using UI.

Question 2. How Can I add reference from GSR document to Supplier Invoice using standard WebService to remove this problem with Exception? And what is important I want to automatically post Supplier Invoice without any confirmation from UI and Exceptions.

Adrian

Accepted Solutions (0)

Answers (1)

Answers (1)

adriansmolinski
Explorer
0 Kudos

Any news, help?

carloortega08
Explorer
0 Kudos

Hi smoliski.adrian,

Are you able to resolve this?

Regards,

Carlo