cancel
Showing results for 
Search instead for 
Did you mean: 

eDocument Italy - Badi EDOC_IT_ATTACHMENT XML Add attachement

SFY50013
Explorer
0 Kudos
1,917

Hello Experts,

i'm struggling to add attachments to the XML file of the eDocument using EDOC_IT_ATTACHMENT Badi. Documentation and Example implementation do not say much.

I tried to implement an outbound service to call the GetPDF with API_BILLING_DOCUMENT_SRV API with no luck so far, i'm getting an HTTP 400 response.

Do you have an example of such an implementation or maybe a CDS that contains the attachement in binary format ?

Thank you for your inputs.

Regards 

View Entire Topic
Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Soufiane.F

Could you provide some detail how you are calling the service and more details of your use case?

I checked the Help on the GetPDF topic and it provides some examples:

https://help.sap.com/viewer/03c04db2a7434731b7fe21dca77440da/LATEST/en-US/fe6f3eda2f914d81b512493fd7...

I would also encourage you to log in to the API Hub and try the Try Out feature to get the sample call with details.

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

HTTP 400 indicates a Bad Request - could be you are not encasing the billing doc in single quotes?

Please also indicate how you are calling it (Postman, Java app, etc.)

If possible, please look into Postman - it is the tool we use internally for trying out APIs.

Thank you

Jerry

SFY50013
Explorer
0 Kudos

Hi Jerry,

You are right ! I missed the simple quotes even if i've already used the API in a iFlow a few months back.

Thank you very much for your help. Everything works fine now.

Best Regards.