cancel
Showing results for 
Search instead for 
Did you mean: 

Value for user-exit variable is invalid in (Customer exit variable on 0MATERIAL)

Former Member
0 Kudos

Hello Experts,

I have created a "multiple single Value" customer exit variable which references 0MATERIAL InfoObject. The purpose of this customer exit is to provide dynamic selection values for the MATNR selection for an InfoPackage on a customized DataSource getting data from the MKPF table containing materials.

The purpose of the code is to look at a Material group master data (ZMAT_GRP) info object's content and select all materials from 0MATERIAL that have these material groups.

The code for the Customer exit in ZXRSRU01 is as below

WHEN 'ZMATGRPTEST_CE'.
CLEAR : ls_mtype.
SELECT * FROM /BIC/PZMAT_GRP
INTO TABLE lt_zmatgrp1.


LOOP AT lt_zmatgrp INTO ls_zmatgrp.
ls_mtype-sign = 'I'.
ls_mtype-option = 'EQ'.
ls_mtype-low = ls_zmatgrp1-/BIC/ZMATGRP.
SHIFT ls_mtype-low LEFT DELETING LEADING '0'.
IF strlen( ls_mtype-low ) = 2.
CONCATENATE '00' ls_mtype-low INTO ls_mtype-low.
ELSEIF strlen( ls_mtype-low ) = 1.
CONCATENATE '000' ls_mtype-low INTO ls_mtype-low.
ELSEIF strlen( ls_mtype-low ) = 3.
CONCATENATE '0' ls_mtype-low INTO ls_mtype-low.
ENDIF.
APPEND ls_mtype TO lt_mtype.
ENDLOOP.


SELECT MATERIAL FROM /BI0/PMATERIAL INTO TABLE lt_material
WHERE objvers = 'A'
AND MATERIAL <> ' '
AND MATL_GROUP IN lt_mtype.

IF sy-subrc = 0.
SORT lt_material.
LOOP AT lt_material INTO ls_material.
ls_range-sign = 'I'.
ls_range-opt = 'EQ'.
ls_range-low = ls_material-material.
SHIFT ls_range-low LEFT DELETING LEADING '0'.
APPEND ls_range TO e_t_range.
ENDLOOP.
ENDIF.

When I run this customer exit, I get the error as below

Value "4711 " for user-exit variable ZMATGRPTEST_CE is invalid.

Could you please help me out with this issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

kohesco
Active Contributor
0 Kudos

Hi,

please check the S table of your infoobject for that value, if it exists try to use the same format as in that table

grtz

Koen