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

Customer reference copy from service confirmation to billing document

daniel_walker
Explorer
219

Dear community,

we want to copy the customer reference number from service confirmation to billing document in S/4HANA Cloud Public Edition.

For that we use the BAdi SD_BIL_DATA_TRANSFER. When we use the following code it works fine:

bil_doc_res-purchaseorderbycustomer = 'Customer Reference'.

After we want to query the data (customer reference - purchaseorderbycustomer) from service confirmation we are not able to get data from related CDS view i_serviceconfirmationtp.

Has anyone an idea how this could work? Do we have to create a new custom CDS? If yes, with which datasource? Or is there an easier way?

Every hint would be much appreciated.

Thx

Accepted Solutions (0)

Answers (1)

Answers (1)

Chris1973
Active Contributor
0 Kudos

Good day @daniel_walker 

Thank you for your question.

Considering you are using public cloud, a clean-core approach is vital. Since you want to retrieve the customer reference after billing, maybe consider using I_BillingDocumentItem for reporting.

For pre-billing situation, you can create a Custom CDS View based on I_ServiceConfirmation and associate it to your custom field or business object that stores the reference.

Alternatively, you can expose the filed through Custom Fields and Logic if it is part of the service confirmation business context (SRV_ORD_CONF/SRV_CONF_ROOT).

Have a look at these references, they provide more detailed guidance:

Service Confirmation (A2X), Extensibility: Service Confirmation - Create, Change, Extending a Service

 

Let me know if you have further questions.

Best regards

Chris

daniel_walker
Explorer
0 Kudos
Thank you Chris, do you know the database I have to use for create a Custom CDS View?
daniel_walker
Explorer
0 Kudos
Hello Chris, thank you for your reply. For the option: For pre-billing situation, you can create a Custom CDS View based on I_ServiceConfirmation and associate it to your custom field or business object that stores the reference.
Chris1973
Active Contributor
0 Kudos
Hello Daniel, I would recommend you use I_ServiceConfirmation as datasource to retrieve service confirmation header details and retrieve service Confirmation item details using I_ServiceConfirmationItem.