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

Get import parameter values of function module at runtime dynamically

Former Member
0 Likes
1,562

Hello,

Is it possible to have access to all import parameter values at runtime. I want to concatenate all import parameters to a string but I want it to be flexible. I just want to call a method or function module to add this functionality and this should take care of everything and just return me the string.

Example:

FM1 with parameters

var1: say

var2: hello

-> result: var1:say;var2:hallo

FM1 with parameters

var1: this

var2: FM

var3: has

var4: five

var5: parameters

-> result: var1:this;var2:FM;var3:has;var4:five;var5:parameters

Thanks for helping,

jeroen

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
688

You can go from function module name to function group using table TFDIR.

From the function group, e.g. ZMYFUNCGROUP, use READ REPORT to get the include LZMYFUNCGROUPUXX source code. This will give you the list of includes making up the function modules.

You can then use further calls to READ REPORT on these includes (like LZMYFUNCGROUPU01) to get the parameters.

You'll have to a bit of parsing. But it's not that complex. btw - why do you want to do this?

matt

1 REPLY 1
Read only

matt
Active Contributor
0 Likes
689

You can go from function module name to function group using table TFDIR.

From the function group, e.g. ZMYFUNCGROUP, use READ REPORT to get the include LZMYFUNCGROUPUXX source code. This will give you the list of includes making up the function modules.

You can then use further calls to READ REPORT on these includes (like LZMYFUNCGROUPU01) to get the parameters.

You'll have to a bit of parsing. But it's not that complex. btw - why do you want to do this?

matt