SAP Knowledge Base Article - Public

3594361 - How to create custom API for GetPDF

Symptom

There is a need to know if it is possible to create a custom API for GetPDF, and how to create it?

Environment

SAP S/4HANA Cloud Public Edition

Resolution

The BO Interface can be used for this purpose. However, exposing the GetLatestPDF function in an OData V4 service binding will not work, as Edm.Stream properties are currently not supported in function results.

An alternative approach is to define a custom function in the OData projection and expose only the binary as the function result (Edm.Binary). This should work, as the content is returned as base64-encoded.

See Also

Keywords

API, billing document, API_BILLING_DOCUMENT_SRV, GetPDF, custom, create, PDF, BO Interface, OData , KBA , SD-BIL-GF-OC-2CL , Output Control Billing (Public Cloud) , How To

Product

SAP S/4HANA Cloud Public Edition all versions