‎2014 Mar 19 8:06 AM
Hi all,
i have made table control in which i am filling the data at run time,my issue is i can insert multiple rows but when i press ENTER or i scroll or any thing like any event , the table control deletes the rows , except the first rows remain the same,
how to solve this issue.?
‎2014 Mar 19 8:19 AM
hi alpesh,
in PAI,PBO , make sure you do not delete the internal table entries. Debugging will solve the issue
Module Pool basics - ABAP Development - SCN Wiki
Regards,
Sivaganesh
‎2014 Mar 19 11:50 AM
Hey Alpesh..
first go to debugger and find why its deleting...
i faced da same problem..i done with following code
check it..once..
it will work..
PAI.
LOOP AT IT.
MODULE READ_DATA.
ENDLOOP.
__________________________
MODULE READ_DATA.
READ TABLE IT INDEX TABC-CURRENT_LINE TRANSPORTING NO FIELDS.
IF SY-SUBRC = 0.
MODIFY IT
FROM WA
INDEX TABC-CURRENT_LINE .
ELSE.
APPEND WA TO IT.
ENDIF.
ENDMODULE.
__________________________
‎2014 Mar 19 12:26 PM
Hai Alpesh,,
In PAI loop for the table control, place a module and write the following code there:
MODIFY gt_table FROM wa_table INDEX table1-current_line.
IF sy-subrc <> 0.
INSERT gt_table INTO wa_table INDEX table1-current_line.
ENDIF.
Similerly, please place the number of lines in your internal table in the table control's LINES property. In case if your table control is table1, then use the following code in any modules in PBO:
DESCRIBE TABLE gt_table LINES table1-lines.
I think this will work for you.
Thanks & Regards,
Abijith
‎2014 Mar 19 12:40 PM
Hi Alpesh,
When you press 'Enter', it will trigger the PAI Event of the program and the execution starts from the scratch, in the middle of the program you may be overwriting your internal table with the other data, or you may be clearing it in the middle of the process.
So put a breakpoint in the PAI event and check where it is clearing the internal table.
Thanks,
Siva
‎2014 Mar 19 1:06 PM