on 11-15-2011 1:01 PM
Dear All,
We want to attach a PDF file to a Purchase order. We are able to do this directly from the PO screen and it works. We are able to retrieve it as well.
Now we upload the file using a upload element in ABAP webdynpro and this is returns the data in XSTRING format. After this step we followed 2 paths but both of them have failed
1. We converted Xstring to a string and string to internal table
2. We converted Xtrsing to an internal table format
Now when call function SCMS_HTTP_CREATE to attach this internal table to PO, it gives no error. When go to PO, it shows this new attachment, but while opening it gives an error saying it is not a PDF format.
Thanks.
Regards
Naveen Agarwal
You defintely don't want to convert the XSTRING to a STRING. This would corrupt the data. How are you converting the XSTRING to an internal table? What is the data type of the internal table? Hopefully it is type x (binary). You need to keep the PDF data in binary format to avoid corrupting the file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas Jung,
I am also searching for the same. which function module should be use to convert the XSTRING to internal table??? i am using SCMS_XSTRING_TO_BINARY function module to convert, is it the correct one?? or is there any class to attach the file from webdynpro application???
Thanks in Advance
Hi Thomas Jung,
Really thanks for your valuable suggestion. its working fine now. I need more help from you for reading the file from webdynpro application. I have design my screen where i am showing the AR_DOC_ID as link, and on click of that link i want to display the attach document(pdf / image). so which UI element should i use in such cases to display both pdf or image.?? and what steps need to be follow??
Thanks
>so which UI element should i use in such cases to display both pdf or image.??
Probably only the iFrame UI element would display both types. Even then you would have to generate a temporary URL to the content (by placing the content in the ICM cache). Probably better to just trigger the content to be downloaded and let the browser decide how to present or save the content via the file download dialog.
http://help.sap.com/saphelp_nw70ehp2/helpdata/en/13/a1764299d76255e10000000a155106/frameset.htm
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.