on 2024 Nov 11 10:53 AM
Hi Experts,
Hope you're having a good day!
Just wanted to ask how do you convert an integer to hexadecimal?
Currently I have this line of code.
DATA(lt_tabix) = sy-tabix.
which is then used to compare a hexadecimal value.
LOOP AT lt_table ASSIGNING FIELD-SYMBOL(<fs_var>) WHERE hex = lt_tabix
It will give me an error since 10 is not 0000000000000010 in hexa.
Really appreciate your replies in advance.
Request clarification before answering.
It works as expected, the line is found:
TYPES:
BEGIN OF ts_itab_line,
hex TYPE x LENGTH 8,
END OF ts_itab_line.
TYPES tt_itab TYPE STANDARD TABLE OF ts_itab_line WITH EMPTY KEY.
DATA(itab) = VALUE tt_itab( ( hex = '000000000000000A' ) ).
LOOP AT itab ASSIGNING FIELD-SYMBOL(<line>) WHERE hex = 10.
WRITE / 'found'.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.