Automate flat IDOC to XML IDOC using one interface

Hello all,
We are currently going through a migration process where XI will be replacing a legacy system.  As part of our testing procedure, we are using historical data pairings from the legacy system and using an automated tool to compare if the interfaces we develop in XI match.  The catch is we need the data that we are comparing in XML format for the automated tool to be able to do the comparison, and unfortunately the legacy data is a flat format.  So now I would like to automate a way to convert this data to XML format.
Specifically for IDOCs, I would like to have an interface which picks up the flat files, transforms them to XML, and then drops them back into another file directory in the XML format.  It would need to be able to pick up any kind of IDOC (given that XI has the metadata already imported), recognize what message type it is, then do the conversion.
I have been reading on SDN and found that there is a standard tool to do the conversion, but it appears it can only handle one kind of IDOC at a time, and it appears it only picks up one specifically named file at a time.
Has anybody tried to implement a scenario like this?  Any help is appreciated (A walkthrough would be the best!).
Thanks in advance,
Mike

Mike,
What version of PI will you be using? PI 7.11 can now auto-convert Flat File IDocs to XML IDoc and vice versa.
Here is the documentation:
http://help.sap.com/saphelp_nwpi711/helpdata/en/b5/bd93642dd3410f90ebea702399fac4/frameset.htm (flat to XML)
http://help.sap.com/saphelp_nwpi711/helpdata/en/74/a45bc07e2043fb9b63295229178903/frameset.htm (XML to flat)
I have not tried this personally, but seems like you might be able to use a "File to File" scenario with no mapping, and use the "IDOCFlatToXmlConvertor" Module in your File Adapter Comms Channel and it may just work, giving you files that are the IDoc XML version of the flat file it is reading. It looks like it does an RFC call to the back-end SAP system where the IDocs are originally from (or could be any system as long as you know the IDocs in there are identical), and reads the IDoc metadata (which has always included flat file field offsets for each IDoc Segment Field), and applies that either to convert from flat file IDoc to XML IDoc, or XML IDoc to flat file IDoc.
It does mention that there is a limitation that there can only be one IDoc in the source flat file - could be a problem if you have many in one file, which is pretty typical.
Regards,
Brendan

