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

pass internal table

Former Member
0 Likes
1,008

Dear all,

I have to pass my inernal table in function module using export parameters as tables parameters are obsolete. I have declared my passing parameter referencing it with table type, but still when i try to pass, it says it is not a structure or itab with header line.How do i get past this?

Any help would be greatly appreciated.

Regards,

C.A

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
968

Hi Abinay,

Better you use CHANGING parameter to pass the internal table.

As you have nmentioned that you have created the table type using Se11 and used that type as reference type.

do the same thing in Changing parameter.

now declare the work area as the line of the Internal table you have passed in the changing parameter.

Hope it will help you.

Regards,

sujit

9 REPLIES 9
Read only

Former Member
0 Likes
968

plz give ur code

rgds

Rajesh

Read only

0 Likes
968

Hi Rajesh,

loop at stock.

move-corresponding stock to ES_MIGO_BADI_SCREEN_FIELDS.

append es_migo_badi_screen_fields.

endloop.

Here stock has internal table data.

i have declared es_Migo_badi_SCREEN_FIELDS REFERENCING A TABLE TYPE IN EXPORT PARAMETERS.

THE ERROR I GET IS ES_MIGO_BADI_SCREEN_FIELDS IS NOT A STRUCTURE OR INTERNAL TABLE WITH HEADER LINE.

Regards,

C.A

Read only

JozsefSzikszai
Active Contributor
0 Likes
968

tables are obsolate by subroutines, not by FMs...

Read only

0 Likes
968

Hi Eric,

Do you mean to say tables can be used althogh it gives me a warning message.

Regards,

C.A

Read only

Former Member
0 Likes
969

Hi Abinay,

Better you use CHANGING parameter to pass the internal table.

As you have nmentioned that you have created the table type using Se11 and used that type as reference type.

do the same thing in Changing parameter.

now declare the work area as the line of the Internal table you have passed in the changing parameter.

Hope it will help you.

Regards,

sujit

Read only

0 Likes
968

Hi Sujit,

I still get the same error.

Regards,

C.A

Read only

0 Likes
968

Hi Abhinay,

i am not sure Just try this-

declare a work area -

Data:wa_ES_MIGO_BADI_SCREEN_FIELDS like line of ES_MIGO_BADI_SCREEN_FIELDS.

loop at stock.

move-corresponding stock to wa_ES_MIGO_BADI_SCREEN_FIELDS.

append wa_es_migo_badi_screen_fields to ES_MIGO_BADI_SCREEN_FIELDS.

endloop.

Read only

0 Likes
968

Hi,

declare the work area as the line type of the table type in your export parameter and also use the workarea in your source code wherever necessary.

regards

padma

Read only

0 Likes
968

Hi Sujit,

Thankks that worked.

Regards,

C.A