Remote Key Manupulation in Java MDM APIs

Hi ,
I need to do create/Modify/retrieve remote key using MDM Java APIs. I have found out two APIs for retrieve and modify of remote key (RetrieveRecordsKeyMappingsCommand and ModifyRecordsKeyMappingsCommand using RecordKeyMapping).
I am not getting any API to create remote key using Java APIs. Can anyone help me in this regard.If anyone has sample code also that would a great help.
Thanks and Regards,
Subhasis

Hi,
Please have a look on below code ...
          /TableID/
          TableId tableId = schema.getTable("table Code").getId();
RecordId recordId = new RecordId("R1"); // record id of record to which you are going to add key mapping
          /Remote System Properties/
          RemoteSystemProperties remoteSystem = schema.getRemoteSystem("RemoteSystemCode");
          /*Creating new instance of RecordKeyMapping */
          RecordKeyMapping recordKeyMapp = KeyMappingFactory.createRecordKeyMapping(tableId,recordId);
          /*Creating new instance of KeyMapping */
          KeyMapping keyMapping = KeyMappingFactory.createKeyMapping(remoteSystem.getId());
          /*Setting value to Key value */
          keyMapping.addKey("1234");
          /storing keymapping instance in RecordKeyMapping instance/
          recordKeyMapp.addKeyMapping(keyMapping);
          RecordKeyMapping [] recordKey = ;
          ModifyRecordsKeyMappingsCommand rkm = null;
          try {
           rkm = new ModifyRecordsKeyMappingsCommand(context);
          } catch (SessionException e) {
          } catch (ConnectionException e) {
          rkm.setKeyMappings(keyMappings);
          try {
               rkm.execute();
          } catch (CommandException e) {
Hope this helps you.
Cheers,
Veeru.

Similar Messages

  • Webdynpro with MDM thru JAVA MDM API

    Hi all
    i have the requirement with webdynpro MDM JAVA API which interacting with MDM system.
    i have one repositoty in the MDM console i.e DEMO_CUSTOMER
    i have one table in that repository called CUSTOMER_ADDRESS .
    i want to access the customer address details information from the MDM table into Webdynpro application.
    can you please send the sample code to the following operations with MDM table which retrieves the information in the webdynpro application.
    1) displying the table data
    2) inserting the record from the table
    2) deleting the record from the table
    3) updating the record from the table.
    it is very helpful to me if anybody would have to send the sample code to me to the above operations.
    Regards
    Suresh babu

    If you are using the MDM Java Connector from Web Dynpro application, you have to set the properites accordingly.
    Go to <b>properties of Project</b> and there choose "<b>Webdynpro reference</b>". Here, choose <b>library reference</b> and there give your library reference.

  • Default remote key check box

    Hi ,
    Does anyone know the significance of defalut remote key mapping check box that appears during Edit Key mapping ?
    Let me know if it can be used in any way.
    Regards
    Yogesh

    Default remote key check box is used to select 1 record among multiple merged records from same remote system.
    if you get 2 or more duplicate records from 1 source systems, then only 1 record out of them can have default remote key check box.
    an MDM object may map to multiple keys from the same remote system. When an MDM object maps to multiple keys, one of the keys is marked as the default key. The default keys the one that is used when syndicating a reference to the mapped MDM object.
    For example, for a particular remote system, the two color objects Light Red and Dark Red both map to the MDM object Red. An MDM product object Shirt has a Color attribute set to Red. When this Shirt object is syndicated back to the remote system, the default key is used to choose the value to syndicate from the two objects Light Red and Dark Red.
    + An
    Try to close your previous questions if they are answered.

  • Loading eClass or UNSPSC  into Hierarchy, remote key isn't generated

    Hello Experts,
    I tried importing eCl@ss and/or UNSPSC into the hierarchy table.
    The import works fine and the hierarchy is created.
    But the import manager doesn't generates the remote key for the choosen remote system.
    Regards,
    Sven

    Hi Sven,
    - If you are trying to Import the eCl@ss and/or UNSPSC into the hierarchy table from an input sources which contains unique key for each record.Then you will need to enable the key mapping as Yes in MDM for the respective MDM table and then in IM you will need to map this unique remote key to the destination <Remote Key> field in the MDM IM->Field mapping tab and then use this Remote key for importing the unique records into MDM.This will make available the Key from the source system to identify the records.
    - However if you wish the keys to be generated by MDM for these records as no such unique keys are available from the source system.Then you can do so by seeting the Range for teh key generation under the Remote system property.But these assigned keys will only be visisble at syndication.
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Java API Remote key

    Hi All,
           I want to retrieve all remote key entries using MDM Java API how can I do that any one had done it before or have any clue for this?
    Thanks

    Hi
          you can try this code
              RetrieveRecordsKeyMappingsCommand recordKeyMappingCommmaond = new RetrieveRecordsKeyMappingsCommand(connection);
              recordKeyMappingCommmaond.setSession(this.getAuthenticatedUserSession().getSession());
              recordKeyMappingCommmaond.setTableId(mainTableId);
              recordKeyMappingCommmaond.setRecordIds(recordIds);
              recordKeyMappingCommmaond.execute();
              GetRemoteSystemListCommand remoteSystemsCommand = new GetRemoteSystemListCommand(connection);
              remoteSystemsCommand.setSession(this.getAuthenticatedUserSession().getSession());
              remoteSystemsCommand.execute();
              RemoteSystemProperties[] remoteSystemProperties = remoteSystemsCommand.getRemoteSystems()
    Thanks
    Ninad

  • MDM API for key Mapping.

    Hi All,
    Can anyone tell me how to use MDM API for updating key mapping ?
    I want to create a webservice which will take customer,client system and key for updating key mapping in mdm.
    Can anyone give me clue on this

    Hello Rama:
    Under Java you can do these things:
    Delete key mapping:
    CatalogData.DeleteKeyMapping(ClientSystem : String, Table :
    String, RecordID : int, Keys : String[])
    Argument Description
    ClientSystem -> Client system name
    Table -> Table name
    RecordID -> Record ID
    Keys -> Remote keys to remove
    Set a new keymapping:
    CatalogData.SetKeyMapping(ClientSystem : String, Table :
    String, RecordID : int, Keys : String[], DefaultKeyIndex
    : int)
    Argument Description
    ClientSystem ->    ClientSystem name
    Table ->           Table name
    RecordID ->        Record ID.
    Keys ->            Remote Keys you want to add
    DefaultKeyIndex -> Index entry into the key parameter
    indicating the key value as the default.
    I hope that helps
    Alejandro

  • Read "Qualified Range Key Generation" with Java API.

    Hi guru,
    I use MDM 5.5 SP6.
    In MDM Console I read Qualified Range Key Generation it in "ADMIN -> Remote Systems -> Qualified Range".
    I have to get "Qualified Range Key Generation" with Java API.
    It's possible?

    Hi Rocco,
    I am also thinking  of same scenario.I thought it is possible in Java Apis by calling the webservices for MDM.there is a service of "get key mapping" where we can pass this "Qualified key range" as  parameter.In MDM we have to define a look up table for that key ranges .We will access that table through JAVA API and then link it with the key mapping service .
    If u find any solution to apply this ,please share.
    thanks and regards
    Ank

  • MDM 7.1 remote key generation on different Remote Systems

    I am checking onthe remote key gerneration.
    1. When I import data from a remotesystem lets say A AND the data have e.g.. a vendor number in Vendors from BusinessContent
        the remote keys are generated for this remote system.
    2. Whe I want to syndicate these date to another remote system e.g. SAP ERP, the objectid i.e. LIFNR is NOT shown in
       the syndicators Destination Preview.
       independent of the map properties setting "Remote Key Override"
    3. When I enter the key by hand inthe data manager the data are shown in the syndicator but only it "Remote key overrifde"is
       set to the target system.
    Question:
    It looks like that the remote keys for a different remotesystem other than the one I omported from are NOT set.
    How to do a automatical assignment to the keys of this different Remote System

    I checked:
    SAP ERP Remote System range 100000 999999
    A range 100000 199999
    Key Mappings defined for SAP ERP Remote System (checked in Data Manager)
    key Mappings not defined for A (checked in Data Manager)
    Everything I do I do in the Syndicator
    With mapping property "Remote Key Override" marekd as "Reset" no LIFNR is written to SAP ERP
    With this property set to SAP ERP the LIFNR is sent.
    When I use System A it doesn't matter which settings I have there is no VendorNumber sent out.
    Looks like I miss the settings for a property?

  • How to use Remote key for linking two repository

    Hi,
    I have a challenge like not to repeate common tables like Company_code,Currency,Vendor name,customer name across all repositories.
    Is there any way I can use 'Remote key' to link different repository.
    I can create a Main table with all common attributes required across the repository but want to know how I can connect it to different repository.
    For example to get company-code in Vendor table , how can I link Company-code main table(customized) in another repository may be thru 'Remote key'.
    Going thru java api route is not prefffered for the sake of simple solution.
    Appreciate your help in providing any idea and detail steps for the process.
    -regards, Reo

    could you confirm the name and the existence of this file "IOMM_20121213_060736.csv" ?
    same error like:
    http://www.oracle-base.com/articles/9i/external-tables-9i.php
    if the load files have not been saved in the appropriate directory the following result will be displayed.
    SQL> SELECT *
      2  FROM   countries_ext
      3  ORDER BY country_name;
    SELECT *
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Countries1.txt in EXT_TABLES not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1Edited by: Fran on 10-ene-2013 23:32

  • Remote key Search in Portal Contents

    Hi,
    I would like to know if its possible to Search Records in MDM based on the Remote Key in the Standard SAP Search Portal contents.
    Regards,
    Tanveer.

    Thanks..
    Any idea if any newer versions support the same..
    Also, Can I enhance the current Portal Contents to accomodate search by Remote Key as the API allows to do the same..
    Regards,
    Tanveer

  • Search for records by Remote Key or Remote System in Data Manager

    Hi all,
    We have a requirement to search for records by Remote key and/or Remote System at the main table level. Is it possible to do this using the Data Manager? If so, how?
    Thanks in advance!
    Lavanya.

    Hi,
    I crosschecked with MDM 5.5 and Don't think it is possible through Data Manager. How ever using APIs you can search records using remote key/ remote system.
    Regards,
    Shiv

  • Key benefits of using MDM

    Hi,
        I am trying to build a business case as to why a business should go for MDM implementation. Can anyone provide any insight into what are the key business benefits of implementing MDM ?
    Thanks

    Hi GS,
    In addition to above posts
    MDM Implementation basically deals to manage and maintain master data of the any firm/organization.
    The Dis separate and bad data is lying through out your IT landscape. to get a "singel version of truth"  or "360 degree view of your data" you need to implement MDM.
    though many MDM technologies are in market in order to implement. but as far as SAP MDM is concern, it is  the most versatile and beautiful platform over all others
    as it gives you
    Master Data Integration :
    Use MDM remote system extractor to extract customizing data in the initial setup of your MDM system
    Use MDM remote system extractor to automatically extract master data
    Use MDM import mechanisms to load master data from various sources
    Use MDM business content to integrate data
    Use MDM Syndicator to distribute master data to various targets
    Use MDM APIs and Web services to integrate data
    Some of the Operations :
    Data Modeling
    Role-Based Data Access
    Search
    Workflow-enabled Data Creation/Maintenance
    Data Publishing
    Master Data Quality
    Use validations and assignments to check the accuracy and consistency of your master data
    Create more complete and meaningful master data using the MDM Enrichment Architecture
    Create non-redundant and consistent master data using matching and merging capabilities
    I think things are clear for you  as far as MDM Implementation is concern.
    Hope it helps.
    Deep

  • Remote System and Remote Key Mapping at a glance

    Hi,
    I want to discuss the concept of Remote System and Remote Key Mapping.
    Remote System is a logical system which is defined in MDM Console for a MDM Repository.
    We can define key mapping enabled at each table level.
    The key mapping is used to distinguish records at Data Manager after running the Data Import.
    Now 1 record can have 1 remote system with two different keys but two different records cannot have same remote system with same remote key. So, Remote key is an unique identifier for record for any remote system for each individual records.
    Now whenever we import data from a Remote System, the remote system and remote key are mapped for each individual records. Usually all records have different remote keys.
    Now, when syndicating back the record with default remote key is updated in the remote system that is sent by xml file format.
    If same record is updated two times from a same remote system, the remote key will be different and the record which is latest contains highest remote key.
    Now, I have to look at Data Syndication and Remote key.
    I have not done Data Syndication but my concept tell if there is duplicate record with same remote system but different remote keys both will be syndicated back. But if same record have two remote keys for same remote system then only the default remote key is syndicated back.
    Regards
    Kaushik Banerjee

    You are right Kaushik,
    I have not done Data Syndication but my concept tell if there is duplicate record with same remote system but different remote keys both will be syndicated back.
    Yes, but if they are duplicate, they needs to be merged.
    But if same record have two remote keys for same remote system then only the default remote key is syndicated back.
    This is after merging. So whichever remote key has tick mark in key mapping option(default) , it will be syndicated back.
    Pls refer to these links for better understanding.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/80eb6ea5-2a2f-2b10-f68e-bf735a45705f
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/7051c376-f939-2b10-7da1-c4f8f9eecc8c%0c
    Hope this helps,
    + An

  • Search for [Remote Key] and [Remote System] in Data Manager

    Hello all
    I would like to be able to search on the remote key and the remote system in the MDM Data Manager is that not possible? I thought I remembered seeing that possibility under the Free-Form Search but now I can't find it.
    I have, however, found this in the Data Manager reference guide:
    REMOTE SYSTEM AND REMOTE KEY FIELDS
    MDM uses the remote systems defined in the Remote Systems table
    within the MDM Console to store and maintain key mapping information
    for each record or text attribute. It does this using a virtual “key
    mapping” field that you never see in the MDM Client.
    This virtual key mapping field is very much like a qualified lookup field
    into a virtual key mapping qualified lookup table.
    Key Mapping information stored in virtual lookup field
    The Remote System and Remote Key fields are normally not visible;
    however, they do appear in several places in the MDM Client.
    Specifically, both fields: (1) appear in the File > Export dialogs in Record
    mode for exporting value pairs; (2) are recognized by the File > Import
    dialog in Record mode for importing value pairs; and (3) appear in the
    Edit Key Mappings dialogs in both Record mode and Taxonomy mode,
    for viewing and editing value pairs.
    Is there any way to search on the value in the remote key from the Data Manager?

    Not sure search i think not possible.
    But you can see keys as mentioned:
    Enable Key mapping in Console.
    MDM Client maens MDM Data Manager.
    They do appear in several places in the MDM Client or Data Manager. Three different methods to see in DM are given already below:
    Specifically, both fields: (1) appear in the File > Export dialogs in Record mode for exporting value pairs; (2) are recognized by the File > Import dialog in Record mode for importing value pairs; and (3) appear in the Edit Key Mappings dialogs in both Record mode and Taxonomy mode, for viewing and editing value pairs.
    BR,
    Alok

  • Remote Key Mapping - Maintanance

    Hi All,
    I have Auto Id field in my repository; I would like to maintain this as my remote key value in my key mapping table ( automatically) in the following scenarios:
    1. Initial Loading
    2. On going ( from portal)
    3. Manual creating a record
    The issue is, since its auto id - not available until unless it get created?
    Do I need to syndicate all and loop back as Import and update remote key??? or any webservices and so?
    thanks,
    Alexander.

    Hi Raja
    You are correct on the approach. This can be done by automatic syndication of the newly created records from any of the channels( excel import, Portal, MDM GUI) to Outbound ready folder from where the files are copied to Inbound folder and automatically imported back in MDM. Steps to be followed can be-
    Create ports for syndication and auto Import
    The syndication map should contain mapping for Auto ID and any other unique field for reference. Assign this to Outbound port above.
    The map used for importing should contain mapping of Auto ID to remote key for the record.Assign this to Inbound port above.
    Define/set up a batch job for copying the files from Outbound Ready folder to Inbound Ready folders.
    hope this helps.
    Ravi

Maybe you are looking for

  • Wireless works on MacBook Pro but not iBook

    Hi, all: I have wireless set up in my home via a Negear router, and all is well when I connect with my MacBook Pro. I have a family member staying with me who has an older iBook running OS 10.3.9 with a wireless card installed, and her wireless conne

  • No more connection - is it ready for the trash??

    I have a linksys WRT160N router and it's been working for 1 1/2 years just fine til today. NO signal at all.  What can I do??

  • T-Codes to See Branch wise Reports/Regional Wise Reports

    HI, Can anybody provide me the T-Codes to See Branch wise Reports/Regional Wise Reports and also kindly provide me the t-codes for the below Financial reporting a)Income Statement by Region Yearly and Monthly comparision b)Income Statement monthly wi

  • HT201210 restoring original iphone

    Getting a 1012 error while trying to restore my original Iphone to os 3.1. ah............... what can I do here?

  • Airport utility and OS 10.10.1

    Running OS 10.10.1 on Mac book Pro.  My Airport utility v5.6 gave message will not run under this OS version. Down loaded v 6.3.1 but it will not instal - I get this message: Help - need to make a change on my Time Capsule router.