How to send records to the MDM workflow using Java APIs

Hi All,
    Using Java APIs i want to send group/single records to the backend MDM workflows for further processing. Can this be acheived? Please provide me with some code samples if you have any
Regards
Suresh

Hi,
Just go through this URL
https://help.sap.com/javadocs/MDM/current/index.html
In this <b>com.sap.mdm.workflow.commands </b> will Provide u commands for managing workflows.
I hope this helps you.
Regards
Nisha
Message was edited by:
        Nisha Lalwani

Similar Messages

  • Adding Record in a MDM table using Java APIs

    While inserting records in a table, we have to make sure that if there is any field of type lookup, particular value entered is either present in the lookuptable or we insert in the lookup table.
    two questions/clarifications
    1.     if there are more than one lookup tables, we have to do the same thing for all the tables????
    2.    to insert in the lookup tables, i have to find the record ID of the particular entry in the lookup table and then use the recordid to enter value in the main table. Is it correct??
    Thanks and Regards
    Nitin Mahajan
    Edited by: Nitin Mahajan on May 14, 2008 12:34 PM
    Edited by: Nitin Mahajan on May 14, 2008 12:36 PM

    Hi Nitin,
    You will need to have the value present in the lookup table and then take the record id of that entry from the lookup table to make an entry in the main table record (for all the fields in the main table which are of type lookup).
    Sample code: This code is from MDM 5.5 sp4.
    A2iFields Fields = new A2iFields();
    Fields = addField(<recordid from the lookup table>, <Field code in main table>, Fields);
    int RID = catalog.AddRecord(<repository>,Fields, 0, 0);
    Hope it helps.
    Thanks,
    Avinash.

  • How to send sms to mobile from tomcatserver using java code?

    Hi,
    Could you please let me know that,
    How to send sms to mobile from tomcatserver using java code? Please provide the code snippet.
    Thanks in advance.

    Yes, but something needs to send that message. You can't just take an arbitrary computer and send an SMS, it does not have the hardware to do that.
    So either you have a mobile through which you do that or more likely - you use some sort of online service to do it. Whatever choice you make will determine what code you will have to write to get it done. Nobody is going to deliver the code to you, that's your job. It is also your job to figure out what service you are going to use.

  • How to find bpel instance in 11g based on the index values using Java APIs

    Hi ,
    In SOA10G we had option to find the instances based on the index value using Java APIs like below.
    WhereCondition criteria= new WhereCondition(SQLDefs.CX_index_1 + " = ?");
    criteria.setString(1, "indexValue");
    Locator mLoc = getLocator();
    IInstanceHandle[] foundInstances = mLoc.listInstancesByIndex(criteria);
    Please tell me how to achieve the same functionality in SOA 11G using Java APIs
    Regards,
    Saba

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • Uploading images whit thumbnail to MDM repository using Java API

    Hello,
    can someone tell me how to upload images whit thumbnail to MDM repository using Java API?
    i get following message using setHasThumbnail(true):
    com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Ungültiger Wert für Parameter
    thanks

    You can upload images to MDM via the API, but the only way to create thumbnails is via the MDM Data Manager application which uses some embedded libraries to do the work.
    Walter

  • How to find out top 10 records from the R/3 using Java code (WD Program)

    Hi Experts,
    I have used Java Web Dynpro program to fetch records from the backend. Following code helps me and fetches record. As per the customer reqirement, we have to fetch only top 10 records (Actual Cost) from the backend. So I have to modify the Java code. How I can do so? Please help.
              wdContext.nodeGraphData().invalidate();
              IPublicCostcnt.IGraphDataElement categoryElement;
                   for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
                   categoryElement = wdContext.createGraphDataElement();
                   categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
                   categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
                   categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
                   wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

    Dear SDN Users,
    This is how I resolved the issue.
    1) Requested ABAPer to provide me sorted data. The data has been sorted in descending order of actual_cost.
    2) After that I used following code. This resolved the issue.
         if (wdContext.nodeItab_Final1().size()>10){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < 10; i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
         if (wdContext.nodeItab_Final1().size()<=10){
         if (wdContext.nodeItab_Final1().size()>0){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

  • How can i turn off the computer remotely using java?

    is it possible to use a java code for turning off the computer remotely by other computer in LAN?
    or if it is not possible how can i achieved that goal?
    thanx

    bd0 wrote:
    Well, if you're running linux you could use Runtime.getRuntime().exec() to execute 'halt -p', if the process was being run as root. Not terribly elegant but I suppose it would work. Although I wouldn't want an unattended process running as root.Yes, this is how you can do it, but on Windows machines as well. I'll go into pseudocode:
    App1: Server (running on every lab machine)
    open server socket on port X
    wait for connection
    verify connection is yourself so that not everyone can shut it down
    if not, wait for connection again
    if it is, run halt for linux or shutdown for windowsApp2: Client (running on just your computer)
    open a socket to each machine running the server app (or you could use multicasting)
    validate yourself however you did that
    close socketThere are some implications of this though - unless your validation mechanism is decent, pretty much anyone can shut down anything they want. Also, if you don't check for a logged-in user, you may destroy someone's work. Just keep those in mind.
    Also, if it is a Windows setting, there are usually better ways to do this - a well-managed windows network has built-in functionality to shut down computers remotely.
    Edited by: sprizor on Jun 22, 2008 10:59 AM

  • How to read data from the excel file using java code.

    Hi to all,
    I am using below code to getting the data from the excel file but I can't get the corresponding data from the specific file. can anyone give me the correct code to do that... I will waiting for your usefull reply......
    advance thanks....
    import java.io.*;
    import java.sql.*;
        public class sample{
                 public static void main(String[] args){
                      Connection connection = null;
                          try{
                               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                               Connection con = DriverManager.getConnection( "jdbc:odbc:Mydsn","","" );
                               Statement st = con.createStatement();
                               ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );
                               System.out.println("sample:"+rs);
                                  ResultSetMetaData rsmd = rs.getMetaData();
                                  System.out.println("samplersd:"+rsmd);
                               int numberOfColumns = rsmd.getColumnCount();
                                  System.out.println("numberOfColumns:"+numberOfColumns);
                                   while (rs.next()) {
                                            System.out.println("sample1:"+rs);
                                            for (int i = 1; i <= numberOfColumns; i++) {
                                                 if (i > 1) System.out.print(", ");
                                                 String columnValue = rs.getString(i);
                                                 System.out.print(columnValue);
                                            System.out.println("");
                                       st.close();
                                       con.close();
                                      } catch(Exception ex) {
                                           System.err.print("Exception: ");
                                           System.err.println(ex.getMessage());
                        }

    1: What is the name of the excel sheet?
    2: What is printed in this program? null ? anything?
    error?Excel file name is "sample.xls" I set excel file connectivity in my JDBC driver(DSN). Here in my program I am not giving that excel file name. I am giving only that excel sheet name. that is followed
    ResultSet rs = st.executeQuery( "Select * from [Sheet1$]" );The output of this program is given bellow.
    sample:sun.jdbc.odbc.JdbcOdbcResultSet@1b67f74
    samplersd:sun.jdbc.odbc.JdbcOdbcResultSetMetaData@530daa
    numberOfColumns:2

  • Iterate through all the records in a table using Java API

    Hi All,
    What is the easiest way to iterate through all the records in a given table using Java API? I cannot find any methods that will return all records in a table and the only way I can use is to perform a free form search with a condition that is always true. The code works but is pretty ugly. Is there an alternative to this approach?
    Thanks!
    Kenny

    Hi Kenny,
    You can construct a new Search object with your table's code name, a new ResultSetDefinition object for your table and just execute this search using the GetResultSet method of CatalogData.
    Please look at the following code:
    Search search = new Search(<code name of your table>);
    ResultSetDefinition rsd = new ResultSetDefinition(<code name of your table>);
    rsd.AddField<code name of a field>);
    rsd.AddField(<code name of a field>);
    String sortField = <code name of your sort field>;
    boolean sortAscending = true;
    int page = 0; //page number
    A2iResultSet rs = <your CatalogData object>.GetResultSet(search, rsd, sortField, sortAscending, page);
    for (int i = 0; i < rs.GetRecordCount(); i++)
        Value fieldValue = rs.GetValueAt(i, <code name of a field>);
    Hope this helps,
    Nir
    PS - I really recommend you to start using the new API, as it is much more efficient and straight-forward.

  • 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.

  • Is there a way to customize the MDM Workflow email notification content?

    I am looking for a way to customize the MDM Workflow email / notification  content. For example, I might want to put the Supplier ID(s) of the impacted supplier records (be it Update, Insert & Delete) into the email body or put an URL into the email body.
    Can MDM Workflow do this?
    Is there any workaround?
    Thanks

    Hi,
    What you can do is add a boolean field to the repository, for instance "Send Mail". You can use an assignment in the Workflows to set this field to true. Next, define an updatelistener and pick up the change to this field. If the value is "true", send out an email. Afterwards, let the listener change the value back to "false".
    Good luck,
    Gerwin

  • Req. Sample code for the Updation of Master record in MDM using Java API..

    Hi All,
    Can anyone provide me the same code for Updation of master record in MDM using Java API ??

    Hi SakthiNarayananD,
    You can additionally go through the following links to work with MDM and Java API:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49  (Java API)
    http://help.sap.com/javadocs/MDM/SP05/(Java api programs)
    https://help.sap.com/javadocs/MDM/current/index.html  (java api codes)
    http://help.sap.com/javadocs/MDM/SP06P2/index.html (Java Docs for SP06)
    Reg: Using JAVA API - Search
    Re: Retrieving Drop Down List Value using JAVA API - Lookup values
    How to retreive records from Lookuptable of type flat - Lookup Values
    Reg: MDM with webdynpro - READ,INSERT,MODIFY
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • How to send  changes in the Database Table Periodically using Change Pointe

    Hi,
           How to send  changes in the Database Table to the external system Periodically using Change Pointers.
    Thanks & Regards,
    Gopi.

    That depends on what table you are referring to.

  • Ready to print. Now, how to send this to the printer?

    Hello Again,
    The little program is 5.5 x 8 inch pages (letter size paper folded in half). They must to
    print it in 4 pieces of paper letter size, put them together and then fold them in half, (staple it).
    I am using 1/4 inches in bleed and I would like to have crops marks. Must to be PDF!
    I have no idea how to send this to the printer. Any help?
    Thanks a lot!!
    Jesus

    First, ask your printer.
    Second, printers generally want unimposed PDF. IOW, export regular pages and let your printer arrange them the way they want it.
    But definitely ask them first. And make sure you mention the bleed.
    Ken Benson

  • How to make records  to the table TRFCQIN

    hi all,
    anyone can tell me
    how to make records  to the table TRFCQIN
    regards

    Hi Wanna,
                    Write a module pool program to enter record into table TRFCQIN.
    Take fields to which u want to make entries in module pool.
    Use insert command to append data in table TRFCQIN.
    Refer this code :
    CASE OK_CODE_101.
    WHEN 'SAV1'.
    TRFCQIN-QNAME = 'XYZ'.
    TRFCQIN-QCOUNT = "Screen field name at which user will enter value
    INSERT TRFCQIN.
    if sy-subrc <> 0.
    message e007.
    else.
    clear TRFCQIN.
    clear ok_code_101.
    endif.
    endcase.
    Reward points if helpful.
    Regards,
    Heamnt

Maybe you are looking for