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

BADI_EDOC_TR_INVOICE_CHANGE : how to map a header text to the Invoice/cbc:Note tag in the XML file

hans_segers
Product and Topic Expert
Product and Topic Expert
0 Kudos
191

Dear All,

Requirement : in SAP S/4HANA Public Cloud, put the header text of a Billing Document in the XML document

I'm implementing the BADI_EDOC_TR_INVOICE_CHANGE to fulfill this requirement.

In the documentation of this BAdI Definition, there is the following paragraph :

"

To map a specific header text of source documents to the Invoice/cbc:Note tag in XML files, you can proceed as follows:

  1. Create a custom field in the Custom Fields and Logic app. Use the Sales: Billing Document business context.

You map a specific header text of source documents to this custom field.

  1. In your BAdI implementation, you map the custom field to the Invoice/cbc:Note tag in XML files.

"

I know how to create a Custom Field, but how can "You map a specific header text of source documents to this custom field." ?

The Header Text of a Billing Document is not accessible in a BAdI implementation :

  • Option 1 : CDS :  I_BillingDocumentTextTP : the field "Long Text" is not populated
  • Option 2 : EML : fails, with the error message : Statement "READ ENTITIES" is not allowed with this status
  • Option 3 : API : API_BILLING_DOCUMENT_SRV : fails with Calling "GET_HTTP_REQUEST" "violates transactional contract "FUNCTIONAL"

Many thanks for sharing your ideas.

Kind Regards

Hans

 

 

Accepted Solutions (0)

Answers (0)