10-12-2007 12:57 PM
Hi plz help on table control.
When i make entries in table control fields in run time and after all entries press enter button, table control entries refreshed. all entries of table control disappaear. why? plz give the solution.
Regards
Rajesh Kumar
10-12-2007 1:01 PM
Is this a standard SAP screen or a custom screen. My first guess would be that the loop in the PAI is missing which transfers the data from the table control to the internal table or the loop in the PBO which transfers the data back from the internal table to the table control. If one of those is missing, the data you put in on the screen will disappear after hitting enter.
Regards,
Michael
10-13-2007 8:10 AM
both the loops exits below is code for that
PROCESS BEFORE OUTPUT.
MODULE status_1001.
LOOP AT it_dclp_tc WITH CONTROL tc1 CURSOR tc1-current_line.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE user_command_1001. "user command to save data.
LOOP AT it_dclp_tc.
MODULE get_dclp_data. "fetching data from table control into it_dclp
ENDLOOP.
MODULE save_dclp. " Saving data from it_dclp intp table zdclp.
what may be problem.
10-13-2007 8:29 AM
A sample code . This is for data entry on table control .. u can follow this logic.
If you feel this code helpful, pls reward neccessary points.
PROCESS BEFORE OUTPUT.
MODULE reimb_tc_change_tc_attr.
LOOP AT it_reimb
INTO wa_reimb
WITH CONTROL reimb_tc
CURSOR reimb_tc-current_line.
ENDLOOP.
PROCESS AFTER INPUT.
----
process exit commands
----
MODULE exit AT EXIT-COMMAND.
LOOP AT it_reimb.
CHAIN.
FIELD wa_reimb-bilno.
FIELD wa_reimb-bildt.
FIELD wa_reimb-prtid .
FIELD wa_reimb-pdesc.
FIELD wa_reimb-blamt.
FIELD wa_reimb-mocmt.
FIELD wa_reimb-npamt.
FIELD wa_reimb-pyamt.
MODULE reimb_tc_modify ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE reimb_tc_change_tc_attr OUTPUT.
DESCRIBE TABLE it_reimb LINES reimb_tc-lines.
ENDMODULE.
MODULE reimb_tc_modify INPUT.
MODIFY it_reimb
FROM wa_reimb
INDEX reimb_tc-current_line.
IF sy-subrc NE 0 .
APPEND wa_reimb TO it_reimb.
ENDIF.
ENDMODULE. "REIMB_TC_MODIFY INPUT
Rgd,
Ranjith
01-03-2013 7:11 AM