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

Help !!!!!

Former Member
0 Likes
326

Hello frnds,

I need to pass HEXVALUE '25' at the end of a text(character type) in SAP and after that it is going into the mainframe system.

Plz do you have any idea how to do this.

Thanks in advance,

Navneet Chaubey

1 REPLY 1
Read only

Former Member
0 Likes
306

hi,

Try the following eg.

DATA TXT(8) VALUE '19980606'.

DATA mytype(1) VALUE 'X'.

FIELD-SYMBOLS <fs>.

ASSIGN txt TO <fs>.

WRITE / <fs>.

ASSIGN txt TO <fs> TYPE 'D'.

WRITE / <fs>.

ASSIGN TXT TO <FS> TYPE MYTYPE.

WRITE / <fs>.

Example using the CASTING addition:

DATA TXT(8) VALUE '19980606'.

DATA mytype(1) VALUE 'X'.

FIELD-SYMBOLS <fs>.

ASSIGN txt TO <fs>.

WRITE / <fs>.

ASSIGN txt TO <fs> CASTING TYPE d.

WRITE / <fs>.

ASSIGN txt TO <fs> CASTING TYPE (mytype).

WRITE / <fs>.

In both cases, the system displays the following:

19980606

06061998

3139393830363036

In these examples, string TXT is assigned to field symbol <FS> three times: first without casting, then casting with type D and finally with casting with type X. The format of the second output line depends on the data in the user master record. The numbers in the last line are the hexadecimal codes of the characters in txt . They are platform-specific (in this case, ASCII).

Reward if helpful.

Regards