cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reading Invoice PDF from External systems in S/4 Hana

Sivabc
Newcomer
0 Kudos
1,041

In this blog , i will discuss on how to read the invoice PDF generated through Outputs in SAP S/4 system from External systems.

S/4 Hana provided a standard API to read , cancel , get PDF  & complete Proforma invoice.

In order to use the API  API_BILLING_DOCUMENT_SRV to get PDF , outputs should be configured using BRF+.

Read Operation:

Read can be used to retrieve Billing document header details based on the billing document number and item details based on billing document header and item number.

use Get Method to read the billing document details.

Cancel  Operation:

Cancel operation is used to cancel single or multiple invoices based on the request from external system or consumers.

POST HTTP method is used to cancel the billing documents. ETAG handling is required for Posting the cancellation.

For any cancellation requests IF-MATCH should be mentioned in the HTTP request, if it is missing then client throws an error response.

Get PDF:

Get PDF method is used to retrieve the PDF from S/4 system outputs.

PDF will be sent to the external system in a ASCII string format (encoded in Base64). The receiver system should convert the base 64 to binary format using a tool or API.

PDF will be encoded in base64, an encoding scheme that represents binary data in an ASCII string format before sent to receiver. 

Example to get PDF:

GET <host>/sap/opu/odata/sap/API_BILLING_DOCUMENT_SRV/GetPDF?BillingDocument=''9xxxxxxxxx'

 

 

 

 

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Edrilan_Berisha
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

 

you created a question, this is not the blog section.

 

Best,

Edrilan Berisha

Answers (0)