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: 

retain data in table control when PAI is triggered

Former Member
0 Kudos

Hello,

I have a screen in which i have a table conrol at the very end of the screen. I will be inputting some data in it and will save it later. When i suppose enter a material no in one column, and press (lets say) enter (PAI triggered) the data vanishes from the column. Why is this so and how can it be retained.

Thanks,

Shehryar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

you have to modify the table control.

In the PAI Module between loop and endloop declare a module, in that module write the code for modifying table control....

Regards,

Satish Reddy.

10 REPLIES 10

former_member188685
Active Contributor
0 Kudos

>and press (lets say) enter (PAI triggered) the data vanishes >from the column. Why is this so and how can it be retained.

When you press enter , Then PAI will trigger, there again you have to transfer the updated content to Internal table.

and Once PAI is over it goes to PBO and again data will be loaded to Table Control.

PBO
|  --> Loading from Itab to TC
|"-----------------------------------------------------------
|   PAI
|<-Changes to back to Itab from TC.

former_member200872
Active Participant
0 Kudos

Hi,

In the PAI, you would have a loop with a module. Inside the module move the data in screen field variables to the program fields. And, modify the itab.

When you loop again in PBO, the procedure is vice-versa.

Then you can see the data in Table Control.

Regards,

Wajid Hussain P.

Former Member
0 Kudos

hi,

you have to modify the table control.

In the PAI Module between loop and endloop declare a module, in that module write the code for modifying table control....

Regards,

Satish Reddy.

0 Kudos

Hello,

I have carried out the task above but when i enter sumthing in a column(first row) and PAI is triggered, the whole column(all rows) is getting populated.

0 Kudos

Hello,

Let me explain what is happening. Suppose i am entering 'ABC' in the Matnr column. PAI is triggered. Then i enter 'DEF' in the 2nd row of the Matnr column. when PAI is triggered this time, i can see 'ABC' twice and 'DEF' once (in1st-2nd and 3rd Row ). 'ABC' is duplicating. Why ?

Thanks

Shehryar

0 Kudos

instead of modifying, May be you are appending the data to Internal table.

That is the reason you are able to see two records.

0 Kudos

Hi,

1.Don,t write anything in the PBO( i mean any code).

2.Make sure that the Modify table control code is written in PAI.

3.Don't write anything under user-command 'ENTER'.

then it should work properly.

Thanks & Regards,

Sathish Reddy.

Former Member
0 Kudos

Hi,

Try this.

Whenever u change any value in the table control, update the corresponding internal table. In the SY-UCOMM of enter event, update the table control with the modified values of the internal table.

Sharin.

Former Member
0 Kudos

hi,

You records are coming twice as you have not refreshed your data in PBO & PAI, hence it is appending the data twice. You can code like this.

PBO

< Loading from Itab to TC >

refresh itab.

-


PAI

<Changes to back to Itab from TC>

Refresh TC.

0 Kudos

Hello,

Thanks everyone. Thread closed.