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

Image Upload in HEX

Private_Member_19084
Active Contributor
0 Likes
955

Hi experts

I need a 7-bit image in our sap-system (for our label-printers).

With "read dataset" I get the image in hex and I'am able to save this.

But my problem is, that the image is not in 7-bit.

So is there a way to convert the image/hex from 8-bit or 16-bit to 7-bit? (FM, Class ...)

I know, that SE78 converts images to 8-bit.

Or is there another option to create a 7-bit image?

Thx in advance

Christian

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
702

You have to make it by xstring and bynary mode.

Here is a sample :


* RAW 1024 to RAW 1022
*
  types: t_1022 type x LENGTH 1022,
         t_1024 type x LENGTH 1024.
  field-SYMBOLS: <fs_converter> TYPE t_1022.       "1022
  data: l_xtr type xstring,
        l_xtr2 type xstring,
        ls_RAW type SDOKCNTBIN.

  loop at DOC_BINARY into ls_raw.
    ASSIGN ls_raw-line to <fs_converter> CASTING.
*    l_xtr = <fs_converter>.
    concatenate l_xtr <fs_converter> into l_xtr IN BYTE MODE.
  endloop.

Hi experts

I need a 7-bit image in our sap-system (for our label-printers).

With "read dataset" I get the image in hex and I'am able to save this.

But my problem is, that the image is not in 7-bit.

So is there a way to convert the image/hex from 8-bit or 16-bit to 7-bit? (FM, Class ...)

I know, that SE78 converts images to 8-bit.

Or is there another option to create a 7-bit image?

Thx in advance

Christian

2 REPLIES 2
Read only

Former Member
0 Likes
703

You have to make it by xstring and bynary mode.

Here is a sample :


* RAW 1024 to RAW 1022
*
  types: t_1022 type x LENGTH 1022,
         t_1024 type x LENGTH 1024.
  field-SYMBOLS: <fs_converter> TYPE t_1022.       "1022
  data: l_xtr type xstring,
        l_xtr2 type xstring,
        ls_RAW type SDOKCNTBIN.

  loop at DOC_BINARY into ls_raw.
    ASSIGN ls_raw-line to <fs_converter> CASTING.
*    l_xtr = <fs_converter>.
    concatenate l_xtr <fs_converter> into l_xtr IN BYTE MODE.
  endloop.

Read only

0 Likes
702

Hi Christophe

First, thank you for your fast answer.

However, I think this only converts the hex-code and not the image values.

I already found a solution on my own.

Making a postscript converts the image into 7-bit. So I do this and then catch the content from the postscript-file.

Christian