Skip to Content
0

generate Temp FM dynamically from existing FM

Oct 24, 2017 at 09:23 AM

54

avatar image

Hi all ,

I have an existing FM in which I need to change some of its code dynamically before calling it .

so is there is any way that I can change its code and store it in some temp FM and then call that temp FM ?

10 |10000 characters needed characters left characters exceeded

Why do you think you have to have self modifying code? What are you actually trying to achieve? It may be doable through other dynamic techniques.

1

I want to export variable that is will be only there in the FM ... the variable and the FM is run-time data so I need something generic .

0

Hi,

I still don't fully understand why in this case you need generated code. What is the functional requirement?

Kind regards, Rob Dielemans

0

Could you please explain more in details why you can't export the variable!?

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
ghadeer alsubsie Oct 26, 2017 at 11:35 AM
0

I solved my problem in these steps :

1- copying FM RS_FUNCTION_COPY

2- read copy FM into itab

3- change the code in the itab

4- INSERT REPORT <FM include name> ["L" + Function Group name + "U" + 01/02...] from itab

5- call my copy FM

6- delete copy FM using RS_FUNCTION_DELETE .

Share
10 |10000 characters needed characters left characters exceeded