Coverting txt file to orders05 IDOC

Hi all,
Want to convert a text file(normal flat text file) into an orders05 Idoc which in turn should be commited to an SAP sytem and could be viewable by calling the transaction VA03. 
It was decided to write an ABAP report program for this.
The txt file looks as follows.
Each number on a row seperated by space or tab indicates
plant,soldToparty,ShipToParty,orderreference,delivery date,itemnumber,quantity,ordertype,way of shipment in that order.
0700 91485 96291      123456      24022010      000798757   3  OR   AU
0700 91485 96291      123456      24022010      1060022568  3  OR   AU
The above text file is saved in a directory.
This file should be read and converted to an idoc by writing an ABAP program.
Any ideas in this direction is greatly appreciated.
Thanks
K

I have to write a report to do this.
So in whichever system from which this report transaction is called  have to create a sales order in that system.
It is my system,then.
Which BAPI and how is it going to work.
Please elaborate how to read the file and create an order ,if thats the case.
Iam having the sap r/3 enterprise release.
K

Similar Messages

  • How to convert Flat file(.txt) data to an Idoc format(ORDERS05)

    Hi,
    How to convert Flat file(.txt) data to an Idoc format(ORDERS05). If any FM does the same work please let me know.
    thanks in advance,
    Chand
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jul 26, 2011 11:11 AM

    Hi,
            For more information, please check this link.
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    Have a look at the FM IDOC_XML_FROM_FILE. May be it helps...
    Regards

  • N IDoc s message to one txt file

    I have finished IDoc to file scenarios.
    If I send n IDocs , there will be n txt files.
    Can I just get a TXT file, with one line with one IDoc?
    Thanks.

    hi
    Another idea for collecting IDocs consists in using standard functionality of the IDoc. Instead of sending the IDoc directly to the XI via the IDoc adapter, you can download the IDocs gathered in a file with XML format. This file can now be uploaded by the sender file adapter. As the XML structure is the same as the IDoc adapter produces, there is no change of the behaviour of the message, besides there no single IDoc inside, but multiple IDocs instead.
    1)As first step you go to WE21 and create an XML file port in the application system. Apply here a function module for creating the file name. You can use a standard module or a self-written module.
    2)Schedule report RSEOUT00 with a variant where you assign the IDoc type, the xml port and the number of IDocs which shall be collected.
    3)The report collects all IDocs in one file, until the "Maximal number of IDoc" is reached. When you have for example 2400 IDocs and you set "Maximal number of IDoc" to 1000, you receive 3 files, two with 1000 IDocs and one with 400. Inside the file there is one IDoc tag for each IDoc.
    Do not gather too many IDocs into one file. The file size should be considered carefully. Too large files might cause memory leaks, when your hardware is not sufficient.
    The files can be uploaded by the sender file adapter. When you collect IDocs of the same type, the Mapping can be done the same way as for IDocs processed by the IDoc adapter.
    check the blog
    /people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • ORDERS05 IDOC to flat file - mapping question

    I have a requirement to convert an ORDERS05 IDOC to a "flat" structure for one of our vendors.
    When the IDOC has the following data, the mapping works well
    Input
    =====
    ORDERS05
       - E1EDP01
          POSEX        00010
          - E1EDPT1
              -E1EDPT2
                 TDLINE   line 1 text
      - E1EDP01
          POSEX        00020
          - E1EDPT1
              -E1EDPT2
                 TDLINE   line 2 text
    Output
    ======
    GWC
      - GWC08-RECORD
          GWC08-SEQNO      0010
          GWC08-TXT        line 1 text
      - GWC08-RECORD
          GWC08-SEQNO      0020
          GWC08-TXT        line 2 text
    However when the IDOC has the following data
    ORDERS05
      - E1EDP01
          POSEX        00010
      - E1EDP01
          POSEX        00020
          - E1EDPT1
              -E1EDPT2
                 TDLINE   line 2 text
    the mapping yields wrong results as below
    GWC
      - GWC08-RECORD
          GWC08-SEQNO      0010
          GWC08-TXT        line 2 text
    The vendor has a requirement that the GWC08-RECORD should only be sent if TDLINE exists in the IDOC - so that part works. However, Text on Line 2 is being associated with Line 1.
    If I am not mistaken, this has to do with the Input queues for POSEX and that for TDLINE having differing number of entries. However, I have no idea how to go about fixing this
    Appreciate any help on this
    thanks
    anil

    Hi,
    This is possible without UDF:
    Please see mapping below:
    For the node GWC08-RECORD
    TDLINE --> removeContext --> GWC08-RECORD
    For the node GWC08-SEQNO
    TDLINE (set context to E1EDP01) --> exists --> ifWithoutElse --> removeContext --> SplitByValue:EachValue --> GWC08-SEQNO
    POSEX ------------------------------------------>/
    For the node GWC08-TXT
    TDLINE (set context to E1EDP01) --> exists --> ifWithoutElse --> removeContext --> SplitByValue:EachValue --> GWC08-SEQNO
    TDLINE (set context to E1EDP01)----------------->/
    Hope this helps,
    Regards

  • Use of Orders05 Interface mapping & XSLT mapping file for Orders03 IDOC

    Hello Experts,
    In a scenario we are sending Purchase orders and Purhase Order change from SAP to SNC through XI.
    Currently Orders03 IDoc is used and standard mapping for Orders03 XSLT is used.
    Now the requirement is to use the same IDOC (Orders03) but
    - XSLT mapping (OrdersOrders05_ReplenishmentOrderNotification) and
    - Interface Mapping (OrdersOrders05_ReplenishmentOrderNotification_01) of Orders05.
    What changes would be necessary
    - On SAP side,
    - in the XSLT mapping, and
    - On XI side.
    Thanks in advance,
    Suraj

    Hi Suraj,
    First compare ORDERS03 IDOC and ORDERS05 IDoc structures,if both structures are same then u no ned to chnage the XSL it will work fine.
    If any chnages in ORDERS05 Idoc then u have to adjust XSLT as per ORDERS05 IDOC.
    test interface mapping first and let me know if any error.
    Regards,
    Raj

  • Bundling ORDERS05 IDOC

    Hi all,
    We have a problem with bundling the IDOCS in Message Mapping. We have a requirement to convert more than one ORDERS05 IDOCS to one ‘flat’ XML file.
    When the IDOC has the following data, the mapping works well:
    Input IDOC:
    IDOC 1:                   
    ORDERS05
    - E1EDP01          
    ---  POSEX 0010
    - E1EDP01          
    ---  POSEX     0020
    - E1CUCFG          
    ---  POSEX     0010     
    E1CUVAL     10-1
    E1CUVAL     10-2
    - E1CUCFG
    ---  POSEX     0020
    E1CUVAL     20-1
    E1CUVAL     20-2
    IDOC 2:     
    ORDERS05
    - E1EDP01          
    ---  POSEX     0010
    - E1EDP01          
    ---  POSEX     0020
    - E1CUCFG          
    ---  POSEX     0010     
    E1CUVAL     10-1
    E1CUVAL     10-2
    - E1CUCFG
    ---  POSEX     0020
    E1CUVAL     20-1
    E1CUVAL     20-2
    Output Message:
    IDOC 1:----
    IDOC 2:
    Position number:      0010----
    Position number:      0010
    Configuration1:     10-1----
    Configuration1:     10-1
    Configuration2:     10-2----
    Configuration2:     10-2
    Position number:      0020----
    Position number:      0020
    Configuration1:     20-1----
    Configuration1:     20-1
    Configuration2:     20-2----
    Configuration2:     20-2
    However when you miss one E1CUCFG node, you will get a confusing result: 
    Input IDOC:
    IDOC 1:     
    ORDERS05
    - E1EDP01          
    ---  POSEX     0010
    - E1EDP01          
    ---  POSEX     0020
    - E1CUCFG
    ---  POSEX     0020
    E1CUVAL     20-1
    E1CUVAL     20-2
    IDOC 2:     
    ORDERS05
    - E1EDP01          
    ---  POSEX     0010
    - E1EDP01          
    ---  POSEX     0020
    - E1CUCFG          
    ---  POSEX     0010     
    E1CUVAL     10-1
    E1CUVAL     10-2
    - E1CUCFG
    ---  POSEX     0020
    E1CUVAL     20-1
    E1CUVAL     20-2
    Output Message:
    IDOC 1:----
    IDOC 2:
    Position number:      0010----
    Position number:      0010
    Configuration1:     20-1----
    Configuration1:     20-1
    Configuration2:     20-2----
    Configuration2:     20-2
    Position number:      0020----
    Position number:      0020
    Configuration1:     10-1----
    Configuration1:     10-1
    Configuration2:     10-2----
    Configuration2:     10-2
    We have tried standard functions like: useOneAsMany, CreateIf, if, ifWithoutElse, collapseContext, etc. in the graphical mapping tool but it doesn’t work.
    Could you please take a look at this problem?
    Appreciate any help on this,
    Kind regards
    Kamran Vakili

    Ive solved this problem

  • Flat File to Delivery IDOC scenario

    Dear All,
    I am having one scenario in which I am having the flat file (.txt) of the Delivery Idoc and now I want to convert that flat file into a Delivery Idoc with the required data.
    Kindly suggest me some good blogs which gives the step by step process for doing this scenario.
    Warm Regards,
    N.Jain

    Hey Nishu,
    You have  to use File Content Conversion Paramters to acheive this.
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    You can Follow the following blogs
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    Or juz post your sender datatype structure some one might give u exact fcc params.
    Hope itz Helpfull.
    <b>Cheers,
    *Raj*
    *REWARD POINTS IF FOUND USEFULL*</b>

  • Message ORDERS05 IDOC problem

    Hello everyone!!!
    My name is Rocio, I'm a new developer on IDOCS and I have a problem with de message ORDERS05.
    I'm forming an STANDARD INBOUNT IDOC for Transaction VA02
    I want to put a field (Assignment - ZUONR ) that is on Header>Accounting. in VA02(Transaction).   
    I use the segment E1EDK02             QUALF       017  : Assignment Number
    But when I generated my idoc, this field is ok, but when I go to see the order..this field doesn't appear  its  empty...
    Can anyone help me because i don´t why is this happened?
    And i need this file with an IDOC value. because we are going to use this value in the invoice.
    Thanks for your help!!!
    Title was edited by:
            Alvaro Tejada Galindo

    Hi experts,
    I take this post to ask a new (added) question:
    We would like to know how to insert a value for ZUONR vía IDOC_INPUT_ORDERS
        We already know that we must implement user exit EXIT_SAPLVEDA_001 in order to get from one segment of the ORDERS IDOC  the value we want to insert into ZUONR.
        But when we analyze the following logic of the function module we see that the way SAP is generating the order is vía call transaction of VA01, and it seems that there's no vbak-zuonr field in the bdcdata structure passed to the call transaction.
        We assume that we need to implement the user exit EXIT_SAPLVEDA_002 to append the vbak-zuonr field with the proper value to the bdcdata structure, but we would like to know if there is some previous note explaning the way to do it or if there's other easier way to reach the same result.
    Thanks.

  • ORDERS05  idoc ship-to party determination

    Hi there
    I am creating sales orders using ORDERS05 idoc type for EDI documents from customers. Customer files are translated to idoc format by a third party. The idoc input file contains an E1EDKA1 segment for parvw = WE but third party and customer do not know our ship-to number. I need to determine the correct ship-to party from e.g. GLN number supplied in input file. I would appreciate some ideas how to do this.

    Liz,
    We currently use a Custom solution, reading the Customer's internal Store code from E1EDKA1-KNREF, and matching it up with the SAP Internal Customer number via a Z Table. Our Customers do not currently use GLN Codes. From what I can tell, although SAP have enabled the GLN fields in the Customer & Vendor Masters (see table below), they are not utilised in any Inbound ORDERS iDoc processing. The GLN (or ILN) does have a placeholder in the ORDERS05 iDoc - in E1EDKA3, child segment of E1EDKA1 - see transaction WE60 for documentation.
    GLN Fields (from KNA1)
    BBBNR     NUMC     7     0     International location number  (part 1)
    BBSNR     NUMC     5     0     International location number (Part 2)
    BUBKZ     NUMC     1     0     Check digit for the international location number
    I believe it would be quite easy to put code into Include ZXVEDU03 to lookup the GLN Code from KNA1 and return KUNNR.
    Good luck,
    Paul.

  • How to open and edit "*.txt" file with "Notepad"

    Hello guys!
    I'm facing problem with SharePoint 2010 Enterprise and got no clue how to solve it.
    What I want to do is to open "*.txt" (which is placed to "Documents Library") in "Notepad", so I could edit it and save (publish) directly to SharePoint from "Notepad".
    If I upload any Microsoft office File, such as "*.docx", "*.xls", etc - it works as it should - document opens in appropriate application and everybody is happy.
    But, when I create documents library, put some "*.txt" file there and click on it - it opens in new browser's tab as text, so I cannot edit the file.
    What I tried to do is to activate feature "Open Documents in Client Applications by Default" - not happy.
    Edit "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\DOCICON.XML" - I've modified "txt" entry as follows:
    <?xml version="1.0" encoding="utf-8"?>
    <DocIcons>
        <ByProgID>
        </ByProgID>
        <ByExtension>
    <Mapping Key="txt" Value="ictxt.gif" EditText="Notepad" OpenControl="SharePoint.OpenDocuments"/>
        </ByExtension>
        <Default>
            <Mapping Value="icgen.gif"/>
        </Default>
    </DocIcons>
    Still not happy.
    So, how do I make this stuff work?

    Found this link which has more information on this scenario:
    http://sharepoint.stackexchange.com/questions/1427/open-txt-file-in-notepad-from-sharepoint
    A programmatic workaround:
    http://weblogs.asp.net/bsimser/archive/2005/01/24/359911.aspx
    Andrew Milsark, MCITP,MCTS
    Fpweb.net - The SharePoint Hosting Pioneer
    Blog : http://blog.fpweb.net
    Twitter : http://www.twitter.com/amilsark

  • Archiving TXT files in Sender File Adapter--Unformatted Way

    Hello,
    I am Archiving TXT files thru Sender file adapter, files are getting archived to specified directory.No issues in that.,
    When i open the archived files, those are not in the correct format way that i placed before file pickup.
    Header & lines got messed up side by side.
    Regards

    Hi,
    If the file that it being archived is not transformed, it should exactly be the same as the original file.
    Please make sure that you are not transforming the archive file by any means(unix script, mapping logics etc).
    As suggested above, it is advisable to open the file in the editors like textpad, ultraedit etc. The difference in the alignment could be because of the notepad editor.
    Try to open the original and archived files in any of those(textpad,ultraedit etc) editors and check.
    Please let us know if you are still able to find the difference in the alignment.
    Regards,
    Subbu

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • Copy contents of a txt file into a transport request

    I am implementing the steps of the 990534 note.
    The note says "Create a new transport request (transaction SE09) in the source client of your Solution Manager system. Unpack file SOLMAN40_MOPZ_TTYP_SLMO_000.zip, which is attached to this note. Copy the contents of the SOLMAN40_MOPZ_TTYP_SLMO_000.txt file into the transport request."
    can anyone tell me how can I copy the contents of a txt file into a transport request?

    Hello,
    I don't know the OSS note, but I think they mean, that you have to go into the object list of your transport (in transaction SE09), switch to change mode and insert the objects from the text file.
    I guess the text file looks like:
    R3TR PROG xyz
    R3TR TABL abc
    Best regards
    Stephan

  • A better way to search a string in a 3GB txt file

    I am looking for a string(12 characters) in a 3GB txt file. I use the file reader to go though each line and use the startwith() (that 12 characters are from the beginning of each line) to check if that line contain the string I am searching for. Is there a faster way to do it? Thank's.

    I would avoid using java to parse/search a 3 GB text file at all costs. Any java solution is going to have terrible performance and you may run into memory problems. I would recomend that you either a) develop a native method for resolving this search and just invoke it from your current java class or b) use Runtime.exec to invoke a native OS command for searching the file (like grep or find) and parse the results. ....
    I'm not even sure how I would complete that task with java exclusivly ... maybe break the file into smaller parts, then iterate through each smaller, temporary file ... I would really recomend storing your data in a different format if possible. A 3 GB text file just isn't very partical or secure.
    ... oh, to answer your original question (which I'm not sure if I all ready did), the fatest way to load the file is to wrap it into some BufferedReader. The fatest way to perform String searches is through the java.util.regex package if you have access to the 1.4 API. Other wise, just use basic String searches, as you all ready are.

  • How do I read txt file and add items to dropdownlist or checkbox

    I want to add items to a dropdown or check box by reading from a text file(and select one of them). (I donot use any table or database). The list of items is sometimes upto 20MB and hence cannot populate using session bean.I want items to be added to either checkbox or listbox during a button action. I have done this for textarea but unable so far to acheive for checkbox or listbox. I use following code which does not work:
    public String button3_action() {       
    try{           
    FileReader fr = new FileReader "F:/CreatorProjects/checkboxtst.prs");
    BufferedReader br = new BufferedReader(fr);
    String s;
    while((s=br.readLine())!=null) {
    dropdown1.setValue(s);
    br.close();
    fr.close();
    }catch(Exception e) {
    e.printStackTrace();
    return null;
    I know I cant just transplant textarea code for dropdownlist or checkbox.
    Any help is greatly appreciated.
    Thanks.
    Dr.AM.Mohan Rao

    I am able to read from txt file to a listbox if i write in sessionsbean1:
    try{
    FileReader fr = new FileReader("F:/CreatorProjects/checkboxtst.prs");
    BufferedReader br = new BufferedReader(fr);
    String s1="";
    String s="";
    while((s=br.readLine())!=null) {
    s1 = s1+s;
    s1= s1+"\n";
    disOptions = new com.sun.rave.web.ui.model.Option[] {              
    new Option(s1,s1)};
    diseases = new String[] {};
    fr.close();
    br.close();
    catch(Exception e) {
    e.printStackTrace();
    But I get all data in one line!! if I click submit button text area gets all. How to display items in each line????Please help...
    Dr.AM. Mohan Rao

Maybe you are looking for

  • Unit Price in Item Master Data

    Step no.1) At time of Defining Item Master Data  we are Defining Unit Price say<b> 2,000</b> <b>INR.</b> Data Saved in Price List 01. Now with this information I am Preparing Purchase Order.After Selecting Specific Item unit price is reflecting in P.

  • How to shuttle though mouse wheel

    Hi folks, I have a trachball mouse with a touch mouse scroll wheel. I was wondering if there is a way to program shuttle so that I can use the scroller's sesitivity to shuttle. Here is more info on my mouse, I am usin CS5.5 http://www.kensington.com/

  • Logging inbound SOAP Message in SALT 2.0

    Is there a way to log the inbound SOAP message [valid or invalid] in SALT 2.0. We have a situation where the client is sending a SOAP message that we want to be able to intercept and log. The client is reporting that the SALT gateway is reporting an

  • Pcie x1 tv tuner card drivers

    Where can I get pcie x1 tv tuner card drivers for my HP Compaq 6005 Pro series SFF desktop Windows 7 Thanks for any help

  • Can not see itunes Match songs in iPhone IOS 6

    After upgrade to ios 6 I can not see my songs in iphone . I have a subscription of ITUNES Match and recenctly could download song to a new MAC. But iphone did not see any song. I have tried turn itunes match option ON AND OFF  but even with this proc