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

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

  • IDOC Data Records

    I have the IDOC Number with me. How to fetch the Data Records from that ?

    If you want to read the idoc records in your program:
    use the folloing fms:
    Sample code:
      CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_READ'
        EXPORTING
          document_number = p_docnum
        IMPORTING
          idoc_control    = f_idoc_control
        EXCEPTIONS
          OTHERS          = 01.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING error_opening_idoc.
      ENDIF.
    * Read IDOC data segments
      CALL FUNCTION 'EDI_SEGMENTS_GET_ALL'
        EXPORTING
          document_number = p_docnum
        TABLES
          idoc_containers = t_idoc_data
        EXCEPTIONS
          OTHERS          = 01.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING error_reading_idoc.
      ENDIF.
    * Close IDOC
      CALL FUNCTION 'EDI_DOCUMENT_CLOSE_READ'
        EXPORTING
          document_number = p_docnum
        IMPORTING
          idoc_control    = f_idoc_control
        EXCEPTIONS
          OTHERS          = 01.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING error_closing_idoc.
      ENDIF.

  • NOD & LINA records - IDoc data

    Hi Experts,
    What is mean by NOD & LINA records?
    One of my spec says "before sending the Idocs validation is done For NOD and LINA records and if any of the mandatory fields are missing then it is printed as an error report".
    thanks
    Dany

    If you want to read the idoc records in your program:
    use the folloing fms:
    Sample code:
      CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_READ'
        EXPORTING
          document_number = p_docnum
        IMPORTING
          idoc_control    = f_idoc_control
        EXCEPTIONS
          OTHERS          = 01.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING error_opening_idoc.
      ENDIF.
    * Read IDOC data segments
      CALL FUNCTION 'EDI_SEGMENTS_GET_ALL'
        EXPORTING
          document_number = p_docnum
        TABLES
          idoc_containers = t_idoc_data
        EXCEPTIONS
          OTHERS          = 01.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING error_reading_idoc.
      ENDIF.
    * Close IDOC
      CALL FUNCTION 'EDI_DOCUMENT_CLOSE_READ'
        EXPORTING
          document_number = p_docnum
        IMPORTING
          idoc_control    = f_idoc_control
        EXCEPTIONS
          OTHERS          = 01.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                RAISING error_closing_idoc.
      ENDIF.

  • IDOC Listener not calling BLS Transaction

    All,
    I am running xmii 11.5.4.  I have a single IDOC Listener configured with a Routing Rule for Message Type = "PROCESS_MESS_DOWNLOAD".  The Routing Rule is defined to trigger a BLS called "TEST_BLS".  The Listener is configured with the BLS Input Parameter.
    The Listener processes the incoming message by writing the XML file to the defined Path with no problems.
    The issue is the BLS Transaction will not trigger.  The Transaction has a single Transaction Property of data type XML with no default value defined.
    I have tried using a simple Transaction with nothing but an Event Logger or XML Trace actions to verify the Transaction is being executed. But nothing occurs.
    I have viewed the General Log and see no errors or warnings or fatal log entries.
    The Transaction works fine manually from inside Logic Editor and even runs from a URL invokation.
    Any ideas of what to look for or try would be greatly appreciated.
    Thanks,
    Chuck

    Udayan,
    The Transaction consists of only an Event Logger Action and an XML Tracer Action.  Neither of these are apparently executing.  No event is logged and no entry is made to the XML Tracer file. The Transaction has a Transaction Property defined as stated in my first post.
    I have noticed through trial and error that the IDOC Listener only works with the asterick message type.  The actual message type of the IDOC is evidently not being read by the Listener.  The IDOC being created is coming from a PPPI Process Message.  The first few lines are:
    <?xml version="1.0" encoding="UTF-8"?>
    <PROCESS_MESS_DOWNLOAD>
    <INPUT>
    <CLIENT>200</CLIENT>
    </INPUT>
    <TABLES>
    <MSEL>
    <item>
    <MSID>100000000000000537</MSID>
    Thanks,
    Chuck

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

  • Idoc- File scenario: Read a data field in IDOC and name the file with it

    Hi All,
    I am configuring an IDOC to File scenario.
    I have a requirement where I need to read one of the IDOC data field and use that as the name of the File.
    E.g: If the IDOC data field-1 = '123456', then I need to name the output file as '123456'.
    Is it possible to do this. Appreciate your help on same.
    Thanks
    Shirin

    Try this code..
    desired field from IDoc will be input parameter to UDF
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key,a);  // a is input parameter
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Also, check Adapter specific message attributes in file adapter, check  filename

  • Read MULTIPLE idocs data with all sgmn to my internal table in a single

    Dear SAP Folks!
    I have a question, I know to read SINGLE idoc data with all segments, we have FM IDOC_READ_COMPLETELY but my requirement is to Read MULTIPLE idocs data with all segments to my internal table in a single shot without keeping this FM in loop! since it is performance issue, at a time i may want to read 1000 idocs data!
    Could anyone please let me know is there any way to get this, keeping mind of performance and any other FM?
    Best Regards,
    Srini

    Hi,
    I know idoc numbers and i can write a select Query to DB table EDID4 to get all segments data to my internal table. But i am looking for FM to do this. because i have too many number of idocs and each idoc is having many segments(I am thinking in performance point of view!) The FM IDOC_READ_COMPLETELY can accept only ONE IDOC number as import parameters at a time to get segment data. in similar way do we have any other FM? or other way? except select query to EDID4 table?
    Best Regards,
    Srini

  • Posting an XML Variable to a BLS Transaction from a web page

    I am working in xMII 11.5 with all the latest service packs. I know this is probably a really basic question but I am stumped.
    I am trying to pass a multi row and multi column XML data set from a web page into a BLS transaction (actually, two of them) in order to populate the parameter. I want to use the Web Service interface to the transaction. I have tried using parameters on an Xacute Query in an Applet as well with an equal lack of success. I cannot persuade the transaction to see the incoming variable as an XML data type. I have tried encoding and decoding and string to xml conversions and nothing seems to successfully allow the data set to be seen withing the BLS as anything but a string. The String to XML action will not handle the number of columns in the dataset though it seems to work if the data set has only one column. The data set is formatted in the proper "Rowsets/Rowset/Row" format. I have considered writing the data to an XML file on the server (I know I can deal with that) but that is not acceptable in this application.
    Can someone share the secret with me?
    ...Sparks

    Parameter value:
    r1d1,r1d2,r1d3;r2d1,r2d2,r2d3;r3d1,r3d2,r3d2
    Pass thru String List to Xml Parser with delim ";"
    <Row>
    <Item>r1d1,r1d2,r1d3</Item>
    </Row>
    <Row>
    <Item>r2d1,r2d2,r2d3</Item>
    </Row>
    <Row>
    <Item>r3d1,r3d2,r3d2</Item>
    </Row>
    Repeat on each row/item and pass thru String List to Xml Parser with delim ","
    <Row>
    <Item>r1d1</Item>
    </Row>
    <Row>
    <Item>r1d2</Item>
    </Row>
    <Row>
    <Item>r1d3</Item>
    </Row>
    Of course, your columns aren't flat but they are easy to ref, to get "column 2" for example:
    StringListToXml_1.Output{/Rowsets/Rowset/Row[2]/Item}
    So now you have rows and columns. Assign your data to your BAPI structured as needed.
    We have passed complex XML via the SOAP interface in 11.5, but it involved some "hacks". Basically we passed the sterilized XML via a String Type Parameter, and then unserialized it inside the BLT.  
    I have been told on this board that there is a solution to passing XML data vie the SOAP interface using ref docs, but i have never personally seen a working example.

  • Update ABAP Report in SAP R/3 with data from xMII

    Hi Experts,
    How do we update some PP reports in SAP R/3 from xMII .
    We have sucessfully got all the data from the historians in the plant and also established connection between SAP R/3 and xMII.
    1. We also need to store the data passed in SAP R/3 in a Z-table and fetch data from there.
    2. How the BLS in xMII can be called from SAP R/3 to update the table.
    Thanks in advance.
    Regards,
    [Vivek K|https://forums.sdn.sap.com/profile.jspa?userID=2097685]

    Vivek,
    You can very well do this using a remote enabled function module.  For this,
    1) Write a function module which takes input (tag name & value) and inserts in z table.
    2) Set it remote enabled.
    3) Define your SAP server under data services - > SAP Server Configurations.
    3) Write a BLS transaction which calls this RFC using SAP JCO action. Here you can use the configuration that you defined in earlier step. Set the input parameters.
    4) Execute the transaction and you can put an external breakpoint in your RFC for debugging.
    I think when you said you are getting data xacute query, even that will execute such kind of BLS transaction.
    Mike.

  • XML INPUT parameter in a MII BLS Transaction

    Hi.
    Please anybody has some good XSD file that can be used as a data type for a xml input parameter of a BLS Transaction ? could share it with us ? I will use it as a sample to create my own XSD file.
    Until now, all XSD files that I created worked but I could not import the webservice on ECC.

    Hi Stephen Kuykendall, thank you.
    I still have to following error message when try to execute the webservice in wsnavigator:
    [location : http://srvsdmii01.malwee.com.br:50000/XMII/WSDLGen/Default/teste2] ERROR : Definition of /definitions/types/s:schema/s:complexType[1]/s:sequence/s:element/s:complexType/s:sequence/s:element is not correct. Missing top level component (uri: 'http://schemas.xmlsoap.org/wsdl/'; name: 'GET_DETAILS').
    I created a XSD file and put your xsd contente there:
    so, I created a transaction propert of type "Input" with Data Type "xml" and assined your XSD with the element "GET_DETAILS":
    The WSDL url (/XMII/WSDLGen/Default/teste2) generated the wsdl with the following content:
    <?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.sap.com/xMII" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
        <!-- Types -->
        <types>
            <s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII"><s:import schemaLocation="http://srvsdmii01.malwee.com.br:50000/XMII/WSDLGen/db/Default/WEB/Entrada.xsd"/>
                <s:complexType name="InputParams">
                    <s:sequence id="InputSequence">
                    <s:element maxOccurs="1" minOccurs="0" name="P_Entrada"><s:complexType><s:sequence><s:element ref="GET_DETAILS"/></s:sequence></s:complexType></s:element></s:sequence>
                </s:complexType>
                <s:element name="XacuteRequest">
                    <s:complexType>
                        <s:sequence>
                            <s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string"/>
                            <s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string"/>
                            <s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams"/>
                        </s:sequence>
                    </s:complexType>
                </s:element>
                <s:complexType name="Rowset">
                    <s:sequence>
                        <s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row"/>
                    </s:sequence>
                    <s:attribute name="Message" type="s:string"/>
                </s:complexType>
                <s:complexType name="Row">
                    <s:sequence id="RowSequence">
                    <s:element maxOccurs="1" minOccurs="1" name="P_Saida" type="s:string"/></s:sequence>
                </s:complexType>
                <s:element name="XacuteResponse">
                    <s:complexType>
                        <s:sequence>
                            <s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset"/>
                        </s:sequence>
                    </s:complexType>
                </s:element>
            </s:schema>
        </types>
        <!-- Messages -->
        <message name="XacuteSoapIn">
            <part element="s0:XacuteRequest" name="parameters"/>
        </message>
        <message name="XacuteSoapOut">
            <part element="s0:XacuteResponse" name="parameters"/>
        </message>
        <!-- Ports -->
        <portType name="XacuteWSSoap">
            <operation name="Xacute">
                <input message="s0:XacuteSoapIn"/>
                <output message="s0:XacuteSoapOut"/>
            </operation>
        </portType>
        <!-- Bindings -->
        <binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
            <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="Xacute">
                <soap:operation soapAction="http://www.sap.com/xMII" style="document"/>
                <input>
                    <soap:body use="literal"/>
                </input>
                <output>
                    <soap:body use="literal"/>
                </output>
            </operation>
        </binding>
        <!-- Service mapping -->
        <service name="XacuteWS">
            <port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
                <soap:address location="http://srvsdmii01.malwee.com.br:50000/XMII/SOAPRunner/Default/teste2"/>
            </port>
        </service>
    </definitions>

  • Idoc data - Need to see the full SDATA field value

    My SAP system is 4.6C. I need to see and extract the field data of the SDATA field in the EDID4 table. The field size in se11 is showing as of 1000 characters, but the field data when displaying is getting truncated. The message that comes below is Field SDATA is too wide to display (field will be truncated) --> Message no. MO 441 --> The field SDATA is more than 200 characters long. --> the system response comes as The field is output in a format restricted to 200 characters. So, it seems that the data after 200th character is getting truncated.
    How can i increase the display field of the SDATA field???

    It is not possible to view the IDoc data directly in the database. You need to use either WE05 transaction for an existing IDoc or WE60 to view the documentation and layout for each type.
    In a nutshell, there are different segments, each with their own layout, but it's not efficient to create database tables with separate fields for each segment. So all the data is stored in "raw" format and then, knowing the segment code, it may be correctly parsed into a readable format.

  • Using Calculation Action in BLS Transaction

    I'm trying to pass the values of two tags in a tag query into a calculation action in a BLS transaction and add the two values together.  I'm linking the action result property to the expression that does the calculation.  When I click on the 'Evaluate' button in the link editor I get the correct result but the action result itself is always zero and zero gets passed into my next action block.  Any ideas?  (I'm using xMII 11.5 SP3)

    Thanks, Jeremy.  The variables coming out of my tag query are doubles.  I'm not sure how to tell what the data type of the calculation "result" variable is.
    My result variable for each calculation always seemed to be zero (I mean I would hover my mouse pointer over "result" and I'd see a zero).  I decided to write my results out to a text file and it looked OK so I'm not sure why I was seeing zeroes in the link editor.
    In any event, my output from the transaction seems to be OK so I'm ready to declare success and move on.
    David

  • How to edit Idoc data in inbound processing

    Moved to correct forum by moderator
    Hi All,
    How to edit idoc data in inbound processing ? We have a custom FM in inbound scenario and requirement is to update a value in idoc, this value comes after certain processing in custom FM.
    I tried editing it through
    EDI_DOCUMENT_OPEN_FOR_EDIT
    EDI_CHANGE_DATA_SEGMENTS
    EDI_DOCUMENT_CLOSE_EDIT
    but there is problem in this approach. By this procedure two idocs are created in system, one with original data and one with modified data. We want only one with modified data.
    We do not want any direct database table updates.
    Please provide appropriate solution.
    Note : We are not changing status record. Please do not post replies related to status change
    Edited by: Matt on Nov 19, 2008 2:24 PM

    Hi,
    You can edit the idoc by doing the following steps:-
    1. Goto WE02 transaction and give the IDOC number and execute
    2. Once the required IDOC gets retrieved then double on the text pad icon beside the segment which you wanted to change.
    3. Select the Data Record at the top and click Display <-> Change option, which will enable you to change the data in that segment.
    4. After doing the step 3 then click the save button to save your changes.
    5. Then system will generate a new idoc number to store the actual data and your current idoc will hold the new data and the idoc will be in 69 status.
    6. Execute the Program RC1_IDOC_SET_STATUS by giving your idoc number and status as 69 and new status 64 and remove the test flag
    7. Then the IDOC will be in 64 status and you can reprocess the idoc with the help of the program RBDAPP01 by giving the idoc number.
    The above is the entire process for editing the error idoc and reprocessing it again.
    I hope I am clear and you understood the entire flow of editing and reprocessing an idoc.
    Thanks,
    Mahesh.

  • BLS transaction execution time

    When I run a BLS transaction,  its execution started time is 4 hours ahead .  I looked at my xMII server time and it is OK .  What should be happening ?

    Thanks michael,
    In fact,  it seems that the problem is in the SERVLETEXEC service  . In the system properties option  windows at the bottom one can change the user time zone option .
    I will let you know if this is the right solution .  By the way,  how can I change the user and password for the SERVLETEXEC application . You can acces this application by using the  http://localhost/servletexec/admin in you xMII server URL .
    Best Regards,

Maybe you are looking for

  • How to move one plot upward or downward in a graph?

    Dear All, There are some buttons in my vi. Press it can move one plot upward or downward. I have thought one way, but it use too much memory. I have tried to move the variety of graph out of the event structure, but after that there is no plot displa

  • Videos not showing up on ipad

    videos are not showing up on ipad after syncing

  • BP Gen. not getting created in ELM

    Hi, When I try to upload a file to create new BP in CRM 5.0 in the 2nd step u201CMap Datau201D it give the error u201CBP 0000400001 does not existu201D. In my mapping file I have given the BP no 0000400001 and mapped it to PER_NUMBER. Still it is not

  • Having trouble reinstalling iTunes to Vista...

    So I was having problems with certain components of iTunes working at first, so I completely removed iTunes (meaning deleted the folders and files, and deleted all of the other iTunes applications.) The problem is now when I attempt to reinstall it,

  • How do I re-download CS5 to my new computer?

    I have the serial numbers of my CS5 package from my old computer, but I have a new computer now and need to download it again. I know you can have 2 downloads, so this would be my 2nd one. I just can't find the place to re-download the product. Can a