How to use MDM ABAP API?

Hi Guys,
I want to use ABAP API for manipulating MDM records(EX Adding two field values and assign into another field value).
Can anybody guide me step by step process?
Best Regards
Devaraj PK

Hi Devraj,
Please go through this pdf:
1. How To identify identical master data records using SAP MDM 5.5 ABAP API’s
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e060251e-b58d-2910-02a2-c9a1d60d9116
2. MDM ABAP API
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/00c49ffb-e5e5-2910-73ba-c85af1da5b0a
http://help.sap.com/saphelp_mdm550/helpdata/en/44/93aa6831381053e10000000a422035/content.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/connectivity-ABAP+API&
Pls rewrds if found helpful.
BR,
Alok Sharma

Similar Messages

  • Retrieving hierarchy fields from MDM to SAP R/3 using MDM ABAP API's

    Hi all,
    I have developed a code to retrieve fields from MDM to SAP R/3 using MDM ABAP API's, i could retrieve   all of the fields excluding the Lookup[Hierarchy] fields like-  FACILITY CODE  etc...
    please update me if anyone has any experience on this.
    Thanks and regards,
    Aastha Mehrotra

    Hi ,
    Any one worked in the MDM API to retrieve Hierarchy fields ???
    Regards,
    Arun.

  • Read data from MDM For Lookup and Flat table using MDM ABAP API

    Hi,
    I have requriment to read data from MDM from FLAT and Lookup table using MDM ABAP API. My design  is like this ,
    I have one ITEMS (Main table in MDM) and inside that i have one Lookup flat table ITEM_TYPE , my requriment is to read Item number and its related Item type.
    From ABAP.
    Please help if any body has any idea.
    Regards,
    Shyam

    HI Guys,
    I found my solution by myself. Below is the solution , hope this will help others:-
    Retrieve data from MDM  using MDM ABAP API.
    Step- 1. Create structure in SAP with the same name as that of MDM field code for MDM Main table.
    Step-2. Create another structure in SAP having all  lookup fields of MDM , fieldname in ECC must be same as that of MDM field
    code.
    Step-3.Create structure in SAP for  individual lookup field(Single Field only)   with the same name as MDM Field code.
    Step-4.
    DATA: IT_QUERY            TYPE STANDARD TABLE OF MDM_QUERY,  "MDM_QUERY_TABLE,
          WA_QUERY            TYPE  MDM_QUERY,
          WA_CDT_TEXT         TYPE  MDM_CDT_TEXT,
          IT_RESULT_SET_KEY   TYPE  MDM_SEARCH_RESULT_TABLE,
          WA_RESULT_SET_KEY   TYPE  MDM_SEARCH_RESULT,
          WA_STRING           TYPE  STRING.
    DATA:<Internal table> TYPE STANDARD TABLE OF <SAP Str Having all LOOKup Fields>    
    DATA: :<Internal table>TYPE STANDARD TABLE OF <SAP Str one LOOKup field>,
         <Workarea> LIKE LINE OF :<Internal table>.
    *PASS LOGICAL OBJECT NAME.
    V_LOG_OBJECT_NAME = 'Logical object name defined in Customization'.
    Define logon language, country & region for server
    WA_LANGUAGE-LANGUAGE = 'eng'.
    WA_LANGUAGE-COUNTRY = 'US'.
    WA_LANGUAGE-REGION = 'USA'.
    TRY.
        CREATE OBJECT LR_API
          EXPORTING
            IV_LOG_OBJECT_NAME = V_LOG_OBJECT_NAME.
    ENDTRY.
    CONNECT to repository. Apply particular logon language info
    CALL METHOD LR_API->MO_ACCESSOR->CONNECT
      EXPORTING
        IS_REPOSITORY_LANGUAGE = WA_LANGUAGE.
    *NOW PASS ITEM NO AND GET KEY FROM MDM.
    CLEAR WA_QUERY.
    WA_QUERY-PARAMETER_CODE  = <MDM FIELD CODE>. "Field code
    WA_QUERY-OPERATOR        = 'EQ'. "Contains
    WA_QUERY-DIMENSION_TYPE  = 1. "Field search
    WA_QUERY-CONSTRAINT_TYPE = 8. "Text search
    WA_STRING                = <Field Value>.
    GET REFERENCE OF WA_STRING INTO WA_QUERY-VALUE_LOW.
    APPEND WA_QUERY TO IT_QUERY.
    CLEAR WA_QUERY.
    *PASS ITEM NUMBER AND GET RELATED KEY FROM MDM.
    TRY.
        CALL METHOD LR_API->MO_CORE_SERVICE->QUERY
          EXPORTING
            IV_OBJECT_TYPE_CODE = <MDM Main Table>
            IT_QUERY            = IT_QUERY
          IMPORTING
            ET_RESULT_SET       = IT_RESULT_SET_KEY.
      CATCH CX_MDM_COMMUNICATION_FAILURE .
      CATCH CX_MDM_KERNEL .
      CATCH CX_MDM_NOT_SUPPORTED .
      CATCH CX_MDM_USAGE_ERROR .
      CATCH CX_MDM_PROVIDER .
      CATCH CX_MDM_SERVER_RC_CODE .
    ENDTRY.
    Pass record id into keys.
    LOOP AT IT_RESULT_SET_KEY INTO WA_RESULT_SET_KEY.
      WA_KEYS = WA_RESULT_SET_KEY-RECORD_IDS.
    ENDLOOP.
    WA_RESULT_SET_DEFINITION-FIELD_NAME = <Look field name>.
    APPEND WA_RESULT_SET_DEFINITION TO IT_RESULT_SET_DEFINITION.
    CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE
      EXPORTING
        IV_OBJECT_TYPE_CODE      = <MDM Main Table>
        IT_RESULT_SET_DEFINITION = IT_RESULT_SET_DEFINITION
        IT_KEYS                  = WA_KEYS
      IMPORTING
        ET_RESULT_SET            = IT_RESULT_SET.
    LOOP AT IT_RESULT_SET INTO
            WA_RESULT_SET.
    *PASS KEYS INTO MAIN TABLE TO GET Structure for FALT or Look up Table
      TRY.
          CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
            EXPORTING
              IV_OBJECT_TYPE_CODE = <MDM Main Table>
              IT_KEYS             = WA_KEYS
            IMPORTING
              ET_DDIC_STRUCTURE =<SAP Strct having all Look up fileds of MDM>         
      ENDTRY.
      LOOP AT <SAP Strct having all Look up fileds of MDM> INTO <Work area>.
        CLEAR WA_KEYS.
        APPEND <Work area>-field name TO WA_KEYS.
        CALL METHOD LR_API->MO_CORE_SERVICE->RETRIEVE_SIMPLE
          EXPORTING
            IV_OBJECT_TYPE_CODE = <MDM Lookup table name>
            IT_KEYS             = WA_KEYS
          IMPORTING
            ET_DDIC_STRUCTURE   = <Single Structure in SAP For Lookup field>.
        READ TABLE <Single Structure in SAP For Lookup field>. INTO <Work Area> INDEX 1.
    Here you can get the value of realted lookup fields associated with main table data.
      ENDLOOP.
    ENDLOOP.
    LR_API->MO_ACCESSOR->DISCONNECT( ).
    Edited by: Shyam Babu Sah on Nov 24, 2009 4:52 AM

  • Trigger MDM Workflow Using MDM ABAP API

    Hi ,
    I have requriment to trigger MDM Workflow from ABAP , Please suggest how to do it ?'
    Thanks in Advance.
    Shyam.

    Hi,
    Are you creating material in MDM using Data Manager or Portal. or Using ABAP API.
    If your workflow trigger Action is "Record Create" then it should trigger workflow as soon as new material is created. I don't see any problem in this.
    Regards,
    Shiv

  • MDM ABAP API  ISSUE ( server  is getting down )

    Hi Folks,
    I am trying to retrieve matching results using MDM ABAP API.
    I am spiting source and target records into lot of blocks dynamically
    in program. I am getting output 2 to 3 times if i can run program
    sequential after that server is getting down (before running program
    i am completely going out and rerunning).After server bring's up
    running couple of times and server getting down.
    Please help me how can i solve this issue.
    Thanks,
    Anil.

    Hi Anil,
    You can have a look at the below links can cross check the steps you have performed in establishing the connection correctly:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/00c49ffb-e5e5-2910-73ba-c85af1da5b0a
    ABAP APIs: Error "The connection is not trusted"
    Comaptible ABAP APIs for MDM 5.5 SP6 Patch 1
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/tip%2b%2bMDM%2bABAP-API%2b%2bThings%2bto%2bRemember%2b(for%2bStarters)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e060251e-b58d-2910-02a2-c9a1d60d9116
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • MDM Hierarchy Table Into Tree UI Control in ABAP WebDynpro & MDM ABAP APIs

    Experts,
    I am a newbie to ABAP / MDM ABAP APIs. I am looking into the possibility of using Tree as as a UI control in a webdynpro abap application to represent hierarchy tables, perform hierarchy / taxonomy search, create and update records involving hierarchy fields, using MDM ABAP APIs.
    I would like to seek inputs to check whether and how, is it possible to use MDM ABAP APIs to:
    1. To perform taxonomy search on material table
    2. To Create material records in the main table involving taxonomy fields.
    3. To search on main table records using taxonomy attribute values as search parameters.
    4. To use Tree UI control with in WebDynPro ABAP, to peform above operations.
    We intend to use function modules - service calls from within WebDynPro ABAP applications, hence would like to know the feasibility, actual build effort and complexity of function modules.
    Inputs and advice on same will be highly appreciated and duly rewarded.
    Regards,
    Paras

    1. To perform taxonomy search on material table - if material table is of type Taxonomy then possible
    2. To Create material records in the main table involving taxonomy fields - possible . you create records in main table and assign value of field to that of taxonomy table entry
    3. To search on main table records using taxonomy attribute values as search parameters. - possiblr
    4. To use Tree UI control with in WebDynPro ABAP, to peform above operations. - yes possible
    dont mix between hierarchy table and taxonomy table
    they are diff in MDM , but it is possible to build UI with WD tree element for each of these types.
    all that you said are supported in ABAP APIs
    thanks
    -Adrivit

  • MDM ABAP API - Retrieval of Qualified Flat lookup fields

    Hi,
    I am having trouble retrieving the records using MDM ABAP API when the fields that are being retrieved includes a Qualified Flat lookup field. An exception is being thrown with the error message <b>Value with type id 0 is not supported</b>. I don't see any problem when I am trying to retrieve other fields of types String or Real. The type of the Qualified Flat lookup field is set to MDM_QUALIFIED_LINK_TABLE as per the How to guides given by SAP. Any ideas on why the exception is occuring?
    Thanks
    Suman

    Hi Suman,
    Please check if the How to guide (#13) in SMP -operations is of help https://websmp204.sap-ag.de/nw04operation
    Regards,
    Anita

  • MDM ABAP API select-option

    Hi,
    I am using MDM ABAP API to retrieve values from MDM. I would like to know if there is any way to use select-option to query and retrieve values from MDM. Below is my code which retrieves values from MDM:
          IF p_stat IS NOT INITIAL.
            wa_query-parameter_code  = 'Z_EMPLOYMENT_STATUS'. "Field code
              wa_query-operator        = 'EQ'.   "Equals
            wa_query-dimension_type  = '1'.      "Fieldsearch
            wa_query-constraint_type = '8'.
            LOOP AT p_stat.
              lv_text1 = p_stat-low.
              GET REFERENCE OF lv_text1 INTO wa_query-value_low.
              APPEND wa_query TO gt_query.
            ENDLOOP.
          ENDIF.
          CALL METHOD lr_api->mo_core_service->query
            EXPORTING
              iv_object_type_code = 'Z_PEOPLE'             
              it_query            = gt_query
            IMPORTING
              et_result_set       = gt_result.
    I can't pass multiple values to gt_query like in select-option.
    Is there any way to do so?.
    Thanks & Regards,
    Soumya.

    Any solution?.

  • MDM ABAP APIs Issues;

    Hi All,
    1. Can we Create Lookup Field in the main table which is
    link  to Lookup Sub table Using MDM ABAP APIs.
    2. We have to Assign FieldQualifiedFlatLookup entries and also qualifiers manually by going into MDM Data Manger as given in HowTo_13.Pdf. Can we achieve this Only Using MDM ABAP APIs.
    3. What is the Role of Value Check inHowTo_19.Pdf.
    4. Can change tracking achievable using MDM ABAP APIs
    Assure Ponits will be rewarded for helpful Answers:
    Thanks in Advance,
    Mandy

    Hi Mandy,
    I would like to help you out on your last query.
    ABAP API's has provided with 2 methods which are related to Change tracking.
    The 2 methods are:
    1. RETRIEVE_CHANGE_TRACKING: You can use this method to update the MDM Change tracking metadata.
    2. RETRIEVE_UPDATE_TRACKING You can use this method to retrieve the MDM Change tracking metadata.
    Along with this, you can use the tracking and CCMS Montioring functionality to keep a track on changes done in MDM through ABAP API's.
    I am also attaching a link to a very gud webinar by Klaus David on ABAP API's:
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00dd47bd-f2f1-2910-5eab-e9ca52465ae4].
    Kindly go through it.
    I hope it helps.
    *Please reward points if found useful.
    Thanks and Regards
    Nitin Jain

  • MDM ABAP APIs

    Hi All,
    After creating Repository on MDM Server Using MDM ABAP APIs, when i call MDM_Accessor_connnect function module to connect the Repository i am geeting Error: Server Return Code 0XFFAA0201 :User not found. Even i have created same Identical user name with Password who has logged onto the R/3 System as suggested in HowTo_02.pdf
    Assure Points will be awarded if problem solves.
    Am i missing any settings please suggest.
    Regards,
    Mandy

    Hi Mandy,
    Give the user name which is same as R/3 system in Capital letter. Dont give any password .
    Regards,
    Nikhil

  • How to access the SAP MDM destinations using mdm java api in 7.1

    hi,
    I have SAP MDM 7.1 SP11 and SAP Portal 7.3 and developing the custom webdynpro application using the  JAVA MDM API. I want configure the SAP MDM destinations in SAP Portal .
    How to access the MDM destinations in java code using API? and how to create the connection with MDM using the MDM destinations.
    Please provide the code for access the SAP MDM destinations in java code using MDM java api and creating the connection to MDM.
    Thanks

    Jun,
    Thanks for the reply and api information.
    I have got this api information from the following sap documentation. But i am looking for the code by implementing this class and creating the mdm connection.
    Creating an MDM Connection Using Java Code - SAP NetWeaver Master Data Management (MDM) - SAP Library
    if any thing can you share it.
    Thanks

  • MDM ABAP API exception using method invoke_matching

    Hi,
    I am using below calss in MDM ABAP API. If i can use small records
    source (1000) target (1000) it is working fine. If  i can use source (1000)
    Target ( 40, 000) i am getting exception ( kernal exception ).
    Please could you advise do i have to set any parameter.
    CALL METHOD lr_api->mo_core_service->invoke_matching
    EXPORTING
    iv_object_type_code = 'MDM_BUSINESS_PARTNERS'
    iv_strategy_id = ls_matching_strategy-strategy_id
    is_matching_filter = ls_matching_filter
    iv_wait_for_invocation = 'X'
    IMPORTING
    ev_matching_task_id = lv_matching_task_id
    ev_matched_record_count = lv_matched_record_count.
    Thanks,
    Anil

    Thank you Andreas its working fine. I am getting new issue
    if i can filter result vs result or result vs selected or sleeted vs result.
    I am passing the values in is_matching_filter.
    matching_scope = 1 or 2.
    selected_records = ( query record ids)
    query_records = ( i am not passing anything).
    1. If i can select source and target values same 2. Filter 2 vs 2
    its working fine. Remaining scenarios its not working. Please
    help me.
    CALL METHOD lr_api->mo_core_service->invoke_matching
    EXPORTING
    iv_object_type_code = 'MDM_BUSINESS_PARTNERS'
    iv_strategy_id = ls_matching_strategy-strategy_id
    is_matching_filter = ls_matching_filter
    iv_wait_for_invocation = 'X'
    IMPORTING
    ev_matching_task_id = lv_matching_task_id
    ev_matched_record_count = lv_matched_record_count.
    Thanks,
    Anil

  • How to retrieve the data from MDM hierarchy table using MDM Java API

    Hi,
    I had a hierarchy table in MDM. This table had some column say x. I want to retrieve the values of this x column and need to show them in a drop down using MDM Java API.
    Can anyone help me to solve this?
    Regards
    Vallabhaneni

    Hi,
    Here is your code...
    TableId Hier_TId = repository_schema.getTableId(<hierarchy table id>);
    java.util.List list = new ArrayList();
    ResultDefinition Supporting_result_dfn = null;
    FieldProperties[] Hier_Field_props =rep_schema.getTableSchema(Hier_TId).getFields();
    LookupFieldProperties lookup_field = null;
    TableSchema lookupTableSchema = null;
    FieldId[] lookupFieldIDs = null;
    for (int i = 0, j = Hier_Field_props.length; i < j; i++) {
    if (Hier_Field_props<i>.isLookup()) {     
                                  lookup_field = (LookupFieldProperties) Hier_Field_props<i>;
         lookupTableSchema =repository_schema.getTableSchema(lookup_field.getLookupTableId());
                                  lookupFieldIDs = lookupTableSchema.getFieldIds();
         Supporting_result_dfn = new ResultDefinition(lookup_field.getLookupTableId());
         Supporting_result_dfn.setSelectFields(lookupFieldIDs);
         list.add(Supporting_result_dfn);
    com.sap.mdm.search.Search hier_search =new com.sap.mdm.search.Search(Hier_TId);
    ResultDefinition Hier_Resultdfn =     new ResultDefinition(Hier_TId);
    Hier_Resultdfn.setSelectFields(rep_schema.getTableSchema(Hier_TId).getDisplayFieldIds());
    ResultDefinition[] supportingResultDefinitions =
    (ResultDefinition[])list.toArray(new ResultDefinition [ list.size() ]);
    RetrieveLimitedHierTreeCommand retrieve_Hier_tree_cmd =
    new RetrieveLimitedHierTreeCommand(conn_acc);
    retrieve_Hier_tree_cmd.setResultDefinition(Hier_Resultdfn);
    retrieve_Hier_tree_cmd.setSession(Auth_User_session_cmd.getSession());
    retrieve_Hier_tree_cmd.setSearch(hier_search);
    retrieve_Hier_tree_cmd.setSupportingResultDefinitions(supportingResultDefinitions);
    try {
         retrieve_Hier_tree_cmd.execute();
    } catch (CommandException e5) {
              // TODO Auto-generated catch block
              e5.printStackTrace();
    HierNode Hier_Node = retrieve_Hier_tree_cmd.getTree();
    print(Hier_Node,1);
    //method print()
    static private void print(HierNode node, int level) {
    if (!node.isRoot()) {
         for (int i = 0, j = level; i < j; i++) {
              System.out.print("\t");
         System.out.println(node.getDisplayValue());
    HierNode[] children = node.getChildren();
    if (children != null) {
              level++;
    for (int i = 0, j = children.length; i < j; i++) {
    print(children<i>, level);
    //end method print()
    Best regards,
    Arun prabhu S
    Edited by: Arun Prabhu Sivakumar on Jul 7, 2008 12:19 PM

  • How to populate boolean fields using MDM Java API's

    Hi Experts!
    I am trying to populate Boolean fields in main table of my repository using MDM JAVA API SP 05 patch 2.
    Problem is i am geting syntax error for any value that i try to put in.
    Please provide me sample code for the purpose.
    Thanks in advance!

    Hi,
    Here is the code snippet to populate boolean values from Main Table in the Repository:
    Populating boolean values from Main Table in the Repository:
    wdContext.currentNodeElement().setABC(Boolean.valueOf((strABC).toString()).booleanValue());
    Putting boolean values in the main table:
    Record objEmptyRecord = RecordFactory.createEmptyRecord(new TableId(strTableId));
    boolean bFieldValue = ((Boolean)strABC).booleanValue();
    objEmptyRecord.setFieldValue(new FieldId(strFieldId),new
    BooleanValue(bFieldValue));
    Hope this helps.
    Regards
    Neha Sharma

  • MDM ABAP API - Language information not valid for repository

    Dear all,
    We're programming an interface in SAP R/3 to MDM catalog through 'MDM ABAP API's'. Automatically, it creates an RFC connection to MMD, but we're getting the following connection errorwhen executing the API:
    E MDM_ABAP_API         078 Language information ENG US USA not valid for MDM repository XXXYYYZZZ*.
    *where XXXYYYZZZ is the repository name. 
    W'e've established the connection in R/3 through transaction MDMAPIC and we've created the same user in R/3 and MDM Console.
    This is the code written on the program where we are defining the language (ENG), country (US) and region (USA).
    *maintain logon language information
    ls_repository_language-language = 'ENG'.
    ls_repository_language-country = 'US'.
    **no region information needed here
    ls_repository_language-region = 'USA'.
    How can I see the repository language definition?
    Which are the correct codes to be used for language 'English', Country 'United States' and Region 'USA'?  And for other countries, like spanish language, country Spain and Region ¿spain?
    In fact, we copied this code from website:
    http://help.sap.com/saphelp_nwmdm71/helpdata/en/44/93ad8931381053e10000000a422035/frameset.htm
    Maybe the problem is that any RFC configuration is missing, and it has to be done in transaction SM59?
    Thanks for your feecback,
    Carlos Santamaría.

    The problem is now solved.
    The correct languague information codes for Language Spanish, Country Spain and Region, are as follows:
    Language: 'spa'
    Country: 'ES'
    Region: '___'
    It is important to respect the CAPS, otherwise it doesn't work.
    Regards,
    Carlos Santamaría.

Maybe you are looking for

  • I did allllll that is listed below, but when I get to sync iPad, it won't sync, what do I do? Preparation Before you connect any device to a new library go to the Devices tab

    THis is what I did, but when I get to sync, it won't sync.....what do I doLynnLynn Preparation Before you connect any device to a new library go to the Devices tab of the the preferences panel via Edit > Preferences (Windows) or iTunes > Preferences

  • Canopus ADVC 110 and Final Cut Pro

    I have FCP 5.1.4 and I have attached Canopus ADVC 110 using white, red, and yellow video cables to my VCR to capture a home video and transfer to CD.  I am getting nothing on FCP when I hit log and capture.  What should my settings be on capture sett

  • How to parse xml (kXML)

    I have some problems when I try to parse xml with the kXML parser. My xml doc looks like this: <?xml version="1.0" encoding="utf-8" ?> - <dsGreenRoom> - <Rooms> - <RoomsInfo> <ID>1</ID> <Name>Rum 101</Name> <Type>Dubbelrum</Type> <NumberOfBeds>2</Num

  • ADF Security

    Dear All; I am new to ADF security, my target is to create a web application, with authentication through a login page, and session tracking through out the users session, i used to do this all in code, the JSP way, where i check the session in every

  • Payment arrangement

    I have a payment arrangement made for July 3rd. My bill is 313 dollars and I was able to make a payment of 150 dollars. My parents usually pay half but their payment will not go through and only method of payment they have is check. Is my service goi