Converting a flat file to IDOC

Greetings to All,
I have a requirement where i need to convert an IDOC (flat) file to IDOC.
the idoc is SHPMNT04.Presently i am trying to implement it using FCC at the sender side as the flat file is fixed length type.
Can any one suggest me a better method like using XSLT or Java mapping which could make my work smarter as i am Finding it very difficult to count and write the FCC for the IDOC which is have more than 60 segments.
Any help will be greatly admired.
Thnaks,
Anika.

Hi
I am still having a doubt if this method will work on real time scenario.I mean i have to pick files
from an 3rd party FTP location (polling and picking as and when i get a file starting with say
ABC*.txt).Added to this there will be issue related to the volume of file(1000 per day),will that create
any performance issues.
It is now that you are sharing the complete scenario/ problem , just have a glance from your first post at the top & the replies, because its the problem statement that steers the discussion.
Making the files available for the Report is a seperate task. You have to develop FTP-to-File XI scenario (or regular ftp process to send files across, which normally will not be allowed in XI server), I dont see any other way, if any, I 'assume' that it might complicate the situation.
Performance - it is not something to do with your scenario alone, but the overall system load, configuration etc. (b.t.w 1000 is normal)
Can we schedule a job for running the report periodically?
Yes, scehdule a batch job calling this Report (with necessary variants) with required frequency or exact time (if there is any agreement with sender)
I have started a POC
I appreciate that, best way at this moment. you can reverse engineer from the errors to configure your scenario. for any reason,if you think it does not work, you can always stop and/or look for different solution.
need your help
- Definitely I will share my thoughts, if time permits
how will i get the flat file xml(IDOC) in the source side
do you mean the source structure, you can use the same structure as your target.
once you are convinced with your solution approach, then it is better to close this thread & start a new one with new issues, for more views & suggestions and better readability.
@Rajesh - I appreciate your efforts to solve the issue , but the below is not correct & possible, w.r.t this issue
Here what you need is to do configure File Sender CC with NFS protocol.
Regards
Vishnu

