Read IDOC using java language

Hi,
   I am a new to sap java develop.
  now i am doing some research about IDOC/ALE using java language. I  receive an IDOC file from the sap system ,now i want to read the data in the IDOC file and tranform it to an XML file. Is there anyway to do it? whether java have provided some Kits to finish it.
   thanks in advance.
    qiuguo

Hi
Please refer to
1. idoc
3. how to create a simple idoc in practice? can you provide an example?
Regards
Abhijith YS

Similar Messages

  • How to open/read file using Java in Unix?

    Hi Friends,
    Can you please help me out how to open/read file using java in unix os? I have create one text file in "/home/test.txt" in unix environment. How to open the same file & read using java code?
    - Hiren Modi

    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • How can we make the ms-word data as read-only using java code?

    How can we make the ms-word data as read-only using java code?

    MVSK wrote:
    By using java code i opened a file in ms-word. But the data i want to display as read-only. that means should not change it.I don't think you can do that. Display pdf documents instead.

  • Hey need help reading images using java bean

    Hey everyone,
    I will like to read some images from a directory using Java and display it on a JSP page, how do I accomplish this,
    thanks
    KT

    What happen is, I have to display 52 card depending on string concatenation, I have a java file that takes two elements from an array, depending on the two strings concatenation I want to display an image on a jsp page, any ideas on how to accomplish this?

  • Reading msword using java

    I want to read msword file using java any one help me to do this
    thanks in advancce
    Message was edited by:
    [email protected]

    the msword section of poi is incomplete and has been inactive for several years.
    might be worth looking at word 2003 as this supports an published xml format for documents which you could access using any of the xml apis for java

  • How to read OVD using java

    Hi all,
    how to access OVD using Java?
    Thanks,
    Kumar.P

    Hi,
    You can just normal LDAP API codes to connect to OVD the same way you connect to other LDAP servers.
    PFB sample code for connecting to OVD.
    Properties props = new Properties();
    try {
    props.load(new FileInputStream("LdapCredentials.Properties"));
    } catch (IOException e) {
    // TODO
    ldapurl = "ldap://hostname:390";
    ldapUser = "cn=orcladmin,ou=Org12,dc=ovid,dc=com";
    userPassword = "welcome1"; //"Killtheking123456";
    userContext = "ou=Join1,dc=ovid,dc=com";
    Now, you have to get Directory Context as shown below.
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, ldapurl);
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, username);
    env.put(Context.SECURITY_CREDENTIALS, password);
    //Initialize the Directory context
    DirContext dCtx = new InitialDirContext(env);
    Then you can perform search operations or new user creation etc., as you wish.
    Does this help?
    -Mahendra.

  • Read mail using java, and set the mail

    How can I read mail and set message "SEEN" with java? (javax.mail)
    IMAP supports flags; so there are no problems, just using
    msg.setFlag(Flags.Flag.SEEN, true);
    but,
    POP3 does not support flags; how can I solve this in POP3? I have searched for this problem, found that I can just check for the header "Status", but this header does not exsist. Then I tried to add this header, but again, then I got IllegalWriteException cause pop3-msg is writeprotected (yes: I opened the folder READ_WRITE); so; does anyone know how I can solve this problem?

    Hi !
    Could u plz send me the code u r having for reading mails using IMAP...actually v r trying to read mails from outlook but due to some security reasons our team has decided not to use pop3 ...
    Thanks in Advance
    sha

  • Read Attachments using Java Mapping API

    Hello,
    after investigating the Java Mapping API a little deeper I found some very interesting Interfaces "InputAttachments" and "Attachments" which could do exactly what is required:
    Reading attachments and convert them into base64 code.
    As I am not an experienced Java Programmer howeve, I am note sure how to use those interfaces.
    For example there is a method defined in interface "InputAttachments":
    Attachment getAttachment(String contentID)
    How do I use it? If I use it in a way like "InputAttachments.getAttachment("abc");" then I get the error that it is not a static method. However how do I instantiate "InputAttachments".? As it is an interface I am not sure how to do this.
    Any idea how to handle these methods?

    Hi,
    I am working on the similar. I am able to attach txt files and csv files but have trouble attaching xcel and pdf's. Any input is appreciated. Thanks

  • Reading XML using Java

    I want to read all <temp >nodes map them to some variable and create one more XML.
    I am stuck up in the first place itself where i need to read the data :( . I am getting null pointer exception, please find the code also.
    <?xml version="1.0" encoding="UTF-8"?>
    <ftpl id="47" name="XXXXXXXX xxx xxxxxxxx">
    <abc-cab name="Systems" id="43434">
    <abc-dr name="zzzzz" id="4545454">
    <temp key="Type">null</param>
    <temp key="Folder">/ZVZ/XXXXX - xyz</param>
    <temp key="Author">XYZ,ABC</param>
    <temp key="Comments">null</param>
    <temp key="Mailed_By">XYZ,ABC</param>
    <temp key="Subject">null</param>
    <temp key="Key_Words">null</param>
    <abc-page name="1" id="3524012">
    <file text="/asas/asasa/asa/asas/Oxxxxxx2276744.txt" count="1"/>
    </abc-page>
    </abc-dr>
    </abc-cab>
    </ftpl>
    try {
    File file = new File("source-file");
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(file);
    doc.getDocumentElement().normalize();
    System.out.println("Root element " + doc.getDocumentElement().getNodeName());
    NodeList nodeLst = doc.getElementsByTagName("abc-dr");
    for (int s = 0; s < nodeLst.getLength(); s++) {
    Node fstNode = nodeLst.item(s);
    if (fstNode.getNodeType() == Node.ELEMENT_NODE) {
    Element fstElmnt = (Element) fstNode;
    NodeList fstNmElmntLst = fstElmnt.getElementsByTagName("abc-dr");
    Element fstNmElmnt = (Element) fstNmElmntLst.item(1);
    NodeList fstNm = fstNmElmnt.getChildNodes();
    System.out.println("First Node : " + ((Node) fstNm.item(1)).getNodeValue());
    NodeList lstNmElmntLst = fstElmnt.getElementsByTagName("Folder");
    Element lstNmElmnt = (Element) lstNmElmntLst.item(0);
    NodeList lstNm = lstNmElmnt.getChildNodes();
    } catch (Exception e) {
    e.printStackTrace();
    Please help.. let me know the code which read XML I have tried with all SAX/DOM i am getting same NUllPointerExcetion
    Message was edited by:
    JavaNewUser

    Hi
    Thanks patricknz
    pls find the XMl and the java code
    I have again modified the code .. but got the same result as below
    [temp: null]----------------------param =
    [temp: null]----------------------param =
    [temp: null]----------------------param =
    [temp: null]----------------------param =
    [temp: null]----------------------param =
    [temp: null]----------------------param =
    [temp: null]----------------------param =
    [abc-page: null]----------------------abc-page=
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Element;
    import java.lang.*;
    public class SampleDOM
        public static void main(String s[]){
            try{
                DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document document = docBuilder.parse("C:\\demo.xml");
                   NodeList nodeList = document.getElementsByTagName("abc-dr");
          for (int i = 0, length1 = nodeList.getLength(); i < length1; i++) {
            final Element rDoc = (Element)nodeList.item(i);
            final NodeList rDocC = rDoc.getChildNodes();
            for (int j = 0, length2 = rDocC.getLength(); j < length2; j++) {
              final Node child = rDocC.item(j);
            if (child.getNodeType() == Node.ELEMENT_NODE) {
                Element element = (Element)child;
                System.out.println(element.getChildNodes() + "----------------------" +
                                          new StringBuffer(element.getNodeName()).append(" = "));
            }catch(Exception e){
                e.printStackTrace();
    }XML FIle:-
    <?xml version="1.0" encoding="UTF-8"?>
    <ftpl id="47" name="XXXXXXXX xxx xxxxxxxx">
         <abc-cab name="Systems" id="43434">
              <abc-dr name="zzzzz" id="4545454">
                   <temp key="Type">null</param>
                   <temp key="Folder">/ZVZ/XXXXX - xyz</param>
                   <temp key="Author">XYZ,ABC</param>
                   <temp key="Comments">null</param>
                   <temp key="Mailed_By">XYZ,ABC</param>
                   <temp key="Subject">null</param>
                   <temp key="Key_Words">null</param>
                   <abc-page name="1" id="3524012">
                        <file text="/asas/asasa/asa/asas/Oxxxxxx2276744.txt" count="1"/>
                   </abc-page>
              </abc-dr>
         </abc-cab>
    </ftpl>Message was edited by:
    JavaNewUser
    Message was edited by:
    JavaNewUser

  • Reading Registries using Java

    Hi All,
    I need to extract a Registry key value and then convert it into string.
    Lets say that I need to find the value of "InstallLocation" at the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Arama
    I just need to extract the value. How can I do this? Please help.

    No way from pure Java, and search the forums or google it. This has been answered a thousand times already.

  • Steps to read PDF using Java Program that uses LifecycleES Jboss server

    Can anyone please mention the steps to setup the Jboss server in Lifecycle ES suite....
    i have program to read PDF that has following contents --and it Fails to connect to LiveCycle server via RMI. Please help me out.....
    Properties connectionProps = new Properties();
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "jnp://localhost:1099");
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceC lientFactoryProperties.DSC_EJB_PROTOCOL);
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");
    connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
    //Create a ServiceClientFactory instance
    ServiceClientFactory factory = ServiceClientFactory.createInstance(connectionProps);

    Vinay,
    i dont think that any body can read and write pdf files by java program.b'coz pdf files will have its own proprietery encoding format.
    Here is something u gotto remember when u post an answer to somebody's question. Never ever answer until u r very sure about something or u r a nerd in that area. Don't give a trivial or a insensible answer.
    Hope u learn the forum etiquette.
    Thanks,
    Kulk.

  • Reading excel using java

    how can i now that end of file has been reached my code isHSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(f.getPath()));
                        // Refer to the sheet. Put the Name of the sheet to be referred from
                        // Alternative you can also refer the sheet by index using getSheetAt(int index)
                        HSSFSheet sheet = workbook.getSheet("Sheet1");
                        //Reading the TOP LEFT CELL
                        HSSFRow row = sheet.getRow(0);
                        // Create a cell ate index zero ( Top Left)
                        for(int i=0;i<=1;i++){HSSFCell cell = row.getCell((short)i);
                        // Type the content
                         if(cell.toString().equals("call volume"))
                                     {           for(int j=1;j<=36;j++)
                                                     {   HSSFRow row1 = sheet.getRow(j);
                                                   HSSFCell cell1 = row1.getCell((short)i);
                                                 System.out.println(cell1.toString());
                                                 call_value[j-1]=cell1.getNumericCellValue();
            }catch(Exception es) {
                System.out.println("!! Bang !! xlRead() : " + es );
            }

    This is not Swing related and don't crosspost!

  • Using javax.usb to read usb using java

    hai friends
    iam trying to read data from usb and i had tried over javax,usb package it asks for the implemntation og javax.usb.UsbServices interface. wt is the solution
    with regards hbk

    I want to do it in windows

  • Running programs WINDOWS using java

    Hi ,
    I would appreciate if anyone could tell me how to run programs WINDOWS using JAVA language .Thank you.

    I am not quite sure what you mean by that, but if you want to execute a program use:
    Runtime.exec(String)

  • Building Excel 2007 Add-on using Java

    Hello
    I'm looking to build a Add-on in Excel using Java Language?
    Is that attainable? could further guidance be provided
    Thanks

    kash85 wrote:
    Apologies requirements have changed.
    Can I run a piece of VB code in Excel attached to Macro button in Excel that launches a Java Application.
    Can you run a piece of VB code in Excel attached to Macro button in Excel that launches an Application?
    Notice that that question has nothing at all to do with java.
    If the answer is yes, then if follows that because java is "an Application" that you can then run it.

Maybe you are looking for

  • Deploying Web Service clients to earlier versions of AS

    Hello, I'm using JDeveloper to create web service proxy for existing service to use in my Web Service client. For development, I'm using JDeveloper 10.1.3.3, for deployment of client application I'm using Application Server 10.1.3.0. The problem is t

  • Question about Java RMI/JNDI/IIOP and Linux IPCHAINS.

    IPChains only recognises, per se, three protocols -TCP -UDIP -ICMP as I grasp things. Can one mention IIOP directly in an IPCHAINS firewall, or is one forced to allow one particular IP, by protocol and Port number? What is recommended for RMI and JND

  • Problem with resizing canvas

    PSE 8, Windows XP Attempting to resize the canvas I entire a width and a lenght. I leave the position square in the middle. I click OK. The canvas extension appears only at the bottom of the photo, not all around as it does in PSE 3. I tried relative

  • Lost new iDVD 11 themes. Anyway to get them back?

    I have the disc for iLife but reinstalling didn't help. Did the latest update. Still no new themes. Any advice on how to get these back?

  • [iphone] Handling button touch events

    I have a view controller which contains a view which in turn manages 2 subviews that take up the entire scree, think like a playing card, where the 2 subviews simulate the front and back of the same card. When the user taps anywhere on the card, the