‎2010 Feb 18 11:17 AM
Hi,
I have the requirement that I have to call the Function Modules dynamcally in my program. i m creating 9 function modules in my developemt and I m maintaining all this function modules in one of the custom table I m creating whicth the part of development please help me.
Thanks&Regards
Uday Kiran
‎2010 Feb 18 12:07 PM
check
link:[Calling function modules dynamically|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-29]
‎2010 Feb 18 11:26 AM
SE38
CTRL+F8
Call function
press enter
select abap statement
READ.
It is all yes all explained in there on how to call a function module either with literal 'bladibla' or through a variable.
Kind regards, Rob Dielemans
‎2010 Feb 18 11:30 AM
Pass a variable as func name and this can be fileld from your custom table.
data: ld_funcname TYPE string.
call fundtion 'func_name'.
‎2010 Feb 18 11:38 AM
Hello guys,
I also thought this question credited a STFW
But a slight thought & i changed my mind. If the interface params for all the FMs in the custom table are same, then the question merits an STFW.
But what if the interface params are diff ? How do we handle this situation ?
BR,
Suhas
‎2010 Feb 18 12:04 PM
Hi Suhas,
what about declaring the signatures as reference types ?
‎2010 Feb 18 12:07 PM
>
> what about declaring the signatures as reference types ?
Hi Keshav,
Which means at the end of the day all the FMs need to have the same interface if i am not mistaken. Please correct me if i am wrong.
How the OP handles this depends on this business requirements.
BR,
Suhas
‎2010 Feb 18 12:29 PM
Hi Suhas,
The reference types will not be applicable as you said,
what i think is the abap_func_parmbind in type pool abap is use.
just by appending all the signatures into it
and the passing it to a fm created.
check the standard include LV69AF21, how the fm's PRICING_SUBSCREEN_PBO and PRICING_SUBSCREEN_PAI gets called.
The signatures in each fm are different.
‎2010 Feb 18 12:07 PM
check
link:[Calling function modules dynamically|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-29]
‎2010 Feb 18 12:15 PM
Hello Keshav,
But from which table you get the FM parameters. TFDIR does not help.
BR,
Suhas
PS: I may sound dumb, but i did not google / search in SDN. So please bear with my ignorance