Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to write Dynamic Function Module

Hi All,

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.

Kindly suggest...

Thanks in Advance.

Regards

Vivek

Former Member
Former Member replied

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 ).

Output:

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.

R

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question