Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Convert image to binary and vice versa

Former Member
0 Likes
2,961

Hi experts,

I have a requirement where i will get chunk of binary data(This binary is actually an IMAGE coming from web dynpro through a RFC in a form of RAWSTRING) , in my RFC i will get this image in RAWSTRING format which i have to store it in a ZTABLE.

Now i have to show this image in a PDF form , so i have to get this RAWstring from my ZTABLE and then convert it in image and then show it on my PDF form . Can anyone help me in achieving this requirement.

PLease let me know in case of more clarification.

Regards,

Abhishek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,518

Hi Abhi,

What u need to do is create a feild of type RAWSTRING in your ztable , pass the value to it and get the image in xstring format.

if still it doesn't work than convert xstring to binary...

using FM CALL FUNCTION 'SCMS_XSTRING_TO_BINARY SO that u can display it in PDF format.

Try out !!

Best of Luck !!!

Regards

Ravi

Hi experts,

I have a requirement where i will get chunk of binary data(This binary is actually an IMAGE coming from web dynpro through a RFC in a form of RAWSTRING) , in my RFC i will get this image in RAWSTRING format which i have to store it in a ZTABLE.

Now i have to show this image in a PDF form , so i have to get this RAWstring from my ZTABLE and then convert it in image and then show it on my PDF form . Can anyone help me in achieving this requirement.

PLease let me know in case of more clarification.

Regards,

Abhishek

4 REPLIES 4
Read only

gaursri
Active Contributor
0 Likes
1,518

Hi Abhishek,

Please check the TCODE SMW0.Hope it helps you in the query.

Have a best day ahead.

Read only

Former Member
0 Likes
1,518

Hi,

Basically i need a RFC which can convert this binary to image , this is what i want.

Regards,

Abhishek

Read only

gaursri
Active Contributor
0 Likes
1,518

Hi Abhishek,

read this wiki.It will be helpful

Wiki:[Image|https://wiki.sdn.sap.com/wiki/display/XI/How%20to%20Send%20Binary%20Data%20to%20RFC%20from%20XI(or)PI]

Hope you get the idea.

Have a best day ahead.

Read only

Former Member
0 Likes
1,519

Hi Abhi,

What u need to do is create a feild of type RAWSTRING in your ztable , pass the value to it and get the image in xstring format.

if still it doesn't work than convert xstring to binary...

using FM CALL FUNCTION 'SCMS_XSTRING_TO_BINARY SO that u can display it in PDF format.

Try out !!

Best of Luck !!!

Regards

Ravi