Similar Messages

  • ALE IDOC to XML IDOC scenario using XML port

    Hi,
    I am working on ALE IDOC to XML IDOC scenario using XML port . The requirement is to place a XML IDOC on the application server using ALE IDOC scenario ( output type is created in NACE which is ALE enabled ).
    Can anybody help me on the steps.
    Regards
    Kumar
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Sep 8, 2011 6:01 PM

    U can give a try as follows.
    In the Partner Profile of Sender R/3 system,
    Give the Receiver Party P_Party in the PartnerNo. Give the 'Business Partner' as logical System type.
    In XI, Party Definition of P_Party
    Give the following Alternative Identifier
    Agency  -   Sender R/3  Business System       
    Scheme -   ALE#GP
    Value    -    P_Party

  • Can i use one interface to load data into 2 different tables

    Hi Folks,
    Can i use one interface to load data into 2 different tables(same schema or different schemas) from one source table with same structure ?
    Please give me advice
    Thanks
    Raj
    Edited by: user11410176 on Oct 21, 2009 9:55 AM

    Hi Lucky,
    Thanks for your reply,
    What iam trying is ...Iam trying to load the data from legacy tables(3) into oracle staging tables.But i need to load the same source data into two staging tables(these staging tables are in two different schemas)
    can i load this source data into two staging tables by using single standard interface(some business logic is there)
    If i can then give me some suggestion how to do that
    Thanks in advance
    Raj

  • Error in using one interface in other

    Hello,
    I have two interfaces , interface1 & interface 2 . Interface 1 is a temp which is used by interface2 as a source.
    I'm trying to set the property "Use Temporary interface as derived table" but the check box is disabled and i cannot modify it. , Interface 1 has target temp table.
    Any advise ?
    In technology for oracle support derived table is already selected.
    thx

    Hi Matt
    I'm using the same FM but it's not working. Can you please share what data you are passing in the FM.
    After debugging I found that my confirmation is getting created but it's not getting saved.
    Please enlighten me.
    Thanks
    Ankit

  • Generating XML Payload using outbound interface

    Hi Members ,
    I have a requirement which is not that clear or details of which are not exactly known.But I just know that I have to outbound some accounting information basically GL Account segment values .Thing is I have done some interfaces before but was using UTL_FILE to have delimiter files. Please let me know how to generate XML file in our case?
    Is it something I can leverage in R12 the XML Gateway ??
    Appreciate help.
    Thanks
    Narayana

    1) First you have yo create map using message designer(map between DTD and DataBase). Please refer user guide for more details.
    2) Load Map
    3) use ecx_oubound.getxml for generating an xml with the map code given

  • Regarding Displaying of outbound Idocs in XML format

    Hi every1
    i want to display my IDocs in XML format. I am using T.Code WE34, after that.... what i have to do. Please let me know whole procedure, because in SAP Library I am getting information about only Inbound; and i want to know about outbound Idoc. please reply me its urgent.
    Thanks
    Anil Behera.

    Hi,
    Follow the procedure
    IDOC to XML Convertion using ALE Interface
    1) Send an outbound IDOC data(MATMAS) to a flat file(XML) on client1(SENDER).
    Create File Port (WE21) of XML Type for outbound file.
    Specify the Physical directory and file under the Outbound File tab
    Maintain Distribution Model (BD64) for sender ->receiver system.
    Create Partner Profile (WE20) for logical system.
    You can use this program RBDSEMAT (t/code BD10) to generate IDoc MATMAS file(s).
    _ Then you can FTP the file(s) to receiver system.
    2) Upload the flat file as an IDOC on the inbound sytem
    which is Client2(RECIEVER).
    Create File Port (WE21) for inbound file.
    Maintain Distribution Model (BD64) for receiver -> sender system.
    Create Partner Profile (WE20) for logical system.
    You can use this program RSEINB00 to upload IDoc MATMAS file(s).
    A sample scenario for idoc generation
    Sending System(Outbound ALE Process)
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Create Model View
    Tcode BD82 ? Generate partner Profiles & Create Ports
    Tcode BD64 ? Distribute the Model view
    Message Type MATMAS
    Tcode BD10 ? Send Material Data
    Tcode WE05 ? Idoc List for watching any Errors
    Receiving System(Inbound ALE )
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 ? Idoc List for inbound status codes
    ALE IDOC Steps
    Sending System(Outbound ALE Process)
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Create Model View
    Tcode BD82 !V Generate partner Profiles & Create Ports
    Tcode BD64 !V Distribute the Model view
    This is Receiving system Settings
    Receiving System(Inbound ALE )
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 !V Idoc List for inbound status codes
    Message Type MATMAS
    Tcode BD10 !V Send Material Data
    Tcode WE05 !V Idoc List for watching any Errors
    STEP 1)a Goto Tcode SALE
    Click on Sending & Receiving Systems-->Select Logical Systems
    Here Define Logical Systems---> Click on Execute Button
    go for new entries
    -System Name : ERP000
    -Description : Sending System
    -System Name : ERP800
    -Description : Receiving System
    press Enter & Save
    it will ask Request
    if you want new request create new Request orpress continue for transfering the objects
    B) goto Tcode SALE
    Select Assign Client to Logical Systems-->Execute
    000--> Double click on this
    Give the following Information
    -Client : ERP 000
    -City :
    -Logical System
    -Currency
    -Client role
    Save this Data
    Step 2) For RFC Creation
    Goto Tcode SM59-->Select R/3 Connects
    Click on Create Button
    RFC Destination Name should be same as partner's logical system name and case sensitive
    to create the ports automatically while generating the partner profiles
    give the information for required fields
    RFC Destination : ERP800
    Connection type: 3
    Description
    Target Host : ERP000
    System No:000
    lan : EN
    Client : 800
    User : Login User Name
    Password:
    save this & Test it & RemortLogin
    STEP 3) Goto Tcode BD64 -- click on Change mode button
    click on create moduleview
    short text : xxxxxxxxxxxxxx
    Technical Neme : MODEL_ALV
    save this & Press ok
    select your just created modelview Name :'MODEL_ALV'.
    goto add message type
    Model Name : MODEL_ALV
    sender : ERP000
    Receiver : ERP800
    Message type :MATMAS
    save & Press Enter
    STEP 4) Goto Tcode BD82
    Give Model View : MODEL_ALV
    Partner system : ERP800
    execute this by press F8 Button
    it will gives you sending system port No :A000000015(Like)
    STEP 5) Goto Tcode BD64
    select the modelview
    goto >edit>modelview-->distribute
    press ok & Press enter
    STEP 6) goto Tcode : BD10 for Material sending
    Material : mat_001
    Message Type : MATMAS
    Logical System : ERP800
    and Execute
    STEP 7)goto Tcode : BD11 for Material Receiving
    Material : 100-300
    Message Type : MATMAS
    and Execute --> 1 request idoc created for message type Matmas
    press enter
    Here Master Idoc set for Messge type MATMAS-->press Enter
    1 Communication Idoc generated for Message Type
    Now go to the physical directory and check your idoc converted as an XML File.
    Regards,
    Satish

  • Conversion of idoc into xml without  XI

    Hi everyone
    i am working on EDI i want to know procedure to convert our idoc into XML without using XI. is it possible, if yes then plz reply me with procedure.
    Thanks & Regards
    Vimarsh

    Hi Nicolai
    Thanks for ur suggestion, i have one more doubt regarding this, i got this program to convert my records in XML but whatever output i m getting that comes in form of excell sheet, i am sending you that program which not working,
    report zexternalfile .
    tables : zzpublisher,
    sscrfields.
    data: it_publisher like standard table of zzpublisher,
    wa_publisher like zzpublisher.
    select * from zzpublisher into table it_publisher.
    call function 'GUI_DOWNLOAD'
    exporting
    BIN_FILESIZE =
    filename = 'C:\externalfiles\kamal.XLS'
    FILETYPE = 'ASC'
    APPEND = ' '
    write_field_separator = 'X'
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = it_publisher
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    IF YOU HAVE ANY OTHER OPTION THEN PLEASE SEND ME, I WILL BE VERY THANKFUL FOR YOU.
    PLEASE SEND ME WHOLE PROCEDURE IF YOU CAN.
    THANKS & REGARDS
    VIMARSH

  • Error in Idoc to XML conversion

    Hi,
    I am doing Idoc to XML conversion using standard program RSEINB00. Can anyone plz tell me what are the pre-requisites to executing this program? I am getting an error message Port XXX segment defn YYYYY in IDoc type ZZZZZ CIM type do not exist.
    Why am i getting this error? and what is the slution for it?
    Regards,
    Mateen.

    Hi
    Delete the metadata in IDX2 for the corresponding IDOC type in PI.
    Also re-import the same in IDX2.
    Reimport the IDOC type into Integration Repository under your SWCV.
    Then check it..
    Refresh the cache also.

  • How to retrieve data (xml file) using jsp

    I am a newbie to xml. I have decided to store my information in the xml file. may I know how can I retrieve my information from the xml file?
    Thanx in advance.

    I am a newbie to xml. I have decided to store my
    information in the xml file. may I know how can I
    retrieve my information from the xml file?
    Thanx in advance.You can get the information from the XML file using one of the parsers available, such as Xerces http://xml.apache.org, and JDOM as an API.
    Using this you have the option of having a SAXParser or a DOMParser.
    SAX (Simple API for XML) is an event based parser, so if you know the XML structure, and need to find a certain element, you can just look for the element name,and retrieve the value of the element, it's attributes and its children.
    DOM(Document Object Model)represents the XML as a tree, but uses more resources as it stores the entire tree in memory. But it is good in that you can traverse the whole tree.
    JDOM would be a good idea too. If you download this, you can use it's API, which is very good, that will use the parser on your system (Xerces). I would definately recommend JDOM.

  • IDOC to Flat File and XML ( Need both the Output)

    Hi ,
    My Scenario is IDOC to File .
    I need o/p in 2 format . ie,    1) Flat File 2 ) XML file
    I have a plan to go with Interface determination , 2 IM and what shd be the condition ?
    or Else  2 Receiver detmination  but condition ?
    How to slove this ?
    Need the Output from Idoc in 2 format ( Flat file and XML file )
    Any Blog , Thread ...Tips...etc
    Regards,
    Jude

    Hi Jude,
    Do like this:
    1. Create two inbound Service Interface (with the same target Message Type)
    2. Create separate Operation mapping with the above service interfaces as target (with the same source service interface)
    3. Create Interface Determination and include these two operation mapping (without any condition)
    4. Create 2 receiver agreement (with two separate communication channel) for each of the target service Inetrface. In one channel use content conversion and the other one will give you normal XML output
    Regards
    Suraj

  • Conversion of multiple xml idocs to flat file

    Hi,
    I did ABAP mapping to convert xml idoc to flat file by using the reference how to do abap mapping in xi3.0.pdf
    It is working for only one idoc at a time.
    If I have multiple idocs in a single xml file, the above code is not working.
    Please let me know what cchange to be done to work out for this.
    Hope am clear.
    Regards,
    Anil.

    Look For the Occurances of target Field node...It should be 1 to unbounded

  • How to convert iDocs in flat format to Xml

    Hi,
    I'm getting iDocs in my .NET application using the SAP .NET Connector.
    But SAP Connector I receive the iDocs in flat format that is very difficult to read, it would be much easier if I had them in xml format. Do you know an easy way for transforming them to Xml or diretly receive them in Xml format?
    I'm a C# developer, so the best solution for me would be to have a small sample showing how to do it.
    I have seen some documents about the IDoc Adapter, how can it be used? Should it be used together with the SAP .NET Connector or it is a separate way of working?
    Maybe my questions are very basic but I come from the SAP Business One word that is completely different from the ERP world.
    Thanks in advance
    Trinidad.

    Hello,
    SAP Provides a standard report / program that converts the idoc flatfile into Idoc XML.
    The report is : rseinb00
    Just make sure that the Idoc Flat file is formatted in the right way,
    1. Linefeed after every segment,
    2. Idoc Control Record matches the logical system name of the business system defined in XI.
    3. Port in the idoc control record exists.
    If this is going to be a end to end interface flow, using this in a ABAP Mapping and then feeding this as the input to your graphical mapping might be a solution.
    Regards,
    Bhavesh

  • Automatically process IDoc to XML File port

    Hi everybody,
    I want to send two different IDocs via "XML File" port using change pointers and the distribution modell (one SAP standard, one custom).
    I maintained the distribution model and created outbound parameters in partner profile (WE20). Both are set to "Transfer IDoc Immed.".
    1.
    Now I change some master data and the change pointers are created. I run RBDMIDOC for both message types and both IDocs are created. But unfortunately they stuck at staus "30 - Idoc ready for dispatch" (yellow). I need to run RSEOUT00 to create the XML files.
    Is it possible to avoid a job that runs this report? I want the IDocs to be processed automatically right after creation.
    The really strange thing about this is, that it used to work for the standard IDoc (BOMMAT). But I might have changed some settings to get my custom IDoc work too and now both stuck at status 30?! This is what bothers me most...
    2.
    When the XML files are created (at the moment after running RSEOUT00) the status in WE05 is "03 - Data passed to port OK" (yellow).
    Why is this light still yellow? Everything is fine, the file was created, it should be green. Is there anything I can do?
    Thanks and best regards,
    Oliver

    Hi,
    thanks for your suggestions.
    Unfortunately this did not solve my problems.
    1)
    OUTMOD for both messages was 2 (which should be ok). Changing it to 1 did not have any affect.
    At least BOMMAT works again (both with OUTMOD 1 and 2). But my custom IDoc still does not get processed automatically.
    2)
    Running report RBDMOIND did not change the status of my IDocs. Please keep in mind that it is no tRFC port, but XML File port.
    Best regards,
    Oliver

  • ABAP Mapping XML-IDoc to Flat string: missing character of segement header

    Hello folks!
    I'm using an ABAP-Mapping in order to trasform an XML-IDOC to a flat string.
    The implementation of the mapping is in accordance with the "HOW TO convert an IDoc-XML to ..."Basically it works fine except the following:
    The following line shows one Segment of an IDoc. the control record is ok.
    With '380' begins the payload of the segment. The part before includes the segment header,
    which is 63 Bytes long, which is correct.
    What we're missing, is the last character of the segement header:
    ABAP-Mapping:
    E1VDEWBGM                     01000000000325511200000020000000 380   5 (...)
    BusinessConnector:
    E1VDEWBGM                     010000000003255112000000200000001380   5 (...)
    Again: the overall length of the segment is ok, but the '1' of the field hirarchie level is overwritten.
    Any idea?

    In that case you need to extend the trace file in the Visual Admin Console...
         Services
         Log Configurator
         Locations
         Choose the location (Java package) and the tracing level (severity)
    (for example, com.sap.aii.adapter.file)
         Root Location > com > sap > aii > File
         Set the severity and choose Copy Severity to Subtree
    Check the trace file to find the field erroring this way!

  • Issues with creating and sending BOM XML IDOC to SAP using 2010 WCF-SAP Adapter (without using Biztalk Server)

      I'm trying to replace an existing Biztalk 2006 Send BOM IDOC process, and completely remove Biztalk server from the equation.   The existing Bizatalk 2006 server receives an input BOM (Bill of Materials) flat file, and using a Biztalk Map (BM08),
    and Orchestration, generates an Idoc and sends it to SAP.
      In my replacement C# program, I'm using the 2010 WCF-SAP Adapter, and am trying to generate the BOMMAT03 XML IDOC it to SAP.  
      I generated the BOMMAT03 schema from SAP using the Add Adapter Service in VS 2010.  I was able to generate a BM08 XSLT from the existing BMO8 map in the current Biztalk 2006 process.  I am able to run a XSLT transform on the input BOM flat
    file, and generate an XML file from that.  
      However, I've run into a few issues.   First of which, is that the XML file that is generated from the XSLT transform is NOT the same schema as the BOMMAT03 schema expects.  It's somewhat similar, but different enough that I have to manually
    translate between the two in my code.  I've verified that both the original Bitztalk 2006 process and my replacement program use BOMMAT V3 from SAP.  Question--Is Biztalk 2006 server doing some other magic to turn that transormed XML into the BOMMAT03
    schema?    
     I ended writing code which translates the transformed XML into the BOMMAT03 schema (which is a strong typed XML IDOC at this point).
      However, when I try to send the BOMMAT03 XML IDOC, I get an exception "Object reference not set to an instance of an object."
                   idocClient.Send(idocData, ref sadapterTxGuid);
    idocData is of type BOMMAT03, and I've verified that the various fields are populated.  
      Any help is appreciated. 

    Well, putting in a MSDN subscription support ticket for Biztalk server actually helped with the issue.  They didn't find, or fix the issue directly.  But one of the examples (https://randypaulo.wordpress.com/tag/idoc/) they sent over, jogged my
    memory, and I realized in the code snippet below, I had accidentally deleted the 1st line.  Such a simple mistake, yet was easy to overlook.  The URL example is almost EXACTLY like my code, but without the transform and translation code to convert
    from input XML file to IDOC XML.  If someone is interested in that, let me know.    
    //Forgot the 1st line.  
    idocClient = new IdocBOMMAT03SIEIS_WED_BOMMAT03V3R700Client(binding, endpointAddress);
     idocClient.Send(idocData, ref sadapterTxGuid);
    For anyone else interested in knowing, you CAN send a strongly typed IDOC to SAP using C#.NET and the WCF SAP 2010 Adapter, using the IDOC Binding Client class you generated using the Add Adapter Service Reference in VS2010.  
    The one difference, which no one, not even the tech support from MS could tell me, was why the XSLT which I generated from the original map, did not transform the input BOM XML into the BOMMAT03 XML.  Instead, it transformed it into an intermediate
    XML, which resembled the BOMMAT03 IDOC XML, but still needed to be translated to the BOMMAT03 IDOC format.  
    The tech support person swore up and down that it should.  But I believe that something happens in Biztalk server, after the Mapping occurs, maybe in the Pipeline, which converts that
    intermediate XML into the final BOMMAT03 IDOC XML format.
    I do think that the examples are severely lacking in showing how to send a strong typed IDOC using C# and the WCF-SAP Adapter.  Even worse, the examples are completely lacking in how to actually generate a weakly typed IDOC.  They show how to send
    that weakly typed IDOC, but show me, or give me a class to be able to generate it.
    I realize that this is not quite the "recommended way" to do it, but in reality, not everyone wants or even needs a full Biztalk installation.   For some simple stuff like this, a C#.NET program and WCF-SAP adapter do the trick.  

