Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How do I create structures for RFC call parameters at runtime ?

Hi,

I have a RFC module that takes one table type and returns complex structure. Can I create these parameters at runtime and pass it to the function (looking at the signature of the RFC).

So that if the structure elements of the RFC changes in the other system, the module would still work on the parent system.

Thanks,

Mahidhar

Tags:
Former Member
Former Member replied

Hi Mahidhar,

yes, why not. Starting release 46C you can create structures dynamically, starting with 47 you can create tables.

Make sure that the structure is defined in your source system.

sample:

field-symbols:

<any> type any,

<anytab> type any table.

Data:

l_ref type ref to data.

create data l_ref type ([strucname]).

assign l_ref->* to <any>.

create data l_ref type table of ([strucname]).

assign l_ref->* to <anytab>.

Now use <any> as the dynamically created structure and <anytab> as the dynamically created internal table.

Regards,

Clemens

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question