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

I_BillingDocumentTextTP : field LongText is empty

hans_segers
Product and Topic Expert
Product and Topic Expert
0 Likes
2,211

Dear All,

Product : SAP S/4HANA Public Cloud

I need to access the Header Texts of an Invoice :

2025-09-26_13-52-56.png

I'm querying the CDS entity  I_BillingDocumentTextTP

The field LongText is empty :

2025-09-26_13-54-16.png

Is there a different way of accessing the Header Texts of a Billing document ?

Many thanks

Hans

Accepted Solutions (0)

Answers (3)

Answers (3)

Chuma
Active Contributor

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.

  • Service: API_BILLING_DOCUMENT_SRV
  • Entity: A_BillingDocumentText → contains the LongText field

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

SAP Help-Billing Document

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

hans_segers
Product and Topic Expert
Product and Topic Expert
0 Likes

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...

 

Chuma
Active Contributor
0 Likes

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-Billing Document

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

Juwin
Active Contributor
0 Likes

You can use the I_BillingDocumentTP to read texts. 

hans_segers
Product and Topic Expert
Product and Topic Expert
0 Likes

Thanks Juwin,

Indeed but the field "LongText" is not populated :

2025-09-29_09-15-34.png