‎2014 Mar 19 11:27 AM
Hi All,
I am facing one problem regarding Table Control.
The issue is I am filling data into table control but when I push enter or scroll the table control the data from the row 2 gets deleted.
I mean the first row data remains same but other data gets disappeared.
Any solution?
‎2014 Mar 19 12:08 PM
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:12 PM
Thank You Ravi.
PROCESS AFTER INPUT.
LOOP AT it_scheme. "Scheme Detail Table
CHAIN.
FIELD it_scheme-advstar.
MODULE check_fiscal_year on CHAIN-INPUT.
FIELD it_scheme-perend.
MODULE check_fiscal_year_1 on CHAIN-INPUT.
MODULE check_compare_fy.
FIELD it_scheme-amount.
FIELD it_scheme-percent.
MODULE input1 ON CHAIN-REQUEST."For Adding Rows at runtime in the ITAB
ENDCHAIN.
*module fill_internal_table.
ENDLOOP.
MODULE user_command_1001.
this is my code..
------------------------------------------------------------------------------------------
MODIFY it_scheme INDEX st_scheme-current_line.
APPEND it_scheme.
LOOP AT it_scheme.
it_work-advstar = it_scheme-advstar.
it_work-perend = it_scheme-perend.
it_work-amount = it_scheme-amount.
it_work-percent = it_scheme-percent.
APPEND it_work.
ENDLOOP.
REFRESH it_scheme.
* CLEAR : it_scheme.
-----------------------------------------------------------------------------------------
‎2014 Mar 19 12:35 PM
hey yash...
check da before post once..
u change ur code..
PAI.
LOOP ..
-----
MODULE READ_DATA.
ENDLOOP.
--------------------------------------------------
MODULE READ.
READ TABLE it_scheme INDEX TABC-CURRENT_LINE TRANSPORTING NO FIELDS.
IF SY-SUBRC = 0.
MODIFY it_scheme INDEX TABC-CURRENT_LINE .
ELSE.
APPEND it_scheme.
ENDIF.
ENDMODULE.
‎2014 Mar 20 5:09 AM
‎2014 Mar 20 5:13 AM
‎2014 Mar 19 12:41 PM
HI Yash,
Thats why you should fill table control in Process before output first if possible.
else as scroll is also an event it will restore the data, you are able to see the first record as may be work area is no getting cleared and is showing there.
CHeck in debugging.
‎2014 Mar 20 5:16 AM
Hello Ranjan,
Thank you for the reply.
I checked in debugging, I am getting the first record . I mean I have written the code for PBO aso.
But when the loop reaches to the second level it clears the value.
‎2014 Mar 19 1:06 PM