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

Retrieving of Function Module parameters dynamically

gaurang_gujar
Contributor
0 Likes
3,581

There is a function module with import and export parameters, I need to pick up the complete structure of the Header Data using a select statement.

ex: Function Module with import paremeters I1, I2 ..... table parameters t1, t2 .....

Select from 'Z' table into var .....

result of this select query is var = 'I1'.

now there is a macro swc_set_element

1st parameter = itab

2nd parameter = var

now i need to generate 3rd parameter 'I1' dynamically which is an import parameter.

Edited by: Gaurang Gujar on May 2, 2011 8:04 AM

1 ACCEPTED SOLUTION
Read only

Kiran_Valluru
Active Contributor
0 Likes
1,854

Hi.,

Using Class CL_FB_FUNCTION_UTILITY u can get the Function Module Details.,

Check this Wiki., [Extracting FM details using Class|http://wiki.sdn.sap.com/wiki/display/ABAP/ExtractingFunctionModuleDetailsusingClass-+CL_FB_FUNCTION_UTILITY]

Also Check these Function Modules:

FUPARAREF

FUPARAREF_ENHA " Parameters of Function Modules

Hope this helps u.,

Thanks & Regards

Kiran

2 REPLIES 2
Read only

Kiran_Valluru
Active Contributor
0 Likes
1,855

Hi.,

Using Class CL_FB_FUNCTION_UTILITY u can get the Function Module Details.,

Check this Wiki., [Extracting FM details using Class|http://wiki.sdn.sap.com/wiki/display/ABAP/ExtractingFunctionModuleDetailsusingClass-+CL_FB_FUNCTION_UTILITY]

Also Check these Function Modules:

FUPARAREF

FUPARAREF_ENHA " Parameters of Function Modules

Hope this helps u.,

Thanks & Regards

Kiran

Read only

0 Likes
1,854

Hi Kiran the class u mentioned was very useful but dint serve my purpose .I have FM which has an Import Parameter HeaderData

and by firing a select query I m getting HeaderData as string in variable (Var ='HeaderData')Now is it possible to use import Parameter Headerdata based on content of this variable ? I dont want to mention import parameters dynamically based on the content of the variable Is this possible ?