2006 Aug 16 10:18 AM
Hi Group,
How to write hexadecimal variable in the file on application server.
With Transfer statement its giving dump.
Hi Group,
How to write hexadecimal variable in the file on application server.
With Transfer statement its giving dump.
2006 Aug 16 10:26 AM
2006 Aug 16 10:31 AM
I transfer to string and write in to the file using transfer still its not writing .
data v_str type string.
types : begin of ty_sep,
str(1) type c,
vsep(2) type x,
end of ty_sep.
data wa_sep type ty_sep.
wa_sep-str = " ".
wa_sep-vsep = '12'.
v_str = wa_sep-vsep.
transfer v_sep to fname.
its writting as 1200 on application server instead of control L.
2006 Aug 16 10:36 AM
transfer v_str instead of v_sep and check the value in the output.
Also, note you dont need it to be string but of type Char with length twice that of the hex value.
Regards
Anurag
2006 Aug 16 10:43 AM
Sorry I trnasfered v_str only,I tried to transfer
the character value but its writting 12 on application server instead of writting hexadecimal equivalent.
2006 Aug 16 10:49 AM
In your example the hex value of the string was 12 and hence the output as 12. Do you mean that you have a numeric value which you wish to convert into hex and transfer it to dataset ?
lnum = '12'.
lhex = lnum.
lstr = lhex.
transfer lstr to dsn.
Regards
Anurag
2006 Aug 16 10:58 AM
it will be displayed in AL11 as #(any hexadecimal value) i guess.
have you defined that variable as X or not ??
like
data : v_hex <b>type x</b> value '09'.
2006 Aug 16 10:39 AM
data : v_hex type x value '09'. "horizantal tab
CONCATENATE V_FIELD1
V_FIELD2
V_FIELD3
INTO V_STRING SEPARATED BY V_HEX.
TRANSFER V_STRING TO <FILENAME>.
This will works fine. in AL11,you can see '#' between the feilds.
Regards
srikanth
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |