05-15-2015 12:40 PM
Hi
I have created a table control which is showing the itab details correctly....however whenever i change any field content and press enter
the internal table does not show the changed content but shows the previous value only.
Below is the code that I am using
loop at it_ekko.
module update_table.
endloop.
MODULE update_table INPUT.
READ TABLE it_ekko INTO wa_ekko INDEX tc100-current_line.
IF mark is not INITIAL.
wa_ekko-sel = 'X'.
MODIFY it_ekko FROM wa_ekko INDEX tc100-current_line.
ENDIF.
ENDMODULE.
What may be the issue?
05-15-2015 1:32 PM
05-16-2015 10:24 AM
Dear Hema,
your approach is wrong . I am changing in your code itself.
loop at it_ekko.
module update_table.
endloop.
you have toi update your internal table with header Line. No need to read the table because your WA contains the updated value. So you have to just update your internal table
When you press enter on table control the updated value for the current line is automatically transferred to the WA you have to just update the internal table from WA.
MODULE update_table INPUT.
modily IT_EKKO index tc100-current_line . " Just write this code you will understand. and commented your code.
ENDMODULE.
Thanks
Nishant
05-16-2015 11:19 AM
Hi Hema,
Have you debugged and checked?
May be mark variable is not initializing.
05-16-2015 12:40 PM
Hello Hema,
have you used (in PAI part of the screen) an instruction that may transfer data from screen to your internal variables like:
LOOP [AT itab [INTO wa] [CURSOR top_line] [FROM n1] [TO n2]]
WITH CONTROL contrl.
...
ENDLOOP.
Please have a look at:
Regards
09-20-2021 11:48 AM
The alerted content has been removed - Thank you. The question already received an accepted answer as best answer. Therefore, the response is going to be deleted. Familiarize yourself with Community Q&A in order to preparing questions that draw responses from members.