How to read Material classification/characteristics

Dear all,
I have to read the characteristic values belonging to a material.
I found some threads about BAPI BAPI_OBJCL_GETDETAIL_KEY and BAPI_OBJCL_GETDETAIL but I don´t know how to call them.
First Question: Is this the right way/function to read the characteristics from one material? If no what is the "right" way?
Second Question: How to call this beast for one material?
Kind regards and thanks for any help.
Roman Becker

DATA: w_obj LIKE bapi1003_key-object,
      w_tab LIKE bapi1003_key-objecttable VALUE 'MARA',
      w_typ LIKE bapi1003_key-classtype.
w_obj = MATNR.
w_typ = '001'. " Material Class
W_tab = 'MARA'.
     CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
        EXPORTING
          objectkey_imp   = w_obj
          objecttable_imp = w_tab
          classtype_imp   = w_typ
          read_valuations = 'X'
        TABLES
          alloclist       = it_alloclist
          allocvalueschar = it_values_c
       allocvaluesnum  = it_values_n
          return          = it_return.
The key here is the parameter <b>objecttable_imp</b>
This parameter should be the Key Master table of the object.
Since this is Material Master it is MARA for Customer 'KNA1' and so on.

Similar Messages

  • Read Material Classification during MM01 creation

    hello all,
    my requirement is to send Idocs to different system when a material is created or changed.   change pointers have been created and badi BDCP_BEFORE_WRITE is being used to filter out the records that don't need to be sent.
    the process works perfectly with one exception.   one of the filter criteria is a material classification we named COMMODITYTYPE.   at the moment my code looks like this:
        SELECT SINGLE ATWRT INTO l_CHAR_VALUE FROM AUSP
                                 WHERE OBJEK = l_matnr
                                 AND   ATINN = '0000000023'
                                 AND   KLART = '001'.
    this works very well for changed materials (MM02) but it looks like AUSP is being updated in a separate update task and it hasn't been triggered at the time BDCP_BEFORE_WRITE gets triggered so there is nothing in the table.
    i am looking for a function module (or whatever) that can read the classification when BDCP_BEFORE_WRITE is triggered. 
    has anyone come across this before?   any ideas?   thanks much.
    (running ECC 6.0)

    tutun,
    thanks for your reply.   however, i may not have been clear.   i am not actually sending the classification in the material idoc (and we are using MATMAS as the basic type).   in fact, the idoc gets created with everything we want.   the issue is filtering the change pointers at the time of creation.    we only want tocreate idocs for certain materials and one of the filter criteria is the classification COMMODITYTYPE.
    so as i go through the MM01 views i can see the correct value in the COMMODITYTYPE field but when i look in AUSP during the BADI BDCP_BEFORE_WRITE it is not there - it gets updated in a secondary update task.    so this value is sitting in memory somewhere and i am trying to find it.  
    i hope that helps explain things.
    james

  • How to transfer the classification characteristics of MM to COPA?

    I have been trying to bring the classification characteristics of MM to COPA.I don't have a match for those in COPA and I am unable to get those values thru table look up from KSML, KLAH or AUSP into COPA.Could anyone please help me out.
    Thanks,
    Swapna

    Hi
    I am understanding that you want to derive COPA characteristics based on some Classification values. But what you need to understand is that the values flows to COPA from SD when you either post a Sales order or Billing Document.
    So you need to explore what classification data is available in Sales order or Billing Document for the material,  check those tables of SD only those values can be used in Derivations to derive the characteristics.
    I hope it helps.
    Regards,
    Suraj

  • How to extract Material Classification into BW ?

    Hi All
    I want to create datasource to extract material classification into BW
    I made research into this forum
    Lot of post speak about Tcode CTBW but I didn't find a method to implement it
    Does somebody can help me with explanations on this Tcode or another method to create the datasource ?
    Thanks a lot in advance for your help
    Sebastien

    Hi Sebastian, 
    Check OSS note 306046 - https://service.sap.com/sap/support/notes/306046
    Regards,
    Sree

  • Derivation of Material classification Characteristics values in COPA

    Hi,
    Although  similar type of questions are there in Forum, But I did not find the correct solution, hence I am putting this thread.
    My question is , in classification view of material master we have Class type - 23 (Batch).
    We are maintaining many chracteristics and their values in the material master.
    Now my requirement is whenever the billing is done for any sales order having this material, all the characteristics and its value should flow to COPA.
    Although the details are there in table AUSP. But I am not finding any way out to derive these characteristics and its value or get these information in COPA.
    Please help.
    Regards
    Kami

    Hi Ajay,
    The attribute tab is not available in MOVE. Is there any other place where I can find this attribute tab.
    While doing the Analysis of derivation, it showing the message :
    *"Derivation was not carried out. Reason: Not available"*
    Both Source field and Target filed is showing blank. I am not able to figure out the reason.
    Is there any relation with Class Type. We are using here Class Type - 23 (Batch).
    And in KEDR , in MOVE as you suggested I am using Source Vield VCONF.
    I hope these are OK.
    I am using the User defined characteristics WW09 , with own value maintenence. Is this OK?
    What could be the possible reasons for not populating the data.
    regards
    Kami

  • How to read material services object attachments

    Hi,
    I'd like to read pdf documents attached to material master.
    There is any function to do that?
    Then I have to send an email attaching this document with a custom program.
    thank you in advance!
    Oscar

    DATA: w_obj LIKE bapi1003_key-object,
          w_tab LIKE bapi1003_key-objecttable VALUE 'MARA',
          w_typ LIKE bapi1003_key-classtype.
    w_obj = MATNR.
    w_typ = '001'. " Material Class
    W_tab = 'MARA'.
         CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
            EXPORTING
              objectkey_imp   = w_obj
              objecttable_imp = w_tab
              classtype_imp   = w_typ
              read_valuations = 'X'
            TABLES
              alloclist       = it_alloclist
              allocvalueschar = it_values_c
           allocvaluesnum  = it_values_n
              return          = it_return.
    The key here is the parameter <b>objecttable_imp</b>
    This parameter should be the Key Master table of the object.
    Since this is Material Master it is MARA for Customer 'KNA1' and so on.

  • How to change material classification for class type 023

    Hi Expert,
    I want to change class ZSK_EXPIRY_DATE to ZSKK_GR_DATE under class type 023 in classfication tab (MM02). Understand that the same class also assigned to material and batch in MSC3N. So i'm sure it's not as easy asdo the direct change in CL20N. Can i anyone please guide me step by step to change it? What is the pre-requisite and the impact of the change that i have to care of..
    Thanks/Regards,

    Hi Crystal,
    You consume all the materials created with the earlier batch classification and then try to change it. or keep the assinged class and then create your new required class and then assign the new class to the material in classification view and start using the new one.
    Chris

  • Second thought about extracting classification characteristics values

    Hello expert:
         I have a question about uploading material classification data into BW,  I know I can extract this classification data by new datasource set up by transaction CTBW.  this is the normal way to extract classification data . I just want to do it in another way technically. My question is : can I enhance some BC datasources such as : 0EC_PCA_3,  in this way,  I will do this enhancement as follows:
       (1) enhance  transaction DS by classification characteristics , such as 0EC_PCA_3.
       (2) customize master DSes for classification characteristics.
       (3) create infoobject in BW corresponding to classification characteristics
       (4) put those infoobjects into the same dimension as material in the infocube which is the datatarget for 0EC_PCA_3
       (5) load master data for those infoobjects for classification characteristics
       (6) load transaction data for enhanced transaction DS 0EC_PCA_3
    by the procedure, I also can get the information for those classification characteristics, please correct me .
    Many Thanks.

    Hi,
    You can use CMOD to enhance 0MATERIAL_ATTR as an alternative to CTBW transaction but keep in mind that Material classification has to do with master data.
    That is the main reason why enhancing transactional data datasources with master data attributes should be avoided if possible.  Even if you need to report on historical truth, you can accomplish it by using Read master data feature on transformations (for example, when you load your InfoCube, you can read material classification master data from 0MATERIAL instead of 0EC_PCA_3).
    Regards,
    Maximiliano

  • How to Change Batch Classification of material master

    Hi,
    How to Change Batch Classification of material master  in a production system,Pl note that there is no stock and no open qty still system is not allowing me to delete the old Classification and add my new classification.
    Guys any solution for this.
    Thanks in advance
    rgds
    bijaya pradhan

    I believe there is a FM VB_CHANGE_BATCH for this, any body tried this FM?

  • How to read inspection method classification data?

    Hi all,
            Can anyone let me know about how to read the Inspection Method Classification data.The transaction code for Inspection Method Classification is QS34.
    Thanks,
    Balaji

    Hello gopi,
                  i know that but I am asking whether there is any FM to read just like for Material classification,Batch classification etc we have FM's.
    Thanks,
    Balaji

  • How to read classification

    Hi developers,
    I need to read the classification item of a material.
    How can I do that?
    Thanks,
    Simone

    Hi Simone,
    You can find out from table CABN and AUSP.
    Below code snippet may help you..
    *--- Build internal table IT_AUSP based on Characteristic Name,
    *--- Internal characteristic value, Indicator(Class/Object) and Class Type
      IF it_objek[] IS NOT INITIAL.
        SELECT SINGLE atinn                     "Internal characteristic
                 FROM cabn
                 INTO v_atinn
                 WHERE atnam = 'Z_001_CLASS'.  "Your class name of the material
        IF sy-subrc IS INITIAL.
          SORT it_objek BY objek.
          DELETE ADJACENT DUPLICATES FROM it_objek.
          SELECT objek                          "Key of object to be classified
                        atwrt                           "Characteristic Value
            FROM ausp
            INTO TABLE it_ausp
            FOR ALL ENTRIES IN it_objek
            WHERE objek = it_objek-objek
              AND atinn = v_atinn
              AND mafid = 'O'                   "Indicator: Object/Class
              AND klart = '001'.                 "Class Type
        ENDIF.
      ENDIF.
    Best Regards,
    Sayak

  • How to integrate cProjects with R/3 to get the Material Classification Data

    Hi all,
       We are installing the cProjects and we have to integrate it with R/3 to get the Material Classification data.
      Is any one has developed the object link, which links cProject and Material Classification data in R/3?
      Thanks in advance.
    Regards.

    Hi Venkat,
    Refer SAP cProjects Guide for Implementing an Object Link. This Guide also includes User Defined Object Links.
    You should be able to find it on SAP Service Marketplace. In case you cannot, pl send me your email ID, I will mail the same to you.
    Regards,
    Reema.
    Pl award points to all useful answers.

  • How to setup material master classification?

    Hi
    Does anyone know how to setup a classification for material master ?
    We need create a new one for classification type ,area, and so on.
    In character , could it have dependence for each character?
    Thanks
    alice

    Hi experts,
      Now our request is below , Hope to get your help
    1.     Is part  in scope?           Valid values: yes / no
    Conditions for yes:
    a.     Included  a product
    b.     Not a consumable
    2.     If 1. is "yes", is part  compliant?      Valid values: yes / no
    Conditions for yes:
    a.     Does not contain abc
    b.     Supplier declaration available
    3.     If 2. is "no", is part with exemtions?     Valid values: yes / no
    Conditions for yes:
    a.     Contains one ore more substance above EU limits with exemptions.
    How could I set if question 1 as yes, then go to question 2?  How to do the  restrict
    Thanks
    ALICE

  • How about a good reads sectrion. Reading material on Arch and Linux

    K awsome wiki best done yet ,, no need for a how to section lol. Anyways might be interesting to have a good reads section on the forum relating to Arch and linux. The wiki is kewl but not all the good reads are on the arch site. This may help a lot of new users find reads to help them out.

    Section on the forum to post links to good reading material like help files or websites with articles pertaining to helping with Arch and linux. Say a good site on a wifi card or how to manually set up networking for a laptop in linux etc. Same idea as a how to's section but rather based on where to find the reading materials you need.

  • "How to pass classification characteristics while creating batch" ?

    Hi,
        I am using FM's BAPI_BATCH_CREATE/CHANGE while creating/changing batch I have to maintain classification data aswell.But in FM docu i saw as shown below
    1.Create the classification of a batch in the background (object characteristics only)
    2. If the batch is to be classified, you must specify a class in the BatchControlFields parameter. Only single classification is possible.
      According to above statments I have passed class name in Batch Control Fields but I am unable to find " How to pass classification characteristics while creating batch". Please tell me how to pass classification characteristics in background?
    Edited by: Vijay Babu Dudla on Dec 16, 2008 3:24 AM

    Hi, You can update classification for a batch using the following code.
    But first, you'll need to find out that the batch management is cross-plant or plant dependant.
    If it is cross plant then plant(WERKS) is not part of the key to BAPI_OBJCL_CONCATENATEKEY.
    CLEAR: objectkey, objectkeytable, objectkeytable[],
               allocvaluesnumnew, allocvaluesnumnew[],
               return.
        objectkeytable-key_field = 'MATNR'.
        objectkeytable-value_int = matnr.
        APPEND objectkeytable.
        objectkeytable-key_field = 'CHARG'.
        objectkeytable-value_int = charg.
        APPEND objectkeytable.
    * Only if Batch management is Plant dependant
        objectkeytable-key_field = 'WERKS'.
        objectkeytable-value_int = werks.
        APPEND objectkeytable.
        CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
          EXPORTING
            objecttable    = objecttable
          IMPORTING
            objectkey_conc = objectkey
          TABLES
            objectkeytable = objectkeytable
            return         = return.
        allocvaluesnumnew-charact = "characteristic name goes here".
        allocvaluesnumnew-value_from ="characteristic value goes here".
        APPEND allocvaluesnumnew.
        allocvaluesnumnew-charact =  "characteristic name goes here".
        allocvaluesnumnew-value_from =  "characteristic value goes here".
        APPEND allocvaluesnumnew.
        CALL FUNCTION 'BAPI_OBJCL_CHANGE'
          EXPORTING
            objectkey                = objectkey
            objecttable              = 'MCHA' " MCH1 in case of cross-plant batch management
            classnum                 = classnum " Classification class number, as used in MSC2N
            classtype                = classtype " Classification class type, as used in MSC2N
    *   STATUS                   = '1'
    *   STANDARDCLASS            = STANDARDCLASS
    *   CHANGENUMBER             = CHANGENUMBER
    *   KEYDATE                  = SY-DATUM
    *   NO_DEFAULT_VALUES        = ' '
    * IMPORTING
    *   CLASSIF_STATUS           = CLASSIF_STATUS
          TABLES
            allocvaluesnumnew        = allocvaluesnumnew
            allocvaluescharnew       = allocvaluescharnew
            allocvaluescurrnew       = allocvaluescurrnew
            return                   = return
    * Do not forget to commit, otherwise changes would not take effect.
    commit work.
    Regards,
    Hashir Ahmed

Maybe you are looking for