Extract to flat file or IDOC

Does anybody know how to use BW Datasources in R3 (found in transaction RSA5) to extract data to a flat file for the purpose of loading a non-SAP data warehouse?
The export file may be an IDoc.
I tried RSA3, but it seems you have to specify a "target system" which is a BW system. I simply want to use the BW extractors to extract to a file.
Thanks - I will reward points.

Hi,
If it is function module based extractor then you can use the copy/modify the code (copy in case you are authorized to change it). Now at the end of the extractor write an ABAP code to download the data into a flatfile using GUI_DOWNLOAD or any suitable function module. You can use this extractor fn module in an ABAP program and schedule it everyday to create the flatfile.
If it view/table base extractor then use that in an ABAP program to create the flatfile.
Revert if you need more info.
You can find the type of extractor in RSO2 and also in the tabel ROOSOURCE.
Bye
Dinesh
Message was edited by: Dinesh Lalchand

Similar Messages

  • Extracting a flat file from oracle table

    I have moved the knowledge module KIM ISO SQL to FileAppend from the Metadata to my project folder.
    But when I create an interface mapping the oracle table and a flat file on a different unix server, in the drop down menu , it shows only KIM SQL TO SQL and KIM Control Append.It does not show up the SQL to FileAppend knowledge module option.
    What should I do to extract a flat file from oracle table?
    Thanks
    Hima
    Overstock.com

    All IKM in the Drop Down Menu are dependent of the target technology.
    A question, at this interface, is your target table a file ?

  • 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

  • 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

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

  • 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    

  • Extracting into Flat Files Using OCI or Pro*C Programs

    Data Extraction into Flat Files from a database Using OCI or Pro*C Programs - please provide me a sample code. It is urgent. Thank you in advance.

    This problem is very simple to solve. Simply use Pro*C, issue an SQL select into a host variable, then use unix "printf" to output the result. An alternative is to use the provided sqlplus utility to grab the data in a script, disabling headers, etc.
    Sadly, this area is a huge, basic hole in the Oracle product offering. While they have an import utility, there is no export utility, except for one that makes binary files not usable outside Oracle. Every other RDBMS I've seen has this. In Informix, you can say something like "export to <filename> select * from <table>", but that syntax is not offered by Oracle Corporation.

  • Flat file to idoc mapping issue

    Hi Gurus,
    i had a flat file format in sender side as below:
    H_ID     TYP_CODE    line_elemet      Quantity
    5896  STANDARD                       1.transmitter    1
    5896                  STANDARD       2.xxxxxxxxx           1
    5896                   STANDARD      3.yyyyyyyyy  2
    6895                  STANDARD       1.aaaaaaaaa        1
    9436                  STANDARD       1.bbbbbbbbb          4
    9436                  STANDARD       2.ggggggggg          3
    The above file need to be send to an Idoc.
    for which same header_ID values should create only one header segment, under that many a line segments should create as many line items appear on that header_id value.
    Here my query is how to suppress the repetetive header values to create onlyone header segment. And how to create as many line_item segments as the number of line items appear.
    points obvoius for the response
    Thanks in advance,
    Sekhar.

    About map problem I suggest youn to see the following link that are really helpful to improve knowledge about mapping:
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    I suggest you to see the following link to learn more about mapping:
    Mapping functionality in XI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    SAP Exchange Infrastructure - Graphical_Mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6658bd90-0201-0010-fbb6-afe25fb398d3
    SAP Exchange Infrastructure - Graphical Mapping Exercise
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/fd5ebd90-0201-0010-d697-91374d5b5190
    SAP Exchange Infrastructure - Graphical Mapping - Advanced
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd
    SAP Exchange Infrastructure: Mapping Patterns - Understand Context Handling in Message Mapping - Webinar Powerpoint
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f7d3b
    SAP NetWeaver Exchange Infrastructure Mapping Troubleshooting - Webinar Powerpoint
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e01e9400-9e81-2910-20a5-a862945a5e98
    Mapping Lookups a RFC API
    Mapping lookups - RFC API
    XI 3.0 New Mapping Features
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f327e1dba7
    I hope these links will be usefull.
    Regards,
    Salvatore

  • File content conversion - flat file to Idoc error

    Dear Experts,
    I have a situation where im using FCC in the sender adapter The data is in flat file with multiple fields separated by space .
    (*header444456    line4445758 header343434 line445687*) sample falt file data . should be divided as below
    header - 44456 , 343434
    *line    -  44457578 , 445687
    So i want to read the header items and pass it into header data of the IDoc and line items into line item data of the Idoc . And the header items and fields items are mixed up in the flat file . How do i read from the position 20 to 26 , 37 to 56 intermittently .And im not using any key field name . as the whole data is in one line . Any solution would be of great help .
    Thanks in advance
    Ganga
    Edited by: N.Ganga on Jan 28, 2012 3:30 PM
    Edited by: N.Ganga on Jan 28, 2012 3:30 PM

    Dear Grzegorz ,
    Yes i totally agree with you it can be separated by comma . But it is as below
    Header       - (once ).............................................. Flat file example :
         Field 1    -
    >order    line no 1   plant        material 1  code 1  quantity 1 
          .......................................................................order    line no 2   plant        material 2  code 2  quantity 2
         Field 2  (plant vlaue shuld come........................................................|
    Line          -  repeats (0-unbounded)                                      |                                     |                             |
       field 1 (line no 1)----
    |                                     |                             |
       field 2(material1)----
    |                             |
       field 3 (quant 1)----
    |
       field 1 (line no 2)----
    |                                     |                             |
       field 2(material2)----
    |                             |
       field 3 (quant 2)----
    |
    So i need to read the data intermittently and map them in the line items ignoring the order and plant data in every line apart from the first line. The order and plant remains the same in the flat file only line items keep changing .
    Hope my question is clear .
    Regards
    Ganga

  • Mapping FLAT File to Idoc

    Hi,
    I have to implement a flatfile --> XI ---> IDOC scenario and I have a question about the mapping.
    Suppose I have a Flat Fiel as following with the first 2columns as key:
    100991;001;text1;posting date
    100991;002;text2;posting date
    100992;001;text4;posting date
    100992;002;text6;posting date
    I have to pass this items to a IDOC strucutured  with header and positions.
    By mapping how can I group  key data to pass to single Idoc?
    Thanks
    marco

    Hi ,
    I have done it with ORDERS IDOC Structure .
    Since the source is a flat file you could take a simple structure with row and all the fields following it ( say filed1 , field2, field3).
    Take a bottom up approach for the child :
    Change the context of all the individual fields to the root then apply split by value on field3 ( this introduces context changes )
    Then format its parents Queue (Field2) based on Field3 Queue for this use the function Format By Example .
    Use the resulting queue  as one of the argument and Field1 to generate the link .
    Using Graphical this requirement is achievable . How ever it is upto your ease to choose which way you want to do it .
    Thanks & Regards
    Kavitha

  • Unsorted Flat File into IDoc with multiple use of nodes

    Hi Experts!
    I am facing a little problem. I have a source flat file for a classification where some fields appear several times.
    My source flat file looks like this:
    item1; field1a
    item2; fieldA
    item3; fieldxa
    item1; field1b
    as you can see the item1 exists twice (further appearances are also possible).
    Now i have to map the flat file into an IDoc structure
    My target IDoc looks like this
    Header
    -- node1
    attribute1
    -- node2
    the "field1a" and "field1b" has to be mapped into the "attribute1" in "node1". "node1" has to be duplicated for each time an "item1" appears (.. and if item2, item3 etc. appears twice, three ... four times...).
    So how can i reach it that the node1 will be duplicated automatically when an item appears twice or more times? I know that it could be possible to work with "SplitByValue"... but for this i need all item1 in an straight order.... but i dont have them in a correct order.
    I am looking forward to your suggestions.
    Thank you in advance.
    Udo

    Complex sorting is not or not easy possible with the grafical mapping tool.
    Use a sequence mapping. The first mapping is a simple XSLT which does the sort. The second mapping works as usual.
    I have an example XSLT which I used for a different purpose:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <ORDERLIST>
          <xsl:for-each select="ORDERLIST/ITEM">
            <xsl:sort select="ID"/>
            <xsl:copy-of select="."/>
          </xsl:for-each>
        </ORDERLIST>
      </xsl:template>
    </xsl:stylesheet>
    Regards
    Stefan

  • Flat File and IDoc

    Hi,
      Is it possible to read a flat file and create the sale order through IDoc.  Can i do this by DOC_INBOUND_FROM_FILE without XI?? What file format should i pass??
    Regards,
    Kit

    Hi  ,
    you can create Sales order through IDoc. IDOC_INPUT_ORDERS
    At a high level, the IDOC processing executes in the following manner:
    1.     Interpret IDOC header segments and captures organizational, customer master and purchase
                   order header details. Performs user exits for each segment to process customizations to data
                     processing.
    2.     Interprets item level segments and captures item level details like material information. Again,
                   it performs user exits for each segment.
    3.     Sums up the order data and determines the posting criterion viz. creating order with reference
                      etc.
    4.     Builds up batch data communication sequence (BDC) with respect to the required screen
                  sequence of posting a sales order.
    5.     While building up the BDC data, system performs user exit to process customizations to BDC
                    data.
    6.     Calls transactions VA01 using the BDC data.
    7.     If the processing fails, an appropriate workitem is generated for workflow processing.
    if you give me brief i can help you out more.
    if helpful REWARD points
    Thank you .
    Regards
    Ramana

  • Flat file to IDOC creation

    hi all,
    I'm looking for the ABAP (sample) Program which can help me out in generating IDOC from the Flat file.
    Flat file will be residing on local PC.
    I required this for Purchase Order Confirmation Step (MSG Type ORDRSP).
    If any had done it, then let me know.
    Regards,
    S Anand

    Hi
    Sorry it is not copied properly.
    Read the data from flst file using function module GUI_UPLOAD and for each entry of internal table fille the control recor and data record and pass to function module IDOC_INBOUND_ASYNCHRONOUS to generate IDOC.
    Sample code which i have used in my report to update customer master using IDOC
    PARAMETERS:p_kunnr TYPE kna1-kunnr,
    p_zahls TYPE knb1-zahls,
    p_tlfns TYPE knb1-tlfns,
    p_intad TYPE knb1-intad.
    START-OF-SELECTION.
      PERFORM idocgeneration.
    *&      Form  idocgeneration
          IDOC Generation
    FORM idocgeneration.
      DATA:wa_knb1 TYPE knb1,
      wa_kna1 TYPE kna1,
      wa_controlrecord LIKE edi_dc40,
      wa_detailrecord  LIKE edi_dd40,
      wa_e1kna1m TYPE e1kna1m,
      wa_e1knb1m TYPE e1knb1m.
      DATA:it_controlrecord TYPE STANDARD TABLE OF edi_dc40,
      it_detailrecord  TYPE STANDARD TABLE OF edi_dd40.
      CONSTANTS: cedidc40    LIKE edi_dc40-tabnam  VALUE 'EDI_DC40',
                 cdebmas06   LIKE edi_dc40-idoctyp VALUE 'DEBMAS06',
                 czdebmas06  LIKE edi_dc40-cimtyp  VALUE 'ZZDEBMAS06',
                 cdebmas     LIKE edi_dc40-mestyp  VALUE 'DEBMAS',
                 ce1kna1m    LIKE edi_dd40-segnam  VALUE 'E1KNA1M',
                 ce1knb1m    LIKE edi_dd40-segnam  VALUE 'E1KNB1M',
                 c_2       TYPE c VALUE '2'.
    Control Record
      CLEAR: wa_controlrecord,it_controlrecord[].
      wa_controlrecord-tabnam  = cedidc40.
      wa_controlrecord-mandt   = sy-mandt.
      wa_controlrecord-direct  = c_2.
      wa_controlrecord-idoctyp = cdebmas06.
      wa_controlrecord-cimtyp  = czdebmas06.
      wa_controlrecord-mestyp  = cdebmas.
      wa_controlrecord-mesfct  = space.
      wa_controlrecord-sndpor  = 'SAPPLD'.
      wa_controlrecord-sndprt  = 'KU'.
      wa_controlrecord-sndprn  = 'A000'.
      wa_controlrecord-rcvpor  = 'SAPPLD'.
      wa_controlrecord-rcvprt  = 'KU'.
      wa_controlrecord-rcvprn  = 'A000'.
      APPEND wa_controlrecord TO it_controlrecord.
    Remove the contents in detail record internal table
      REFRESH it_detailrecord.
    Create detailed data
    Assign values to the segment fields
      CLEAR:wa_kna1,wa_e1kna1m.
      SELECT SINGLE * FROM kna1 INTO wa_kna1 WHERE kunnr = p_kunnr.
      IF sy-subrc IS INITIAL.
        MOVE-CORRESPONDING wa_kna1 TO  wa_e1kna1m.
        wa_e1kna1m-msgfn = 'INT'.
    Create the detail record
        CLEAR wa_detailrecord.
        wa_detailrecord-segnam  = ce1kna1m.
        wa_detailrecord-mandt   = sy-mandt.
        wa_detailrecord-segnum  = '000001'.
        wa_detailrecord-psgnum  = '000000'.
        wa_detailrecord-hlevel  = '01'.
        wa_detailrecord-sdata   = wa_e1kna1m.
        APPEND wa_detailrecord TO it_detailrecord.
      ENDIF.
    *assign values to the segment fields
      CLEAR:wa_knb1,wa_e1knb1m.
      SELECT SINGLE * FROM knb1 INTO wa_knb1 WHERE kunnr = p_kunnr.
      IF sy-subrc IS INITIAL.
        MOVE-CORRESPONDING wa_knb1 TO  wa_e1knb1m.
        wa_e1knb1m-msgfn = 'INT'.
        wa_e1knb1m-intad = p_intad.
        wa_e1knb1m-zahls = p_zahls.
        wa_e1knb1m-tlfns = p_tlfns.
      ENDIF.
    Add segment to the detail record
      CLEAR wa_detailrecord.
      wa_detailrecord-segnam  = ce1knb1m.
      wa_detailrecord-mandt   = sy-mandt.
      wa_detailrecord-segnum  = '000003'.
      wa_detailrecord-psgnum  = '000001'.
      wa_detailrecord-hlevel  = '02'.
      wa_detailrecord-sdata   =  wa_e1knb1m.
      APPEND wa_detailrecord TO it_detailrecord.
      CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS'
        TABLES
          idoc_control_rec_40 = it_controlrecord
          idoc_data_rec_40    = it_detailrecord.
      IF sy-subrc IS INITIAL.
        WRITE:/ 'Sucessfully Update'.
      ENDIF.
    ENDFORM.                    "IDOC Generation

  • Flat file to Idoc : Last line empty in payload

    Hello everyone,
    I'm trying to import Flat File from an external partner, and insert it in our SAP System as Idoc.
    It works fine, after a small change in the flat file.
    In the normal version, I have a last record with value 'OK'.
    I have add the close record.lastFielsOptional in the FCC.
    But after checking the payload, I have seen that I have at the end the following thing :
    <ns:File xlmns:ns="http://world.com/file">
    <record>
    </record>
    <record>
    </record>
    <record />
    </ns:File>
    Can someone explain me how to avoid to have this last <record/>, or checking it in mapping ?
    Thanks a lot

    Hello Greg,
    The problem is that the key in the flat file is 3 digit numeric field, and OK is 2 char.
    If I try to use the key, I have an error on the last record because we have only 2 char for the key, and when I put the parameter record.lastFiledsOptional : yes, i have no more error on the FCC, but the last record of the payload is empty.
    Have you a possibility to avoid this error.
    Thanks and regards
    JC

Maybe you are looking for

  • Apple website doen't recognise the serial number on my iPod Nano

    Strange and frustrating! I have a 1st generation iPod Nano. I received an email from Apple about a replacement program for the iPod Nano. I have been trying to check my serial number on the apple website, but it is not being recognised. I took the pr

  • Is it possible to control when loadView() launches?

    Here is my situation.  I would like to be able to tap on my camera view to dismiss it, but I am having an issue due to when UITapGestureRecognizer becomes active. Background When a user presses the camera tab bar button, she is presented with a view

  • How do I write a query to give back the records only with today's date?

    For example the date format is "2014-05-01 16:31:35.897" is a column called "EffectiveStartDate' I tried using where EffectiveStartDate like '2014-05-01%' but that returns nothing.

  • OnDemand HD Content

    Hi, this question has probably been asked before but cant seem to see anything to answer my question. So, my question is..... Obviously on BT Vision I can download Box Office Movies in HD if I want to watch them later, however I was wondering if ther

  • Invisible Files Not Shown By Finder

    When I plug in my USB stick to delete some files on it, they seem to be gone afterwards, using Finder as my file browser. When I plug in the same stick in a PC, I see that the files are still there, starting with For example: ._letter On my mac, thes