on 01-09-2024 9:32 AM
Hi,
I have created an variant function accordingt to the blog https://blogs.sap.com/2015/05/31/variant-functions-with-an-example/
When i try to create the Dependency and call the Function Module in Procedure-Editor, I get the following Error:
E28021 Error: remaining part of expression cannot be interpreted (Line 10)
Sourcecode:
PFUNCTION Z_FM_VC_TEST
( GI_BR_TX = 12).
I don't understand what the problem is?
what have I done?
Step 1
Creation of the VC-Function and the Function Module of the same name Z_FM_VC_TEST using Transaction cu65/66
VC-Function:
assigned characteristics
Source code of Function Module
FUNCTION Z_FM_VC_TEST
IMPORTING
GLOBALS LIKE CUOV_00
TABLES
QUERY LIKE CUOV_01
MATCH LIKE CUOV_01
EXCEPTIONS
FAIL
INTERNAL_ERROR.
CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
EXPORTING argument = 'GI_BR_TX'
* IMPORTING
* vtype = " Value format
* sym_val = " Alphanumeric value
* num_val = " Numeric value
* io_flag = " Input/output parameter indicator
TABLES query = query " Table of input and output parameters
EXCEPTIONS arg_not_found = 1 " Parameter not found
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFUNCTION.
Step 2
Create Dependency Procedure using Transaction CU01.
Sorcecode
* set the default value if not given
$SET_DEFAULT ($SELF, GI_BR_TX, 1).
* PFUNCTION Z_FM_VC_TEST($ROOT).
* FUNCTION Z_FM_VC_TEST (
* GI_BR_TX = 12
* )
PFUNCTION Z_FM_VC_TEST
( GI_BR_TX = 12
).
I've tested
FUNCTION Z_FM_VC_TEST
and also
PFUNCTION Z_FM_VC_TEST
Thanks a lot.
Hi schneidermic,
actually, pfunction can be called without parameters, so this should work:
PFUNCTION ZFM_SD_VC_GET_CHARCTERISTIC().
hope this will fix the error
Thanks and bye,
Flavio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.