How do I create structures for RFC call parameters at runtime ?
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.
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.
<any> type any,
<anytab> type any table.
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.