2009 Jan 12 8:17 AM
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
2009 Jan 12 8:27 AM
refer to below link...
http://saptechnical.com/Tutorials/ABAP/TableControl/Demo.htm
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
2009 Jan 12 8:24 AM
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
2009 Jan 12 8:59 AM
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
2009 Jan 12 9:08 AM
2009 Jan 12 8:27 AM
refer to below link...
http://saptechnical.com/Tutorials/ABAP/TableControl/Demo.htm
2009 Jan 12 8:41 AM
Hi Karthik,
Did you use the CHAIN and ENDCHAIN for the fields in the screen.
Regards,
Phani.
2009 Jan 12 10:32 AM
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
2009 Jan 12 10:41 AM
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
2009 Jan 12 9:13 AM
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.
2009 Jan 12 9:14 AM
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
2009 Jan 12 10:51 AM
Hi Kartik,
Just in PBO write Modify statement the it wont dissappear from table control.....
2009 Jan 12 10:59 AM
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
2013 Jan 03 7:08 AM