2006 Nov 02 6:29 AM
Hi all,
I have the table control in the screen developed, If I press enter key after entering the value, the value in the table control disappears. I want to retain the value in the screen as it is in the standard programs. how to do it.
Regards
Rusidar S
2006 Nov 02 6:36 AM
see the standard table control programs . u will get a better idea of what u r missing in ur code.
<b>demo_dynpro_tabcont_loop
demo_dynpro_tabcont_loop_at
RSDEMO_TABLE_CONTROL</b>
if u still have a problem paste ur code. i ll correct it
few things regd table control
in PBO
describe the int table to be passed to the tab control
and fill the tab ctrl lines with the no of rows of itab.
use the read statement in the PBO of the tab ctrl loop and move the tab ctrl data to into internal table
in PAI
use the modify statement in the PAI of the tab ctrl loop and move the int table data to tab ctrl.
Regards
- Gopi
2006 Nov 02 6:36 AM
see the standard table control programs . u will get a better idea of what u r missing in ur code.
<b>demo_dynpro_tabcont_loop
demo_dynpro_tabcont_loop_at
RSDEMO_TABLE_CONTROL</b>
if u still have a problem paste ur code. i ll correct it
few things regd table control
in PBO
describe the int table to be passed to the tab control
and fill the tab ctrl lines with the no of rows of itab.
use the read statement in the PBO of the tab ctrl loop and move the tab ctrl data to into internal table
in PAI
use the modify statement in the PAI of the tab ctrl loop and move the int table data to tab ctrl.
Regards
- Gopi
2006 Nov 02 6:36 AM
Hi Rusidar
Please check if you have REFRESH command. Try to restrict the same basing on field SY-UCOMM. This can help.
Kind Regards
Eswar
2006 Nov 02 6:41 AM
Hi,
On Enter the PAI events gets triggered. In this even you need copy the data from the table control to the internal table. In the PBO the internal is used to pass the data to the table cotnrol make sure you are not clearing this internal table in the PBO aftr you copy the data to the table control.
Regards,
Sesh
2006 Nov 02 9:15 AM
hi Rusidar Subramani ,
follow the below procedure. it will help you.
step1: write the module inside the loop and endloop.
process after input.
loop at itab.
module update.
endloop.
step2:
in the module update.clear the table control stucture.so that your data will be available in the table control.
it will solve your problem.if not let me know.
*reward if it helps.
regards,
Ashok.
2006 Nov 02 9:29 AM
hi madam,
PAI.
LOOP AT ITAB.
MODULE UPDATE.
ENDLOOP.
...
..
MODULE UPDATE.
MODIFY ITAB FROM (STRUCTURE OF TABLE CONTROL).
ENDMODULE.
above code will solve your problem.if not let me know.
*reward if it helps.
regards,
Ashok.
2006 Nov 03 3:37 AM
In my program, the structure of the Table control is same as itab.
It didnt solve my problem. this code is automatically generated if i use wizard.
2006 Nov 03 3:39 AM
Hi Subramani,
please paste ur code here, i ll help u solve that.
Regards
- Gopi
2006 Nov 09 8:45 PM
Hi Subramani,
In PAI Event there has to be a Loop Endloop.
Eg. Loop at itab.
*& Add this module which transfers data from itab to table control
MODULE TC_xxxx_MODIFY.
endloop.
*& Defination for the module which updates your internal table.
MODULE TC_xxxx_MODIFY INPUT.
MODIFY itab
FROM itab
INDEX TC_xxxx-CURRENT_LINE.
ENDMODULE. " TC_0300_MODIFY INPUT
This has to solve your problem.
2006 Nov 10 9:51 AM
Hi Subramani,
In addition to Sanjay's Code you may add this part.
*& Defination for the module which updates your internal table.
MODULE TC_xxxx_MODIFY INPUT.
MODIFY itab
FROM itab
INDEX TC_xxxx-CURRENT_LINE.
add this part
if sy-subrc <> 0.
append itab .
endif.
endmodule..
hope this helps