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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi ,

Give like this .

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

module fill_acoes_adm.

endloop.

Regards ,

Senthil

0 Kudos

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...

LucianoBentiveg
Active Contributor
0 Kudos

Try this

LOOP AT gi_acoes_adm

with control tc_acoes_adm

cursor tc_acoes_adm-current_line.

ENDLOOP.

Regards.

Former Member
0 Kudos

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.