2010 Aug 23 9:46 PM
Hello:
i'm from argentina so.. sorry, my english is not so god.
Well hi's my problem.
I have to get the digital signature from one pda. To do that, make a Z function module that get the image (signature) y one table. it's consisting of two fields : index and value. Value are rows of char 250.
In my function , get thats rows and make one variable type Xstring.
But my question is :
How can i restore the image from the xstring? i search for a function do that... but I could not find.
I need restore that image and put in one SmartForm ...
my principal problem is restore the imagen (with the signature) from my table.
Can anybody help me?
Thank You so much and again.. sorry for my english.
Regards!
2010 Aug 24 1:52 PM
Alejiandro:
Thank you for answer! The function is so helpful.
Now i know how to get de binary, but i don't know how convert this binary in bmp an put in se78.
As you see, i'm a rookie and this project is difficult for me.
Thank you for your help! .
Regards.
2010 Aug 23 10:16 PM
Hello sorongo,
you can use function module SCMS_XSTRING_TO_BINARY to convert the xstring back into a binary table. To get an URL of the picture you can use function module DP_CREATE_URL.
As an example a snippet based on the [blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/7249] [original link is broken] [original link is broken] [original link is broken]; of Thomas Jung regarding picture manipulation:
TYPES:
BEGIN OF gt_binary,
line(255) TYPE x,
END OF gt_binary .
TYPES:
gt_binary_table TYPE STANDARD TABLE OF gt_binary.
DATA:
l_xstring type xstring,
graphic_table TYPE gt_binary_table.
" get content from somewhere ...
l_xstring = l_xstring
" convert xstring into binary format
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = l_xstring
TABLES
binary_tab = graphic_table.
" get an (local, temporary) URL to the image
DATA url(255) TYPE c.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
type = 'IMAGE'
subtype = 'X-MS-BMP'
TABLES
data = graphic_table
CHANGING
url = url.
2010 Aug 24 1:52 PM
Alejiandro:
Thank you for answer! The function is so helpful.
Now i know how to get de binary, but i don't know how convert this binary in bmp an put in se78.
As you see, i'm a rookie and this project is difficult for me.
Thank you for your help! .
Regards.
2010 Aug 24 6:53 PM
2010 Aug 25 2:03 PM
Hello:
Thanks for answer!
yesterday saw that function to jaja.
Only implement some changes becouse that function use gui_upload and only can upload from local folder.
but then run fine!.
Thank you all.
Regards!