2009 Jul 06 8:38 AM
We have recently upgraded our SAP system. In one of our customized programs we are using the BAPI BAPI_OBJCL_CHANGE to update the characteristics of a batch. Class type is 023.
After the upgrade we get the below error::
Class type 023 is not defined for object 0000000030200023270000206979.
Here are the parameters that the calling program passed in the BAPI:
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = lv_objek
objecttable = 'MCH1'
classnum = gv_class
classtype = gv_klart
TABLES
allocvaluesnumnew = lt_num2
allocvaluescharnew = lt_char2
allocvaluescurrnew = lt_curr2
return = lt_ret2.
I check the BAPI_OBJCL_CHANGE, there is a validation added after the upgrade which returns the error message:
*check wether object and class/classtype fits together begin_1260633
value1 = classtype.
value2 = OBJECTKEY.
CALL FUNCTION 'CLCA_CHECK_CLASSTYPE'
EXPORTING
CLASSTYPE = classtype
OBTAB = objecttable
EXCEPTIONS
CLASSTYPE_NOT_FOUND = 1
INVALID_CLASSTYPE = 2
OTHERS = 3
.
IF SY-SUBRC = 1.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'CL'
number = '014' "CLASSTYPE_NOT_FOUND
par1 = value1
IMPORTING
return = return.
APPEND return.
exit.
ELSEIF SY-SUBRC = 2.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'CL'
number = '650' "INVALID_CLASSTYPE
par1 = value2
par2 = value1
IMPORTING
return = return.
APPEND return.
exit.
ENDIF. " end 1260633
Is there a way to correct this error? Is there OSS note to resolve this issue? Please help. Thanks.
2009 Jul 06 10:10 AM
We have recently upgraded our SAP system. In one of our customized programs we are using the BAPI BAPI_OBJCL_CHANGE to update the characteristics of a batch. Class type is 023.
After the upgrade we get the below error::
Class type 023 is not defined for object 0000000030200023270000206979.
Here are the parameters that the calling program passed in the BAPI:
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = lv_objek
objecttable = 'MCH1'
classnum = gv_class
classtype = gv_klart
TABLES
allocvaluesnumnew = lt_num2
allocvaluescharnew = lt_char2
allocvaluescurrnew = lt_curr2
return = lt_ret2.
I check the BAPI_OBJCL_CHANGE, there is a validation added after the upgrade which returns the error message:
*check wether object and class/classtype fits together begin_1260633
value1 = classtype.
value2 = OBJECTKEY.
CALL FUNCTION 'CLCA_CHECK_CLASSTYPE'
EXPORTING
CLASSTYPE = classtype
OBTAB = objecttable
EXCEPTIONS
CLASSTYPE_NOT_FOUND = 1
INVALID_CLASSTYPE = 2
OTHERS = 3
.
IF SY-SUBRC = 1.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'CL'
number = '014' "CLASSTYPE_NOT_FOUND
par1 = value1
IMPORTING
return = return.
APPEND return.
exit.
ELSEIF SY-SUBRC = 2.
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'E'
cl = 'CL'
number = '650' "INVALID_CLASSTYPE
par1 = value2
par2 = value1
IMPORTING
return = return.
APPEND return.
exit.
ENDIF. " end 1260633
Is there a way to correct this error? Is there OSS note to resolve this issue? Please help. Thanks.
2009 Jul 06 8:56 AM
Hi,
Is it because of the table MCH1?
For a material the table should be MARA i guess.
Regards,
Ankur Parab
2009 Jul 06 9:47 AM
Hello Ankur,
Thanks.Yes because of MCH1 table, the CLCA_CHECK_CLASSTYPE function module looks for MCHA because it is the value in TCLA table for class type 023. But the calling program pass MCH1 in the BAPI because the batch definition is that batch unique at material level.
regards,
Aida
2009 Jul 06 9:54 AM
Hi,
I think is the class type 023 exists??..Please do the change of the batch information in mSC2N and see if u rable to change the batch charcatristics....
You can also try FM 'BAPI_BATCH_sAVE_REPLICA' before try to change manuallly in mSC2N and see what your are getting.
Regards,
Nagaraj
2009 Jul 06 10:10 AM
2009 Jul 07 2:58 AM
2009 Jul 08 4:06 AM
2009 Jul 22 4:34 PM
Hello Aida,
just one question.
To which SAP release did you migrate to.
I see that the note is for Rel.7. I am on the way to 6 and I have the same problem ..
Best regards
FerdiM
2009 Sep 16 2:52 AM
Hello Ferdi,
It's Release 6.
Sorry for the late response._
Regards,
aida
2011 Mar 03 1:33 PM
thank you!!! after implementing note , all works perfectly!!!!!!
2011 Jul 29 10:05 AM
Hi Dzed,
I also facing nearly same kind of problem. the issue is we are manually entering the long text for characteristics. but after the execution of the above function module the text will updated into the table AUSP in the jumbled manner. ie., suppose my text formated to four lines then it is updated into the table AUSP with 4th line as 1st line and 3rd line as 2nd line etc...
can u guess what is the possible rot cause for this and resolution??
Thanks,
Sankar
Edited by: Shankar6688 on Jul 29, 2011 11:05 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |