Dynamic FM call with extra parameter.
Consider the scenario in your development, you are reusing a standard FM in your program which is having 2 mandatory import parameters . And you shipped the solution to the customer. Now same FM in the customer system is having one more additional mandatory importing parameter. Now when your program runs and that calls the FM the dump appears in customer system. How to resolve this issue. This can be done by calling the FM dynamically with extra parameter that is not in your system but it is there in customer system. The below post tries to show the same.
The FM ‘FPM_DEMO_FLIGHT_GET_CARRIER’ having below details as one import and one export parameter.
Simple way of calling the FM.
Output of program.
In the simple call pass one more parameter like CONNID which is not declared as a import parameter in the FM definition.
No activation error of the program but once you execute below error appears.
Trying a dynamic call to the FM without any additional parameter.
With dynamic FM call, added other parameter which is not there in the FM definition.
Imagine in your system CONNID parameter is not defined, but the FM call works fine without any error but if it is defined in the FM then surely there would not be any dump.
Here is the output without any dump.