cancel
Showing results for 
Search instead for 
Did you mean: 

Consume billing document xml in SCP app

former_member306668
Participant
0 Kudos

Hi;

We are working on a side by side extensibility scenario where we like to consume the xml that is generated for Output items for billing documents (invoice) for professional services.  SAP Note 2678898 describes how I can display the xml from S/4HANA directly. The question is how can we retrieve it from a SCP app if we know a billing document number.

Alternatively are there CDS views available that (in the case of T&M invoice)

- show all individual time entries including Price and Qty information that make up the invoice 

- show all individual expense entries that make up the invoice

Thanks

Thomas

Accepted Solutions (1)

Accepted Solutions (1)

bociurea
Advisor
Advisor
0 Kudos

Hi Thomas,

Best way to retrieve the data would be by using a white listed API and for Billing Documents you could use API_BILLING_DOCUMENT_SRV.

Please have a look at the API documentation here https://api.sap.com/api/API_BILLING_DOCUMENT_SRV for more details and see if it fits your requirement.

If you need any other details that might not be provided by the above mentioned API, then you could use the Custom CDS Views option, create a custom CDS view, expose it as OData service and then consume it from the SCP app.

Bogdan

former_member306668
Participant
0 Kudos

Thanks Bogdan

I have checked out the API and it provides information about the Billing Document and the Billing Items the xml for the Adobe form has a lot more information as it also includes the timesheet information of the entries that make up the billing items.

I haven't found any CDS view that would give me this information.

Regards

Thomas

former_member306668
Participant
0 Kudos

Sorry just re-reading my comment. I am still looking for any recommendation on how to achieve this. The API does not give us the same level of details that we require.

We need the information about the timesheet entries (and expense items) that make up the invoice including the actual charge out rates. The background is that we need to show different aggregation levels (e.g. weekly) for an invoice.

Regards

Thomas

Andrew
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Thomas,

For timesheet information - You can try creating a CDS view including the data on I_TIMESHEETRECORD.

Then as Bogdan said, publish the CDS view data in an API. There's a good blog detailing how to do that here:

https://blogs.sap.com/2018/01/23/create-cds-views-in-sap-s4hana-cloud-and-consume-them-as-apis/

Regards,

former_member306668
Participant
0 Kudos

Thanks Andrew;

We are using this view already for a number of different things mainly around printing timesheet and our own version of utilisation analysis.

What is missing (or we haven't found it) in this case are two things:

- how can we determine the billing document for a timesheet entry?

- how can we find the actual billing rate for the entry?

Regards

Thomas

Andrew
Product and Topic Expert
Product and Topic Expert
0 Kudos

borntosucceed I haven't tested this, but since the billing document API has WBS element as well:

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

Could you join them on WBS element field? Then on the billing document API you also have the net amount billed and quantity to derive the rate (but that'll be the final rate including discounts etc.) - this should be the actual billing rate.

For the planned billing rate (price you've set up for the project) I know there's no API to read the condition rates that you've set up yet but it is on the public roadmap:

https://go.support.sap.com/innovationdiscovery/#/innovation/42F2E9281A611ED7A58C87FDD76020D2

and so hopefully coming soon. It's on the roadmap for 1902 as of the time of this writing but roadmap dates may change.

former_member306668
Participant
0 Kudos

andrew.saunders interesting concept and it might work for some of the requirement. I still can't see which timesheet entries belong to a specific invoice number.

What would be ideal is that https://api.sap.com/api/API_BILLING_DOCUMENT_SRV can return the xml for the form template via the GetPDF call.

Regards

Thomas

Answers (0)