Retrieve original record via Java API

Hi Community,
I have a checked out record and need to compare some fields with the original one at runtime. I have both of the ids and thought I could simply pass the original id to the RetrieveRecordsByIdCommand to get the original version. But if I do so, I allways get the record with the modified values of the checked out version. Do I have to pass a special paramter to get the original record or maybe an other command?
Many thanks,
Tobi

Thanks for your reply.
The RetrieveOriginalsByCheckoutRecordCommand only gives me the orignal record id (which i already have) but i need the record with all fields.

Similar Messages

  • Extract image and Features from the Catalog via JAVA API

    Hello,
    I would like to Extract image from the Catalog via JAVA API, Can anybody help on that? I also tried to extract the Features field form the Catalog but results in the error "Features field not found" Any ideas what could have wrong?
    Many thanks,
    Dharmi

    Hello,
    Can anybody tell me where i can find the latest JAVAAPI reference guide? I found the one for MDM 5.5 SP 1 but that also refers to the last parameter of the CatalogCache.Init as int and not string.
    I looked up in service.sap.com/instguides -> SAP Netweaver -> Release 4 -> Installation and there only following 3 files are there for MDM 5.5 SP2
    MDM 5.5 SP02 - Configuration Guide  SAP MDM
    MDM 5.5 SP02 - Installation Guide   SAP MDM
    MDM 5.5 SP02 – ERP-MDM Field Mapping and Check Tables
    Regards,
    Dharmi
    Message was edited by: Dharmi Tanna
    Message was edited by: Dharmi Tanna

  • How to call business rules scripts via Java API

    Hi
    I have a problem. I have some scripts (business rules in essbase) that can be seen thru Administration Services Console under Business Rules folder. How can I execute these script using Provider Services (via Java API to EssBase interface)?

    hi
    i look too java api sample for "HBR Lounch"
    you can try found example in EAS folder
    C:\Hyperion\AdminServices\AppServer\InstalledApps\Tomcat\5.0.28\eas\webapps\hbrlauncher\MC_LaunchWindow.jsp
    please back, if you will have resolution :)

  • Need to transfer files using sftp via java api's.

    Hi,
    I got a requirement to transfer files using sftp via java api's.
    Kindly specify any 3rd party Java Libraray to do this.
    The requirements are
    -It must support extensive encryption algorithms.
    -It must allow generating public/private keys and authenticating with server by sending the keys first(before the actual file transmission).
    Thanks.

    Don't resurrect old threads, please. Start your own thread.
    Better yet: google for "Java SFTP", look at what you find and come back when you have a specific question.
    And: when you ask a specific question, then clarify if you're talking about the [SSH file transfer protocol|http://en.wikipedia.org/wiki/SSH_file_transfer_protocol] or about FTPS, which is sometimes (wrongly) called SFTP.

  • Fetching Images Via JAVA API

    Hi,
    I am trying to fetch images via Java Api.
    Please look at the code below:
    A2iValueArray imgs1 = null;
    for(int y=0; y<rs1.GetRecordCount(); y++){
         imgs1 = rs1.GetValueAt(y,"Product_Image").GetValueArray();
    It is throwing me a Class cast exception.
    I also tried
    imgs1 = (A2iValueArray) rs1.GetValueAt(y,"Product_Image").GetValueArray();
    but to no avail...
    I am using MDM Sp04..
    Please guide me...

    This Code Worked for me:
              try {     
              A2iResultSet rs1 = catalogData.GetResultSet(search, rsd, null, true, 0);
               A2iValueArray imgs1 = new A2iValueArray();
                   for(int y=0; y<rs1.GetRecordCount(); y++){
                        if(!rs1.GetValueAt(y, "Images").IsNull()){
                        imgs1 = rs1.GetValueAt(y,"Images").GetValueArray();
                        int id = imgs1.GetValueAt(0).GetIntValue();
                        //int id = rs1.GetValueAt(0, "Product_Color").GetIntValue();
                        String imagePath = catalogCache.GetImagePath("Products", id);//"Thumbnail" ,
                        //wdComponentAPI.getMessageManager().reportWarning("Your image is at: " + CACHE_DIRECTORY + "\" + imagePath);
                        System.out.println("imagePath="+imagePath);
                        break;
                   catalogData.Logout();
              } catch (StringException e) {
                   e.printStackTrace();
    Posting your program may help troubleshoot.
    Venkat

  • Null Pointer Exception while Retrieving Records using Java API

    Hi,
        I am using the Class RetrieveLimitedRecords, to retrieve he records from the main table.
    While using this class I am getting an error Null Pointer Exception, when there are no records matching the search criteriea.
    Could anybody tell me how to ignore this error.
    Thanks,
    Priya.

    Hi,
    Thanks for the reply.
        There is no any class which automatically handles, so we should handle exceptions individually.
    Thanks,
    Priya.

  • Extracting image variants for web index from MDM via Java API

    Hi There, we are currently using an open source search engine to crawl the MDM database and build indexes for our webstores nightly. In this process, we have an image extraction method using the MDM java API's. Can someone please tell me how to call an image variant into this process rather than the 'original image' stored in MDM? I've created a variant that will optimise for web conditions and we need to call this one into the webstore, not the originals that are sometimes huuuuge...

    Hi Adam,
    From MDM Documentation (can be found here [http://help.sap.com/saphelp_nwmdm71/helpdata/en/49/0505fba870404ce10000000a42189b/frameset.htm]):
    Retrieving Image Variants
    To retrieve binary data for image variants carry out these steps:
           1.      Retrieve all image variants using the RetrieveImageVariantsCommand class.
           2.      Retrieve the Image BLOB whose variants you want to get, (see Retrieving BLOB Records above).
           3.      Retrieve the BLOB for the specific image variant using the RetrieveBlobCommand.
    Hope this information helps,
    Idan

  • Retrieve contact list  via the API not with the last updated date but created date?

    I can connect via the API and retrieve a list of contacts  but it seems that the only paramater i can pass is to search since the last Update  Date.
    Is it possible to search on the Created date and to have a date range as well?
    I found the xml result is slow to come as it gives all entries since the "lastUpdateDate" entered.

    A change in score does not cause the Date Modified field to change on the contact record. This field only changes when some data in one of the fields has changed.
    However, some of the confusion can come from the fact that lead scores have a Profile and Engagement portion. So if you have certain fields on the profile section being modified, that would cause a rescore at the same time. Engagement criteria such as form submits often cause the contact record to be modified while website visits and email clicks/opens do not.
    Hopefully this helps clarify,
    Bojan

  • Access to Attribute Type via Java API

    Hi,
    I'm writing an aplication in Java to access out OLAP schema and display certain DIMENSION/LEVEL and ATTRIBUTE values. This is working out really well but I'm hitting one issue at the moment which has me stumped.
    When I display a Dimension value in a table I want to default the attribute we display to a sensible display value. In AWM there is a field "Attribute Type" which offers drop down selections for "User", .... "Member Short Description", "Member Long Description"...
    See the General Tab under Attributes for a particular Attribute. Looking at the Help text for the "Member Long Description" I see the following.
    "Long descriptive names typically used by Oracle Business Intelligence tools for displaying dimension members in selection lists, crosstabs, and graphs." Looks perfect for what I want. My Dataware house architect already has an Attribute for each hirearchy
    marked with this property so in theory I should be able to look for the Attribute in the Dimension with this property and bingo I have my default display Atttribute!
    The problem is I seem to be able to find api's to access every aspect of the MdmAttribute object except this particular property.
    Here is a snippet from the OLAP api sample code augmented with some println's of my own:
    if (mdmAttr.getName().equals(name)) {
         System.out.println("Attribute : " + mdmAttr.getID());
         System.out.println(" name : " + mdmAttr.getName());
         System.out.println(" desc : " + mdmAttr.getDescription());
         System.out.println(" s desc: " + mdmAttr.getShortDescription());
         System.out.println(" type : " + mdmAttr.getType());      
         System.out.println(" type id: " + mdmAttr.getType().getID());
    return mdmAttr;
    None of the avaiable APIs of MdmAttribute seem to fit the bill.
    The question is ... is there an API somewhere I can call on the MdmAttribute object or an associated object that will give me back the "Attribute Type" as listed in this dropdown. Note that getType returns DataType!String which denotes the fundemental type of the Attribute (int, String etc) rather than this abstract Attribute Type property we need. Not listed here is the getDataType() api which also returns DataType!String and seems to be equivalent to the getType api.
    Regards
    Fergal

    One small clarification if its not already obvious. We are using the OLAP Java api's directly ... not via BI Beans.
    Regards
    Fergal

  • Problems adding WFS layer via Java API

    Hi
    I am trying to add a WFS layer to my map via the java api. There is little documentation on this and I am struggling a bit, I wonder if anyone has done the same? The call I am developing looks like:
    mapViewer.addWFSTheme("devprop",
    "WFS",
    "http://cjones:8080/geoserver/wfs?",
    "EPSG:27700",
    "ST_Building",
    "the_geom",
    "building",
    "ID",
    attributeList,
    renderStyleAttributes,
    featIds
    but the mapviewer log states:
    Jun 30, 2011 4:03:47 PM oracle.sdovis.util.WfsCapabilities readUsingHttpGet
    INFO: GetCapabilities request: http://cjones:8080/geoserver/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities
    Jun 30, 2011 4:03:47 PM oracle.sdovis.util.WfsCapabilities decodeCapabilities
    SEVERE: Decode GetCapabilities failed: null
    Jun 30, 2011 4:03:47 PM oracle.sdovis.theme.WFSThemeDefinition readCapabilities
    WARNING: Unable to get Capabilities for url: http://cjones:8080/geoserver/wfs?
    Jun 30, 2011 4:03:47 PM oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on loading features: 172ms.
    Jun 30, 2011 4:03:47 PM oracle.sdovis.RenderingEngine prepareForRendering
    FINEST: xfm: 3.0236220472436512 0.0 0.0 -3.0236220472436512 -1047236.0393699252 532885.8661416543
    Jun 30, 2011 4:03:47 PM oracle.sdovis.VectorRenderer render
    FINER: time to render theme WFS with 0 styled features: 0ms
    Jun 30, 2011 4:03:47 PM oracle.sdovis.VectorRenderer label
    FINER: time to label theme WFS with 0 styled features: 0ms
    Jun 30, 2011 4:03:47 PM oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on rendering: 0ms
    if I goto http://cjones:8080/geoserver/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities via the browser I get:
    <WFS_Capabilities version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://cjones:8080/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd">
    +<Service></Service>
    +<Capability></Capability>
    +<FeatureTypeList></FeatureTypeList>
    +<ogc:Filter_Capabilities></ogc:Filter_Capabilities>
    </WFS_Capabilities>
    Any pointer appriciated
    Thanks
    Chris

    If the getcapabilities result is:
    <WFS_Capabilities version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://cjones:8080/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd">
    +<Service></Service>
    +<Capability></Capability>
    +<FeatureTypeList></FeatureTypeList>
    +<ogc:Filter_Capabilities></ogc:Filter_Capabilities>
    </WFS_Capabilities>
    then it's empty and there are no features to be served up.
    Test the WFS service in mapbuilder first.

  • Resource Object Approval via Java API

    Is there a way to do approval of Resource Object via Java code/API?

    You have to use updateTask API
    HashMap search = new HashMap();
    search.put("Process Instance.Task Information.Assigned To User Key", "81");
    tcResultSet pend = requestOperationsIntf.getApprovalTasksAssigned(search);
    // The above ResultSet stores all the request information pending for approval. Right now there is just one row
    pend.goToRow(0);
    long taskInsKey = pend.getLongValue("Process Instance.Task Details.Key");
    // Extract the taskInstance key form the above resultSet to pass to the next API
    Map mhProcessMap = new HashMap();
    mhProcessMap.put("Process Instance.Task Details.Data", "Approve");
    // Where 'Approve', 'Reject' etc will be your approval task responses
    proOperIntf.updateTask(taskInsKey, mhProcessMap);

  • Bug report (and solution): adding multiple records through Java API in bulk

    I have found some bugs in the Java API (version 4.1.25) that makes it impossible to add mulitple values in bulk to a RECNO database. The fixes are as follows:
    MultipleEntry.java, line 80:
    "DbUtil.int2array(curr_off, this.data, pos);"
    should be replaced by
    " DbUtil.int2array(recno, this.data, pos);"
    MultipleRecnoDatabaseEntry.java, line 130:
    "return append_internal(data, doff, dlen, recno);"
    should be replaced by
    "return append_internal(data, offset, len, recno);"
    Regards,
    Johan Walters

    Hello,
    It looks like there were some corrections to this area in the post 4.1 i.e. 4.2 release. And I do not see these same issues in the current 5.1.25 release. If you do find them in the current release, just let us know.
    Thanks,
    Sandra

  • Connecting to Shared Services via java API

    Hello All -
    I am new to using Shared Services and I would like to know how to connect to Shared Services using a java API. We are using release 11.1.1.2 and I have found and read the documentation on how to maintain users and groups. The examples in the documentation demonstrates how to the task but assumes you have already connected to shared services or you know how to connect. Any help will be appreciated.
    Keep in mind this is not an Essbase connectivity question but shared services.
    Thanks

    Sorry double post

  • Failed to connect to MDM via Java API

    Hi,
    I wrote a very simple application in which there is a view which
    calls the component contoller. The Component Controller
    connects to MDM Repository.
    I think I am wrong with the calling of Component from Web Dynpro view.
    As, the code resulting in no error or success.
    Please suggets something.
    public void getRepositoryConnection( java.lang.String hostName, java.lang.String repositoryName, java.lang.String userId, java.lang.String passWord )
        //@@begin getRepositoryConnection()
    //          create connection pool to a MDM server
             String serverName = "kolapon.HCLT.CORP.HCL.IN";
             ConnectionPool connections = null;
             try{
                  connections=ConnectionPoolFactory.getInstance(serverName);
             catch(ConnectionException e)
             { e.printStackTrace();
                  return;
    //          specify the repository to use
                               // alternatively, a repository identifier can be obtain from the GetMountedRepositoryListCommand
                           repositoryName = "KaushikRepo";
             String dbmsName ="MDM";
              RepositoryIdentifier reposId = new RepositoryIdentifier(repositoryName, dbmsName, DBMSType.ORACLE);
    //          get list of available regions for the repository
              GetRepositoryRegionListCommand regionListCommand = new GetRepositoryRegionListCommand(connections);
              regionListCommand.setRepositoryIdentifier(reposId);
              try{
                   regionListCommand.execute();
              catch(CommandException e)
                   e.printStackTrace();
                   return;
         RegionProperties[] regions = regionListCommand.getRegions();
    //      create a user session
          CreateUserSessionCommand sessionCommand = new CreateUserSessionCommand(connections);
          sessionCommand.setRepositoryIdentifier(reposId);
          sessionCommand.setDataRegion(regions[0]); // use the first region
         try {
                                   sessionCommand.execute();
                              } catch (CommandException e) {
                                   e.printStackTrace();
                                   return;
         String sessionId = sessionCommand.getUserSession();
    //      authenticate the user session
          String userName ="kaushikb";
          String userPassword ="taton";
          AuthenticateUserSessionCommand authCommand =
                                    new AuthenticateUserSessionCommand(connections);
          if(authCommand!=null)
               wdComponentAPI.getMessageManager().reportSuccess("Success");                          
          else{
               wdComponentAPI.getMessageManager().reportWarning("Failure");
          authCommand.setSession(sessionId);
          authCommand.setUserName(userName);
          authCommand.setUserPassword(userPassword);
          try {
                                    authCommand.execute();
                               } catch (CommandException e) {
                                    e.printStackTrace();
                                    return;
                               // the main table, hard-coded
           try{
              GetRepositorySchemaCommand getRepositorySchemaCommand = new GetRepositorySchemaCommand(connections);
              getRepositorySchemaCommand.setSession(sessionId);
              getRepositorySchemaCommand.execute();
              RepositorySchema repositorySchema;
              repositorySchema = getRepositorySchemaCommand.getRepositorySchema();
              TableId tableId= repositorySchema.getTable("MDM_BUSINESS_PARTNERS").getId();
         RecordFactory.createEmptyRecord(tableId);
         //RecordFactory.createEmptyRecord(mainTableId);
         if(tableId!=null)
              wdComponentAPI.getMessageManager().reportSuccess("It is success");
         else{
         wdComponentAPI.getMessageManager().reportWarning("Failure");     
    catch(Exception ce)
    ce.printStackTrace();     
    //  catch(SessionException se)
    //se.printStackTrace();
        //@@end
    Regards
    Kaushik Banerjee

    Hi Jitesh,
    getRepositoryConnection() is my method which does the connection.
    Now, there are methods as :
    getFields
    public FieldId[] getFields()Get array of field IDs for all populated records.
    Returns:
    array of field IDs. Empty array is returned if any field was populated
    getFieldValue
    public MdmValue getFieldValue(FieldId fieldId)
                           throws java.lang.IllegalArgumentExceptionGet value of the specified field.
    Parameters:
    fieldId - field ID
    Returns:
    field value
    Throws:
    java.lang.IllegalArgumentException - if field with specified ID does not exist or was not populated
    I want to use all these methods.
    So, I need to declare these methods in the Controller Class and these methods will call themselves so, that I can achieve the real purpose of creating records, getting values from the field and getting field Ids etc.
    Regards
    Kaushik Banerjee
    Edited by: Kaushik Banerjee on Apr 28, 2009 7:09 AM

  • Saxon: recovery policy via Java API? (avoid "Ambiguous rule match" error)

    When I switch the XMLTransformer from the Java built in Xalan to Saxon (9), I get many
    Ambiguous rule match for /
    Matches both "document-node()" on line 22 of file:/D:/Tmp/test/layouts/lay_Client_T_SM_Notes_2C.xsl
    and "document-node()" on line 6 of file:/D:/Tmp/test/subReports/S_RiskValues_S.xslerrors. I read that you can "relax" these checks with the TransformerFactory attributes
    //http://www.saxonica.com/documentation/using-xsl/embedding/jaxp-transformation.html
    tf.setAttribute("http://saxon.sf.net/feature/recoveryPolicy", 1); //dynamic XSLT errors => warning
    tf.setAttribute("http://saxon.sf.net/feature/recoveryPolicyName", "recoverWithWarnings");but this doesn't work. (I check to have the saxon parse via tf.getClass().getName())

    If anyone is interested I have now found a resolution for issue.
    The client certificate authentication needed to be at transport level and not message level.
    Following discussions with Oracle, my understanding is that OWSM manager can be used to only apply policy data at message level.
    Using OWSM was not the method to fulfil this sort of requirement. Instead I needed to configure a 2 way SSL handshake.
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/security/transport_level.html
    Re: How to call https service from OSB
    Edited by: 920251 on 12-Apr-2012 05:14
    Edited by: 920251 on 12-Apr-2012 05:15

Maybe you are looking for