Claf_classification_of_objects

hi,
what is the use of 'claf_classification_of_objects' module when this function module use .
my object is  get the production order detatils using 'bapi_prodord_get_detail'  after want use this function module  and pass the parameters in
class = cis
classtype = 001
object = afpo-matnr after i want down load the production order deatils. please help me what is the use of this function module .
regards
jai

hi
good
CLAF_CLASSIFICATION_OF_OBJECTS Return all of the characteristics for a material
DATA : LV_CLASSNUM LIKE KLAH-CLASS,
       LV_CLASS LIKE BAPI1003_KEY-CLASSTYPE VALUE '002' ,
       LV_OBJECTKEY LIKE BAPI1003_KEY-OBJECT ,
       LV_TAB LIKE BAPI1003_KEY-OBJECTTABLE VALUE 'EQUI',
       LT_CLASSSTRUCT TYPE STANDARD TABLE OF SCLASS,
       LT_VAL_CHAR TYPE STANDARD TABLE OF CLOBJDAT,
       LW_VAL_CHAR TYPE CLOBJDAT .
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
         EXPORTING
              CLASS              = LV_CLASSNUM
              CLASSTEXT          = 'X'
              CLASSTYPE          = LV_CLASS
              LANGUAGE           = SY-LANGU
              OBJECT             = LV_OBJECTKEY
              OBJECTTABLE        = LV_TAB
              KEY_DATE           = SY-DATUM
              INHERITED_CHAR     = 'X'
         TABLES
              T_CLASS            = LT_CLASSSTRUCT
              T_OBJECTDATA       = LT_VAL_CHAR
         EXCEPTIONS
              NO_CLASSIFICATION  = 0
              NO_CLASSTYPES      = 0
              INVALID_CLASS_TYPE = 0
              OTHERS             = 0.
    IF SY-SUBRC <> 0.
    ENDIF.
  ENDIF.
  SORT LT_VAL_CHAR BY ATNAM .
  READ TABLE LT_VAL_CHAR INTO LW_VAL_CHAR WITH KEY ATNAM = 'PROPERTY' BINARY SEARCH .
  IF SY-SUBRC EQ 0 .
    P_LW_REPORT_CHARAC =  LW_VAL_CHAR-AUSP1
  ENDIF.
thanks
mrutyun^

