How to read XI Data type in Java code and populate as array list, using UDF

Hi,
How to read XI Data type in Java code and populate as array list, using UDF?
Is there any API using which  the XI data types can be read?
Kindly reply.
Richa

Input Structure:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:CustomerCreateResp xmlns:ns0="urn:bp:xi:up:re:cust_mdm:cmdm:pr5:100">
   <CUSTOMER>
      <item>
         <CUSTOMERNO/>
         <MDMCUSTOMER/>
         <CREATE_DATE/>
         <RETURN>
            <TYPE/>
            <MESSAGE/>
         </RETURN>
         <PT_CONTPART_RETURN>
            <item>
               <MDM_CONTACT/>
               <CONTACT/>
            </item>
         </PT_CONTPART_RETURN>
         <PARTNERS>
            <item>
               <CUSTOMERNO/>
               <PARTNER_FUNCTION/>
               <PARTNER_NUMBER/>
               <DEFAULT_PARTNER/>
            </item>
         </PARTNERS>
      </item>
   </CUSTOMER>
</ns0:CustomerCreateResp>
Output structure
(Sample output structure.This actually needs to be mapped and generated using UDF)
<?xml version="1.0" encoding="UTF-8"?>
<ns1:updateCustomer xmlns:ns1="urn:xiSericeVi"><ns1:customer><ns2:ArrayList xmlns:ns2="java:sap/standard">[]</ns2:ArrayList></ns1:customer><ns1:name>2344566</ns1:name></ns1:updateCustomer>

