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

Fetching internal table values in a Form

Former Member
0 Likes
732

Hi,

In a function module, in table interface i have declared a table. In source code this table gets values. In source code one perform statement is there. In that form, this table is not present. How can i get this table values in that form?

Ezhil.

6 REPLIES 6
Read only

former_member209217
Active Contributor
0 Likes
701

Hi Ezhilhrh ,

Use TABLES addition for ur perform statement.

Like, PERFORM sample1TABLES <ur Internal table>

Regards,

Lakshman

Read only

Former Member
0 Likes
701

Hi,

Do like shown below:

PERFORM FILL_ITEM_TKOMVD TABLES XKOMV

Regds,

Anil

Read only

Former Member
0 Likes
701

Hi,

You can try using tables with perform statement like:



Perform append_heading TABLES T_Head          " internal table declared
                                                 USING COUNT      "variables
                                                              COUNT1
                                                              INDEX
                                                              FIELDCAT
                                                              FIELDCAT1.

Its form would be like,

FORM APPEND_HEADING TABLES T_HEAD    structure T_HEAD
                                                 USING COUNT     TYPE I
                                                               COUNT1    TYPE I
                                                               INDEX     TYPE I
                                                               FIELDCAT type slis_t_fieldcat_alv
                                                               Fieldcat1 type slis_fieldcat_alv.


Hope it helps

Regards

Mansi

Read only

former_member585060
Active Contributor
0 Likes
701

Hi,

You declare a internal table in the TOP include of the function module and move the interface table data to that internal table, as using TABLES addtion is obsalute i guess.

In top INCLUDE

DATA : it_inttab TYPE TABLE OF <ZSTRUCTURE>.

In Function module

it_inttab = zinterface[].

as it_inttab is globally defined the table contents are available in other INCLUDES of the Function module.

Regards

Bala Krishna

Read only

Former Member
0 Likes
701

You can do it in two ways

1 . You can pass the table to the perform by "USING" staement

2. You can declare the internal table globally

Hope any of this method will work

Read only

Former Member
0 Likes
701

Thank you all