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

SAP PUBLIC CLOUD EVENT - Billing Document Created

0 Likes
357

Hi All,

in SAP S4HANA Public Cloud we need to create an Automatic Header Text in the Billing Customer Invoice after creation.

In SAP Documentation i've found

https://help.sap.com/docs/SAP_S4HANA_CLOUD/03c04db2a7434731b7fe21dca77440da/28ff5a6e242249e0b82645ca...

I can use this event in SAP S4Hana Public Cloud? I need specific license? What i've to activate in the system? 

Is not an integration, but when user creates sales invoice, i need event to call API_BillingDocument for create text in the sales invoice created.

 

 

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

dawid90
Contributor
0 Likes

Dear @gianmaria_bonvini,

Yes the Billing Document business object in Public Cloud provides business events as described on the SAP Help Portal Billing Document Events page

Link below:

https://help.sap.com/docs/SAP_S4HANA_CLOUD/03c04db2a7434731b7fe21dca77440da/28ff5a6e242249e0b82645ca...

Best first option (no event, no API):

If your goal is simply, for example when the user creates a customer invoice, the header text should be filled automatically the cleanest approach in Public Cloud is Text Determination for Billing Header. This happens during document creation, so you avoid update after posting limitations.

In CBC look for the ID: 101292 - Set Up Text Determination for Billing Header

dawid90_0-1765740986202.png

 

More details below:

dawid90_1-1765740986202.png

This is the approach I’d recommend first because it stays fully standard and robust

Second option, if you still want events + API callback

Usually Yes, you need an additional license on BTP side to consume Public Cloud business events, you typically need an SAP BTP messaging service such as SAP Event Mesh or equivalent entitlement in your contract

Step by step (high-level):

  1. Create a Communication Arrangement for SAP_COM_0092
  2. Search for SAP_COM_0120 in Communication Arrangements
    • If available you can expose API_BILLING_DOCUMENT_SRV for BTP callback.
    • If no the API part is likely blocked often because the scope (1Z6) item isn’t active/entitled

SAP Note below:

https://userapps.support.sap.com/sap/support/knowledge/en/3462588

Example proces flow:

  1. User posts/creates the invoice in Public Cloud
  2. Public Cloud emits Billing Document Created event ->Event Mesh (via SAP_COM_0092)
  3. BTP consumes the event
  4. BTP calls API_BILLING_DOCUMENT_SRV via SAP_COM_0120 to create/update header text

More details below:

https://help.sap.com/docs/SAP_S4HANA_CLOUD/03c04db2a7434731b7fe21dca77440da/78da10ca6df542acb5926ac9...

https://help.sap.com/docs/SAP_S4HANA_CLOUD/03c04db2a7434731b7fe21dca77440da/65680dabb625460291756554...

https://api.sap.com/api/API_BILLING_DOCUMENT_SRV/resource/post_Cancel

Summary:

  • If the text is deterministic based on customer, sales org, payer, Incoterms, etc. use Set Up Text Determination for Billing Header in CBC is the standard way
  • Use events + API callback only if the text depends on logic/data that cannot be determined inside CBC/Public Cloud at creation time and accept that it becomes a BTP extension + API authorization topic

Best Regards,

Dawid