2015 Jul 13 5:05 PM
I am trying to make a dynamic call of function, I am fetching data from fupararef table and making dynamic calls to functions using the below code
*-- Main call
CALL FUNCTION function
PARAMETER-TABLE ptab
EXCEPTION-TABLE etab.
In debug, when I hog into the function the import parameters are blank even though ptab table is filled correct.
The value is being passed as a ref to data. Not sure why the import parameters A and B are blank in the function( its a simple function to add a + b = c.
2015 Jul 13 9:30 PM
Parameter A and B should be passed as EXPORTING (ABAP_FUNC_EXPORTING = 10) in field KIND. I think you are passing that as IMPORTING (ABAP_FUNC_IMPORTING = 20). Parameter C should be IMPORTING (20).
Now, you may ask why it didn't raise an error as those parameter A and B are not defined as EXPORTING in the FM. The reason is - Dynamic FM call ignores all the parameters which don't exist. Read more at - ABAP Call FM Dynamically with Mystery Parameters! | ABAP Help Blog
Regards,
Naimesh Patel