cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MATERIAL CLASSIFICATION

asimsharmacs
Explorer
0 Likes
1,459

Hi,

While creating class , there is a select option --> same classification --> check with error .

When i select this option and assign this class to 2 to 3 material code with same value of all characteristics there is no error .

Pls let me know the use of this check with error . how we will restrict to user to not to create same classification of multiples material code.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

ajitkumar
Active Contributor
0 Likes

you assign the class to the materials, give all the characteristic values for one material; save. Then assign the same values and all of them , to the 2nd material. when you save you should get error C1818.

if not, may be you should check the characteristics with data type Char. it may need to be exactly similar.

asimsharmacs
Explorer
0 Likes

Hi Ajit,

all characteristics data type char only .  how to do the same .

ajitkumar
Active Contributor
0 Likes

Have you given values for this characteristics in the materials. if it is only for testing, keep values in a notepad and copy paste it to 2 materials in the material master classification tab. At the time of save you should get the error. It is working for me.

asimsharmacs
Explorer
0 Likes

Error is coming in Ides system but not in Dev . Is there any configuration need to be done ???

JL23
Active Contributor
0 Likes

there are some limitation with the check, they are listed in the documentation Check for Same Classification - Classification (CA-CL) - SAP Library

asimsharmacs
Explorer
0 Likes

Hi Jürgen ,

I got the solution , i feel there is error on SAP program due to Note 1229278 .

data: L_PRAUS like KLAH-PRAUS,                              "  1229278

         L_OBJ   like KSSK-OBJEK.                              "  1229278


L_praus value is assign in IF section not in else section  . and my data will go direct to else section where L_praus value is blank  so no error is appearing same has done through user exit .


if SY-SUBRC is initial.
delete COBJC_HELP where OBJ = COMO-OBJEK or OBJ is initial.

read table COBJC_HELP index 1.
if SY-SUBRC is initial.
case L_PRAUS.
when ' '.
L_PRAUS
= IKLAH-PRAUS.
L_OBJ  
= COBJC_HELP-OBJ.
when 'W'.
*             errors have a higher priority than warnings
if IKLAH-PRAUS = 'E'.
L_PRAUS
= IKLAH-PRAUS.
L_OBJ  
= COBJC_HELP-OBJ.
endif.
endcase.

append lines of COBJC_HELP to COBJC.
endif.
endif.                                                  "^ 1229278
ENDLOOP.

ELSE.


CALL FUNCTION 'CLSC_SELECT_SAME_OBJECT'
EXPORTING
IMP_KLAH        
= *KLAH
IMP_RELEASED    
= TCLC-STATU
key_date        
= f_date                         "H300487
IMP_OBJECT_ID   
= COMO-OBJID
TABLES
IMP_SELTAB      
= SEL
EXP_VALUES      
= CAUSP
EXP_OBJECTS     
= COBJC
EXCEPTIONS
NO_OBJECTS_FOUND
= 01.

ENDIF.
DELETE COBJC where OBJ is initial.                        "end_928424

endif.

*-- Bin ich selbst in der Tabelle, dann überflüssig -------------------
DELETE COBJC
WHERE OBJ EQ COMO-OBJEK.

DESCRIBE TABLE COBJC LINES SY-TMAXL.

*-- Ein Objekt mit gleicher Klassifizierung ---------------------------
IF SY-TMAXL EQ 1.
READ TABLE COBJC INDEX 1.

IF TCLA-KLART NE COMO-KLART.
SELECT SINGLE * FROM TCLA
WHERE KLART EQ COMO-KLART.
ENDIF.

CALL FUNCTION 'CLCV_CONV_EXIT'
EXPORTING
EX_OBJECT     
= L_OBJ                          "  1229278
TABLE          = TCLA-OBTAB
IMPORTING
IM_OBJECT     
= L_OBJ                          "  1229278
EXCEPTIONS
TCLO_NOT_FOUND
= 00.

CASE L_PRAUS.                                             "  1229278
WHEN 'E'.                        "ERROR
MESSAGE E818
WITH L_OBJ                                    "  1229278
RAISING ANOTHER_OBJECT.

WHEN 'W'.                        "WARNING
MESSAGE W818
WITH L_OBJ                                    "  1229278
RAISING ANOTHER_OBJECT.

ENDCASE.
ENDIF.


Answers (0)