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 error

Former Member
0 Likes
637

I have created a table control, visible length of the table control is 15 lines, now the broble is if i enter 20 lines(5 lines in next page) the 5 lines are not getting updated in internal table.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
593

Hi

It depends on how you transfer (the data from table control to internal table and how you update the internal table in PAI process.

Here u should have a module to transfer and update the data:

PROCESS PAI.
   
   LOOP AT ITAB.
       MODULE MODIFY_ITAB.
   ENDLOOP.

 MODULE MODIFY_ITAB.
   MODIFY ITAB INDEX <TABLE CONTROL>-CURRENT_LINE.
ENDMODULE,

Max

6 REPLIES 6
Read only

Former Member
0 Likes
594

Hi

It depends on how you transfer (the data from table control to internal table and how you update the internal table in PAI process.

Here u should have a module to transfer and update the data:

PROCESS PAI.
   
   LOOP AT ITAB.
       MODULE MODIFY_ITAB.
   ENDLOOP.

 MODULE MODIFY_ITAB.
   MODIFY ITAB INDEX <TABLE CONTROL>-CURRENT_LINE.
ENDMODULE,

Max

Read only

Former Member
0 Likes
593

Hi Basant ,

DO not hard code the no of lines in table control, if you will do this it will not take extra lines and will also give short dump.

This is because table control display depends on the resolution of your screen.

Hope it helps you.

Read only

Former Member
0 Likes
593

Hi harsh ,

i am hardcoding the lines (999), but it should update internal table with second page lines also... right, internal table is updated perfectly with first page data.

Read only

0 Likes
593

Hi,

In PBO

Describe table itab lines tc-lines

Implement the above

Cheers

Ram

Read only

0 Likes
593

Hi

Can u post your code of PAI process?

U don't need to hard code the number of line of table control, but u can set the lines appended in the internal table:

DESCRIBE TABLE ITAB LINES <TABLE CONTROL>-LINES.

Max

Read only

Former Member
0 Likes
593

Hi,

For another thing, you do not LOOP at control in the PAI.

Refer the link [Table Controls|http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm]for more information.

PBO:

LOOP AT <internal table> CURSOR <scroll-var>
                            [WITH CONTROL <table-control> ]
                            [FROM <line1> ]  [TO <line2> ]. 
      ...<actions>...
ENDLOOP.

PAI:

LOOP AT <internal table>.

-Regards

Saurabh Goel