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: 

Table Control

Former Member
0 Kudos
181

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

1 ACCEPTED SOLUTION

gopi_narendra
Active Contributor
0 Kudos
134

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

9 REPLIES 9

gopi_narendra
Active Contributor
0 Kudos
135

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

Former Member
0 Kudos
134

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

0 Kudos
134

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

Former Member
0 Kudos
134

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.

0 Kudos
134

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.

0 Kudos
134

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.

0 Kudos
134

Hi Subramani,

please paste ur code here, i ll help u solve that.

Regards

- Gopi

Former Member
0 Kudos
134

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.

0 Kudos
134

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