Skip to Content

function modules concerning batch classification

Hi experts,

I'm looking for 2 function modules to do the following:

- search for an object with specific characteristic values of a specific class, as you can do in Txn CL30N

- (if none found) classify an object (a batch) with specific values

As far as I can tell, the BAPI_CHARACT* functions don't do these two things, or do they?

I also know of function module CLAF_OBJECTS_OF_CLASS but this function module returns all objects, and in our implementation there will soon be thousands of objects. I need to be able to specify which objects I get, using specific values.

Thanks,

Rob

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    Jul 17, 2009 at 05:14 AM

    Use the following function module

    • Create classification

    call function 'CLVF_VB_INSERT_CLASSIFICATION' "IN UPDATE TASK

    exporting

    • called_from_cl = c_x

    • object = wa_kssk-objek

    table = c_table

    date_of_change = wa_batch-datab

    tables

    ausptab = t_ausp

    kssktab = t_kssk

    i_mdcp = t_clmdcp.

    Regards

    D. Pandit

    Add comment
    10|10000 characters needed characters exceeded

  • May 22, 2009 at 05:35 PM

    Hi,

    Please check if the following FMs are useful for you.

    BAPI_OBJCL_GETCLASSES

    BAPI_OBJCL_CREATE

    BAPI_OBJCL_CHANGE

    Regards,

    Ankur Parab

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Rob Smeets

      Hi ,

      check this function module to get the batch characteristics names and values for particlar class like CL30N ..

      
      CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            classtype          = '023'
            features           = 'X'
            language           = 'E'
            object             = w_l_object        "material number with leading zeros..
            objecttable        = 'MCH1'            "MARA,MARC,MCH1 or any table relevent
          TABLES
            t_class            = t_lclass            "THis stores Batch class
            t_objectdata       = t_objectdata    "This stores batch characteristics names and values for particular class.
          EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.
        IF sy-subrc = 0.
        endif.
      

      Regards,

      Prabhudas

  • May 27, 2009 at 01:35 PM

    Sorry, for that function module I need to know the batch beforehand (since it's part of the object name).

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      check in the Table..

      CABN,CAWN,CAWNT..

      
            SELECT SINGLE * FROM cabn
                WHERE atnam = wa_zcxref_classes-characteristic.               "Pass Batch characteristic name..
            IF sy-subrc  = 0.
              SELECT  * FROM cawn into table t_cawn            "All the characteristic values available for batch characteristci is stored here
                              WHERE atinn = cabn-atinn
                                         AND adzhl  = cabn-adzhl.
              IF sy-subrc = 0.
          ENDIF.
      

      Prabhudas

  • avatar image
    Former Member
    Sep 09, 2014 at 11:24 AM

    Hello Rob,

    - search for an object with specific characteristic values of a specific class, as you can do in Txn CL30N

    The functions you are looking for are CLSD_CALL_SEARCH and CLSD_START_SELECTION. I guess better late than ever 🤪

    Regards 😀

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09, 2016 at 03:24 PM

    use the fm VB_BATCH_GET_DETAIL

    Add comment
    10|10000 characters needed characters exceeded