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

Create BMP in se78 from table string dynamically

Former Member
0 Likes
1,178

Hi ! :

I try to insert a image in bmp format to se78 dynamically.

In my function receives a table with string ( this table is generated by our client, he takes a bmp file and cut it into pieces char 255 to send by webservices).

I must take this table, and generated again the bmp file and insert into se78 to print in a smartforms.

so far I did the following :

1- CONVERT_TABLE_TO_STRING (to generate a string merging table content)

2 - SCMS_STRING_TO_XSTRING

3- SCMS_XSTRING_TO_BINARY

4- DP_CREATE_URL

5- SAPSCRIPT_CONVERT_BITMAP_BDS

but this last return sy-subrc = 2 ( no_bmp_file).

can someone help me fix this?

if you need to copy code just tell me.

Thank for your help.

regards.

1 ACCEPTED SOLUTION
Read only

brad_bohn
Active Contributor
0 Likes
763

Can you receive the data directly in the required format for the call to SAPSCRIPT_CONVERT_BITMAP_BDS via the webservice (the raw data)? If you were to upload the binary data (bmp file) directly using GUI_UPLOAD, this is the format it would be in already. Did you compare the binary data from the original bmp file with the result of the SCMS_XSTRING_TO_BINARY call? What is the purpose of DP_CREATE_URL in your process - it's not used in SE78 loads?

1 REPLY 1
Read only

brad_bohn
Active Contributor
0 Likes
764

Can you receive the data directly in the required format for the call to SAPSCRIPT_CONVERT_BITMAP_BDS via the webservice (the raw data)? If you were to upload the binary data (bmp file) directly using GUI_UPLOAD, this is the format it would be in already. Did you compare the binary data from the original bmp file with the result of the SCMS_XSTRING_TO_BINARY call? What is the purpose of DP_CREATE_URL in your process - it's not used in SE78 loads?