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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a 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

  • Posted on 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 a 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

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 09, 2016 at 03:24 PM

    use the fm VB_BATCH_GET_DETAIL

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.