on 2025 Sep 26 1:13 PM
Dear All,
Product : SAP S/4HANA Public Cloud
I need to access the Header Texts of an Invoice :
I'm querying the CDS entity I_BillingDocumentTextTP.
The field LongText is empty :
Is there a different way of accessing the Header Texts of a Billing document ?
Many thanks
Hans
Request clarification before answering.
Hello @hans_segers
The CDS view I_BillingDocumentTextTP only provides the keys BillingDocument, Language, LongTextID. The LongText field consistently appears blank because the actual long-text content is not exposed through that CDS.
The recommended way to read invoice header texts in Public Cloud is via the released Billing Document API.
Example OData call:
/sap/opu/odata/sap/API_BILLING_DOCUMENT_SRV/A_BillingDocumentText
? $filter=BillingDocument eq '0090000122'
and Language eq 'E'
and LongTextID eq 'TX06'
This will return the header text content TEXT EXAMPLE FOR XML in your screenshot.
In Public Cloud, you cannot access STXH/STXL or use READ_TEXT. Use the Billing Document API instead.
Refer to the helpful SAP Documentation below.
Business Accelerator Hub- Billing Document - Read, Cancel, GetPDF
KBA 3282990 - CDS View for Sales Order Long Text not available in S/4HANA Cloud
Let me kow if it was you needed
With best regrads
Chum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Chum for this confirmation.
As an alternative solution, I'm trying to consume the API API_BILLING_DOCUMENT_SRV in my ABAP Class, as described on the Business Accelerator Hub : https://api.sap.com/api/API_BILLING_DOCUMENT_SRV/cloud-sdk/ABAP
No luck so far, I have posted a new question for this : https://community.sap.com/t5/technology-q-a/api-quot-billing-document-read-cancel-getpdf-quot-how-to...
Hello @hans_segers
The CDS view I_BillingDocumentTextTP only includes the keys (document, language, text ID); the LongText field is not filled. To access the actual text content, you must use the published OData API API_BILLING_DOCUMENT_SRV, entity A_BillingDocumentText, which returns the LongText.
You can check these SAP Documentation below for your references
SAP Business Accelerator Hub - Billing Document - Read, Cancel, GetPDF
SAP Help-Extensibility in SAP S/4HANA Cloud Public Edition explains why direct access to table or text objects is not available, and APIs must be used.
Let me know how it goes
With regards
Chuma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the I_BillingDocumentTP to read texts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.