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 - bug??

Former Member
0 Likes
573

Hi all.

I'm trying to fill a table control with data coming from an internal table.

I'm doing things just like I've done thousands times before (and in other screen in same program), and it doesn't work!!!

the problem is: There is a loop to fill the table control

loop with control tc_acoes_adm.

module fill_acoes_adm.

endloop.

and, the module that fills it:

MODULE fill_acoes_adm OUTPUT.

READ TABLE gi_acoes_adm INDEX tc_acoes_adm-current_line.

ENDMODULE. " fill_acoes_adm OUTPUT

but, inside the module, the "tc_acoes_adm-current_line" is always 0. Thus, the table control is never filled with data from internal table gi_acoes.

any idea will be welcome!!

thanks in advance,

Hermes.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
538

Do you have more than one table control in your screen?

If yes, you should loop the table controls in the same order they appear in the screen. left to right, top to bottom.

Hope it helps.

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
538

Hi ,

Give like this .

loop <b>at itab</b> with control tc_acoes_adm .

module fill_acoes_adm.

endloop.

Regards ,

Senthil

Read only

0 Likes
538

it didn't work...

and it should not be needed, since I use the same logic in other screens, and it is working...

I'm getting crazy with this. SAP is playing jokes on me...

Read only

LucianoBentiveg
Active Contributor
0 Likes
538

Try this

LOOP AT gi_acoes_adm

with control tc_acoes_adm

cursor tc_acoes_adm-current_line.

ENDLOOP.

Regards.

Read only

Former Member
0 Likes
539

Do you have more than one table control in your screen?

If yes, you should loop the table controls in the same order they appear in the screen. left to right, top to bottom.

Hope it helps.

Thanks.