‎2020 Jan 07 6:16 AM
Hi all,
Just not able to write counter increase Logic inside Value Constructor

Want to increase the Counter i mean want to increase i inside loop but how to increase the i value in the above code not understanding can some one help me out.
Regards,
kiran rachamalla.
‎2020 Jan 07 6:43 AM
If you need the index of the line, why didn't you use INDEX statement ?
DATA(lt_setopt) = VALUE tbl_mat_range( ( sign = 'I'
option = 'EQ'
matnr_low = '123'
matnr_high = '456' )
( sign = 'I'
option = 'EQ'
matnr_low = '123'
matnr_high = '456' ) ).
DATA(lt_result) = VALUE tbl_mat_range( FOR my_temp_line
IN lt_setopt
INDEX INTO my_index (
sign = my_temp_line-sign
option = my_temp_line-option
matnr_low = my_temp_line-matnr_low
matnr_high = my_index + 1 ) ) .
cl_demo_output=>write_data( lt_setopt ).
cl_demo_output=>write_data( lt_result ).
cl_demo_output=>display( ).
‎2020 Jan 07 6:43 AM
If you need the index of the line, why didn't you use INDEX statement ?
DATA(lt_setopt) = VALUE tbl_mat_range( ( sign = 'I'
option = 'EQ'
matnr_low = '123'
matnr_high = '456' )
( sign = 'I'
option = 'EQ'
matnr_low = '123'
matnr_high = '456' ) ).
DATA(lt_result) = VALUE tbl_mat_range( FOR my_temp_line
IN lt_setopt
INDEX INTO my_index (
sign = my_temp_line-sign
option = my_temp_line-option
matnr_low = my_temp_line-matnr_low
matnr_high = my_index + 1 ) ) .
cl_demo_output=>write_data( lt_setopt ).
cl_demo_output=>write_data( lt_result ).
cl_demo_output=>display( ).
‎2020 Jan 07 10:21 AM
Please don't post code as image, copy/paste it and use CODE button to add the colors. Hopefully some people accept to not be paid to type your code again...