SAPIDocReceiver - read idoc content

Hi,
I'm writing a dot net application receive IDOCS from SAP using .net connector class SAP.Connector.SAPIDocReceiver.
Can anybody tell me the easiest way to access IDOC content from received text stream.
Also please let me know if there's a alternative to receive IDOC into a .NET application.
Thanks,
Sameera Perera.

Hi Sameera,
Read this blog and it would help- /people/sap.user72/blog/2004/12/31/some-tips-on-developing-idoc-receiver-programs-with-net-connector
And also NCo provides you with a sample application in the samples directory.
Regards.

Similar Messages

  • Read IDOC content in abap program

    Hi all
    using IDOC number, i'd like to read informations containted in that IDOC.
    In EDI_* Function moduls i have found EDI_DOCUMENT_OPEN_FOR_EDIT
    The problem is that this FM is used to process IDOC to change its content. i supose that the IDOC is enqued when processed by this FM.
    Do you know any other way to access IDOC data content in READ mode
    Thank you in advance
    Regards

    Hi,
    You can use the following FM.
    IDOC_READ_COMPLETELY (Read IDoc Data)
    IDOC_TYPE_COMPLETE_READ (Read IDoc Structure and Segments)
    or
    read the idoc data from database table edid4 and edids (idoc status))and edidc (idoc control data).
    Regards,
    S.Velsankar

  • Read IDOC Content in MII

    Hi Gurus,
    My plan is to send master data to MII and process them in MII.
    Is there a standard template or wizard available in MII to process the IDOC?
    Thanks.
    Nagarajan.

    Hi Jamie,
    Thank you for  your reply.
    I followed the exact steps which are mentioned in the link you have provided. I am able to get the IDOC in MII.
    My original question is how do I read my IDOC in MII efficiently? Example: If a material master have the basic views only, then the IDOC content will be miminum. If the material has all the views, then the IDOC will contain more data corresponds to the views of the material. Standard material master changes will provide IDOC which are specific to the changes carried out in the material master.
    How do I write a "common logic" to read the materials all the times?
    Thanks
    Nagarajan

  • Read IDOC WMMBID02 information and compare inventory data with SAP

    Hi All,
    Here is an explanation of the issue:
    I need to read the data from an inbound IDOC, status 64, of standard type WMMBID02 and message type WMMBXY. I do not want to post the IDOC, but only read the IDOC information which is mainly the material number, batch, status(INSMK), quantity and unit. This data I have to compare with SAP data and see if it is same for the selected material numbers. Now to read and process the inbound IDOC we have a program RBDAPP01 (BD20 Transaction) which calls the process code WMMB (WE42 transaction) which in turn calls the function module L_IDOC_INPUT_WMMBXY. This FM posts the IDOC. I have created a function module with the same import, export and tables parameters like this FM and have attached it to a custom process code ZWMMB. This function module should just read the data of the IDOC and put it in the table TB_IDOC_DATA like EDIDD (IDOC data records). I then loop into this table, extract SDATA and split it into the 3 segments of WMMBID02 and then extract my required data, MATNR, CHARG, INSMK, MENGE & MEINS.
    My Question:
    How do I trigger the process code ZWMMB so that I can read the IDOC data when it is fired (status 64), just like program RBDAPP01. Is there any standard code that can be copied and modified or how to do it???
    I have tried to be very clear with the question, please reply if the question is not clear. If I am clear, please help
    Thanks Anirban

    I am able to read the contents of the IDOC, but I need to run the FM when I fire the IDOC of message type ZWMMBXY. I have created a custome FM which will behave as a stndard FM for inbound IDOC processing.

  • Read Idoc Data In xMII 12 BLS Transaction

    Hi All,
    I am new to xMII.
    I followed the instructions suggested in the Document "How to Send an IDoc from the SAP R/3 Enterprise to the SAP xMII IDoc Listener" By Diana Hoppe and Michael Appleby written on 04 Dec 2008. It was pretty simple  and i was able to complete all the steps.
    In the Message Monitor in xMII 12.0 i am able to see " 5 Messags Found" and they are listed below in a grild with the server name, Message Name, Message Type etc
    Example
       Server Name   Message Type    Message Name    Message Category   Received Time                      Processing Time
       MII_IDOC          IDoc                     LOIPRO01            MII_IDOC                    2009-07-10 02:11:25.911  
    Now i would like to know how do i read the contents of this IDOC i.e Production order? Is there a sample or  stepby step guide which explains how i can get this data into an xML message in a BLS Transaction?
    Are there any simple steps to be followed to get this data from the IDOC?
    Please help me undestand this. Thanks in advance.
    Regards
    Suraj Prabhu

    Hi Dipankar,
    I had Pre ordered your book and I  just received a copy. The first impression wrt the Contents & Coverage of the book looks excellent.
    Congratulations to you and Abesh on this achievement. Writing a book on a topic which there has been no book written earlier is a great feat on its own.
    Will be spending more time with the book today evening.
    My Expectations from this book:
    1. A good intermediate to Expert developer/ BA / Architect guidance.
    2. Error Handling & Implementation - Best practices
    3. A Reference book for the current implementation I am doing with a customer :).
    Will keep you updated with my comments on the book. Since this is a first time I am working on a xMII implementation this book will be a life saver for me and could not have come at a better time. Thanks again.
    BTW u2013 First thing I checked in the book was steps on how to read the data from the IDOC in the Buffer and that has been explained pretty well and in detailsu2026.. Thanks again for that.
    Regards
    Suraj Prabhu

  • IDOC Contents in a table

    Hi Guys
    Could anybody tell me if there is any table wherein I can read the content of an IDOC?
    I have around 400 MBGMCR type IDOCs and I need to get the PO number for each of them. Is there any table where I just retrieve them from by giving the IDOC number.
    Thanks and any help will be much appreciated

    EDID2                          IDoc Data Record from 3.0C onwards
    EDID3                          IDoc Data Record from 3.0 onwards
    EDID4                          IDoc Data Records from 4.0 onwards
    EDIDC                          Control record (IDoc)
    EDIDD_OLD                      IDoc Data Record
    EDIDO                          Value table for IDoc types
    EDIDOCINDX                     Control record (IDoc)
    EDIDOT                         Short description of IDoc types
    EDIDS                          Status Record (IDoc)

  • Is there any standard ptogram/tcode to download idoc contents with fields.

    Hello All,
    Is there any standard ptogram/tcode to download idoc contents with fields?
    Thanks,
    Devaraj.

    Hi Patil,
    I dont think there is standard program or t-code.
    But u can down load the IDOC with field contents by following way
    Goto t-code WE62- give the basic idoc name- press display button  then it shows all filed contents with description.
    Now select 'SYSTEM' LISTSAVE--LOCAL FILE from menu bar .
    Here select the file type ie spread sheet,html, etc and give the file name and directory where u need to place it.
    <b>Rewards with points if helpful.</b>
    Regards,
    Vijay.

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How to read the contents of XML file from my java code

    All,
    I created an rtf report for one of my EBS reports. Now I want to email this report to several people. Using Tim's blog I implemented the email part. I am sending emails to myself based on the USERID logic.
    However I want to email to different people other then me. My email addresses are in the XML file.
    From the java program which sends the email, how can I read the fields from XML file. If any one has done this, Please point me to the right examples.
    Please let me know if there are any exmaples/BLOG's which explain how to do this(basically read the contents of XML file in the Java program).
    Thank You,
    Padma

    Ike,
    Do you have a sample. I am searched so much in this forum for samples. I looked on SAX Parser. I did not find any samples.
    Please help me.
    Thank you for your posting.
    Padma.

  • No music in iTunes library and it wont read the content of my iPod? Help please!

    So I recently updated to iTunes 10.7 and when I did, all of the content in the iTunes library was gone! i have tried many different things to get it to work, like restoring to a previous iTunes library, but it appears that all the previous iTunes libraries were also deleted when I updated! If there is no other way to get the music back than finding the original files and putting them into iTunes, I guess that will be ok.
    The second problem I am having is that when ever I try to sync my iPod it takes a very long time to load, and then it says that iTunes can't read the content of my iPod and that I should restore to the factory settings, but because there is no music or apps in my iTunes library I dont want to do that, because then I will have no way of getting all of my content back on. And I can't restore to a previous backup because it wont read it as my iPod, it just comes up as an unkown iPod. This is very frustrating and I have tried everything I can think of. Please help!

    Try:
    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Try another cable and another USB port
    - Reboot the computer.
    - See if you can find the media by:
    - See if a third-party progtam like one of those discussed here will allow you to get the music off the iPod
    newer copy
    - I think you may end up restoring the iPod.

  • "Itunes cannot read the contents of ipod. Go to the summary tab in Ipod preferences and click Restore to restore this ipod to factory settings." What is this?

    I have been getting this error message since about the end of June when I updated to the latest version of iTunes. It's pretty annoying. Let me lay out how this has been happening for the past month, the best I can. I have a 32GB 4th gen iPod Touch
    I load content up to my iPod. Music, Apps, Videos, pictures, etc.
    My iPod works well for a little while, days sometimes a week is the longest I went without seeing this message.
    I connect iPod back to my laptop through the standard pack in Apple USB connector.
    I get the "Itunes cannot read the contents of ipod. Go to the summary tab in Ipod preferences and click Restore to restore this ipod to factory settings." message. When I go to the preferences tab, I click restore and iTunes gets stuck trying to restore my iPod. Then I have to uplug my iPod. And Shutdown/Restart my PC reconnect my iPod, and go through the restore process again.
    I have been doing this for as I said, a month. It's getting pretty grueling to keep havomh putting cotent on my iPod after these restores.
    I've tried everything.
    I've stopped autosync, it still happens.
    I tried to reinstall iTunes(be it I didn't full uninstall before trying to install again and got the option to fix corrupted files and such
    I've deleted all old back up, and it still happens
    Today is the fist time I'm fully uninstalling iTunes, and then reinstalling to see if this works.
    But do you guys have any otehr solutions for this? As I said, this didn't start happening until I installed the lastest version of iTunes 10.6.3

    - Have you tried another cable?
    - Another USB port?
    - When you have the problem, connect it to another computer to help determine if you have an iPod or computer problem.
    - Try just restoring the iPod to factory settings/new iPod. Do not restore from backup. If you still have the problem with this and all computer that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Extract text file from a folder and read the content

    Hi
    I have "n" no.of text files saved in a folder with automatically generated naming convention which include DD/MM/YYYY and also some measurement output value.
    Eg: 1) Die_1_DUT_outputvalue_DD_MM_YYYY.txt
        2) Die_1_DUT_outputvalue_DD_MM_YYYY_ABC.txt
    In the above files part of the 2nd file naming convention same as the first file (i.e. Die_1_DUT and DD_MM_YYYY) whereas outputvalue is different and an additional string named ABC is appended.
    Now I want to search the 2nd file based on matching the naming pattern with the 1st file (note: the outputvalue in the file name is different for both files) and so far followed this method
    1) Use a list folder with *.txt pattern to search all the text files and the output is a 1D array
    2) then use array to cluster and then flatten to XML function to have all the text file names as a string element (not 1D array)
    3) then pass the output of the 2nd step to the sting match pattern and use a regular expression to get the required file name
    4) send the output of the 3rd step to search 1D array to get the index and then get the file name and later use read text file to read the content of the text file
    And I am stuck at the 3rd step while sending an input as the regular expression to match the pattern as the outputvalue in the namming convention of the above two files is different is there any way I can actually extract the filename/file?
    Any suggestions?
    Attachments:
    1.png ‏11 KB

    Some bits in your code are unnecessary, a leaner implementation here:
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • How to read the contents of attached files

    Hi,
    I am designing a Form using LiveCycle Designer 8.0
    Scenario:
    User can attach the file through "Attachments" facility provided on Adobe  Reader.
    The requirement is to attach 3 documents and post it to SAP system using Web services.
    I am using the following code(which i got from this forum only) to find the number of files user has attached.
    d = event.target.dataObjects;
    n =  d.length;
    xfa.host.messageBox("Number  of Attachments: "+n);
    //Displaying  the names of the Attached files
    for( i =  0; i < n; i++ )
    xfa.host.messageBox("Name  of the file: "+d[i].name);
    My problem: is how to read the contents of the attached files so that I post it to SAP using Web services
    Thanks in advance!!
    Taha Ahmed

    In order to read the content of the Redo Log files, you should use Logminer Utility
    Please refer to the documentation for more information:
    [Using LogMiner to Analyze Redo Log Files|http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/logminer.htm#SUTIL019]
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • This item cannot be displayed in the Reading Pane. Open the item to read its contents Outlook 2013

    One of Outlook 2013 of Office Home and Business in Windows 7 Pro 64bit who is connecting to a local Exchange 2010 server is having the following error:
    This item cannot be displayed in the Reading Pane. Open the item to read its contents.
    When launching Outlook, it seems work fine. If user click other folders and click Inbox again. The error comes out. It only happens on Inbox folder.
    I have tried the followings with no luck.
    1. Rebuilt new Outlook profile.
    2. Rebuilt new Windows profile + Outlook profile.
    3. Disabled all add-ins.
    There are 2 ways I can make it work.
    1. I disabled "Cache Mode", then it starts working well. 
    2. Start Outlook with outlook.com /safe.
    So the question is why in Cache mode, Outlook 2013 cannot display the item in reading pane. 
    Any hint will be appreciated.
    CliffZ

    CliffZ,
    One hint: Do an offline virus scan on the affected computer:
    1. Check if your computer has a 32- or a 64-bit system. Right-click on Computer icon, choose Properties. System type reveals the bitness.
    2. Download the appropriate virus scanning version from http://windows.microsoft.com/en-US/windows/what-is-windows-defender-offline
    Note: If you're on Windows 8.1: http://windows.microsoft.com/en-us/windows/what-is-windows-defender-offline-beta
    3. Insert a USB stick with nothing important on. Observe the drive letter (F:, G: etc ...) assigned to it.
    4. Start the downloaded program and follow the instructions. Note: Choose the correct drive letter from 3 above.
    5. Restart your computer so it will boot from the USB stick. Depending on computer brand you can often press F12 to get a boot menu.
    Sometimes you have to enter BIOS to tell the computer to boot from USB if present.
    The quick scan starts. Abort it and select Full Scan.
    Let it run overnight.
    Regards Pete

  • Help me...How to read the content if "Transfer-Encoding:chunked" is used?

    I am doing a project for internet control using Java,PHP and MySql.All sites should go through the proxy server only.If the HTTP header contains Content-Length,am getting the content length as below:
    public class HTTPResponseReader extends HTTPMessageReader
        String statusCode;
        public HTTPResponseReader(InputStream istream) throws IOException,                     NoSuchElementException
      BufferedInputStream distream = new BufferedInputStream(istream);
      retrieveHeader(distream);
      StringTokenizer st =  new StringTokenizer(new String(HTTPMessageReader.toArray(header)));
      versionProtocol = st.nextToken();
      statusCode = st.nextToken();
      String s;
      while (st.hasMoreTokens())
            s = st.nextToken();
            if (s.equals("Transfer-Encoding:"))
           transferEncoding = new String(st.nextToken());
         if (s.equals("Content-Length:"))
           contentLength = Integer.parseInt(st.nextToken());
         if (s.equals("Connection:"))
          connection = new String(st.nextToken());
          if (connection.equals("keep-alive")) mustCloseConnection = false;
       retrieveBody(distream);     
    }After getting the Content-Length,i used read method to read the content upto that content length.Then i concatenated the HTTP header and body and the requested site was opened.But some sites dont have Content-Length.Instead of that,Transfer-Encoding is used.I got the HTTP Response header as "Transfer-Encoding:chunked" for some sites.If this encoding is used how to get the length of the message body and how to read the content.
    Can anybody help me.
    Thanks in advance...
    Message was edited by:
    VeeraLakshmi

    Why don't you use HttpUrlConnection class to retrieve data from HTTP server? This class already supports chunked encoding...
    If you want to do anything by yourself then you need to read HTTP RFC and find all required information. Well in two words you may reject advanced encoding by specifying HTTP 1.0 in your request or download chunked answer manually. Read RFC anyway :)

Maybe you are looking for