01-30-2014 5:24 PM
Hello,
Someone Knows How to get the classnum of the material? I don't know what value should I put for the parameter of the BAPI BAPI_OBJCL_CREATE
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
OBJECTKEYNEW = class-object
OBJECTTABLENEW = class-objecttable
CLASSNUMNEW = ????
CLASSTYPENEW = class-classtype
TABLES
RETURN = returnmessages.
Thank you so much
01-30-2014 5:28 PM
Hi Enrique,
Table KLAH, field CLINT, should be the answer.
Thank you and bye,
Flavio
01-30-2014 5:32 PM
Hello,
I know the matnr, only with this data, how i can get the classnum in the tabla klah
thank you so much
01-30-2014 5:46 PM
Hi Enrique,
Then try with table KSSK, field OBJEK is the material number, and CLINT the class(es) internal number.
Hope it will solve the issue.
Thank you and bye,
Flavio
01-30-2014 6:27 PM
Hello Flavio,
I got the classnum, which is the field CLINT of the table KLAH.
"Classification
CLEAR class.
class-object = bapi_head-material.
class-objecttable = 'MARA'.
class-classnum = '5034'.
class-classtype = '001'.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
OBJECTKEYNEW = class-object
OBJECTTABLENEW = class-objecttable
CLASSNUMNEW = class-classnum
CLASSTYPENEW = class-classtype
TABLES
RETURN = returnmessages.
But I got the following message, could you help me please?
01-30-2014 6:32 PM
01-30-2014 6:38 PM
The bapi_objcl_create functions OK at last.
The problem is that doesn't appear the view for this material, what else do I have to do?
Thanks
01-30-2014 7:04 PM
do you know how can I assign material to class and char values at material level use with the bapi
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
OBJECTKEY = class-object
OBJECTTABLE = class-objecttable
CLASSNUM = class-classnum
CLASSTYPE = class-classtype
STATUS = '1'
* STANDARDCLASS =
* CHANGENUMBER =
KEYDATE = SY-DATUM
* NO_DEFAULT_VALUES = ' '
* IMPORTING
* CLASSIF_STATUS =
TABLES
ALLOCVALUESNUMNEW =
ALLOCVALUESCHARNEW =
ALLOCVALUESCURRNEW =
RETURN =
thanks
01-30-2014 8:40 PM
Hi Enrique,
I think you should try to pass the class-classnum with the leading zeroes, that is:
class-classnum = '000000000000005034'.
being type BAPI1003_KEY-CLASSNUM C(18)
Hope it will work.
Bye,
Flavio
01-30-2014 9:00 PM
01-30-2014 9:14 PM
Hi Enrique,
Well, no, I don't think so: 'ZPERU_TIPO_ARTÍCUL' is the class name (CLASS), class internal number is 5034 (CLINT), to be rendered with leading zeroes.
Give it a try and let me know.
Thank you and bye,
Flavio
01-30-2014 10:22 PM
it doesnt work, only works when i write 'ZPERU_TIPO_ARTÍCUL' , it says the class doesnt exist.
do you know what bapi do i have to use to enhance the material to other societies?
Thanks