Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

File Corrupted Downloading SRM attachments - Converting RAW to XSTRING

$
0
0


Hi!

 

I'm reading the SRM attachments via the function module BBP_PD_CTR_GETDETAIL where the attachments like PDF, DOCS etc (if any attached in the SRM documents) are provided in RAW format (data type SDOK_SDATX). To download the files I provide the pop-up option via the class method   cl_wd_runtime_services=>attach_file_to_response

 

When i'm able to convert the RAW to XSTRING using the below code and download PDF files successfully I couldn't download DOCX file types. Not sure if the conversion of RAW to XSTRING is incorrect. Anyone had experienced this earlier? Please can u help?

 

    

Code to convert RAW to STRING:

 

 

LOOP AT attachment-phio_content INTO ls_attachmt.

   
MOVE ls_attachmt-line TO l_xstring.

   
CONCATENATE lv_content l_xstring

          
INTO lv_content IN BYTE MODE.

   
CLEAR l_xstring.

 
ENDLOOP.


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>