cancel
Showing results for 
Search instead for 
Did you mean: 

Read attached document from crmd_order as a binary file or as attachment

sujay_ranjan3
Participant
0 Kudos

Hi Gurus,

                I was trying to read the attached PDF document to an order and convert it as binary file (as attachment). I was able to get the file url using

cl_crm_documents=>get_with_url. But the url it returns has a GET method and I am not able to get past this. I need to read the file and convert it a binary file (as attachment).

The below is the format of the url.

http://<Domain>:<port>/sapcs?get&pVersion=<version>&contRep=<contrep>&docId=<guid>4&compId=<filename...

Any help is appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use cl_crm_documents=>get_info and cl_crm_documents=>get_with_table to get the attached document data in binary format. Exporting parameter file_content_binary in the get_with_table method returns the binary data. Refer to my article below for an example:

http://divulgesap.com/blog.php?p=MTI2

Thanks.

Regards,

Ravi

Answers (0)