on 2019 Nov 18 3:52 AM
Good day Experts,
I'm having a problem on how to post CustomerInvoiceRequest via Custom OData, can someone kindly please help me on this? My custom OData for Journal Entry Voucher works fine, but on this Business Object, the error is always like this on Postman :
500 Internal Server Error
Creating data not possible; creation disabled::Create not possible; source object does not exist::The customer invoice request cannot be saved, because the preceding document ID missing. Report an incident.::The customer invoice request cannot be saved, because the preceding document type missing.
Below is my created OData and my sample body request from postman:
{
"AccountsReceivableDueItemTypeCode": "",
"CustomerInvoiceProcessingTypeCode": "CI",
"Name": "Manual Request via PostMan",
"ProposedInvoiceDate": "/Date(1574035200000)/",
"ReferenceBusinessTransactionDocumentID": "",
"ConsistencyStatusCode": "3",
"CustomerInvoiceRequestItem": [
{
"Quantity": "1.00000000000000",
"ProcessingTypeCode": "CII",
"CustomerInvoiceRequestItemProduct":
{
"ProductID": "SE00001",
"ProductIdentifierTypeCode": "1",
"ProductTypeCode": "2"
}
}
],
"CustomerInvoiceRequestParty": [
{
"PartyID": "API-56477",
"PartyTypeCode": "159",
"RoleCategoryCode": "1",
"RoleCode": "1001"
},
{
"PartyID": "8000000014",
"PartyTypeCode": "167",
"RoleCategoryCode": "39",
"RoleCode": "39"
},
{
"PartyID": "GXI",
"PartyTypeCode": "154",
"RoleCategoryCode": "11",
"RoleCode": "1101"
},
{
"PartyID": "GXI-PMT",
"PartyTypeCode": "410",
"RoleCategoryCode": "44",
"RoleCode": "44"
},
{...
},
{...
},
{...
},
{...
},
{...
}
]
}
I got these fields on already posted Invoice Request and I'm trying to duplicate this via postman.
Appreciate your help on here. Thanks!!
Regards,
Chester
Request clarification before answering.
Hi Chester,
semantically the customer invoice request is a billable item based on a source document such as a sales order, customer contract, service order, service confirmation, and so on. The invoice run combines those billable items into an invoice that is then send to the customer.
For external customer invoice requests (created via API), ByD assumes the source document of the billable item to be outside the ByD system.The BaseBusinessTransactionDocumentID is the ID of the source document. Hence get it from the system were the source document resides. If you don't have a source document, then simply enter some unique ID.
Best regards,
Knut
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chester,
you need to provide a BaseBusinessTransactionDocumentID.
In case of format errors, you find detailed error messages in the ByD work center view "Business Communication Monitor" >> "Rejected web service calls" or via API ReadBusinessDocumentMonitoringInformationIn.
Best regards,
Knut
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chester,
as of today you cannot create (manual) customer invoice requests via OData (there are a few essential parts not OData enabled yet).
However, most customer invoice requests are follow-up documents from sales orders, service orders, contracts and others, and created by the system automatically. You can edit and release those invoice requests to initiate the creation of a customer invoice.
Furthermore you can create (external) customer invoice requests via SOAP services.
Please check blog post https://blogs.sap.com/2019/02/27/sap-business-bydesign-api-usage-samples/ for more details and examples how to edit/post invoice requests via OData and how to create invoice requests using SOAP.
Best regards,
Knut
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Knut,
thanks for the insightful response. 🙂
I commented on your blog, seeking advise on how to post Customer Invoice Request using the sample xml you provided in the comments. cause up to now, I always receive an error message in SoapUI :
Web service processing error; more details in the web service error log on provider side (UTC timestamp 20191119023012; Transaction ID 00163E0E46381EEA82CE906A7F601B46)
and here's my modified xml request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1="http://sap.com/xi/AP/Globalization">
<soapenv:Header/>
<soapenv:Body>
<glob:CustomerInvoiceRequestBundleMaintainRequest_sync>
<BusinessDocumentBasicMessageHeader>
</BusinessDocumentBasicMessageHeader>
<!--1 or more repetitions:-->
<CustomerInvoiceRequest actionCode="01" itemListCompleteTransmissionIndicator="false">
<ObjectNodeSenderTechnicalID>HDR_1</ObjectNodeSenderTechnicalID>
<BaseBusinessTransactionDocumentID></BaseBusinessTransactionDocumentID>
<Name>My customer invoice with external payment</Name>
<!-- SettlementPriorityCode:
1 = Immediate - create custom invoice,
2 = Urgent - stop if a down payment exists
3 = Normal - save invoice request with status "to be invoiced" -->
<SettlementPriorityCode>3</SettlementPriorityCode>
<ReferenceBusinessTransactionDocumentID></ReferenceBusinessTransactionDocumentID> <!-- External Reference -->
<BuyerParty>
<InternalID>00163E0E-4638-1ED9-BEA4-DAF3538739D1</InternalID>
</BuyerParty>
<SalesUnitParty>
<InternalID>0163E8B-A8D0-1ED9-BD8F-6F29F8DA75C9</InternalID>
</SalesUnitParty>
<CashDiscountTerms>
<!-- 1001 = immediately net; 1006 = 10 days 5% -->
<Code>1001</Code>
<!-- <FullPaymentEndDate>2019-05-30</FullPaymentEndDate> -->
</CashDiscountTerms>
<PricingTerms>
<!-- PricingProcedureCode: PPGP02 = Standard Gross Procedure, PPSTD1 = Standard Procedure -->
<PricingProcedureCode>PPGP02</PricingProcedureCode>
<CurrencyCode>USD</CurrencyCode>
</PricingTerms>
<!-- Invoice item | service product | tax code derived by system -->
<Item>
<BaseBusinessTransactionDocumentItemID>10</BaseBusinessTransactionDocumentItemID>
<!-- ReceivablesPropertyMovementDirectionCode: 1 = Invoice item, 2 = Credit memo item -->
<ReceivablesPropertyMovementDirectionCode>2</ReceivablesPropertyMovementDirectionCode>
<!-- <Description languageCode="EN">My invoice item</Description> -->
<CashDiscountDeductibleIndicator>false</CashDiscountDeductibleIndicator>
<Product>
<!-- <InternalID>{{ServiceProductID2}}</InternalID> -->
<ProductID>SE00001</ProductID>
<ProductIdentifierTypeCode>1</ProductIndetifierTypeCode>
<TypeCode>2</TypeCode>
</Product>
<Quantity unitCode="EA">10</Quantity>
<QuantityTypeCode>EA</QuantityTypeCode>
<PriceAndTax>
<!-- List Price -->
<PriceComponent>
<!-- TypeCode: 8PR1 = Gross list price, 7PR1 = Net list price -->
<TypeCode>8PR1</TypeCode>
<Rate>
<DecimalValue>120</DecimalValue>
<CurrencyCode>PHP</CurrencyCode>
<BaseDecimalValue>10</BaseDecimalValue>
<BaseMeasureUnitCode>EA</BaseMeasureUnitCode>
</Rate>
</PriceComponent>
</PriceAndTax>
<ObjectNodeSenderTechnicalID>ITM_1</ObjectNodeSenderTechnicalID>
</Item>
<!-- Invoice item | free text -->
</CustomerInvoiceRequest>
</glob:CustomerInvoiceRequestBundleMaintainRequest_sync>
</soapenv:Body>
</soapenv:Envelope>
Thanks,
Chester
Hello again Knut,
By now, my xml request is returning status 200 OK, but on the Note tag, it is the same error as my result in oData CustomerInvoiceRequest saying :
<Note>Save failed; item ID from preceding document missing</Note>
and
<Note>The customer invoice request cannot be saved, because the preceding document ID missing. Report an incident.</Note>
Thank you so much,
Chester
User | Count |
---|---|
94 | |
15 | |
8 | |
7 | |
5 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.