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

Table control

Former Member
0 Likes
238

Hello gurus ,

I am using a table control in that I have call some data from differt table and I want to insert some data manually in differt coloum , and some calculation in differt column ,Now data is caoming from differt table and I can enter the value also in visible column , but when I press enter , the entry data is disapper means what I have enterd . I mean to say hw to fix taht data in the screen after pressing enter, is there any way or example .Plz help .

I am waiting for your valuable answer .

Thanks in advance .

Regards .

Joy .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
217

Hello Joy,

This is a typical problem for the scenario

Why it happens:

We have an internal table which we project on the screen as a table control...In the PBO the screen is displayed from values in the internal table....In the PAI,once you input the data..the screen does not automatically feed the values to your internal table and it remains empty..so when u press enter..it goes to PAI..then to PBO and shows data from table in PBO

How to solve it:

Write a module in PAI to modify the internal table with values from table control in the screen...Please see the sample code below written in PAI...

  • in PAI we are looping at the table from screen

loop at int_screentable.

module f_set_data.

endloop.

module f_set_data.

*pass data from screen to work area

wa_screentable = int_screentable.

*update the current line in the internal table from screen

modify internaltable from wa_screentable index sy-tabix.

endmodule.

In PBO..you are already displaying the internal table..so need to change there

Note that in most of the cases the name of the internal table and screentable will be the same

which means internaltable = int_screentable.

in such case do the code

module f_set_data.

*pass data from screen to work area

wa_screentable = int_screentable.

*update the current line in the internal table from screen

modify int_screentable from wa_screentable index sy-tabix.

endmodule.

and yes..even if it the same table on screen and code you need to modify the currentline(sy-tabix) then only it will get reflected

Pls check , revert and reward if helpful

Regards

Byju

1 REPLY 1
Read only

Former Member
0 Likes
218

Hello Joy,

This is a typical problem for the scenario

Why it happens:

We have an internal table which we project on the screen as a table control...In the PBO the screen is displayed from values in the internal table....In the PAI,once you input the data..the screen does not automatically feed the values to your internal table and it remains empty..so when u press enter..it goes to PAI..then to PBO and shows data from table in PBO

How to solve it:

Write a module in PAI to modify the internal table with values from table control in the screen...Please see the sample code below written in PAI...

  • in PAI we are looping at the table from screen

loop at int_screentable.

module f_set_data.

endloop.

module f_set_data.

*pass data from screen to work area

wa_screentable = int_screentable.

*update the current line in the internal table from screen

modify internaltable from wa_screentable index sy-tabix.

endmodule.

In PBO..you are already displaying the internal table..so need to change there

Note that in most of the cases the name of the internal table and screentable will be the same

which means internaltable = int_screentable.

in such case do the code

module f_set_data.

*pass data from screen to work area

wa_screentable = int_screentable.

*update the current line in the internal table from screen

modify int_screentable from wa_screentable index sy-tabix.

endmodule.

and yes..even if it the same table on screen and code you need to modify the currentline(sy-tabix) then only it will get reflected

Pls check , revert and reward if helpful

Regards

Byju