Need help in getting MDM relationship details using Java Apis

Hi,
Is it possible to search records which are in relationship using Java Apis? Suppose Record A is Parent record and Record B,C,D ... are child records.
I have to search all the records which are in relationship with record A.
Can any one send code snippet on this.
Regards,
Niraj

Hi Niraj,
You can use RetrieveRelationshipsCommand api to get the relationship child of the Anchor Record.
RetrieveRelationshipsCommand command = new RetrieveRelationshipsCommand(connectionAccesor);
command.setSession(session);
command.setAnchorRecord(anchorRecord); / command.setAnchorRecordId(anchorRecordId); (use any of the two statements)
command.setRelationship(relationshipId); //For child int type is 10, and for Parent_child int type is 5
command.setMemberResultDefinition(resultDefinition);
command.execute();
//Get Member Records' resuld definition
ResuldDefinition rd = command.getMemberResultDefinition();
Hope this helps you.

Similar Messages

  • Getting completed process details using BPM API

    Hi Experts,
    is there any way to get the completed process details using BPM API or Analytics API for a specific process definition (in 7.31 SP10)?
    my observations:
    1. using getRunningProcessInstances(process_def_id) of ProcessInstanceManager, I can fetch running process instances.
    but I need completed process instances.
    Thanks in advance.
    Best Regards
    -Trim

    seems no way

  • Getting weblogic usersegment details using an API

    Hi,
    Can weblogic usersegment (*.seg) information be got using some API?
    if not, how can the information be got, so that we can for example, pass the usersegment name to the weblogic businessrule as a condition and got some contentquery as an action??

    Please find below the sample code to get information about user segment.
         @Control
         private SegmentManagerControl segmentManagerControl;
         @Jpf.Action(forwards = { @Jpf.Forward(name = "default", path = "index.jsp") })
         public Forward begin() throws PersistenceException, XmlException, LoginException {
              Authentication.login("weblogic", "weblogic", getRequest());
              ResourceContext resCtx = ResourceContext.createResourceContext(getRequest(), getResponse(),getServletContext(), false);
              resCtx.setRetrieveResultsIfNoLocale(true);
              resCtx.setWebApp(getServletContext().getServletContextName());
              RuleModel ruleModel = segmentManagerControl.getSegment("/segments/GlobalClassifications/testUserSegment.seg", resCtx);
              System.out.println("Name"+ruleModel.getName());
              System.out.println("Description"+ruleModel.getDescription());
              Authentication.logout(getRequest());
              return new Forward("default");
    Note: You can use this API only from the controller. You need to create SegmentManagerControl in controller and from there you can access the user segment details. you need to be in the Administrative group to access SegmentManagerCotnrol (and all other controls related to campaigns, placeholders etc.).
    segmentManager.getSegment() always returns null, if you're not in the Administrators group.

  • Need help in developing a webdynpro application using UWL API

    Hi developers,
    Iam developing a new WebDynpro application for UWL using UWL API.the functionality is to dispaly the summary of UWL like number of unread items, total items.
    Iam getting the problem while deploying the application, iam getting warning while deployed the application.
    I have given all possible ways mentioned in the below forum link
    Re: Accessing PortalRuntime at runtime?
    The exact problem is coming at reference file.
    Please giude me how to move forward.
    1. Below is the error when given "tckmcbc.uwl~api" in the service entry
    deployed with warning :
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application local/UWLCountDemo for startup. Reason=Clusterwide exception: Failed to start dependent service ''tckmcbc.uwl~api'' of application ''local/UWLCountDemo''. Status of dependent component: STATUS_MISSING. Hint: Is the component deployed correctly on the engine?
    2.Below is the error  when i gave PORTAL:sap.com/tckmcbc.uwl~api in the sharing refernce entry
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application local/UWLCountDemo cannot be started. Reason: it has hard reference to resource tckmcbc.uwl~api with type application, which is not active on the server.
    Thanks in Advance
    Sekhar.
    Edited by: sekhar c on Mar 21, 2009 11:24 AM

    Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
    How to use UWL API for NetWeaver BPM Tasks
    The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's.

  • Need help in desigining Client/Server Application using Java

    Hi,
    I am new to Java and no sooner that I started studing it I have been given a project - client server java Application that allows a user to do a property search based on critiras (eg location, price) and display the results. I am stuck because I don't know where I need to start. Have to use IDE (Netbeans or Eclipse) but not sure about dev frameworks.
    Can someone give me an outline of what I should do / where I should start? What will be the best solution?
    Thanks in adance

    http://java.sun.com/docs/books/tutorial/networking/index.html
    That's Sun's networking tutorial series. Live it, learn it, love it. You'll need to decide if you want to use connected sockets or datagrams. You'll need details like, can multiple clients connect simultaneously?
    The tutorials are the first step though.

  • Need help with tomcat 5.5 and using java classes

    hey there,
    i am trying to set up tomcat 5.5 on my computer at home and have sucessfully done so. i have been trying to use Java classes inside my JSP files however tomcat thows an internal servlet error as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    ProductList cannot be resolved to a type
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    ProductList cannot be resolved to a type
    An error occurred at line: 144 in the jsp file: /order.jsp
    Generated servlet error:
    Product cannot be resolved to a type
    i have the classes located as the setup tutorial recommends (root/WEB-INF/classes/) and still nothing works. i would appreciate any help anyone can give.
    thanks,

    Which tutorial are you following?
    As of java1.4, all classes must be in packages for them to work in Tomcat. This means your beans and servlets too.
    Put your beans in a package, and then recompile them, and put them in the right place.
    eg
    package com.mypackage
    public class MyClass ...
    once compiled would go into WEB-INF/classes/com/mypackage/MyClass.class
    Are you using Product and ProductList classes in scriptlet code?
    Have you imported them with a page directive
    <%@ page import="com.mypackage.Product, com.mypackage.ProductList" %> ?

  • How to get regional options information using java api

    Hi all
    I want to read what is properties like what is the currency symbol , what is the precession , what is the digit seperator and No of digits after the decimal .. such information i want to get using the java API
    How can i get this information.
    i tried with Locale API.
    But it always giving me the default information only.
    If i go and change those things in teh regional options it is not effecting
    Any suggestions.
    Thankin you

    http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormatSymbols.html

  • Need help to get Oracle certificate details -

    Hi,
    I have completed my Oracle 9i/10g/11g OCP certification on 2009. Unfortunately, I missed my all Oracle certificates two years back.
    Is there any way to get my certificate again as it is required for my job?
    Thanks & Regards,

    Is there any way to get my certificate again as it is required for my job?A new paper certificate? No.
    However, if you create your CertView account and link it with your Oracle Testing ID, you will have access to all of your test information. One of the options from Certview is to send your certification credentials to a third party (i.e. your employer).
    https://education.oracle.com/pls/eval-eddap-dcd/ocp_interface.ocp_candidate_login?p_include=Y&p_org_id=1001&p_lang=US
    Q&A on Certview is here:
    https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=638#2

  • Data retrieval from MDM 5.5 using Java API

    Hi,
    Does anyone have a sample Java code snippet that can be called via XI to retrieve data from a repository in MDM 5.5 ?
    Cheers
    Colin.

    Colin,
    What exactly do you want to do?
    If you want to retrieve data from MDM, you need to have Java application call the API's provided.
    Where is XI coming into picture?
    Other way of doing it is to develop a web service and call that via XI and send the data.
    Here is quick snippet to get some data.
    Sample code for FreeForm search:
    SearchParameters sparam = search.GetParameters ();
    FreeFormTableParameter fftParam =
    sparam.NewFreeFormTableParameter(ProductsTable);
    FreeFormParameterField ffParamField =
    fftParam.GetFields().New(PartNumberField);
    ffParamField.GetValues().NewString(
    partNoValue,FreeFormParameter.PrefixSearchType);
    search.Add(fftParam);
    Regards,
    Ravi
    Note : Please reward the posts that help you.

  • Need Sample Code for Vendor creation using JAVA API

    Hi,
    I have a scenario like Vendor creation using <b>Java API</b>.
    1.I have Vendors (Main) Table.
    2.I have <b>look up</b> tables like Account Group.
    3.Also <b>Qualifier table</b>(Phone numbers) too.
    Could you please give me the sample code which helps me to create Vendor records using Java API?
    <b>I need Code samples which should cover all of the above scenario.</b>
    <b>Marks will be given for the relevent answers.</b>
    Best Regards
    PK Devaraj

    Hi Devraj,
    I hope the below code might solve all your problem:-
    //Adding Qualified field
    //Creating empty record in Qualifed table 
    //Adding No Qualifiers
    Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
    try {
    qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
    catch (IllegalArgumentException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    catch (MdmValueTypeException e2) {
    // TODO Auto-generated catch block
    e2.printStackTrace();
    //Creating Record in Qualified table
    CreateRecordCommand create_command = new CreateRecordCommand(connections);
    create_command.setSession(sessionId);
    create_command.setRecord(qualified_record);
    try
    create_command.execute();
    catch(Exception e)
    System.out.println(e.toString());
    RecordId record_id = create_command.getRecord().getId();
    //Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
    QualifiedLookupValue lookup_value = new QualifiedLookupValue();
    int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
    //Adding Yes Qualifiers
    lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
    //Now adding LookUP values
    //Fetch the RecordID of the value selected by user using the following function
    public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
    ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
    rsd.addSelectField(new FieldId(Fieldid));
    StringValue [] val = new StringValue[1];
    val[0] = new StringValue(value);
    RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
    val_command.setSession(sessionID);
    val_command.setResultDefinition(rsd);
    val_command.setFieldId(new FieldId(Fieldid));
    val_command.setFieldValues(val);
    try
         val_command.execute();
    catch(Exception e)
    RecordResultSet result_set = val_command.getRecords();
    RecordId id = null;
    if(result_set.getCount()>0)
         for(int i = 0 ; i < result_set.getCount() ; i++)
         id = result_set.getRecord(i).getId();     
    return id;
    //Finally creating the record in Main table
    com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
    try {
         empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
         empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
    empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp  value Retrieved above
    } catch (IllegalArgumentException e1) {
    // TODO Auto-generated catch block
         e1.printStackTrace();
    } catch (MdmValueTypeException e1) {
         // TODO Auto-generated catch block
         e1.printStackTrace();
    //Actually creating the record in Main table
    CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
    create_main_command.setSession(sessionId);
    create_main_command.setRecord(empty_record);
    try
         create_main_command.execute();
    catch(Exception e)
         System.out.println(e.toString());
    Thanks
    Namrata

  • How to upload Image to MDM 5.5 SP3 using Java APIs

    Hi,
    I am trying to upload Image to Images table in MDM 5.5 using JAVA API for MDM. But. I'm not able to find particular field in Images table where I need to set the Blob object ( Image data ).
    I'm not aware of the method to set the Blob, there is one for getting the Image data.
    I have gone through I am not able to add images into Catalog thru java API forums posts and tried the code. But with no luck....
    I think this code is for some other MDM version as the fields mentioned are not present in the Images table e.g. DataObject - this field is used in the above posts to set the Blob data but this field does not exist in Images table in MDM 5.5
    Can anyone suggest the solution?
    Thanks and Regards,
    Mausam

    Hi Mausam,
    Please try the following:
    // adding to a image table
    // get the bytes for the image
    byte[] imageBuf = readFile("C:\pic.bmp");
    // setup A2iFields
    fields = new A2iFields();
    fields.Add(new A2iField("DataObject", new
    Value(imageBuf))); // the image binary (required)
    fields.Add(new A2iField("Name", new Value("pic.bmp")));
    // a name for the image
    fields.Add(new A2iField("OrigName", new
    Value("pic.bmp"))); // the original image file name
    (required)
    fields.Add(new A2iField("DataGroupId", new Value(888)));
    // the data group to add to (required)
    fields.Add(new A2iField("OrigLocationId", new
    Value(999))); // the data location of the image
    (required)
    fields.Add(new A2iField("Description", new Value("a
    short description"))); // a short description here
    // add the image
    String imageTable = "Images";
    catalog.AddRecord(imageTable, fields, -1, -1);
    It's taken out of the API guide for SP3 (the example for method AddRecord.
    Best regards,
    Amit

  • Search for a Multilingual value in MDM using JAVA API

    Good day,
    Could you kindly assist.
    I am trying to search for a field in MDM, from Portal using JAVA API. I do retrieve the value in English, but the problem is when I am trying to retrieve it in other languages. Please see sample code:
         private Search getSearch(MDMConnection mdmconnection,String value, TableId tableid){
              Search search =null;
              FieldSearchDimension fielddimension=null;
              TextSearchConstraint textcontrain=null;
              RepositorySchema reposchema =mdmconnection.reposchema;          
                                               if(value!=null)
                   search= new Search(tableid);
                   fielddimension=new FieldSearchDimension(reposchema.getFieldId("ATTR_VAL_ABBR","TEXT_VALUE"));
                   textcontrain=new TextSearchConstraint(value,TextSearchConstraint.EQUALS);
                   search.addSearchItem(fielddimension,textcontrain);
                   search.setComparisonOperator(Search.AND_OPERATOR);
              return search;
    Thank you in advance.
    Regards,
    Simni

    Hi ,
    Mdm- Multilingual value in MDM using JAVA API:
    you can check the first point as its reagrdign youisue related pdf and soloutions for your question.
    1.  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e8aedc-cdfe-2c10-6d90-bea2994455c5?QuickLink=index&overridelayout=true
    2.  http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e8aedc-cdfe-2c10-6d90-bea2994455c5?QuickLink=index&overridelayout=true
    Hope this information helps you in solving the  issue!!
    Thanks&Regards
    AswinChandraGirmaji

  • How to build a small application using Java API

    Hai expertise,
         I want to retreive MDM repository info using JAVA API, i am following these blogs:
    /people/andreas.seifried/blog/2006/03/26/performing-free-form-searches-with-mdm-java-api
    /people/udi.katz/blog/2005/08/21/retrieving-data-from-mdm-server-using-the-mdm-java-api
    /people/udi.katz/blog/2005/07/17/mdm-connectivity-to-java-application
    <b>where to get the jar and sda files to build the application??
    In Developer Studio.. Windows -> Preferences -> Java -> Classpath variables. Is this the only place where we need to give the jar file path??
    Are there any other configurations to do(except setting container variable to MDM4J jar file) to connect my java application to MDM repository???</b>
    Regards,
    Chand.

    Hi Govada,
    (1)You need to add the MDM4j and other JAR files at:-
    right click on project -> Java Build Path -> Libraries -> Add External JARs
    (2)If the project is Web Dynpro project one
    then right click on project -> Web Dynpro Reference -> Library Reference -> and add sap.com/com.sap.mdm.tech.mdm4j
    Are you using JAVA API 1 or 2???
    Thanking you
    Namrata Dixit

  • How to create the groups in OID Using Java API.

    Hi,
    I need to create the group in OID Using Java API's only(i.e., javax.naming.* only).
    I need to achieve it without using any oracle specific jars.
    Is there any way to achieve it?.If there's a option to achieve it,do let me know.
    I also need to create the users in that group ,after creating it.
    If you share any useful link or ideas for the same would be great.
    Thanks
    Balaji

    bobws wrote:
    Hi,
    I want to find the installed JREs in windows using java. I couldn't fine any java API. So I am using the below code to fetch the JRE list from windows registries & parse the returned collection to know the installed JRE.Why? If you are running java you already have a JRE. So why not just use it?
    >
    String key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment";
    Runtime.getRuntime().exec(
    "reg query " + "\"" + key + "\"");
    Is it legal to retrieve the installed JREs in this way? Legal? It is OS specific, and to a certain extent dependent on vendor and what the vendor wants to do. Could also be impacted by permissions. Other than that it is ok.
    I am feeling like its a type of hacking. So I couldn't decide whether this is legal (recommended) way of using. Does anybody can answer me. I can see the similar posts in google. Somebody suggests this way & somebody suggests to use preference API which is similar to this. Appreciate your help.Preferences won't work. It doesn't allow access to the registry in general, only a part of it. There are discussions in the JNI forum about retrieving VM versions. Prior to actually using the VM though.

  • I need help changing my credit card details so that I can use the App Store but I can't get it to work

    I need help updating credit card. Details as its not sllowing me to get any apps

    Accepted forms of payment  >  http://support.apple.com/kb/HT5552
    Changing Account Information  >  http://support.apple.com/kb/HT1918
    If necessary... Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for