Maybe you are looking for

  • TS3367 Contact not available

    I own an iphone 5. The facetime on my phone is not working. Every time I try to make a video call it just shows that 'the person is not available for facetime' even though she actually is. I wasn't having this problem before, been having it only for

  • Cannot do backup database in the startup menu!!

    Dear all, Please help to tell me what's wrong - I cannot do the backup database option in the Oracle software menu, the error is : Unkown log mode : SP2-0640 Log file is at SP2-0640 Can anyone tell me? Rgds/Simon Wong

  • Where is K8T800 Pro?

    Seeing the anandtech and other reviews of the K8T800 AnandTech 939 Motherboard review There is no mention, even PR on the MSI site about this board? Any word on release date?  According to newegg I can buy in-stock 3800+ CPUs right now - but I don't

  • Cost Element Groups

    For P&L account, to see it in CO reports, user have to use a Cost element group or Account group. Could you please tell us how we can see in wich Account groups is included an account ? Edited by: Pathi S on Jun 13, 2008 12:57 PM

  • Relationship Modeling - Jumpstart Guide

    Workshop Gurus - How would I model a One-Many or Many-Many relationship in Workshop? For example, in the JumpStart Guide - 1. What is the simplest way for me to show the Customer Name with the Order, in the Order Admin Page Flow. 2. How do I add a On