Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table Control - Urgent

Former Member
0 Likes
591

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
557

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.

3 REPLIES 3
Read only

Former Member
0 Likes
557

How are you trying to change it ? May be you are hitting the insert button. Just check.

Award points if it helps.

Read only

Former Member
0 Likes
558

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

Read only

Former Member
0 Likes
557

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