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

Modification in module pool program.

sanjeev_mishra_15aug
Active Participant
0 Likes
1,892

Hi Experts,

I am working on module pool programming.

There is a table control inside a tabstrip control.

Here whenever I change the value of quantity filed in a row, it should change the same row.

But instead of that a new row is getting added in addition of the previous row.

Please help me.

For your understandings I am putting here the screen shot of the screens. step by step.

1. first screen:

2. second screen where i changed the quantity field in second row but didn't  press enter key.

3. final screen with additional row unwanted. here the second row should be modified but new row is being added.

Please help me to resolve this issue.

Thanks in advance.

-Sanjeev

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,503

hi sanjeev,

make sure that PBO has the following (TBL_CTRL-current_line)

LOOP AT itab INTO wa WITH CONTROL tbl_ctrl CURSOR TBL_CTRL-current_line.
   MODULE DISPLAY_DETAIL_RECORDS.
ENDLOOP.



Also make sure that PAI has the following (TBL_CTRL-current_line)


LOOP AT itab.
   MODULE read_table_control.
ENDLOOP.



MODULE READ_TABLE_CONTROL INPUT.
   MODIFY ITAB2 FROM WA2 INDEX TBL_CTRL-CURRENT_LINE.
ENDMODULE.                


4 REPLIES 4
Read only

sanjeev_mishra_15aug
Active Participant
0 Likes
1,503

here the third screen comes after pressing enter key.

Read only

0 Likes
1,503

Please debug the code,

Instead of modifying the table is getting inserted.

Please check the loop endloop in your screen PAI.

Read only

Former Member
0 Likes
1,505

hi sanjeev,

make sure that PBO has the following (TBL_CTRL-current_line)

LOOP AT itab INTO wa WITH CONTROL tbl_ctrl CURSOR TBL_CTRL-current_line.
   MODULE DISPLAY_DETAIL_RECORDS.
ENDLOOP.



Also make sure that PAI has the following (TBL_CTRL-current_line)


LOOP AT itab.
   MODULE read_table_control.
ENDLOOP.



MODULE READ_TABLE_CONTROL INPUT.
   MODIFY ITAB2 FROM WA2 INDEX TBL_CTRL-CURRENT_LINE.
ENDMODULE.                


Read only

0 Likes
1,503

Hi Abdul Bhai,

Thanks your logic worked bro...

Thanks a lot.

Thanks to other helping persons too.