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

Similar Messages

  • Create batch classification using FM VB_CREATE_BATCH

    Hi Experts,
    Here is my situation, some of the batch dose not have classificatioin when displaying using MSC3N, so I have to create the classification of the batch in my program.
    I have a test of using FM VB_CREATE_BATCH , I execute FM VB_CREATE_BATCH directly in SE37 and the result is successfully and in the return table of YMCHA, the CUOBJ_BM has value filled.
    Then I go to table INOB using the CUOBJ_BM for selection, but no result exits in the table.
    It seems the classification of the batch dose not created.
    What else should I do ?
    Please give me some advice.
    Thanks for your time.
    Kiki

    Dear Use below code :
    I mean Use BAPI.
    it_object-key_field = 'MATNR'.
       it_object-value_int = wa_tab-matnr.
       APPEND it_object.
       it_object-key_field = 'WERKS'.
       it_object-value_int = wa_tab-werks.
       APPEND it_object.
       it_object-key_field = 'CHARG'.
       it_object-value_int = wa_tab-charg.
       APPEND it_object.
    build the object key
       CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
         EXPORTING
           objecttable    = w_obtab
         IMPORTING
           objectkey_conc = w_object
         TABLES
           objectkeytable = it_object
           return         = rettab.
    extract the original characteristic data if exists
       CLEAR:  numtab, chatab, curtab, rettab.
       REFRESH:  numtab, chatab, curtab, rettab.
       CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
         EXPORTING
           objectkey       = w_object
           objecttable     = w_obtab
           classnum        = class
           classtype       = klart
         TABLES
           allocvaluesnum  = numtab
           allocvalueschar = chatab
           allocvaluescurr = curtab
           return          = rettab.
    *Change your characteristics here.
      CALL FUNCTION 'BAPI_OBJCL_CHANGE'
         EXPORTING
           objectkey          = w_object
           objecttable        = w_obtab
           classnum           = class
           classtype          = klart
         TABLES
           allocvaluesnumnew  = numtab
           allocvaluescharnew = chatab
           allocvaluescurrnew = curtab
           return             = rettab.
       LOOP AT rettab WHERE type = 'E' OR type = 'A'.
         PERFORM update_error_tab USING rettab-message ' ' wa_tab-matnr wa_tab-charg.
       ENDLOOP.
    if sy-subrc <> 0.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    endif.

  • Want to find out how a batch classification is used

    Hello
    I have previously sent out a message and the idea given was not very helpful.
    Anyway, this is my question:
    I have found a class and its characteristic which was setup in the system and I would like to know how this classification` is being use in the system.
    For example, I would like to know which process (i.e. during goods receipt, during sales order creation, during production, during warehouse) is using this classification to perform their transaction.
    Do you know how to find out this kind of information in the SAP system?
    Thanks
    Tuff

    Do you want to know how the batch classification is used in general in SAP or how it is used in the system where you found it?
    In the latter case make an interview with the users, any process that has to do with stock can make use of the batch classification
    In general is classification exact what the word "classification" means. You describe something in more detail in an organized way. Classification is a modification free way to add own "fields" to standard objects, the user can immediately search  in classification without an extra effort to develop a search help.
    The batch classification can be used in a batch determination to to enable SAP to automatically search for batches with certain characteristics.and assign them to documents like sales order, delivery, goods movements, transfer orders, and production/process orders.

  • Batch classification during GR against production order using txn MIGO

    Hello All
           I am usng batch classification during for movement type 101, when am doing the GR against production order using txn MB31 the system automatically navigates to classification screen wherein i need to enter the characterstic value & it all goes well, I can also view the stock with batch no and the classifcation value when the GR is being done with txn MB1.
          But when am dong the same thing i.e. GR against production order using txn MIGO system doesnt navigates to classification screen for characterstic value entry and am able to do the posting. I want that system must navigate to classification screen automatically if i do the GR using MIGO also as it doen in the case of txn MB31.
           Please suggest what settings are to be done for the same, I am unable to figure out why the system is behaving in this manner. Kindly provide your inputs to sort out this issue. Waiting for your valuable inputs.
    Regards,
    J K Tharwani

    Dear,
    did u refer SAP Note 519303 ?
    After keeping Batch Classification as 4 in OMCV, in MIGO, it will start showing the Batch Classification button under "Batch" Tab, it will not show the Batch Classification Pop-up automatically as it shows in case of MB31.
    If you wan users to enter the characteristics values mandatorily in the Batch Classification then in CT04 for these characteristics activate Entry required indicator in "Basic Data" Tab
    SAP Note 519303
    Please refer this also,
    [MIGO|Re: How can I get the MRP history?]
    Regards,
    R.Brahmankar

  • Batch Classification Values not getting changed

    Hi Gurus,
    I am using the following bapi ( BAPI_OBJCL_CHANGE ) to change Batch classification values Eg: Cut clarity etc.
    when i pass these values thru the function module in the program it is not getting changed while when i change it through msc2n it gets changed successfully...
    I have passed the following values in the parameters of the bapi :
    OBJECTKEY            = v_objectkey          
    OBJECTTABLE        = 'MCH1'          
    CLASSNUM             = V_CLASSNUM 
    CLASSTYPE           = '023'
    KEYDATE                = 30.04.2010
    ALLOCVALUESCHARNEW
    CHARACT = CLARITY
    VALUE_CHAR =  P040
    VALUE_NEW   = P040.
    Can some one help me solve this....
    Needed urgently..
    Edited by: NAVIN FERNANDES on Apr 30, 2010 12:31 PM
    Edited by: NAVIN FERNANDES on Apr 30, 2010 12:32 PM

    Hi Jacky,
    I am posting the code here.. Do let me know if u have ne queries:
    REPORT  ZNAVBATCH.
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS: P_MATNR TYPE MATNR,
                P_CHARG TYPE CHARG_D,
                P_WERKS TYPE WERKS_D,
                P_LGORT TYPE LGORT_D.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      DATA: WA_BATCH TYPE BAPI1003_OBJECT_KEYS,
            WA_ALLOCCHAR TYPE BAPI1003_ALLOC_VALUES_CHAR,
            WA_ALLOCVAL TYPE BAPI1003_ALLOC_VALUES_NUM,
            INT_BATCH TYPE STANDARD TABLE OF BAPI1003_OBJECT_KEYS,
            INT_RET1 TYPE STANDARD TABLE OF BAPIRET2,
            INT_RET2 TYPE STANDARD TABLE OF BAPIRET2,
            INT_RET3 TYPE STANDARD TABLE OF BAPIRET2,
            LV_KEY TYPE BAPI1003_KEY-OBJECT,
            INT_ALLOCVAL TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_NUM,
            INT_ALLOCCHAR TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CHAR,
            INT_ALLOCCURR TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CURR.
      WA_BATCH-KEY_FIELD = 'MATNR'.
      WA_BATCH-VALUE_INT = P_MATNR.
      APPEND WA_BATCH TO INT_BATCH.
      WA_BATCH-KEY_FIELD = 'CHARG'.
      WA_BATCH-VALUE_INT = P_CHARG.
      APPEND WA_BATCH TO INT_BATCH.
      CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
        EXPORTING
          OBJECTTABLE    = 'MCH1'
        IMPORTING
          OBJECTKEY_CONC = LV_KEY
        TABLES
          OBJECTKEYTABLE = INT_BATCH
          RETURN         = INT_RET1.
      IF SY-SUBRC = 0.
       WRITE: 'SUCCESSFUL'.
        CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
          EXPORTING
            OBJECTKEY              = LV_KEY
            OBJECTTABLE            = 'MCH1'
            CLASSNUM               = 'ZTBATCHCHR'
            CLASSTYPE              = '023'
            KEYDATE                = SY-DATUM
          UNVALUATED_CHARS       = ' '
          LANGUAGE               = SY-LANGU
        IMPORTING
          STATUS                 =
          STANDARDCLASS          =
          TABLES
            ALLOCVALUESNUM         = INT_ALLOCVAL
            ALLOCVALUESCHAR        = INT_ALLOCCHAR
            ALLOCVALUESCURR        = INT_ALLOCCURR
            RETURN                 = INT_RET2
        IF SY-SUBRC = 0.
          WRITE : 'SUCCESSFUL'.
          READ TABLE INT_ALLOCCHAR INTO WA_ALLOCCHAR WITH KEY CHARACT = 'CLARITY'.
          IF SY-SUBRC = 0.
            WA_ALLOCCHAR-VALUE_CHAR = 'C02'.
            WA_ALLOCCHAR-VALUE_NEUTRAL = 'C02'.
            MODIFY INT_ALLOCCHAR FROM WA_ALLOCCHAR INDEX SY-TABIX TRANSPORTING VALUE_CHAR VALUE_NEUTRAL.
          ENDIF.
          CALL FUNCTION 'BAPI_OBJCL_CHANGE'
            EXPORTING
              OBJECTKEY                = LV_KEY
              OBJECTTABLE              = 'MCH1'
              CLASSNUM                 = 'ZTBATCHCHR'
              CLASSTYPE                = '023'
             STATUS                   = '1'
             STANDARDCLASS            =
             CHANGENUMBER             =
             KEYDATE                  = SY-DATUM
             NO_DEFAULT_VALUES        = ' '
           IMPORTING
             CLASSIF_STATUS           =
            TABLES
              ALLOCVALUESNUMNEW        = INT_ALLOCVAL
              ALLOCVALUESCHARNEW       = INT_ALLOCCHAR
              ALLOCVALUESCURRNEW       = INT_ALLOCCURR
              RETURN                   = INT_RET3
          IF SY-SUBRC = 0.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
             EXPORTING
               WAIT          = 'X'
            IMPORTING
              RETURN        =
            IF SY-SUBRC = 0.
              WRITE: 'SUCCESSFUL'.
            ENDIF.
          ENDIF.
        ENDIF.
    ENDIF.

  • Need a bapi r  fn module to update the batch classification in the bom

    hi,
    iam working a exit : exit_saplcoml_001.This exit is for material quantity calculation.the materials are currently classified in the material master under the classification tab.Ans due to this the classification becomes cross plant.
    To make the material classification plant specific i have decided to maintain the classification in the batch classification of bom.i am finding for a function module r a bapi to update the calculated values in to the batch classification characteristics.please help mi with this.
    thanks.

    Hi
    U can try to use BAPI_MATERIAL_SAVEREPLICA
    Max

  • Copy batch classification in GR (101)

    Dear gurus,
    Could you please help me with the following issue.
    I have a material managed in batches, and it has a classification type 023 in material master.
    Now I want the class (with all characteristics) to be copied to the batch classification during the good reciept (MIGO / 101).
    How it's possible?
    When i go to the batch generated in migo (101) using T-code MSC2N, there is one icone in Classification-tab "Create classification". and i can do it manually. how can we do this automatically in GR (101).
    Thanks in advance.

    Hi,
    Check for that movement type in OMJJ in Entry control tab where there is field called  classification batch, check what is defined for that movement type.
    Regards
    Ravi Shankar.

  • Batch classification "Date of last goods receipt" is "00.00.0000"

    Dear all,
    I have configured all steps for batch determination for FIFO.
    It worked fine for IM (stock transfer - mov.type 301) on last friday, however, get the issue today:
    - After I do GR (mov.type 101), the batch is auto created, batch classification is created,
    I use MSC2N to view batch classification:
    the value of "Date of last goods receipt" is "00.00.0000"
    What is wrong with my configuration?
    Could you pls help me to fix this?
    Thanl you very much for you help!
    Edited by: Ngo Quoc Hung on Dec 13, 2010 10:59 AM

    System Updates Batch Data in the Batch Master Record in the Following ways :
    1)  If the batch does not yet exist for the plant, it is automatically created.
    2)  If the batch already exists for the plant, the new quantity is simply posted as a receipt in the specified storage location.
    When posting a goods receipt with reference to Purchase order, the system updates Posting date as the goods receipt date in general data of the batch.

  • Batch classification class and MBC3

    Hi,
    I am a bit confused with the batch determination (i.e. how the R/3 searches the correct batch). Kindly please correct me on the following steps.
    1 u2013 Base on OMCG setup, R/3 pulls the batch search procedure base on the movement type in IM.
    2 u2013 R/3 searches through the strategy types listed in the search procedure to search for a search strategy.
    QUESTION:
    Letu2019s say there is this strategy condition type consist of access sequence and a class (to be used in batch classification)
    I am a bit confused here when come to the relationship between the classification and the access sequence. How does the R/3 find the correct batch when the R/3 can uses the characteristics from the selection class of the search strategy to look for batches with suitable specifications, in that case does the R/3 still have to access sequence to find the batch again in MBC3?
    If R/3 can find the batch through the batch determination from the classification, what is the MBC3 use for? I am confuse here because unlike batch determination, the pricing determination can just go find the right price value for a condition type base on the access sequence and later grab it in MEK3.
    The batch classification and MBC3 confused me? Are they both finding the same batch object or redundant to one another? Please explain with an example.
    rgd.
    Tuff

    Hi Jurgen,
    So, can you tell me which of the following sequence correct base on what you said.
    1 u2013
    Movement Type >> Batch Search Procedure >> Strategy Condition Type >> Batch Classification found the batch >> Go to batch condition table (i.e. base on the Access sequence in the strategy type) and get the final batch?
    2 u2013
    Movement Type >> Batch Search Procedure >> Strategy Condition Type >>  Go to batch condition table (i.e. base on the Access sequence in the strategy type) and get the batch >> Go to Batch Classification found the final batch?
    Which of the above is correct? And it seems my wording explanation is not quite correctu2026. Am I?
    Thanks
    Tuff

  • Basics for Batch Classification Data

    Hello Experts ,
    I have few queries for Batch Classification Data .
    1. Which are the tables where Batch Classification Data for the batches is stored .
    2.Which Function module is called once we do the Goods movement which determines the batch
    classification data .
    3.When we do stock transfer for batches , then the Batch classification will run in Issuing plant and
    the batch classi. data will be copied in the receiving plant . Can you please tell me that which object
    carries this data from issuing plant to receiving plant.
    4.There is also a user exit with which we can play with Batch classification , can you please give some information on this .
    Thank you very much for the help !
    Regards
    Shashank

    1. The table is AUSP - but why would you need to know that. There are good function modules to query, read, change classifications of batches - so why would you like to read directly from DB?
    2. This depends on your release. Typicall in MIGO the module VB_CREATE_BATCH is called, the same one that is called within the BAPI to create batches.
    3. See 2. When you create a batch with reference, you call the same module additionally with the key of the reference batch (this is the issueing batch). 
    Inside that module are loads of user exits for all kind of purposes.
    Why not have a look yourself in Customizing at Logistics General -> Batch Management -> Batch Valuation.
    There's the "customer exits for goods movements in inventory management" (this is called e.g. in the goodsmovement bapi and the old transactions)  --> EXIT_SAPMM07M_004
    and the  "Valuation of Creation of New Batches Using Function Module" (this is called in the MSCxN and in MIGO) --> EXIT_SAPLV01Z_014 .
    In Customizing there's also the documentation what you can achieve with the exits.
    Hope this helps.
    Stefan

  • Material Batch Classification Update

    Hi ,
    Is there a Function Module or BAPI to update Material Batch Classification ?
    Thanks.

    hi,
    check tcode bapi. or search function bapiclas
    cheers.
    ...reward if useful.

  • BADi/UserExit for MIGO : To popup batch classification screen auto

    Hi all,
    I want to pop up batch classification screen automatically in MIGO when performing a goods movement . In MIGO there is a command button for that to open up the batch classification screen, but my requirement is when click CHECK or SAVE button, branch it to batch classification screen if those characteristics are not maintained.
    Please reply .
    Thanks and Best regards,
    Sandun

    HI ,
    Chk BADI using these steps..
    1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.
    2. In 'Display' mode, go to 'Methods' tab.
    3. Double click the method 'Get Instance' to display it source code.
    4. Set a breakpoint on 'CALL METHOD cl_exithandler => get_class_name_by_interface'.
    5. Then run your transaction.
    6. The screen will stop at this method.
    7. Check the value of parameter 'EXIT_NAME'. It will show you the BADI for that transaction.

  • Batch classification details in Goods receipt

    Hi ,
    In my business for some of the materials i have activated the batch management and the batch classification details in the material master record.
    For those materials if i am doing the goods receipt system is allowing to post the document if the batch characterstics are not entered. I have to restrict if the batch characterstics are not allowed it should not able to post.
    I have made a message setting LB045 active with'E'. then also it is allowing.
    Is there any other message settings to be configuered.

    If the classification tab can be accessed in MIGO is depending on your customizing IMG > Logistics - General > Batch Management > Batch Valuation > Valuation for Goods Movement in Inventory Management > Activate Batch Classification for Goods Movements in IM
    there you have 5 options:
    ' ' No branching to batch classification
    1 Classification carried out in background (all batches)
    2 Classification only in foregr.for mand.charac. (all batches)
    3 Classification always in foreground (all batches)
    4 Classification in foreground for new batches only
    how did you setup it in your system?
    from OSS note 519303 - FAQ: Goods movement with Transaction MIGO:
    3. Question:
    How does the batch classification work in Transaction MIGO?
    Answer:
    When you post or check a goods movement, the system carries out the classification in the background. If you want to process the batch classification online, use the 'Classification' pushbutton. You can find this pushbutton on the 'Batch' tab page in the detail data of the item.
    You cannot automatically go from Transaction MIGO to the batch classification dialog. You can use the adjustable system message (Transaction OCHS) LB 045 to ensure that the complete classification data is entered.

  • How can mass create batch classification for many material batches? ?

    Hi Experts,
    In our system , there are so many material batches which have not been classified,see by
    BMBC Tcode.
    That means these batches has no values in the batch class. I know we can create
    classification for these batches with MSC2N Tcode.
    But there are so many batches  which have not been classified,more then 2000.
    It is not possible to create classification for every batch with with MSC2N once a time.
    So how can I create batch classification for so many batches once a time?
    How can I mass create batch classification for so many batches??
    Thanks for any reply!

    Hi,
    Please be aware that SAP does not support the use of batch
    input in the classification system. SAP recommends you use BAPI's for
    example in your case BAPI BAPI_OBJCL_CREATE and BAPI_OBJCL_CHANGE
    would be able to help. For more information, please have a look at the
    note: 943559 - Point 2 and 13. Point 13 references the note 1083986.
    I hope this helps!.
    Best Regards,
    Arminda Jack

  • FM for updating Batch Classification for a Batch (MSC2N)

    Hi,
    This is in regards to the Batch Classification (MSC2N).
    Is there a Function Module available to load data into the Classification tab for the batch, in MSC2N?
    Please Help.
    Thanks,
    John

    BAPI_OBJCL_CREATE
    and you may also refer tho this one -
    Look at Note 619913 - FAQ: Basic functions of batch management
    Change classification data of a batch
    Up to and including Release 4.6C, BAPI BAPI_OBJCL_CHANGE needs to be used.
    In later releases, BAPI BAPI_BATCH_SAVE_REPLICA may also be used for that purpose.
    Regards,
    Amit

Maybe you are looking for

  • Jabber for Windows 9.2.5 Local Contacts

    Hi Guys,      By default, Jabber for Windows 9.2.5, when searching for contacts, it first lists the local Outlook contacts, and then it shows the list of Corportate Directory Contacts.      Is there a way to show only LDAP contacts?? I don't want the

  • Java Client AUthentication to IIS 5 server throwing no IV for Cipher error

    I have trying to do Java client authentication. Got the Certificate from CA and loaded it in server. When I run the JavaClient program I get the error no IV for Cipher. I am using JDK 1.5.0_06 and JSSE 1.0.3_03. Any help is greatly appreciated. Thank

  • How do I get rid of a deleted iCloud account? It keeps popping up on my iPad

    I deleted an email address for iCloud but I still get a pop up to sign into the Apple account with the deleted email address.  how do I stop the Apple sign in pop up.  I established a New email and password for my apple account but need to get rid of

  • My iphone was stolen and i need help please!!

    ok, so my iphone was stolen and i want to know if i can transfer my old number to my new iphone without a new contract since i don't have the old sim card nor my old computer with the old iphone's backup, any suggestions? Message was edited by: iphon

  • Cs4 urgent - gaussian blur have different visualization on same object

    Continuing the before post. As i have write before i have copied and pasted an object from one document to another but the gaussian blur effect are visualized in different way, as the image. Why this?