cancel
Showing results for 
Search instead for 
Did you mean: 

Variant configuration call Funktion - E28021 Error

schneidermi
Explorer
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Flavio
Active Contributor
0 Kudos

Hi schneidermic,

at the end of the procedure first line, replace the dot with a comma, like this:


$SET_DEFAULT ($SELF, GI_BR_TX, 1),

hope this will work

Flavio

Answers (3)

Answers (3)

schneidermi
Explorer
0 Kudos

Hi flavio.ciotola3,

thanks a lot for your support. I have now found the solution.
In Transaction CU66, if some characteristics are assigned for the function, you have to specify them in the PFUNCTION Call dependency.

Now i remove the Input Parameter of the assigned characteristics an it works.

That was the Problem.

Greets Michael

Flavio
Active Contributor
0 Kudos

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

schneidermi
Explorer
0 Kudos

Hi flavio.ciotola3,

yes it works. 🙂 Thanks a lot.

What a stupid Error.

This function module was meant for testing. No, I am trying to use another function module that should be used. Only when I change the FM name, I get the following error:

E28024 Syntax error in simple action/procedure (Line 10)
E28126 Required formal parameter missing for inference in ZFM_SD_VC_GET_CHARCTERISTIC (Line 10)<br>

The source code of the two function modules is the same. Only the develop package is different.

Any suggestion?

The difference between these two function modules lies in the number of characteristics. all characteristics must be transferred in full?

Thank you very much!

* 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  ZFM_SD_VC_GET_CHARCTERISTIC
( GI_BR_TX = 12
 ).