BAPI_OBJCL_CHANGE_KEY

Hi all,
i'm using BAPI_OBJCL_CHANGE_KEY to update customer classification class (type 011) for around 140k records in background......
when i saw the logs of the job, i found many clients for which BAPI returned "Assignment was not changed: Message CL738" and didnot update R/3.... out of curiosity when i ran my program just for failed customer again alone, it succeded.....
any one know why this dodgy BAPI doesn't update R/3 please ?
Thanks

Let me explain the entire scenario.
once a inspection lot is created it is sent to a different vendor for its usage decision. the usage decision comes back to us as a flat file and we have to update the batch characteristics.
if the interface wouldn't have been there the we would do it through MSC2N.
the steps are as follows:
Step1 - from transaction cor1 the process order is created
step2 - from cor2 process order
step3 - from cor6n, do the goods movement, give storage location and save
step4 - the interface work starts::
            we get the inspection lot number from the proxy structure for the batch. now we need to update the batch characteristics
            as we do in transaction MSC2N.
I need to use the Bapi here. now tell me how do i do that?

Similar Messages

  • BAPI_OBJCL_CHANGE_KEY : Random Behaviour

    Hi,
      I'm using BAPI_OBJCL_CHANGE_KEY to update the characteristics of the batch. My code sequence is as below:
    CALL FUNCTION 'BAPI_OBJCL_GET_KEY_OF_OBJECT'
        EXPORTING
          objectname     = gv_obj
          objecttable    = 'MCHA'
          classtype      = '022'
        IMPORTING
          clobjectkeyout = gv_objkey
        TABLES
          return         = it_return.
      READ TABLE it_return INTO wa_return WITH KEY type = 'S'.
      IF sy-subrc IS INITIAL
      AND NOT gv_objkey IS INITIAL.
        REFRESH it_return[].
        CALL FUNCTION 'BAPI_OBJCL_GETDETAIL_KEY'
          EXPORTING
            clobjectkey     = gv_objkey
            classnum        = 'ABC_DETAIL'
          TABLES
            allocvaluesnum  = it_allocvaluesnum1
            allocvalueschar = it_allocvalueschar1
            allocvaluescurr = it_allocvaluescurr1
            return          = it_return.
        READ TABLE it_return TRANSPORTING NO FIELDS WITH KEY type = 'S'.
        IF sy-subrc IS INITIAL.
          REFRESH it_return[].
    Modify characteristics & fill internal tables
    ---code
    CALL FUNCTION 'BAPI_OBJCL_CHANGE_KEY'
              EXPORTING
                clobjectkey         = gv_objkey
                classnum            = 'ABC_DETAIL'
              TABLES
                allocvaluesnum_new  = it_allocvaluesnum
                allocvalueschar_new = it_allocvalueschar
                allocvaluescurr_new = it_allocvaluescurr
                return              = it_return.
    READ TABLE it_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.
            IF NOT sy-subrc IS INITIAL.
         IF it_return[] IS INITIAL.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                EXPORTING
                  wait = 'X'.
    Now the problem if I execute the code directly then this BAPI doesn't work. If put a break-point & wait for almost 1 min or so
    then the BAPI does the changes. I though of putting a wait period as well. But it didnt work. Sometimes it works in debugging / sometimes not. Not able to understand the issue. Plz someone advise.

    you can pass this table ALLOCVALUESCHAR_NEW STRUCTURE  BAPI1003_ALLOC_VALUES_CHAR
    here you need to pass
    CHARACT                          ATNAM     CHAR     30     0     Characteristic Name
    VALUE_CHAR     ATWRT     CHAR     30     0     Characteristic Value
    CHARACT_DESCR     ATBEZ     CHAR     30     0     Characteristic description

  • BAPI_OBJCL_CHANGE_KEY AND OBJECT DEPENDENCY

    We use BAPI_OBJCL_CHANGE_KEY  in a class type 023 with object dependency.
    When we try to modify the characteristic which produces a new valuation in an other characteristic from the same object (material and batch) problems occurs. The system displays message C1821 or C1842 in certain circumstances.
    Thank you in advance.
    Soledad Olcina.

    Hey Chris,
    You cannot use the BAPI for class type 001, This BAPI can only be used with class types which have multiple objects enabled.
    For changing the characteristics of material try using  BAPI_OBJCL_CHANGE.
    Here the key of the object will be your material number

  • Batch Classification using BAPI_OBJCL_CHANGE_KEY

    in the bapi "BAPI_OBJCL_CHANGE_KEY" i need to update the batch classification. in the tables parameter, which one do i need to use? and what do i need to pass there. please tell me with an example

    you can pass this table ALLOCVALUESCHAR_NEW STRUCTURE  BAPI1003_ALLOC_VALUES_CHAR
    here you need to pass
    CHARACT                          ATNAM     CHAR     30     0     Characteristic Name
    VALUE_CHAR     ATWRT     CHAR     30     0     Characteristic Value
    CHARACT_DESCR     ATBEZ     CHAR     30     0     Characteristic description

  • No Batch through BAPI_BATCH_CREATE and BAPI_OBJCL_CHANGE_KEY

    Hi Guys
    Dont understand why cant I be able to create batch using BAPI_BATCH_CREATE  that has a corresponding object ID in table INOB. Subsequently I am trying to create the classification in that batch after creating it manually through MSC1N, still I am unable to get the classification done for that batch. However in both cases BAPI doesnt return any error. I am also doing BAPI_TRANSACTION_COMMIT after all the steps.
    Please somebody tell me what is wrong with these BAPIs or what is wrong with my approach to automatic batch creation with subsequent creation of its classification.
    Please help as its very urgent...
    Thanks a lot

    Yes I can create them by direct TCode.. but have no idea why these BAPIs are not working. I am using SE37 to test them. Would it be any different if it call them in a program.
    Please suggest me a way to solve it.
    Thanks a lot

  • FM for Material charateristric modify

    Hi,
      Is there any function module to modify the material master charateristic.
    Please let me know the procedure and sample code.

    Hi,
    Giving u All Bapis related to classification.Although u need BAPI_OBJCL_CHANGE
    BAPI_OBJCL_CHANGE              Classification BAPI: Change Assignment
    BAPI_OBJCL_CHANGE_KEY          Classification BAPI: Change Properties of Assignment (Key)
    BAPI_OBJCL_CONCATENATEKEY      Classification BAPI: Generate Concatenated Key
    BAPI_OBJCL_CONCATENATEKEY_KEY  Classification BAPI: Generate Concatenated Key (Key)
    BAPI_OBJCL_CREATE              Classification BAPI: Create Assignment
    BAPI_OBJCL_CREATE_KEY          BAPI for Classification: Create Assignment (Key)
    BAPI_OBJCL_DELETE              Classification BAPI: Delete Assignment
    BAPI_OBJCL_DELETE_KEY          Classification BAPI: Delete Assignment (Key)
    BAPI_OBJCL_EXISTENCECHECK      Classification BAPI: Check Existence of Classification
    BAPI_OBJCL_EXISTENCECHECK_KEY  Classification BAPI: Check Existence of a Classification (Key)
    BAPI_OBJCL_GETCLASSES          Classification BAPI: Classes for Object
    BAPI_OBJCL_GETCLASSES_KEY      Classification BAPI: Classes for Object (Key)
    BAPI_OBJCL_GETDETAIL           Classification BAPI: Read Classification Information on Object
    BAPI_OBJCL_GETDETAIL_KEY       Classification BAPI: Read Classification Information (Key)
    BAPI_OBJCL_GETOBJECTS          Classification BAPI: Find by Assignment
    BAPI_OBJCL_GETOBJECTS_KEY      Classification BAPI: Find Assignment (Key)
    BAPI_OBJCL_GETSTATUS           Classification BAPI: Classification Status of Object
    BAPI_OBJCL_GETSTATUS_KEY       Classification BAPI: Classification Status for Object (Key)
    BAPI_OBJCL_GET_KEY_OF_OBJECT   Classification BAPI: Key of Object
    BAPI_OBJCL_GET_OBJECT_OF_KEY   Classification BAPI: Object for Key
    BAPI_OBJCL_SPLITKEY            Classification BAPI: Decomposition of Concatenated Key
    BAPI_OBJCL_SPLITKEY_KEY        Classification BAPI: Decomposition of Concatenated Key

  • BAPI_OBJCL_GET_KEY_OF_OBJECT - Class type 001 requires additional objects

    ABAP'ers
    I am trying to use BAPI's to complete class assignments (mimicking CL20N). 
    I am using BAPI_OBJCL_GET_KEY_OF_OBJECT to get the internal object key that is needed for BAPI_OBJCL_CHANGE_KEY, which I am using to complete the classification.
    When I execute BAPI_OBJCL_GET_KEY_OF_OBJECT for class type 002 I get the internal key needed for the second BAPI.
    When I execute the same BAPI for class type 001 I get the following error:
    "CL669 - Class type 001 requires additional objects"
    I have seen other posts on the forums on how to do this for class type 023, but I need to complete this for class type 001. 
    What are the additional objects needed? 
    Can I use this feature if a material HAS NOT been extended to a plant or storage location?
    I have looked in table INOB and there are no entys for this class type - is this normal?  Is there something that I am missing?
    I have already tried internal and external values, concatenating with the client number and plant number but still get the same error.

    Hey Chris,
    You cannot use the BAPI for class type 001, This BAPI can only be used with class types which have multiple objects enabled.
    For changing the characteristics of material try using  BAPI_OBJCL_CHANGE.
    Here the key of the object will be your material number

  • How to use LSMW in CL20N

    Hello! I'm a begginer in SAP and I really need help.
    I saw a lot of threads about this subject and, apparently, the solution is to use one of the following BAPIs (I'm not sure which one):
    BAPI_OBJCL_CREATE
    BAPI_OBJCL_CREATE_KEY
    BAPI_OBJCL_CHANGE
    BAPI_OBJCL_CHANGE_KEY
    OK, but how do I use it? I don't even know where to start.
    I'm sorry for my lack of knowledge.
    Can anyone help me?

    The below document on SCN by Ravi Sankar Venna
    LSMW for Functional Consultants in simple step-by-step way
    is the best help on LSMM. I have been using this in so many of my projects including roll outs, Support and implementation.
    Regards
    Sanil Bhandari

  • LSMW for MB1C with Batch & Characterstic

    Dear All,
    I want to upload the initial stock with movement type 561.My materials are Batch Managed and the Batch are having certain Characterstic.So i want to upload the Stock with Batch Characterstic.This is not possible with recording in LSMW.Can anybody help me out in making the LSMW.
    Thanks
    Jagmohan

    Try this code
    REPORT zosmm_carga_caract_lote NO STANDARD PAGE HEADING LINE-SIZE 100.
    Global Parameters
    DATA: BEGIN OF t_message OCCURS 0.
    INCLUDE STRUCTURE bapiret2.
    DATA: END OF t_message.
    DATA: BEGIN OF t_archivo OCCURS 0,
    lineas(42),
    END OF t_archivo.
    DATA: BEGIN OF t_carga OCCURS 0,
    charg(10),
    valor(30),
    END OF t_carga.
    DATA: BEGIN OF t_caract OCCURS 40,
    atnam LIKE cabn-atnam,
    atinn LIKE cabn-atinn,
    atfor LIKE cabn-atfor,
    anzst LIKE cabn-anzst,
    END OF t_caract.
    BAPI structures
    DATA: BEGIN OF wa_allocvaluescharnew OCCURS 0.
    INCLUDE STRUCTURE bapi1003_alloc_values_char.
    DATA: END OF wa_allocvaluescharnew.
    DATA: BEGIN OF wa_allocvaluesnumnew OCCURS 0.
    INCLUDE STRUCTURE bapi1003_alloc_values_num.
    DATA: END OF wa_allocvaluesnumnew.
    DATA: BEGIN OF wa_allocvaluescurrnew OCCURS 0.
    INCLUDE STRUCTURE bapi1003_alloc_values_curr.
    DATA: END OF wa_allocvaluescurrnew.
    Variables
    DATA: lineas TYPE i,
    w_rc LIKE sy-subrc,
    mens LIKE message,
    date_err(1) TYPE c,
    swc(1).
    DATA: c_totreg(6),
    c_vanreg(6).
    DATA: v_atinn LIKE cabn-atinn,
    v_atfor LIKE cabn-atfor,
    v_anzst LIKE cabn-anzst.
    SELECTION-SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK uno WITH FRAME TITLE text-001.
    PARAMETER: p_matnr LIKE mara-matnr OBLIGATORY,
    p_atnam LIKE cabn-atnam OBLIGATORY.
    PARAMETER: p_file LIKE rlgrap-filename OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK uno.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    PERFORM buscar_archivo USING p_file.
    START-OF-SELECTION.
    START-OF-SELECTION.
    REFRESH: t_archivo, t_carga, t_caract.
    *** Characteristics Values
    SELECT SINGLE atinn atfor anzst
    INTO (v_atinn, v_atfor, v_anzst)
    FROM cabn
    WHERE atnam = p_atnam.
    IF sy-subrc NE 0.
    MESSAGE i899(m3) WITH 'Not Valid Characteritics'.
    ELSE.
    *** Read input and upload
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = p_file
    filetype = 'ASC'
    TABLES
    data_tab = t_archivo
    EXCEPTIONS
    conversion_error = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    OTHERS = 7.
    IF sy-subrc EQ 0.
    LOOP AT t_archivo.
    CLEAR t_carga.
    SPLIT t_archivo AT ';'
    INTO t_carga-charg t_carga-valor.
    APPEND t_carga.
    ENDLOOP.
    DESCRIBE TABLE t_carga LINES lineas.
    IF lineas > 0.
    PERFORM clasificar_lotes.
    ELSE.
    MESSAGE i899(m3) WITH 'Doesn't exist batch to process'.
    ENDIF.
    ELSE.
    MESSAGE i899(m3) WITH 'Error on upload'.
    ENDIF.
    ENDIF.
    TOP-OF-PAGE
    TOP-OF-PAGE.
    WRITE: /'TITLE', sy-datum, sy-uname NO-GAP.
    WRITE: /'Material: ', p_matnr.
    WRITE: /'Characteristics: ', p_atnam.
    SKIP.
    WRITE: 01 'Batch', 11 'Valor', 30 'Log'.
    ULINE.
    *& Form clasificar_lotes
    FORM clasificar_lotes.
    DATA: w_matnr LIKE mara-matnr,
    w_cuobjbm LIKE mch1-cuobj_bm,
    w_obtab LIKE inob-obtab,
    w_objek LIKE inob-objek,
    w_class LIKE klah-class,
    w_clint LIKE kssk-clint,
    w_valor(8),
    w_mbapi(80),
    logline(100).
    CLEAR: t_message.
    LOOP AT t_carga WHERE charg IS NOT INITIAL.
    REFRESH: wa_allocvaluescharnew,
    wa_allocvaluesnumnew,
    wa_allocvaluescurrnew.
    CLEAR: wa_allocvaluescharnew,
    wa_allocvaluesnumnew,
    wa_allocvaluescurrnew,
    date_err,
    w_mbapi,
    logline.
    CONCATENATE t_carga-charg t_carga-valor
    INTO logline SEPARATED BY space.
    *** Find object to classified
    SELECT SINGLE cuobj_bm matnr
    INTO (w_cuobjbm, w_matnr)
    FROM mch1
    WHERE charg = t_carga-charg
    AND matnr = p_matnr.
    IF sy-subrc EQ 0.
    SELECT SINGLE obtab objek
    INTO (w_obtab,w_objek)
    FROM inob
    WHERE cuobj = w_cuobjbm.
    *** Find class from object
    SELECT SINGLE clint INTO w_clint
    FROM kssk
    WHERE objek = w_cuobjbm
    AND mafid = 'O'
    AND klart = '023'.
    IF sy-subrc = 0.
    SELECT SINGLE class INTO w_class
    FROM klah
    WHERE clint = w_clint.
    TRANSLATE t_carga-valor USING ',.'.
    CONDENSE t_carga-valor.
    CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
    EXPORTING
    objectkey = w_objek
    objecttable = 'MCH1'
    classnum = w_class
    classtype = '023'
    KEYDATE = SY-DATUM
    UNVALUATED_CHARS = ' '
    language = sy-langu
    IMPORTING
    STATUS =
    STANDARDCLASS =
    TABLES
    allocvaluesnum = wa_allocvaluesnumnew
    allocvalueschar = wa_allocvaluescharnew
    allocvaluescurr = wa_allocvaluescurrnew
    return = t_message.
    *** Define characteristics type
    CASE v_atfor.
    WHEN 'CHAR' OR 'BOOL'.
    wa_allocvaluescharnew-charact = p_atnam.
    wa_allocvaluescharnew-value_char = t_carga-valor.
    APPEND wa_allocvaluescharnew.
    LOOP AT wa_allocvaluescharnew WHERE charact = p_atnam.
    wa_allocvaluescharnew-value_char = t_carga-valor.
    wa_allocvaluescharnew-value_neutral = t_carga-valor.
    MODIFY wa_allocvaluescharnew.
    ENDLOOP.
    WHEN 'NUM' OR 'TIME'.
    wa_allocvaluesnumnew-charact = p_atnam.
    wa_allocvaluesnumnew-value_from = t_carga-valor.
    APPEND wa_allocvaluesnumnew.
    LOOP AT wa_allocvaluesnumnew WHERE charact = p_atnam.
    wa_allocvaluesnumnew-value_from = t_carga-valor.
    wa_allocvaluesnumnew-value_from = t_carga-valor.
    MODIFY wa_allocvaluesnumnew.
    ENDLOOP.
    WHEN 'DATE'.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
    EXPORTING
    datum = t_carga-valor
    dtype = 'DATS'
    IMPORTING
    error = date_err
    idate = w_valor
    messg = mens.
    IF date_err = 'X'.
    CONCATENATE logline '-> Error: Fecha no valida'
    INTO logline SEPARATED BY space.
    ENDIF.
    wa_allocvaluesnumnew-charact = p_atnam.
    wa_allocvaluesnumnew-value_from = w_valor.
    APPEND wa_allocvaluesnumnew.
    LOOP AT wa_allocvaluesnumnew WHERE charact = p_atnam.
    wa_allocvaluesnumnew-value_from = w_valor.
    MODIFY wa_allocvaluesnumnew.
    ENDLOOP.
    WHEN 'CURR'.
    wa_allocvaluescurrnew-charact = p_atnam.
    wa_allocvaluescurrnew-value_from = t_carga-valor.
    APPEND wa_allocvaluescurrnew.
    LOOP AT wa_allocvaluescurrnew WHERE charact = p_atnam.
    wa_allocvaluescurrnew-value_from = t_carga-valor.
    MODIFY wa_allocvaluescurrnew.
    ENDLOOP.
    ENDCASE.
    IF date_err IS INITIAL.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> by AGARCIA
    CALL FUNCTION 'BAPI_OBJCL_CHANGE_KEY'
    CALL FUNCTION 'BAPI_OBJCL_CHANGE'
    EXPORTING
    objectkey = w_objek
    objecttable = 'MCH1'
    classnum = w_class
    classtype = '023'
    status = '1'
    TABLES
    allocvaluesnumnew = wa_allocvaluesnumnew
    allocvaluescharnew = wa_allocvaluescharnew
    allocvaluescurrnew = wa_allocvaluescurrnew
    return = t_message.
    IF sy-subrc EQ 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    LOOP AT t_message WHERE type CO 'EA'.
    CONCATENATE w_mbapi t_message-message ';'
    INTO w_mbapi SEPARATED BY space.
    ENDLOOP.
    IF w_mbapi IS INITIAL.
    CONCATENATE logline '-> Ok!' INTO logline SEPARATED BY space.
    ELSE.
    CONCATENATE logline '-> Error:' w_mbapi
    INTO logline SEPARATED BY space.
    ENDIF.
    ELSE.
    CONCATENATE logline '-> Error: Problem on BAPI Execution
    INTO logline SEPARATED BY space.
    ENDIF.
    ENDIF.
    ELSE.
    CONCATENATE logline '-> Error: Class object don't found'.
    INTO logline SEPARATED BY space.
    ENDIF.
    ELSE.
    CONCATENATE logline '-> Error: Class object don't found'.
    INTO logline SEPARATED BY space.
    ENDIF.
    WRITE: / logline.
    ENDLOOP.
    WRITE: / '>>>>>>>>>> FIN DEL PROCESO <<<<<<<<<<'.
    ENDFORM. " clasificar_lotes
    Form buscar_archivo
    Muestra el diálogo para seleccionar el archivo
    +----
    FORM buscar_archivo CHANGING ie_arch.
    DATA: v_file1 LIKE dynpread-fieldname,
    v_file2 LIKE ibipparms-path.
    v_file1 = ie_arch.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    field_name = v_file1
    IMPORTING
    file_name = v_file2.
    ie_arch = v_file2.
    ENDFORM. " BUSCAR_ARCHIVO

  • MBCFC004 problem with updation of batch characteristics

    hi,
    I am facing a problem in updattion of batch charactristics using exit MBCFC004.. EXIT_SAPMM07M_004 
    in user exit interface EXIT_SAPMM07M_004 there is one table parameter 'Values' which is used to update batch characteristics.
         i am able to add characteristics values but not able to delete or change batch characteristics.
    please help

    Class type 023 is classified as a type which allows multiple object types.
    For this class you may have to use 'BAPI_OBJCL_CHANGE_KEY' (check out its code).
    The key relationships for such class types are maintained in table INOB and can be fetched  using the BAPI 'BAPI_OBJCL_GET_KEY_OF_OBJECT' .
    Hope this helps.
    Thanks and Regards,
    Srihari

  • Uploading Funcational location classification data

    Hi All,
    I have a requirement in which I have to update Functional locations with classification data. This will be an inbound interface which will update Functional location classification from the data in the file. This file will be having Functional Location, Class, Characteristic & Value. We just need to read the file and change the characteristic values of that particular class in that particular FLoc.
    I am using BAPI_OBJCL_CHANGE_KEY to update this data. And here lies the problem. This bapi is not updating the data. Although it is returning 'S' message "Assignment updated". But it is actually not updating.
    I am sure that I am providing right data to the bapi. Before this I am also executing BAPI_OBJCL_GET_KEY_OF_OBJECT to get the object key (for Functional location).
    I have even tried direct input porgram. This program has all relevant structures, but that is also not working. I am sure that there is some configuration issue that is holding me. I have also checked IMG, to my knowledge it seems to be ok, but there is something MISSING !!
    Can anyone share his/her experience with similar scenarios ? Can any one help me out of this ?
    Thanks & Regards
    Kapil

    Do you commit after your BAPI call?
           CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                WAIT = 'X'.
    I hope this helps.
    - Vijay

  • BAPI for Allocating Object to Class

    Hi all Experts,
    Pls help in how to use the following BAPIs.
    BAPI_OBJCL_CREATE_KEY
    BAPI_OBJCL_CHANGE_KEY
    OR else provide me any other BAPI avaliable for Allocating Object to Class in MASS Processing / Single Entries.
    Regards
    Nagarajan M

    Hello,
    have a look at the following thread. There're some function modules that should fit to your requirements:
    BAPI for CL24N
    Best regards
    Stephan

  • BAPI for CL24N trnsaction

    Hi,
    I have to change the value of a particular Release Strategy class character in the CL24N transaction. as it is an enjoy transaction i cannot proceed with BDC and CL24 transaction is outdated. so i need a BAPI through which i can change the value. i have tried using BAPI_OBJCL_CHANGE_KEY entering all the data in it but the only problem i am facing in this is that i am not able to understand what is the CLOBJECTKEY value that i have to enter because i am not using any material number, i am changing the value of a release strategy class character value.
    i need any other BAPI for this requirement or else if any one can say what is the value that i have to pass in the CLOBJECTKEY field of the FM.
    Thanks and Regards,
    M.phanindra

    HI
    Pls. check this thread :- Batch Classification using BAPI_OBJCL_CHANGE_KEY

  • Change Material Characteristics

    Dear All,
    My requirement: Need to change material characteristics through a BDC or BAPI.
    thru BDC, it is not allowing to change from the tcode mm02/mm42, don't have an idea BAPI for changing material Characteristics.
    Thanks,
    Ravi

    Characteristics are part of Classification system, so you would not find a specific BAPI for material characteristic maintenance. Use the below function to update characteristics of any classification relevant object including materials.
    CLOBJECTKEY is Class type value that you see when you select Classification view in Materiam master MM03. Play around with it comparing its interface with MM03 classification.
    Also classification can be accessed Sap Menu -> Cross application components -> Classification system
    CALL FUNCTION 'BAPI_OBJCL_CHANGE_KEY'
      EXPORTING
        CLOBJECTKEY               =
        CLASSNUM                  =
    *   STATUS_NEW                = '1'
    *   STANDARDCLASS_NEW         =
    *   CHANGENUMBER              =
    *   KEYDATE                   = SY-DATUM
    *   NO_DEFAULT_VALUES         =
    * IMPORTING
    *   CLASSIF_STATUS            =
      TABLES
        ALLOCVALUESNUM_NEW        =
        ALLOCVALUESCHAR_NEW       =
        ALLOCVALUESCURR_NEW       =
        RETURN                    =

Maybe you are looking for