Similar Messages

  • Function Module CLAF_CLASSIFICATION_OF_OBJECTS is thrrowing exception

    Hi,
    I have used this function in one of my program
    CLAF_CLASSIFICATION_OF_OBJECTS
    but it is throwing "NO_CLASSIFICATION" Exception and breaks into a short dump
    only if i give some plant in the selection screen which is
    can any one help.

    try to uncomment the exceptions.
       CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            classtext          = ' '
            classtype          = '300'
            features           = ' '
            language           = sy-langu
            object             = matl
            objecttable        = 'MARA'
            key_date           = p_date
          TABLES
            t_class            = class_allocs
            t_objectdata       = obj_data
    <b>      EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.
        IF sy-subrc = 0.</b>
    endif.
    and handle them if you can.
    regards
    vijay

  • Regarding CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

    Hi Friends,
    I want to know, Can this module update the Class information?
    I can retrive class information using this function module, but i am not able to update the class information.
    If all of you know any other way to update class information. Please let me Know.
    Thanks
    Amit

    Hi Amit,
    I know about these .
    CLAF_CLASSIFICATION_OF_OBJECTS - reads all classifications for an object
    BAPI_OBJCL_GETDETAIL - returns detailed information on a classification
    BAPI_OBJCL_CHANGE - changes an existing classification, or creates the classification if it does not yet exist.
    This one can be checked but if there are some more inputs on this, it would be helpful.
    regards
    Nishant Malhotra

  • Problem with CLAF_CLASSIFICATION_OF_OBJECTS

    Hi,
    I calling Function module 'CLAF_CLASSIFICATION_OF_OBJECTS'  for a given Class and characteristic description , I am reading its value.
    The characteristic  value is not mandatory to maitained , so when no data was maintained for a given Class and characteristic description  space was coming as output from the Function module which is correct.
    But strangely for some reason when I run the same  program and when no data is maitained , the charcteristic value instead of giving space it is giving '?' , any idea why this happens ?
    Regards,
    Senthil

    Hi senthil,
    This FM will always behave in this way only.
    so no need to worry  just add condition in your program to check ?.
    I have done in my many progrms in this way.
    hope this will help you.
    Thanks,
    dhiraj.

  • CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'

    I am newbie to ABAP.
    To get the characteristic values I am using following FM inside a BADI called Batch_Master.
    When I test this FM in se37 I get the desired values in t_class with one entry and t_objectdata with 4 entries.
    I know what to fill in for class, classtype, object.
    <b>Now when I call this FM in BADI how do I read my data from t_class and t_objectdata ??</b>
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
    EXPORTING
    class = i_class
    classtype = i_classtype
    object = i_objek
    TABLES
    t_class =
    t_objectdata =
    *EXCEPTIONS
    *no_classification = 1
    *no_classtypes = 2
    *invalid_class_type = 3
    *OTHERS = 4

    This is the sample code
    FORM voorraden_in_output TABLES xmchb STRUCTURE wa_xmchb
                            CHANGING wa_vart04_charg
                                     STRUCTURE wa_vart04_charg.
       SORT xmchb BY werks lgort matnr.
    * charge tabel lezen
       LOOP AT xmchb INTO wa_xmchb WHERE matnr = wa_vart04_charg-matnr.
         l_wa_mchb = wa_xmchb.
         wa_vart04_charg-werks   = l_wa_mchb-werks.
    * magazijn
         wa_vart04_charg-lgort   = l_wa_mchb-lgort.
    * charge
         wa_vart04_charg-charge  = wa_xmchb-charg.          "LCMG PD 20070712
    * bepaal batchclassificatie
         PERFORM clear_class_fields CHANGING wa_vart04_charg.
         IF NOT wa_xmchb-charg IS INITIAL.                  "LCMG PD 20070712
           PERFORM get_classificatie_batch TABLES ta_object_data
                                            USING wa_vart04_charg-matnr
                                                  wa_vart04_charg-charge.
    *  vul wa_vart04_charg met gegevens uit ta_object_data
           PERFORM kenmerken_in_output TABLES ta_object_data
                                              ta_class
                                       USING  wa_vart04_charg
                                              wa_xmchb.     "LCMG PD 20070712
         ENDIF.
         PERFORM check_kenmerken USING wa_vart04_charg
                              CHANGING sy-subrc.
         IF sy-subrc <> 0.
           CHECK 1 = 2.
         ENDIF.
    *  gereserveerde voorraad bepalen
         PERFORM gereserveerde_voorraad  CHANGING l_wa_mchb
                                                  wa_vart04_charg.
    *  voorraden charge regel bepalen
         PERFORM charge_voorraden           USING l_wa_mchb
                                                  wa_vart04_charg.
    * charge regel is volledig bepaald
         APPEND wa_vart04_charg TO ta_vart04_charg.
       ENDLOOP.
    ENDFORM. 
    * lokale data vullen
       l_object(18)    = artikel.
       l_object+18(10) = charg.
       l_classtype     = c_023.
       l_obtab         = 'MCH1'.
    FORM get_classificatie_batch TABLES  ta_object_data STRUCTURE clobjdat
                                   USING  artikel TYPE mara-matnr
                                          charg   TYPE mchb-charg.
       DATA: l_object TYPE ausp-objek,
             l_classtype  TYPE  klah-klart,
             l_obtab TYPE  tcla-obtab.
    * lokale data vullen
       l_object(18)    = artikel.
       l_object+18(10) = charg.
       l_classtype     = c_023.
       l_obtab         = 'MCH1'.
    * schonen interne classificatie tabellen
    *  REFRESH: ta_class, ta_object_data.                  "LCMG PD 20070712
       CLEAR  : ta_class, ta_object_data.
       CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
         EXPORTING
           classtype          = l_classtype
           language           = sy-langu
           object             = l_object
           objecttable        = l_obtab
           key_date           = sy-datum
           no_value_descript  = 'X'                              " 467394GVE
           initial_charact    = ' '
         TABLES
           t_class            = ta_class
           t_objectdata       = ta_object_data
         EXCEPTIONS
           no_classification  = 1
           no_classtypes      = 2
           invalid_class_type = 3
           OTHERS             = 4.
    ENDFORM. 

  • Problem  using claf_classification_of_objects

    hi frns,
    i'm a new abaper and i need some help in utilising this function module  claf_classification_of_objects
    and give me a part of code as an example.
    thanx,
    suresh

    Hello
    purpose of CLAF_CLASSIFICATION_OF_OBJECTS
    need FM to read classification deatils of a material based on classtype
    claf_classification_of_objects
    To get Material Classification Values for Class Type 300 (CU51)

  • Purpose of CLAF_CLASSIFICATION_OF_OBJECTS

    Hi folks,
    Can any one provide me the sample code for executing the Function module CLAF_CLASSIFICATION_OF_OBJECTS .
    This FM is used for  obtaining the values of the characteristics of the material.
    its very urgent and rewards for sure.
    Regards,
    Naveen

    Hey,one year before i used this FM to get the tolerance values.here is the code.
    W_OBJEK = IT_FINAL-OUTMATNR.
      SELECT SINGLE OBJEK INTO W_OBJEK FROM KSSK WHERE OBJEK = W_OBJEK AND KLART = '001'."#EC *
      IF SY-SUBRC NE 0.
        EXIT.
      ENDIF.
      CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
        EXPORTING
          CLASSTYPE          = '001'
          LANGUAGE           = SY-LANGU
          OBJECT             = W_OBJEK
          FEATURES           = 'X'
          KEY_DATE           = SY-DATUM
          INITIAL_CHARACT    = 'X'
          CHANGE_SERVICE_CLF = 'X'
        TABLES
          T_CLASS            = IT_CLASS
          T_OBJECTDATA       = IT_OBJ.

  • FM CLAF_CLASSIFICATION_OF_OBJECTS  to get the Country characteristics .

    Hello Gurus,
    I am trying to use the FM CLAF_CLASSIFICATION_OF_OBJECTS to get the characteristics name and the corresponding value by Importing-CLASSTYPE = '023'
                    OBJECT and OBJECTTABLE = 'MCH1' etc.
    The table T_OBJECTDATA is returning all the characteristics. I have to use only the country characteristics like (US, JP).
    Can any one suggest what will be the key field to read the table T_OBJECTDATA?
    Regards
    Soocharita

    Hi,
    In T_OBJECTDATA there is a field called ATINN which is a no corresponding to ATNAM, the characteristics name in table CABN. Please check the ATINN corresponding to your requirement.
    Regards
    Prasenjit

  • CLAF_CLASSIFICATION_OF_OBJECTS - Language dependance

    Hi All,
    when i am trying to get characterisitc values through CLAF_CLASSIFICATION_OF_OBJECTS, i can find the values in t_objectdata. but for one of my characteristic t_objectdata - ausp1 is displaying as the text 'YES'. i am passing this text to my final ALV table display.My requirement is when login to different language like french i should get this text in french language only while displaying mu ALV. but i am not getting it. someone please help with how do i get this resolved and is there any table where i have to maintain the translations?( i have tried to debug this BAPI, but there is no breakthrough, i am not sure but may be i have missed something)
    Thanks in Advance,
    Sankar

    Hi,
    CLAF_CLASSIFICATION_OF_OBJECTS i available in ecc 4.6 version

  • CLAF_CLASSIFICATION_OF_OBJECTS does not fetch ATINN

    Hi,
    Since this Fm: CLAF_CLASSIFICATION_OF_OBJECTS does not fetch ATINN, hence is there any alternate similar FM which can be used and which fetches ATINN too?
    ags.

    As per my understanding you are looking for characteristic number for corresponding characteristics name. If yes then you can check the conversion exit attached to the field pass characteristics name to FM CONVERSION_EXIT_ATINN_OUTPUT which will return its  corresponding characteristics number.
    There is one FM CLGV_DISPLAY_OBJECT_VALUES you can check if it suits your purpose.

  • CLAF_CLASSIFICATION_OF_OBJECTS for many materials

    Hello everybody,
    i like to read the classification data for many materials.
    I know how to use CLAF_CLASSIFICATION_OF_OBJECTS for just one material,
    but how can i receive the data for a lot of materials?
    I call CLAF_CLASSIFICATION_OF_OBJECTS in .NET using ERPConnect.
    I dn't want to call CLAF_CLASSIFICATION_OF_OBJECTS n a loop because of perfromance issues.
    Kind regards
    Lars

    Hi,
    The performance problem will be there for all the selects related to material classifications. to aoid these kind of problems what we did is a refresh twice a day and moved the data to a third party server from where the select was done easily.
    in these fm there are certain parameters which acts as filters like( initial characteristics values,inherited values etc ) . Hope you can read the documentation and check these inputs. But i dont think so you have a fm where a loop can be avoided.

  • CLAF_CLASSIFICATION_OF_OBJECTS - RMWB tcode

    I'm using CLAF_CLASSIFICATION_OF_OBJECTS function module to get characteristic value in the tcode RMWB. i have to avoid the deleted values and i'm not able to see any indicator.
    how to find the deletion indicator?
    i noted that there is an field LKENZ in ausp table for deletion indicator.but its not updaing.
    Any help thank in advance
    Suresh

    i'm writing custom program to get characteristic value using function module.
    To get Object key  i have to concenate estva-recn and estva-actn fields from ESTVA table.
    and then get object key from  AUSP table.
    Inside program i'm calling CLAF_CLASSIFICATION_OF_OBJECTS to get the characteristic value.
    even i can get from AUSP table but some time it act differ so i will go function module.
    Question is if they delete entries in standard transaction still my program i'm getting those values.
    So i'm trying to find deletion indicator.
    Edited by: Suresh on Nov 15, 2008 10:17 PM

  • Data loaded successfully in RSA3, but can not find data in BW PSA

    Dear all:
    We have custom datasource enhanced through BADI. For one column, in the source system RSA3, I can see this field populated with data, but in BW, when I load the data in PSA and check, this field is blank...
    I tried seeral ways like re-replicate datasource, delete the datasource in BW and re-replicate, but not work.
    Did anybody meet the same situation before? How to handle this issue?
    Any post would be appreciated and thank you all in advance!
    Tim

    Hi Pavan:
    Thanks for your reply.
    I don't have any selection field for this datasource, and the number between ECC and BW matches. Actually the problem is only for one field, on ECC side RSA3, this field are populated with values, while in BW PSA, this column is there, but all the content are blank.
    I do call one function module called to populate that field:
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
          CLASS                      = ''
            CLASSTEXT                  = 'X'
            CLASSTYPE                  = '023'
          CLINT                      = 0
            FEATURES                   = 'X'
            LANGUAGE                   = SY-LANGU
            OBJECT                     = W_OBJECT
            OBJECTTABLE                = 'MCH1'
            KEY_DATE                   = SY-DATUM
            INITIAL_CHARACT            = 'X'
          NO_VALUE_DESCRIPT          =
            CHANGE_SERVICE_CLF         = 'X'
          INHERITED_CHAR             = ' '
          CHANGE_NUMBER              = ' '
          TABLES
            T_CLASS                    = ITAB_CLASS
            T_OBJECTDATA               = ITAB_OBJECTDATA
          I_SEL_CHARACTERISTIC       =
          T_NO_AUTH_CHARACT          =
          EXCEPTIONS
            NO_CLASSIFICATION          = 1
            NO_CLASSTYPES              = 2
            INVALID_CLASS_TYPE         = 3
            OTHERS                     = 4
        IF ITAB_OBJECTDATA IS NOT INITIAL.
           READ TABLE ITAB_OBJECTDATA INTO wa_OBJECTDATA WITH KEY atnam = 'ZLOBM_PLNTMFG'.
           <LS_ESMI_BW_MD_ZBATC0001>-ZORIGPLNT = wa_OBJECTDATA-AUSP1.
        ENDIF.
    The code is very simple, it just call the standard FM and fetch the value from the return table, is there any thing wrong with my code?
    Thanks!
    Tim

  • RFC Failure: Processing Repairable Materials: BAPI_ALM_ORDER_MAINTAIN

    Hello,
    We are using a Function Module BAPI_ALM_ORDER_MAINTAIN Process Maintenance-/Service Order with in
    custom RFC for "Autocreate repair order" and Executes in a separate LUW,
    called in the User Exit EXIT_SAPLMBMB_001 (Customer Function Exit in the Case of Updating a Material Document),
    in the Function Module MB_POST_DOCUMENT.
    We are getting the Short Dump with RFC as Connection Closed no data, where as the Destination is NONE.
    And the respective data is locked, while de-bugging no dump is resulted, seems like before getting the connection closed data is passed to the RFC, but here Destination is NONE,

    Hello,
    Please find the following Code.
    function Z_PM_0491_REPAIR_ORDER.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(T_MSEG) TYPE  CCRCTT_MSEG
    *"     VALUE(T_MKPF) TYPE  CCRCTT_MKPF
    *"  EXCEPTIONS
    *"      PROBLEM
    Description: Autocreate repair order                       *
    Get plant value
      loop at t_mseg into lw_mseg.
      Check if udd is active
        refresh lt_dev.
        call function 'Z_PM_XXXX_DEV_GET_PARAMETERS'
        exporting
          i_udd     = lc_udd_0491
          i_werks   = lw_mseg-werks
        importing
          e_dev     = lt_dev
        exceptions
          not_found = 1
          others    = 2.
        check sy-subrc eq 0 and not lt_dev[] is initial.
      Only for movement type 261
        read table lt_dev into lw_dev index 1.
        check lw_mseg-bwart = lw_dev-zzparameter1(3).
      Check if material is repairable
        move lw_mseg-matnr to lv_objek.
        call function 'CLAF_CLASSIFICATION_OF_OBJECTS'
            EXPORTING
              classtype          = lc_class_001
              object             = lv_objek
              inherited_char     = lc_x
            TABLES
              t_class            = lt_class[]
              t_objectdata       = lt_value_class[]
            EXCEPTIONS
              no_classification  = 1
              no_classtypes      = 2
              invalid_class_type = 3
              OTHERS             = 4.
        if sy-subrc eq 0.
          read table lt_value_class into lw_value with key atnam = lc_ypm_repairable.
          if sy-subrc eq 0.
            if lw_value-ausp1 eq lc_repairable.
            Material is repairable -> get PM order data
              CALL FUNCTION 'BAPI_ALM_ORDER_GET_DETAIL'
                EXPORTING
                  NUMBER                 = lw_mseg-aufnr
                IMPORTING
                  ES_HEADER              = lw_pheader
                TABLES
                  RETURN                 = lt_bapiret2.
            Continue if data read successfully
              read table lt_bapiret2 with key type = lc_e.
              check sy-subrc ne 0.
            Refresh all tables
              clear: lw_methods, lw_header, lw_operation, lw_component, lw_extension_in.
              refresh: lt_methods, lt_header, lt_operation, lt_extension_in, lt_component, lt_return, lt_numbers.
            Prepare data for suborder creation
            Append following info in the IT_METHODS
              lw_methods-refnumber = 1.
              lw_methods-objecttype = 'HEADER'.
              lw_methods-method = lc_create.
              lw_methods-objectkey = lc_objectkey.
              append lw_methods TO lt_methods.
              lw_methods-refnumber = 1.
              lw_methods-objecttype = 'OPERATION'.
              lw_methods-method = lc_create.
              lw_methods-objectkey = lc_objectkey.
              append lw_methods TO lt_methods.
            We will create a component
              lw_methods-refnumber = 1.
              lw_methods-objecttype = 'COMPONENT'.
              lw_methods-method = lc_create.
              lw_methods-objectkey = lc_objectkey.
              append lw_methods TO lt_methods.
              lw_methods-refnumber = 1.
              lw_methods-objecttype = space.
              lw_methods-method = lc_save_method.
              lw_methods-objectkey = lc_objectkey.
              append lw_methods TO lt_methods.
            Specify header information in IT_HEADER
              lw_header-orderid = lc_orderid.
              lw_header-order_type = lw_pheader-order_type.
              lw_header-planplant = lw_pheader-planplant.
              lw_header-mn_wk_ctr = lw_pheader-mn_wk_ctr.
              lw_header-plant = lw_pheader-planplant.
              lw_header-pmacttype = lc_rev.
              lw_header-funct_loc = lw_pheader-funct_loc.
              lw_header-equipment = lw_pheader-equipment.
              lw_header-priority = lc_3.
              lw_header-start_date = sy-datum.
              lw_header-finish_date = sy-datum + lc_30.
              lw_header-short_text = lw_mseg-matnr.
              shift lw_header-short_text left deleting leading lc_0.
              concatenate lc_repairof lw_header-short_text into lw_header-short_text separated by space.
              lw_header-assembly = lw_mseg-matnr.
              append lw_header to lt_header.
            Update IT_OPERATION
              lw_operation-activity = lc_0010.
              lw_operation-control_key = lc_ypm1.
              lw_operation-plant = lw_pheader-maintplant.
              lw_operation-assembly = lw_mseg-matnr.
              lw_operation-work_cntr = lw_pheader-mn_wk_ctr.
              lw_operation-description = lw_header-short_text.
              append lw_operation to lt_operation.
            Update component in IT_COMPONENT
              lw_component-material = lw_mseg-matnr.
              lw_component-plant = lw_pheader-maintplant.
              lw_component-stge_loc = lw_mseg-lgort.
              lw_component-activity = lc_0010.
              lw_component-item_cat = lc_l.
              lw_component-requirement_quantity = - lw_mseg-menge.
              lw_component-requirement_quantity_unit = lw_mseg-meins.
              append lw_component to lt_component.
            Linking to the superior order: will happen in Badi IBAPI_ALM_ORD_MODIFY
              lw_extension_in-structure = lc_struc.
              lw_extension_in-valuepart1 = lw_mseg-aufnr.
              append lw_extension_in to lt_extension_in.
            Create subordinate order
              call function 'BAPI_ALM_ORDER_MAINTAIN'
                tables
                  it_methods = lt_methods
                  it_header = lt_header
                  it_operation = lt_operation
                  extension_in = lt_extension_in
                  it_component = lt_component
                  return = lt_return
                  et_numbers = lt_numbers.
              read table lt_return into lw_return with key type = lc_e.
              if sy-subrc ne 0.
              If all went well, commit order creation
                clear lw_return.
                call function 'BAPI_TRANSACTION_COMMIT'
                    exporting
                      wait   = 'X'
                    importing
                      return = lw_return.
              else.
              Otherwise raise exception
                raise problem.
              endif.
            endif.
          endif.
        endif.
      endloop.
    endfunction.

  • How to get the values inputted by the user in Classification view of  MM02

    Hello,
    Does anyone know how to get the inputted values in Classification view of MM02/MM01? I tried to use CLAF_CLASSIFICATION_OF_OBJECTS but this gets the values that is currently saved in the tables and not the values that the user recently inputted in the screen.
    Regards,
    Alfred

    hi
    try this...
    How to Display the Batch Characteristics in BOM?

Maybe you are looking for