How to write Dynamic Function Module
I have one requirement to dynamically create Remote enable function module.
I got one FM : FUNCTION_CREATE.
It create Function module but there is no provision to write coding for FM.
Thanks in Advance.
Ok though this is not recommended but you can try using INSERT REPORT to generate the code.
Something like INSERT REPORT prog FROM itab where prog is the FM include ( Normally "L" + Function Group name + "U" + 01/02... so on or do a search on table TFDIR to get the Count also ).
Check the F1 help for INSERT REPORT.
Please note insert report generates the code exactly the way you populate the internal table . So punctuation is important. Otherwise the FM will show as "Active" in SE37/SE80 but will not run because of syntax error.