on 07-24-2017 3:41 PM - last edited on 02-03-2024 10:27 PM by postmig_api_4
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.