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

Data is disappearing in Table control when pressed Enter

Former Member
0 Likes
2,995

Dear Experts,

I have a query, when i enter the data in table control and press enter ,the data which is present gets disappeared. How can i resolve this issue.

Regards,

CHK

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,855
12 REPLIES 12
Read only

Former Member
0 Likes
1,855

Hi Karthik,

Kindly post some code of yours and requirement briefly so that it is easier to understand what exactly is required and how.

Regards Mansi

Read only

0 Likes
1,855

Dear Mansi,

Take for example T-code - ME21N , creation of purchase order, in which u have table controls used for item overview. in my requirement i have the same scenario, where in you enter around 4 to 5 records in items. But after i entry 1 record and press entry all the records in my table control disappears.

I hope u got a better picture.

Rgds,

CHK

Read only

0 Likes
1,855

u wud have put CLEAR <itab> in the PBO...

Read only

Former Member
0 Likes
1,856
Read only

Former Member
0 Likes
1,855

Hi Karthik,

Did you use the CHAIN and ENDCHAIN for the fields in the screen.

Regards,

Phani.

Read only

0 Likes
1,855

I have not created the table control using the wizard. its normal table control with the fields data . I want the data in the fields on table control to stay after pressing enter.

rgds,

CHK

Read only

0 Likes
1,855

Hi,

I have made a simple test program, u can try with that :

report ztest_prog3.

data: begin of it occurs 0,

ebeln type ekko-ebeln,

bukrs type ekko-bukrs,

bstyp type ekko-bstyp,

bsart type ekko-bsart,

end of it.

controls tc type tableview using screen 100.

call screen 100.

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


module user_command_0100 input.

modify it index tc-current_line.

if sy-subrc <> 0.

append it.

endif.

endmodule. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


module status_0100 output.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

tc-lines = 10.

endmodule. " STATUS_0100 OUTPUT

&----


*& Module STATUS_0101 OUTPUT

&----


  • text

----


module status_0101 output.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

clear tc-lines.

endmodule. " STATUS_0101 OUTPUT

Hope this helps.

Regards,

Nibha

Read only

Former Member
0 Likes
1,855

I think you are not modifying the table control.

try this one..

in PAI..

loop at itab
module modify_tc.
endloop.

in module modify_tc write.

modify itab from wa index tc-current_line.

Read only

Former Member
0 Likes
1,855

Hi Kartik,

Do the validation Properly.

I think it's problem with ur validation.

Had u paste some sort of code here, it could be easy for giving the exact answer.

Cheers,

Pravin s

Read only

Former Member
0 Likes
1,855

Hi Kartik,

Just in PBO write Modify statement the it wont dissappear from table control.....

Read only

Former Member
0 Likes
1,855

Hi ,

Do the following things in your PBO and PAI event of screen .

PROCESS BEFORE OUTPUT.

module call_screen .

Module LINES .

LOOP AT IT_CIVIL WITH CONTROL TCVLAB CURSOR

TCVLAB-CURRENT_LINE .

ENDLOOP .

PROCESS AFTER INPUT.

chain .

field IT_CIVIL-CIVILIND .

field IT_CIVIL-NAME_TEXT1 .

field IT_CIVIL-SUBCONT1 .

field IT_CIVIL-NAME_TEXT2 .

field IT_CIVIL-SUNCONT2 .

module modify_civil_DATA .

endchain .

*****************************************************

modules :

IN PBO

MODULE LINE OUTPUT .

DESCRIBE IT_CIVIL LINES LIN .

TCvLAB-LINES = LIN .

ENDMODULE .

IN PAI :

MODULE MODIFY_CIVIL_DATA INPUT.

clear : wa_civ .

move-corresponding it_civil to wa_civ .

read table it_civil index 1 .

if sy-subrc = 0 .

modify it_civil index 1 from wa_civ .

else .

append it_civil .

clear : it_civil .

endif .

******************************

YOUR PROB WILL SOLVED .

PLEASE REWARDS IF SATISFIED .

REGARD'S

NILESH JAIN

Read only

amrendra_tiwari
Explorer
0 Likes
1,855

Hi,

Please check:

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

Regards,,

Amrendra