Application Development 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: 

How to Capture Signature From PDA using mobile 7.0

Former Member
0 Kudos

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!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

alejiandro_sensejl
Active Participant
0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

Hello sorongo,

I haven't had such a requirement yet, but I found an example by Rich Heilman: [Upload Graphics Using Function Module|].

I can only suggest you to download the image via DP_CREATE_URL and use the above mentioned approach to import it again.

Good luck!

0 Kudos

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!