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

SAP Graphics + third party software

Former Member
0 Likes
1,229

Hi,

We want to use a third-party software www.cardfive.com for printing employee cards. I think it would be simple to get the data from SAP tables. What i would like to know is how to get the images (uploaded via SE78) into cardfive. Will they be in binary form? Which table is this information stored in?

I searched previous posts of similar topics but could not find a clear solution.

Thanks and regards,

Zubair

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
1,188

Hi Welcome to SDN.

You can use table STXBITMAPS to get the header details of the image and to get the actual image as binary you could use the following piece of code.

call method cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp

exporting

p_object = fs_stxbitmaps-tdobject

p_name = fs_stxbitmaps-tdname

p_id = fs_stxbitmaps-tdid

p_btype = fs_stxbitmaps-tdbtype

receiving

p_bmp = loc_graphic_xstr

exceptions

not_found = 1

others = 2.

Hope this helps.

Regards

Raja

Reward the helpful answers by clicking the radiobutton and if the question is answered mark it so.

Hi Welcome to SDN.

You can use table STXBITMAPS to get the header details of the image and to get the actual image as binary you could use the following piece of code.

call method cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp

exporting

p_object = fs_stxbitmaps-tdobject

p_name = fs_stxbitmaps-tdname

p_id = fs_stxbitmaps-tdid

p_btype = fs_stxbitmaps-tdbtype

receiving

p_bmp = loc_graphic_xstr

exceptions

not_found = 1

others = 2.

Hope this helps.

Regards

Raja

Reward the helpful answers by clicking the radiobutton and if the question is answered mark it so.

6 REPLIES 6
Read only

athavanraja
Active Contributor
0 Likes
1,189

Hi Welcome to SDN.

You can use table STXBITMAPS to get the header details of the image and to get the actual image as binary you could use the following piece of code.

call method cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp

exporting

p_object = fs_stxbitmaps-tdobject

p_name = fs_stxbitmaps-tdname

p_id = fs_stxbitmaps-tdid

p_btype = fs_stxbitmaps-tdbtype

receiving

p_bmp = loc_graphic_xstr

exceptions

not_found = 1

others = 2.

Hope this helps.

Regards

Raja

Reward the helpful answers by clicking the radiobutton and if the question is answered mark it so.

Read only

0 Likes
1,188

Hello Raja,

Thank you for the help. I have not been able to find the method in my installation, i have 4.6C

I am making a table view (through SE11) that will contain all the data in the third party software (cardfive). Do you think, if i pass the content in (p_bmp = loc_graphic_xstr) in one of the fields in the view, cardfive will be able to pick it as a graphic?

Also, let me know how to add the code you gave in the view.

Thanks

Zubair

Read only

0 Likes
1,188

Further to my post above, i am using structured programming and not object oriented, so please let me know any function module that performs the same function as cl_ssf_xsf_utilities.

Thanks

Read only

0 Likes
1,188

you can use FM

SAPSCRIPT_GET_GRAPHIC_BDS

Regards

Raja

Read only

0 Likes
1,188

Thanks Raja, the function module works. Now I have to make the return value (binary) available to the thirdparty software. Is it possible to do this through a view? i.e., is it possible to add a field in the view for which i can call this function module.

The other option i was trying is to save the return value in a custom table (infotype). I added a field (BINIMG) in the table and called the function SAPSCRIPT_GET_GRAPHIC_BDS

in the module pool of the infotype. But i get the following error:

<The type of "L_CONTENT" cannot be converted to the type of "PA9201-BINIMG">

What type should this field be in order to be able to store the return value from the function? I tried component type SDOK_SDATX but then table gives an activation error:

<Field BINIMG (Length >255 for RAW only allowed for non-DB tables)>

Any suggestions?

Read only

0 Likes
1,188

check out the following link where i have provided a complete sample code for saving binary data to DB table.

Regards

Raja