Similar Messages

  • How to read varbinary data type using sql server

    Hello,
         I'm converted a text file data into varbinary format, and stored in DB table. Now I need to read
    Varbinary column and store in Temp table
    in sql server.
     can some one help on this.
    Regards,
    Praven
    Regards, Praveen

    I understand this question is related to your previous thread and I believe what Erland suggested is the best way to implement this.
    https://social.msdn.microsoft.com/Forums/en-US/a96a8952-0378-4238-9d9d-85b053182174/send-direct-text-file-as-a-input-parameter-to-sp?forum=transactsql
    I believe when the user uploads the data its getting uploaded onto the Application Server, You could then open the file and import the files into SQL server(all using application code) and do the manipulations. I believe this is the better way of handling
    this.
    Also what is the expected file size and what is the kind of data you are expecting?
    Satheesh
    My Blog | How to ask questions in technical forum

  • How to read sampled data info from a "*.au"file into an array?

    I need to manipulate the sound file directly using DSP, the first step is to read sampled data from "*.au" file into an array. How can I do that? Thanks a lot!!

    There is a file I/O tutorial in the Java Tutorial (google for Java Tutorial). You can read an .au file as bytes like any binary file.
    Or if you are using the Java Sound API, google for java sound api or java audio tutorial etc etc.

  • How to read notes data in FBV3 transaction code

    Hi Experts,
    When i go to Tcode FBV3 parked vendor invoice i have tab notes along with workflow, tax, withholding tax tabs. Notes contains  item long text, my requriement is i need to get this data into my report, i have tried but i couldn't able to get the details like Text Name, Language, Text ID and Text Object to pass it to READ_TEXT function module. Kindly suggest how to read this notes data.
    Regards,
    Sridhar

    Sorry, but this issue is not Asset Accounting.

  • How to read ABAP return parameter into java code

    Hi all,
    How JAVA environment can trap an error returned from abap code?
    E.g.:
    From a BAPI wrapper written like this:
    "function zpm_gi_create .
    ""Interfaccia locale:
    *"  IMPORTING
    *"     VALUE(ZBAPIGOODSMVT) TYPE  ZBAPIGOODSMVT
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRET2
    *"     VALUE(PO_NUMBER_ES) TYPE  ZBAPIEKKO-PO_NUMBER
    *"  TABLES
    *"      GOODSMVT_ITEM STRUCTURE  ZGOODSMVT_ITEM
      data: goodsmvt_header type bapi2017_gm_head_01,
            return2         type bapiret2 occurs 0 with header line,
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header             = goodsmvt_header
          goodsmvt_code               = zbapigoodsmvt-gm_code
          testrun                     = 'X'
    importing
      GOODSMVT_HEADRET   GM         =
        materialdocument              = matdoc
        matdocumentyear               = matyear
    tables
        goodsmvt_item                 = gm_item
      GOODSMVT_SERIALNUMBER       =
          return                      = return2.
    Our return (for istance is):
    "EBM                  312The (internal) unit xx has not been maintained in
    the unit table"
    How JAVA environment can trap this error or interpret the BAPIRET2 structure?
    Is there something to do in the corresponding syncBO?
    regards,
    eliana

    Hi elina ,
    these topic is already discussed in forum.
    Jo has replied to this doubt in these links.
    Re: Return messages in SyncBo
    Can't see RETURN parameter in SyncBO
    Return messages in SyncBo
    just note this..
    have to change like this , when u follow the help.
    if (messageReply.getType() == MessageReplyType.SYNC_BEGIN) {
              if (messageReply.getType() == MessageReplyType.SYNC_END) {
                Regards
                  Kishor Gopinathan

  • How to read the contents of a text file and populate the data in a table ?

    Hello All,
      Can anyone advise on how to acheieve the above ? I am trying to read in a text file (CSV) and have the contents populated to the respective UI elements in a table. Any help is greatly appreciated.
    from
    Kwok Wei

    Hi,
    Let us consider you have list of names(Seperated by delimeter) in a text file and you want to display in  a table.
    1. Create Context Node "Names" and context attribute "Name"
    2. Create Table and bind to the above context.
    3.Write the following code in the "Init method.
    try{
    FileReader f =new FileReader("");
    BufferedReader r=new BufferedReader(f);
    String names=r.readLine();
    Vector Names=new Vector();
    // Use Tokenizer and store all the names i a vector//
    for(int i=0;i<Names.size();i++){
    IPrivate<<VieName>>.INameElement ele=wdContext.createNameElement();
    ele.set<<Name>>( Names.get(i).toString());
    wdContext.NodeName().addElement(ele);
    Regards, Anilkumar
    Message was edited by: Anilkumar Vippagunta

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How can I read the data type of a field in an MS Access database

    I need to be able to determine if a field in an Access database is of a certain data type, and if it isn't, to change it to what it should be.
    I can't seem to find any way of reading the data type of any field in any table - can anyone give me a metod of getting this info?
    Thanks
    ..Bob

    Does <cfdbinfo> work for Access DBs?
    You might be better off asking this on a MS Access forum.  It's more of an Access issue than a CF one.
    Adam

  • Is there a date data type in java???

    Hi guys!
    Is there a date data type in java???
    How to declare date data type variable?
    Your reply is greatly appreciated!
    -=samer=-

    RTFM
    there's about 8 date types, depending on what you want
    see
    java.util.Date
    java.util.Calendar
    GregorianCalendar
    SimpleDateFormat
    System.currentTimeMillis()

  • How to Find the Data Type of the Field In a Database Table

    Hi Experts,
    I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
    Thanks a lot.

    Hi,
    Use this..
    DESCRIBE FIELD dobj  TYPE typ.
    write typ.
    type will contain the data type of the object.
    and check this thread also....
    Re: How to get datatype of fields in dynamic structures
    Cheers,
    Simha.
    Reward all the helpful answers..

  • How to find the Data Type of a column

    Dear All,
    How to find the Data Type of a Column dynamically in oracle Form.
    Thanks and Regards,
    Fazil
    Edited by: user11334489 on Aug 25, 2012 9:06 PM

    hi,
    you can use get_item_property built-in
    eg:
    declare
       l_item VARCHAR2(10);
    begin
       l_item := Get_Item_Property('item_name',DATATYPE);
    end;

  • How to change a date value from "java.util.Date" to "java.sql.Date"?

    Hi all,
    How to change a date value from "java.util.Date" to "java.sql.Date"?
    I m still confusing what's the difference between them.....
    thanks
    Regards,
    Kin

    Thanks
    but my sql statement can only accept the format (yyyy-MM-dd)
    such as "select * from xx where somedate = '2004-12-31'
    but when i show it to screen, i want to show it as dd-MM-yyyy
    I m using the following to change the jave.util.Date to str and vice versa. But it cannot shows the dd-MM-yyyy. I tried to change the format from yyyy-MM-dd to dd-MM-yyyy, it shows the wrong date in my application.
         public String date2str(java.util.Date thisdate)     {
              if (thisdate != null)     {
                   java.sql.Date thissDate = new java.sql.Date(thisdate.getTime());
                   return date2str(thissDate);
              }     else     {
                   return "";
         public String date2str(java.sql.Date thisdate)     {
              if (thisdate != null)     {
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   return sdf.format(thisdate);
              }     else     {
                   return "";
         public java.util.Date str2date(String thisdate)     {
              String dateFormat = "yyyy-MM-dd"; // = 1998-12-31
              java.util.Date returndate = null;
              if (thisdate != null)     {
                   SimpleDateFormat dateFormatter = new SimpleDateFormat(dateFormat);
                   try {
                        returndate = dateFormatter.parse(thisdate);
                   } catch (ParseException pe) {
                        System.out.println (pe.getMessage());
              return returndate;
         }

  • Does data type nvarchar in SQL 7.0 have matched DATA TYPE in JAVA

    does data type nvarchar in SQL 7.0 have matched DATA TYPE in JAVA
    I use odbc-jdbc bridge to connect to SQL 7.0
    thanks in advance!

    try String.
    java.sql.Types.VARCHAR would be the sql type.

  • Help! How to read a .txt file into a Java class and make 2D array?

    Hi guys,
    Im a newbie with arrays, just started really using them.. please bear with me if I don't seem to understand much..
    I have a .txt file that contains either a square or rectangle (random width and length).. How can I read each line into a Java class into a 2D array with rows and columns?

    Example :
    import javax.swing.*;
    import java.util.ArrayList;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.File;
    public class ReadInto2DArrayExample {
        public static void main(String[] args) {
            ArrayList array = new ArrayList();
            char [][] twoDimesionArray = null;
            try
                JFileChooser fileChooser = new JFileChooser();
                if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)
                    File file = fileChooser.getSelectedFile();
                    BufferedReader reader = new BufferedReader(new FileReader(file));
                    String data;
                    //Read from file
                    while ((data = reader.readLine()) != null)
                        //Convert data to char array and add into array
                        array.add(data.toCharArray());
                    reader.close();
                    //Creating a 2D char array base on the array size
                    twoDimesionArray = new char [array.size()][];
                    //Convert array from ArrayList to 2D array
                    for (int i = 0; i < array.size(); i++)
                        twoDimesionArray[i] = (char [])array.get(i);
                    //Test the 2D Array
                    for (int y = 0; y < twoDimesionArray.length; y++)
                        char [] temp = twoDimesionArray[y];
                        for (int x = 0; x < temp.length; x ++ )
                            System.out.print(temp[x]);
                        System.out.println("");
            catch (Exception ex)
                ex.printStackTrace();
    }

Maybe you are looking for

  • XML Publisher errors with pdf template workd perfectly with rtf template

    Hi there, I hope you are well. I am having a problem with pdf templates in XML publisher. I have a report which outputs XML, this works very well with an rtf template. However I am trying to create a pdf xml publisher template (using the concurrent p

  • Can you share music between iTunes accounts on the same computer

    Can you share music between iTunes accounts on the same computer? My kids iPods are under my account now with all of our shared music but they want their own iTunes accounts. I would like to transfer the music and apps that they purchased under my ac

  • IMovie volume meter shows much red peaking but audio waveform shows none

    When I play my movie, the volume meter in iMovie shows peaking in the red (distortion) all over the place, but in the audio waveform there is not one place where it peaks into the red (or even the yellow).  The whole wave is very close to the 0db lin

  • ADF selectOneChoice and af:forEach

    Hi, I'm atempting to create a data-bound selectOneChoice that displays DepartmentName and selects the corresponding DepartmentId as its value. I've tried using an af:forEach on an f:selectItem with the selectOneChoice, but I'm getting an error with t

  • BAPI or FM to create Invoice in SRM , without reference to PO ?

    Dear Colleagues, We have a situation where we have to create invoices in SRM from a file from a legacy system, that means we have no POs in SRM. Which process, BAPI or Function Module would you recommend me? Is it possible to create "standard" invoic