Similar Messages

  • IDOC Flat File-- XI-- IDOC

    Hi,
       I have a requirement wherein we have to read the IDOC flat file and post it as IDOC to SAP using XI. I understand we have to use the Flat File Sender adapter and the IDOC Receiver Adapter. On the Sender Side we have to define the Content Conversion to convert the IDOC Flat File to IDOC XML. Writing File Content Conversion for the IDOC Flat File would be very tedious because of the number of fields and fixed structure of the flat file.
      I have don through the following guide Section 3.2 where it talks abt converting IDOC to IDOC XML using reportRSEINB00.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20convert%20between%20idoc%20and%20xml%20in%20xi%203.0.pdf
    I am not clear how to invoke this report in the Flat File Sender adapter. Also is there any other approach.
    Thanks
    Rajeev Gupta

    Hi Rajeev
    You have a flatfile at the sender side so you dnt  have any feasiable option to do other than FCC....FCC is not a tediuos one...if you can provide the strucutrre we will help you out...
    Check out you have a fixedlength file or piple separated one....
    In the functional design how many fields re present and buil the DT,MT MI accoprdingly.....
    you have to just use some conecnt conversion parameters that's it...
    item.fieldSeparator
    item.endSeparator
    item.fieldNames
    here item is your recordset name
    let us know your strucutre
    regards
    Nisar

  • Convert the flat file to xml format.

    hi,
    I need to write a interface program in the R/3  to pull the flat file data from the unix application server and do some manipulation and place back into the unix application server in XML format, From the unix box XML file taken by the XI server.
    pls give me some idea to convert the flat file to XML format, through any function module or any other logic is there...
    with regards,
    Thambee.

    Hi Thambe
    in addition to the above posts
    Program to convert flat file to XML file.
    please download tool from this link:
    http://www.download.com/Stylus-Studio-2008-XML-Enterprise-Suite/3000-7241_4-10399885.html?part=dl-StylusStu&subj=dl&tag=button&cdlpid=10399885
    how to use:
    http://www.stylusstudio.com/learn_convert_to_xml.html
    http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
    Flat file to XML
    CONVERTION OF FLAT FILE TO XML : NO OUT PUT FOUND
    Converting Idoc flat file representation to XML
    how to convert flat file into IDOC-XML
    Thanks
    sandeep sharma
    PS ; if helpful kindly reward points

  • Suggesstions on flat file to IDOC

    Hi,
       Help me on following topics,
       1) What is the use of port in program RSEINB00. I want this program to read a flat file and convert it into IDOC. How does this program recognize to which IDOC format it has to convert the flat file.
       2) what is the use of file port and ABAP port when to use them. My requirement is to download a flat file or CSV flie into the customer system through FTP.Can I specify the path in the directory itself or do i need to write a seperate program for this.
      3) what is the use of function module in file port.Is it used to generate file name alone or file itself.Can we write a own function.
    Thanks & Regards,
    Kaarthik.k

    Karthik,
    You know what you could do.. To get the input file format
    First download the MATMAS IDOC or any idoc for that matter to a flat file, using the standard transaction BD10.
    Then see the format.
    As a third step upload the same file as input file with minimal changes to the data keeping the format same.
    This way you can figure out how the system is able to fetch all the configuration details.
    Hope this helps.
    Rgds,
    HR

  • Legacy flat file to IDOC into SAP

    after been given the task of converting a flat file structure to SAP idocs my research as lead me into the daunting world of CAPS. Basically I would like to know if using CAPS is the best choice for me
    and if so what is actually involved to make this happen?
    Thanks
    Michael

    hi michael,
    from my point of view "the right thing to do" would be:
    consider if this is the only task for you that is somehow EAI ish...
    if it is do not care about technology... just do it with a very simple program
    if you have to evolve choose a tool that is capeable of your systems you own: e.g. SAP AS400 .......
    in caps you would typically do this:
    setup CAPS
    write an ftp2queue component
    write a converter (custom otd + convertion logic + IDOC OTD)
    write a idoc 2 sap component via TRFC
    run ;-)
    a good starting point would be:
    http://developers.sun.com/docs/javacaps/index.jsp
    or
    http://wikis.sun.com/display/JavaCAPS/Grok+Java+CAPS
    or try to convince your boss that sun will implement it for you if you have the money to do so.
    we did that when introducing CAPS (we got it for free besides the CAPS licences of course ;-)).
    regards chris

  • IDOC to Flat file and Flat file to IDOC

    Hello Experts,
      I have the following requirement in my current project:
    Third Party Sender sends the data in the in the below XML format via HTTP:
    <?xml version="1.0"?>
    <fxEnvelope>
      <header>
        <message>
          <exchangeID></exchangeID>
          <messageID></messageID>
          <subject></subject>
          <payloadType>IDOC</payloadType>
        </message>
        <from>
          <orgID></orgID>
          <locationID></locationID>
          <messageID></messageID>
        </from>
        <to>
          <orgID></orgID>
          <locationID></locationID>
        </to>
      </header>
      <body>
        <Opaque>
          <DataType></DataType>
          <DataStream></DataStream>
        </Opaque>
      </body>
    </fxEnvelope>
    In the above XML, the Tag <DataStream> is a string which contains the IDOC flat file.
    Now, the scenario is HTTP to IDOC, where the sender sends the above XML payload and PI needs to convert <DataStream> to IDOC XML and pass it on to the receiver R/3.
    But the challange i am facing is converting this <DataStream> tag which contains the IDOC flat file to IDOC XML using a Mapping program.Since both adapters are running on ABAP stack i can not go for Adapter Modules available(We are using PI 7.10).
    Looking for some guidance on the same.
    Thanks in advance.
    Cheers,
    Manasa.

    There are 2 options for you
    In either case, you might need a java mapping to convert the DataStream into String. Use a file adpater to write this string to IDOC-File.
    1) Option1: Write the content of DataStream into IDOC-Flatfile.(java mapping) Pick it from PI to convert IDOC-flat file inot IDOC-XML (using std features of PI) & send it to ECC.
    2) Option2: Write the Content of DataStream to IDOC-Flatfile (accessible to ECC system). Configure WE21 to pick the file from a file port.
    If the datastream was IDOC-XML, then it would have been simpler, it will be a direct communcation from PI to ECC (using java mapping & IDOC adapter).
    Regards,
    Siva Maranani

  • IDoc flat file to IDoc

    I am receiving flat file in SFTP Server which need to be posted into SAP (No mapping involved)
    What will be the best approach ?
    1. I tried using IDOCFlatToXmlConvertor (The limitation in the format of source file. The parent and child node relationship should be explicitly mentioned in IDoc flat file which legacy system is not able to do) - Any workarounds ?
    2. I moved the Idoc flat file into SAP application server. Now need to schedule job using program RSEINB00
    3. File Content Conversion
    Any other better solution ? Appreciate your help.
    Thanks and regards,
    Jose Augastine

    For converting Idoc Flat file to idoc xml, ABAP mapping is one of the feasible option.

  • I have one requirement .which is JMS XML file should convert to Flat file

    HI Gurus,
    My Scenario is
    sender SAP ---> receiver  MF( Mainframe) ..
    I have one requirement i will get IDOC from SAP sender pass throw PI to Mainframe...  which is recevier's JMS XML file should convert to Flat file...
    plz guide me any related suggestion and related links .... how to achieve..
    Thanks in advance..

    >
    > My Scenario is
    > sender SAP ---> receiver  MF( Mainframe) ..
    >
    > I have one requirement i will get IDOC from SAP sender pass throw PI to Mainframe...  which is recevier's JMS XML file should convert to Flat file...
    >
    Where is MQ coming in to picture here, You receiving data from SAP and sending Main Frame system,as per your post.
    so we can SAP->PI-->MAINFRAMES.most of the times we sent data to main frame system in the form of test files,so you can use receiver adapter file and use file content conversion.
    thats it.
    Regards,
    Raj

  • Convertion of flat file to XML using DOM

    Hi!
    I need help for convert a flat file to XML using DOM and by taking the validation of a specified DTD. Can any body help me in this regard.
    Bye,
    lat

    first you have to decide how the flat file will map to xml. Will you use attributes or pcdata for your fields, or both? Will there be a hierarchy, or will it be mostly flat?
    Once decided, you'd probably just use a BufferedReader to read the lines one at a time, and generate Dom nodes as appropriate, and stick them in the tree.

  • Flat File to IDOC- didn't get data into IDOC

    Hi All,
    Our scenario is Flat File to IDOC....
    working fine... didn't get any errors... IDOC also generated but didn't get any data in that IDOC....
    for details see the attachment...
    Thanks In Advance,
    vishnu.........

    Hi Rajesh,
    I am getting payload in RWB from sender Cc like below:
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_File xmlns:ns="http://mouritech.com/file2idocsender"> 
    - <MT_File> 
    <Value>1</Value>  
    <Reason>test</Reason>  
    </MT_File>
    </ns:MT_File>
    If i test with this payload in mapping i am getting a pop up with this message and mapping not completed ...
    Could you please let me know what i have to do now?
    Pop Up: 
            The processing instruction target matching "[xX][mM][lL]" is not allowed.
    See error logs for details    

  • Convert the Flat file format to XSTRING.

    hi experts,
                    I need to convert the flat file(.txt,.pdf....) to an internal table as the XSTRING.

    Hi,
          Refer
    /people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    Regards

  • Convert flat file to IDOC

    Hi SAP Gurus,
    I got a flat file containing all the info about IDOC, how can I use this file to generate an IDOC.
    Is there is any standard prog which takes the flat file & generate the IDOC.
    Flat file contains all info i.e control record, data.
    Thanks,
    Krishna

    store the file in application server and use WE16 trasaction, i think it will create IDOc from the file. use existing file port in 'POSRT' on selection screen of SE16.
    Reddy

  • Convert flat file to Idoc format

    Due to some security reasons , the ALE scenario for material master is not allowed directly between 2 SAP systems
    So the SAP system A is sending a flat file (not in Idoc format)
    From SAP system B , we need to do an Inbound process to post the Idocs with following rough steps
    1) Flat file upload
    2) Flat file -> Idoc format conversion  (EDI subsystem is not existing in this scenario and so this step has to be done within SAP)
    3) Idoc processing
    Even though this scenario can be accomplished without using Idocs ,
    for better monitoring and reprocessing options it is required that Idocs need to be used.
    Please explain the detailed steps for the above scenario

    Hi,
    This sounds very much lie complicating things unnecessary...Are this 2 SAP systems of the same company ?
    Why would using IDOCS be more insecure then using flat files ?
    If the purpose is to have a manual check before upload, you can achieve the same with IDOCS.
    Please add some background to the process,
    regards
    Dirk

  • Flat file with IDOC structure on sender side - how to convert

    Hello,
    I have a flat file with an IDOC structure in it, like produced from R/3.
    Example:
    EDI_DC40  4000000000000761577620 3014  ORDERS05                                                    ORDRSP                                           SAPR3P    LS  LS_R3P_302                                                                                DATEIPORT2KMBG0000019887                                                                                20061206095508                                                                                20061206095508     
    E2EDK01005                    400000000000076157700000100000001004 EUR   1.00000     0039                                                     DFUE0000543012                                                                                12Muenster/Weststr.0000019887                                                                               
    E2EDK14                       40000000000007615770000020000000200630                                
    E2EDK14                       40000000000007615770000030000000200710                   ......             
    I need to send this file via XI to an R/3 system as an ORDERSP IDOC.
    My question is:
    What is the easiest way to do this?
    My intention is to us a self programmed mapping!
    Best regards
    Dirk
    null

    Hi Shabarish,
    I found a sinple solution:
    File adapter picks up file from external drive
    Receiver adapter saves it on XI server directory
    We21 can pick up now from here!
    But, next problem:
    When trying to save the file port in We21 (like described in the guide) I get a message: Port incomplete, not possible to save! (mess. is green -> information).
    But I cannot save the port. What is wrong?
    Hm, possibly reason was that inbound and outbound file name was the same! Now its OK! Port is created!
    Regards
    Dirk
    Message was edited by:
            Dirk Meinhard

  • RSEINB00 flat file to idoc uploading in XI

    Hi,
    I've searched a lot of posts here in SDN on how to use RSEINB00 to upload flat file idocs, and i tend to get lost as there are conflicting answers...
    can anyone give me a clear/consolidated answer on how to use RSEINB00 in XI?
    correct me if i'm wrong but the process is basically to upload a flat file idoc (residing in the XI application server) using RSEINB00, then after successful upload you're supposed to see your idoc in SXMB_MONI (the idoc flat file will be converted to idoc xml using the meta data loaded automatically in IDX2 and be passed to the xi pipeline)
    is it needed to finish first all the setup in Integration Builder to enable the automatic loading of the metadata in IDX2?
    Also what is the difference between executing RSEINB00 in a 4.5B to 4.5B  system, and a 4.5B to XI system?  (because rseinb00 is existing even before xi).  is it the idoc xml convertion? if it is then definitely the importing of the idoc type in XI Integration Builder Design is necessary right?
    Hope someone can explain clearly
    I'll be more than willing to give points to the answer that will completely explain the concept..
    Thanks in advance

    Hi HJ,
    Report RSEINB00 is no dedicated XI Report. You will NOT see the IDOC in SXMB_MONI.
    Report RSEINB00 just calls a function module:
    IDOC_INBOUND_FROM_FILE
    This is the documentation of IDOC_INBOUND_FROM_FILE unfortunately just in german language available:
    +Der Funktionsbaustein führt die IDoc-Eingangsverarbeitung von
    IDocs aus, die sich in der übergebenen Datei (Dataset) befinden.
    Die IDocs werden aus der Ddatei ausgelesen und auf der IDoc-Datenbank
    abgelegt. IDocs, die weiterverarbeitbar sind, werden asynchron an die Anwendung weitergegeben. Die zeitliche Entkopplung zwischen Auslesen und Abspeichern auf der einen Seite und der Verarbeitung durch die Anwendung auf der anderen Seite wird durch Erzeugen eines Workflow-Ereignisses bewerkstelligt. Der Ereignis-Container nimmt i.a. mehr als nur eine IDoc-Nummer auf. Die Aufgabe, die durch das Ereignis ausgelöst wird, reicht alle IDocs and die Anwendung weiter.
    Ein COMMIT wird nicht nach Verarbeitung jedes einzelnen IDocs abgesetzt, sondern durch einen Datensatzzähler gesteuert, ausgelöst.+
    Normally IDOCs are posted to a R/3 System and will processed automatically.
    If you have a IDOC lying in the file system of your R/3 you can upload this file and trigger the automatic processing. Your R/3 knows what to do with every single IDOC type. IDOCs point to
    a) function modules or
    b) workflows
    Hope that helps
    Regards Mario

Maybe you are looking for

  • What's after E90? Anything in the pipeline for the...

    Hi again. Thanks for the comments / inputs on my previous thread. I'm still really hoping that nokia would come with something similar to the 9500. I would really like to have a slightly lighter 9500, with a better camera, and BIGGER internal memory,

  • IdeaPad S206 Display dark

    Hi, I bought a Lenovo IdeaPad S206 and it worked for like 2-3 months with Windows 8 und Lubuntu 12.10 but since yesterday I got a problem with my display. The Display stays dark, no matter if plugged in or out, I tried the Fn-Keys and it won't get br

  • Bapi FM upload program

    Hi All, I am doing bapi fm upload program, when i run the program it shows the short dump error, i debug this program, the cursor is not move after tansaction_commit, it shows the FM: ps_commit. it s not run successfully, any one help for this error,

  • Newbie trying to write toplink hello world program

    I am trying to write my first toplink app using POJOs, and I'm having a hard time finding a sample toplink application. In this case, I'd like to run outside of a J2EE container with a stand-alone java application to do some basic CRUD operations. I'

  • Adding support for trinindad

    How to add jsf trinidad or other jsf components to design palette