2005 Oct 14 10:18 AM
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
2005 Oct 15 8:14 AM
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.
2005 Oct 15 8:14 AM
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.
2005 Oct 19 6:20 AM
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
2005 Oct 19 6:29 AM
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
2005 Oct 19 6:34 AM
2005 Oct 20 10:57 AM
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?
2005 Oct 22 8:40 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |