Application Development 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: 

on pressing enter button, table control entries disappear why?

Former Member
0 Kudos

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

4 REPLIES 4

former_member589029
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

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

amrendra_tiwari
Explorer
0 Kudos

Hi Rajesh,

Please check : http://scn.sap.com/thread/1744821

Hope it'll help ypu.

Regards,

Amrendra