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: 

Passing a table with dynamic type to generated FM

Former Member
0 Kudos

Hi Great Gurus of ABAP!!!

I am trying to find a way to define an internal table with a dynamic type to allow me to pass this table to a generated FM.

In fact, I am working on BW and using SOAP datasource. I built an ABAP report allowing the end user to load the delta queue from a flat file (so using an ABAP interface).

The situation is the following: SAP Generates itself the FM on each and every environment and generate a structure with a different name each time.

I am using this structure to create my internal table selecting the name of this structure from ROOSOURCE table.

As a consequence, the type of my internal table (actually Field Symbols) is dynamic.

I am able to get my data into this table but when I want to call the generated function module I can't because I do not have a table with the same type defined in the Function module.

How can I solve my problem???

Thanks a lot!!

Cyril.

3 REPLIES 3

former_member182550
Active Contributor
0 Kudos

Pass a data reference.

Rich

Former Member
0 Kudos

Well do you have a bit more example? The module function is generated and I cannot change the definition of it as it is an RFC one.

The following definition does not allow to pass the data as a Table.

DATA: lt_table type ref to data.

CREATE OBJECT lt_table type table of <my dynamic table>.

If I want to pass lt_table as parameter of my module function SAP Refuses to use this object in the call.

0 Kudos

Hi all,

just to update... My field-symbols table was not declared as "type table of" but as "type any table"...

This has solved my issue!

Cyril.