on 10-13-2011 8:49 PM
I am implementing a Pre-Exit Enhancement for a method in a standard SAP delivered Web Dynpro Component. The method has 3 importing parameter, all specified as Optional.
In the Pre-Exit of the method, I am coding the sytax like below.
IF iv_suppress_warnings IS NOT SUPPLIED.
iv_suppress_warnings = abap_true.
ENDIF.
When I check the method, I am getting the syntax error:
The "IS SUPPLIED" query makes sense only for optional parameters.
Any idea why I am getting this error even though the parameter is marked as optional? Is this an SAP bug?
Thanks,
Aaron
Not necessarily a bug, more likely a side effect of the fact that you are in a Pre-Exit. With the Pre- and Post- exits what happends behind the scenes is that your logic is placed into a separate method of a local class and called from the original method. Therefore the method signature is "copied" from the original method and all parameters must be passed into the exit method. We don't really have access to the original parameters as they are defined, but instead as they are passed into the exit method. All parameters of the original method are passed into the exit method regardless of if they were supplied to the original method or not. Therefore IS_SUPPLIED and optional parameters become meaningless within the exit methods.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.