on 06-22-2013 2:21 AM
Hi,
I have defined a function and the underlying Z table. I am using a Variant Configuration (VC) procedure to call this function. When I run the error check on the VC procedure, I get the error that the "Formal parameter xyz not valid for: <name of function module>.
In the code for the function module, I have defined it as follows. Am I missing something?
CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
EXPORTING
ARGUMENT = 'xyz'
IMPORTING
* VTYPE =
* sym_val =
NUM_VAL = F_XYZ
* IO_FLAG =
TABLES
QUERY = QUERY
EXCEPTIONS
ARG_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
RAISE INTERNAL_ERROR.
ENDIF.
Please help,
Nicky
Hi
As per the sap help user defined functions
From the variant configuration menu, choose Tools ® Function ® Create (cu65) provide xyz characteristic as input in characteristic tab.
for more details see the below link
http://help.sap.com/saphelp_470/helpdata/en/92/58c6aa417011d189ec0000e81ddfac/frameset.htm
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
There was a requirement to do some processing and then pass that processed value on to the VC screen. Given below is Function i used for the same. Hope it helps you.
FUNCTION ZFI_VC_VAS_SPCL_CODE .
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(GLOBALS) LIKE CUOV_00 STRUCTURE CUOV_00
*" TABLES
*" QUERY STRUCTURE CUOV_01
*" MATCH STRUCTURE CUOV_01
*" EXCEPTIONS
*" FAIL
*" INTERNAL_ERROR
*"--------------------------------------------------------------------
*----------------------------------------------------------------------*
* DATA DECLARATION *
*----------------------------------------------------------------------*
* Variable Definitions
DATA: lv_value LIKE cuov_01-atwrt,
lv_char LIKE cuov_01-atwrt.
* Constants Declaration
CONSTANTS: lc_std_vas TYPE cuov_01-varnam VALUE 'GD_STD_VAS',
lc_spl_vas TYPE cuov_01-varnam VALUE 'GD_SPECIAL_VAS',
lc_vtype TYPE cuov_01-atfor VALUE 'CHAR'.
*----------------------------------------------------------------------*
* DATA PROCESSING *
*----------------------------------------------------------------------*
* Concatenate all the VAS CODES in a string lv_char seperated by comma
*----------------------------------------------------------------------
* Get the Standard VAS (This characteristic will be filled by default)
*----------------------------------------------------------------------
* Get value of input characteristic STANDARD VAS
CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
EXPORTING
ARGUMENT = lc_std_vas "GD_STD_VAS
IMPORTING
SYM_VAL = lv_value
TABLES
QUERY = query
EXCEPTIONS
ARG_NOT_FOUND = 1.
IF SY-SUBRC <> 0.
RAISE internal_error.
ENDIF.
IF lv_value IS NOT INITIAL.
*----------------------------------------------------------------------
* Return VAS Code value to the VAS CODE Characteristics
*----------------------------------------------------------------------
* Add result to the table of output characteristics
CALL FUNCTION 'CUOV_SET_FUNCTION_ARGUMENT'
EXPORTING
argument = lc_spl_vas "GD_SPECIAL_VAS
vtype = lc_vtype "CHAR
sym_val = lv_char
TABLES
match = match
EXCEPTIONS
existing_value_replaced = 01.
IF SY-SUBRC <> 0.
RAISE internal_error.
ENDIF.
ENDIF.
ENDFUNCTION.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have checked the FM
the data element for 'xyz' is below.
you have to declare like below..
DATA : l_ARGUMENT LIKE CUOV_01-VARNAM default 'xyz'.
CALL FUNCTION 'CUOV_GET_FUNCTION_ARGUMENT'
EXPORTING
ARGUMENT = l_ARGUMENT
IMPORTING
* VTYPE =
* sym_val =
NUM_VAL = F_XYZ
* IO_FLAG =
TABLES
QUERY = QUERY
EXCEPTIONS
ARG_NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
RAISE INTERNAL_ERROR.
ENDIF.
Regards
Tejas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.