2007 Feb 13 4:49 PM
is it possible to fetch the current line of the table control.
In table control i m entering a value.
After tht i tried to change tht value but its not getting modified instead of tht value is appened in the next line. So tht now i m having 2 values in the table control.
How to solve this.
Thanks in advance.
2007 Feb 13 4:53 PM
Hi,
Do this in your PAI.
PROCESS AFTER INPUT.
LOOP AT ITAB.
MODULE MODIFY_DATA.
ENDLOOP.
MODULE MODIFY_DATA.
MOVE THE SCREEN VALUES TO THE INTERNAL TABLE.
MOVE-CORRESPONDING SCREEN_0100 TO ITAB.
TC WILL BE TABLE CONTROL NAME.
MODIFY ITAB INDEX TC-CURRENT_LINE.
IF SY-SUBRC <> 0.
If there is no record for the index.
APPEND ITAB.
ENDIF.
ENDMODULE.
Thanks,
Naren
is it possible to fetch the current line of the table control.
In table control i m entering a value.
After tht i tried to change tht value but its not getting modified instead of tht value is appened in the next line. So tht now i m having 2 values in the table control.
How to solve this.
Thanks in advance.
2007 Feb 13 4:53 PM
How are you trying to change it ? May be you are hitting the insert button. Just check.
Award points if it helps.
2007 Feb 13 4:53 PM
Hi,
Do this in your PAI.
PROCESS AFTER INPUT.
LOOP AT ITAB.
MODULE MODIFY_DATA.
ENDLOOP.
MODULE MODIFY_DATA.
MOVE THE SCREEN VALUES TO THE INTERNAL TABLE.
MOVE-CORRESPONDING SCREEN_0100 TO ITAB.
TC WILL BE TABLE CONTROL NAME.
MODIFY ITAB INDEX TC-CURRENT_LINE.
IF SY-SUBRC <> 0.
If there is no record for the index.
APPEND ITAB.
ENDIF.
ENDMODULE.
Thanks,
Naren
2007 Feb 13 4:58 PM
Hi,
MODULE read_table_control INPUT.
MODIFY itab FROM demo_conn INDEX itab-current_line.
ENDMODULE.
itab-current_line should be the current line number.
Regards
Sudheer