Build daily Big flat file using SAP R/3 material master data

Hi all,
I must build an interface between SAP R/3 4.7 and an external application
Daily a flat file must be generated contaning Material data in full exchange mode
(volume 100 000 materials, <10 fields => ~ File of 30Mo)
No complex mapping, only format mapping (Ex : Price quantity...)
I don't know yet if I will use Idocs or BAPI to extract data. However, I'm sure I must use multiple inbound messages because of volume
After reading documentation, I consider the both following solutions to manage it :
1) A simple asynchronous interface with a file adapter in construction mode APPEND to build flat file progressively with arrival of SAP messages
=>
viable solution ?
Is there problem of concurrent access to file in such a solution  ?
(idocs or bapi data will be processed ones following the others )
2) BPM Collecting and Bundling Messages - One Interface
(Unlimited Loop with Deadline trigger correspondint to time I must build flat file)
=>
Each SAP message is a small message but the outbound XML will represent a 30 Mo flat file => Is it a problem ??
Which solution do you advise ?
Is there another ?
Last question : (more general one)
In such scenario, I can't see XI-value added comparing a creation of flat file directly with R/3.
I will generate a big number of idocs, use a big part of XI memory ...
Can you give me your opinion about it ?
Thanks a lot
Best regards
Jean-Charles
Message was edited by:
        Jean-Charles
Message was edited by:
        Jean-Charles

Hi Jean-Charles,
>>>volume 100 000 materials, <10 fields => ~ File of 30Mo
You have a performance task...
>>>Is there problem of concurrent access to file in such a solution ?
No, the adapter framework has its own queueing, the message would be stored and executed later. If sequence is important, you can use EOIO as well.
>>>BPM Collecting and Bundling Messages - One Interface
BPM is not required in your case, you should avoid becoz of performance task. You can append at file adapter, no problem. Bundling and splitting is even possible at Integration Server without BPM.
>>>Each SAP message is a small message but the outbound XML will represent a 30 Mo flat file => Is it a problem ??
Avoid using BAD words
>>>Each SAP message is a small message but the outbound XML will represent a 30 Mo flat file => Is it a problem ??
Use the <a href="https://websmp110.sap-ag.de/quicksizing">Quick Sizer</a> for sizing the hardware.
Regards,
Udo

Similar Messages

  • Transferring MATERIAL MASTER DATA USING lsmw

    I am using LSMW to transfer material master data from text file using direct input program RMDATIND.  The problem is that the field WRKST in screen is of 48 characters while the batch data structure BMMH1 of field WRKST contains 14 characters. How can we transfer the full 48 characters in text file to THE FIELD BMMH1 IN DIRECT INPUT PROGRAM. Can we write any translation or routines . If yes, how is it possible. I can do the same using BDC but our client is already using the LSMW , only the new field WRKST for material has to be inserted. It is picking only 14 characters.
    Regards
    Debopriyo

    Hi
    Kindly use the sap note 351557 it is applicable for your release
    if you have any further clarifications let me know
    Regards
    Damu

  • How to upload  schedule line from flat files to sap file

    dear all,
    i want to upload the schedule lines from flat files to sap schedulle lines
    but the flat files have 15 schedule lines and the data is as per date
    so how to upload that and the fields available in flat files are more than the sap screen
    we are having more than 6 items
    and 15scedule lines its abt 90data to be upload
    for one customer in every 15 day
    so how to do this
    is there any direct use in functional side
    with out the help of any abap
    but my user will do it
    so he need a permanent solution
    with regards
    subrat

    Hi Subrat ,
    u can upload the data either ( Master /Transaction) data with the help of lsmw. for that all u need to do is go through the lsmw and do it. in that u can go Batch input recording/ BAPI/ IDOC any of that. here i am sending the LSMW Notes go through it and do the work.
    once u create the LSMW project then u can ask the data from user or u can explain the user about the program and can run the flat file to upload the data.
    if u require LSMW material Just send me blank mail from u. my mail id is [email protected]
    Reward if Helpful.
    Regards,
    Praveen Kumar.D

  • How to seperate a big flat file

    Hi Everyone,
    I have a performance issue with loading a very big flat file. I have a 200 million flat file and I am trying to load it via Oracle Data Integrator to Sql server 2005. Oracle data integrator is trying to execute a bcp tool like below.
    bcp CDWH_DW.dbo.Campaign_History_Outbound in "\\server\CDWH\FlatFile2Send \FILES\ailing_active.txt" -f"\\Server\Campaign\Campaign_Response_Outbound.fmt" -o"\\server\CDWH\FlatFile2Send\ \LOG\sony_mailing.log" -T -S"sqlserver " -C"RAW" -m 1
    If I have a problem with data in this huge file it is very difficult to find what is wrong. So I am trying to find out a solution for this issue. Do you have a suggestion? I am thinking to separate this huge file a lot of small piece and loading them in a loop but I am thinking about how to separate this big file to a small piece.
    Thank You for your Helps
    Kind Regards
    Caner Sahan

    Hi Caner...
    I believe that is possible.
    There is any column, from text file, that can be used as PK?
    What is the type of this text, delimited? positional?
    Do you want this only for development or will keep it for production?
    Cezar Santos
    http://odiexperts.com

  • Flat File Extract - SAP BW System Directory

    Hi,
    I want to export a flat file using data manager so that it is saved in the SAP BW System Directory i.e. the /SAP/ directories.
    How can I do this? When i use data manager it only gives me options to save in the SAP BPC directory structure.
    Cheers,

    Hi Leo,
    Look on the chain CPMB/EXPORT_TD_TO_APPL
    Vadim

  • Logical flat file in SAP

    Can anybody help me with documents regarding logical flat file in SAP?
    I want to create a logical flat file . Moreover I want to load data which is stored in logical flat file path .Lastly if I want to make changes in that flat file ..
    How should I proceed?
    please help me as soon as possible with blogs or documents..

    Hi,
    ask your basis huys to define logical/physical path and assigments, use tcode FILE to create your logical filenames and definitions
    /manfred

  • Idoc to flat file using Integration process does not show up at all

    Hello All,
    I created a scenario IDOC to Flat File using Integration Process and one without IntegrationProcess. I am able to execute the one without Integration Process easily.
    However when I send the IDOC from SAP then the Integration Process scenario just does not work.
    I Checked SXMB_MONI  There is no entry for the Integration Process.I can see entry for other without Integration Process.
    SXI_CACHE : I can see my Integration Process active
    SWEQADM :  I have activated the Event Queue and Background job
    SWF_XI_ADM_BPE :  ALL BPE is showing green status.
    All syntax check on IP are fine.
    There is no Basis Help for me so  there could be some additional basis steps which need to be configured.  Has anyone faced such an issue with Integration Process?
    Regards
    Prashanta

    Hope this might help you. when u configure an IDoc as Sender with BPM this is how you proceed.
    <b>1<b>. let us split the scenario into two</b>.</b>
    a. <b>Sender to BPM</b> ( Integration Process).
    b. <b>BPM to Receiver</b>.
    <b>2. First let us configure the first Sender to BPM.</b>
    a. Sender Agreement( <b>Not required</b> ).
    b. Receiver Agreement( <b>NOT Required</b>).
    c. Receiver Determination( Sender Service, Outbound Interface, Receiver Service(<b>Integration Process</b>).
    d. Interface Determination( Inbound Interface(Sender Abstract Interface), Message Mapping(NOT Required if your using transformation stepin Integration Process)).
    <b>3. Now let us configure the Second BPM to Receiver.</b>
    a. Sender Agreement( <b>NOT Required</b>)
    b. Receiver Agreement( Sender Service(<b>Integration process</b>), Receiver Abstarct Interface,Receiver service, Inbound Interface).
    c. Receiver Determination( Sender Service(Integration Process), Receiver Abstarct Interface,Receiver Service).
    d. Interface Determination( Inbound Interface, Message Mapping(<b>NOT Required</b>)).
    So Finally we have <b>One Receiver Agreement</b>, <b>Two Receiver Determinations</b>, <b>Two Interface Determinations</b>.
    Please let me know if you have any more queries.
    Regards
    Gopi

  • Data Transfer from Flat file To SAP system,

    Hi SAP Guru's,
    My query is :
    How to update Material master data by using idoc type MATMAS05 . The data is present in flat file at application server.
    I am  new to idoc area.Please provide me the sample program that how to update material master data by using standard idoc type.
    I am clear with the point that we have to read flat file from application server to internal table.
    But i got stucked at this point that how to update data from internal table data , by using standard idoc type MATMAS 05.
    I am in real need.Please provide me with the answer of this query.
    I will really appreciate your <<removed by moderator>> reply.
    Thanks
    Simran
    Edited by: Simran_SAP on Aug 25, 2010 10:46 AM
    Edited by: kishan P on Aug 25, 2010 4:36 PM

    Hi Vinod,
    Thanks for reply..
    I am new to idoc area.and my requirement is to generate the idoc after reading data from a flat file. The file is passed to the application server
    by a middleware . The SAP interface program reads the file from the application server and then starts processing the data. Please help me how to create the inbound IDoc and which FM needs to be used.
    Please provide a sample Program .
    This will really help..
    Waiting fr ur early response.
    Thanks
    Simran

  • How to import a logo from flat file to SAP in SMARTFORM.

    how to import a logo from flat file to SAP in SMARTFORM. i need to know whether TIFF format is used and also the full steps.
    Thanks,

    Hi,
    You can not directly use a logo from a file into a Smart form. First you will have to upload it to SAP. This has to be done only once. Once it is imported into SAP then you can use it in smart form. To import a logo to SAP, goto SE78. Open the tree under GRAPHICS. Select the file type and click on the Import (first button on the toolbar, just before delete button). Select the logo file and give it some appropriate name along with description. Select appropriate type of the image and click Continue. Your logo will be uploaded into SAP from a file. Now in your smartform, Create a Graphic Node, give the name of the logo along with other properties. In this way you can import a logo from a flat file into SAP and consequently in a smart form.
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • Upload a Flat File to SAP BW

    Hi,
    i created a flat file using this :
    http://help.sap.com/saphelp_nw70/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    now, i want to upload my flat file (csi.files) in SAP BW because i want to use it with business explorer.
    I looked on the internet and forum but didn't find the right procedure.
    Any idea?
    Thank you
    Edouard

    Step by step procedure of data load from a flat file?
    /thread/256392 [original link is broken]

  • Time taken to upload a flat file in SAP BI

    Hello Experts,
                          Want to know , about how much time it will generally take to upload a flat file in SAP BI  having data volume near about 10 million .
    OR what is standard time taken to upload the data from a flat file what ever be the size of the the flat file in terms of records ,
    please provide me the detaild information regarding the time taken , plz clarify it , and thanks in advance

    Hi,
    there are some other points that you need to consider while trying to evaluate your question:
    - how wide is your file/how many columns it has?
    - what's the type of interface you using for flat file upload? is it: flat file loaded from user workstation? from application server? from web interface (like planning app)?
    - how complex is login used to transform the data from flat file before data is saved in BW objects?
    In general 10mil of records is not a problem is not a problem if you using upload from application server. If you using load from user workstation thsi can be an issue. Even less performant is load of that much data via web interface.

  • Delete data from a flat file using PL/SQL -- Please help.. urgent

    Hi All,
    We are writing data to a flat file using Text_IO.Put_Line command. We want to delete data / record from that file after data is written onto it.
    Please let us know if this is possible.
    Thanks in advance.
    Vaishali

    There's nothing in UTL_FILE to do this, so your options are either to write a Java stored procedure to do it or to use whatever mechanism the host operating system supports for editing files.
    Alternatively, you could write a PL/SQL procedure to read each line in from the file and then write them out to a second file, discarding the line you don't want along the way.

  • Writing to a flat file using UTL in a procedure

    Hello All,
    I am creating a procedure in which I am trying to write data to a flat file using UTL. Code is shown below:
    CREATE OR REPLACE PROCEDURE wrt_lifungduty IS
       sql_stmt             varchar2(200);
       sql_stmt1            varchar2(200);
       sql_stmt2            varchar2(200);
       v_cur_hdl            integer;
       v_rows_processed     BINARY_INTEGER;
       V_file           UTL_FILE.FILE_TYPE;
       V_flatfile_line      VARCHAR2(98) := NULL;
      V_OBLIGATION_KEY    NUMBER(10);
      V_OBLIGATION_LEVEL  VARCHAR2(6);
      V_KEY_VALUE_1       VARCHAR2(20);
      V_KEY_VALUE_2       VARCHAR2(20);
      V_PARTNER_TYPE      VARCHAR2(6);
      V_PARTNER_ID        VARCHAR2(10);
      V_EXT_INVC_NO       VARCHAR2(30);
      V_EXT_INVC_DATE     DATE;
      V_PAID_DATE         DATE;
      V_PAID_AMT          NUMBER(20,4);
      V_COMP_ID           VARCHAR2(10);
      V_RECEIPT_DATE      DATE;
      V_ORDER_QTY         NUMBER(12,4);
      V_RECEIPT_QTY       NUMBER(12,4);
      V_FRT               NUMBER;
      V_DUTY              NUMBER;
      V_SUPPLIER          NUMBER;
      V_FLAG              VARCHAR2(1);
      V_ELC_COST          NUMBER;
      V_ADJ_ELC           NUMBER;
    Cursor x is
          select OBLIGATION_KEY,OBLIGATION_LEVEL,KEY_VALUE_1,KEY_VALUE_2,PARTNER_TYPE,PARTNER_ID,EXT_INVC_NO,EXT_INVC_DATE
                 ,PAID_DATE,PAID_AMT,COMP_ID,RECEIPT_DATE,ORDER_QTY,RECEIPT_QTY,FRT,DUTY,SUPPLIER,FLAG,ELC_COST,ADJ_ELC
          from RMSBIZ.CT_ANALYZE_LIFUNG_DUTY;    
    BEGIN
    if not UTL_FILE.IS_OPEN(V_file) then
          V_file := UTL_FILE.FOPEN('/exchange/biz/rms2lan','sb_duty.dat','w'); --need to give the location for testing
       end if;
    for x1 in x loop
      V_OBLIGATION_KEY    :=1;
      V_OBLIGATION_LEVEL  :='test';
      V_OBLIGATION_KEY    :=x1.OBLIGATION_KEY;
      V_OBLIGATION_LEVEL  :=x1.OBLIGATION_LEVEL;
      V_KEY_VALUE_1       :=x1.KEY_VALUE_1;
      V_KEY_VALUE_2       :=x1.KEY_VALUE_2;
      V_PARTNER_TYPE      :=x1.PARTNER_TYPE;
      V_PARTNER_ID        :=x1.PARTNER_ID;
      V_EXT_INVC_NO       :=x1.EXT_INVC_NO;
      V_EXT_INVC_DATE     :=x1.EXT_INVC_DATE;
      V_PAID_DATE         :=x1.PAID_DATE;
      V_PAID_AMT          :=x1.PAID_AMT;
      V_COMP_ID           :=x1.COMP_ID;
      V_RECEIPT_DATE      :=x1.RECEIPT_DATE;
      V_ORDER_QTY         :=x1.ORDER_QTY;
      V_RECEIPT_QTY       :=x1.RECEIPT_QTY;
      V_FRT               :=x1.FRT;
      V_DUTY              :=x1.DUTY;
      V_SUPPLIER          :=x1.SUPPLIER;
      V_FLAG              :=x1.FLAG;
      V_ELC_COST          :=x1.ELC_COST;
      V_ADJ_ELC           :=x1.ADJ_ELC;
      V_flatfile_line:=  V_OBLIGATION_KEY||','||
      V_OBLIGATION_LEVEL  ||','||
      V_KEY_VALUE_1       ||','||
      V_KEY_VALUE_2       ||','||
      V_PARTNER_TYPE      ||','||
      V_PARTNER_ID        ||','||
      V_EXT_INVC_NO       ||','||
      V_EXT_INVC_DATE     ||','||
      V_PAID_DATE         ||','||
      V_PAID_AMT          ||','||
      V_COMP_ID           ||','||
      V_RECEIPT_DATE      ||','||
      V_ORDER_QTY         ||','||
      V_RECEIPT_QTY       ||','||
      V_FRT               ||','||
      V_DUTY              ||','||
      V_SUPPLIER          ||','||
      V_FLAG              ||','||
      V_ELC_COST          ||','||
      V_ADJ_ELC;
    V_flatfile_line:= V_OBLIGATION_KEY||','|| V_OBLIGATION_LEVEL;
        UTL_FILE.PUT_LINE(V_file, V_flatfile_line);
    end loop
      commit;
       UTL_FILE.fclose(V_file); 
    END;
                Getting the following errors:
    SQL>Welcome-->
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.UTL_FILE", line 98
    ORA-06512: at "SYS.UTL_FILE", line 157
    ORA-06512: at "RMSBIZ.WRT_LIFUNGDUTY", line 39
    ORA-06512: at line 1
    SQL>Welcome-->39
    39* V_file := UTL_FILE.FOPEN('/exchange/biz/rms2lan','sb_duty.dat','w');
    SQL>Welcome-->
    Does any one know why it is erroring out?
    Thanks,
    Chiru

    the code below works if i take out the last 3 columns while writing to the flat file line.
    CREATE OR REPLACE PROCEDURE wrt_lifungduty IS
       sql_stmt             varchar2(200);
       sql_stmt1            varchar2(200);
       sql_stmt2            varchar2(200);
       v_cur_hdl            integer;
       v_rows_processed     BINARY_INTEGER;
       V_file           UTL_FILE.FILE_TYPE;
       V_flatfile_line      VARCHAR2(98) := NULL;
      V_OBLIGATION_KEY    NUMBER(10);
      V_OBLIGATION_LEVEL  VARCHAR2(6);
      V_KEY_VALUE_1       VARCHAR2(20);
      V_KEY_VALUE_2       VARCHAR2(20);
      V_PARTNER_TYPE      VARCHAR2(6);
      V_PARTNER_ID        VARCHAR2(10);
      V_EXT_INVC_NO       VARCHAR2(30);
      V_EXT_INVC_DATE     DATE;
      V_PAID_DATE         DATE;
      V_PAID_AMT          NUMBER(20,4);
      V_COMP_ID           VARCHAR2(10);
      V_RECEIPT_DATE      DATE;
      V_ORDER_QTY         NUMBER(12,4);
      V_RECEIPT_QTY       NUMBER(12,4);
      V_FRT               NUMBER;
      V_DUTY              NUMBER;
      V_SUPPLIER          NUMBER;
      V_FLAG              VARCHAR2(1);
      V_ELC_COST          VARCHAR2(20);
      V_ADJ_ELC           VARCHAR2(20);
    Cursor x is
          select OBLIGATION_KEY,OBLIGATION_LEVEL,KEY_VALUE_1,KEY_VALUE_2,PARTNER_TYPE,PARTNER_ID,EXT_INVC_NO,EXT_INVC_DATE
                 ,PAID_DATE,PAID_AMT,COMP_ID,RECEIPT_DATE,ORDER_QTY,RECEIPT_QTY,FRT,DUTY,SUPPLIER,FLAG,ELC_COST,ADJ_ELC
          from RMSBIZ.CT_ANALYZE_LIFUNG_DUTY;
    BEGIN
    if not UTL_FILE.IS_OPEN(V_file) then
          V_file := UTL_FILE.FOPEN('/rmsapps/rms803/biz/data/utl_files','sb_duty.csv','w'); --need to give the location for testing
       end if;
    for x1 in x loop
      V_OBLIGATION_KEY    :=nvl(x1.OBLIGATION_KEY,null);
      V_OBLIGATION_LEVEL  :=nvl(x1.OBLIGATION_LEVEL,null);
      V_KEY_VALUE_1       :=x1.KEY_VALUE_1;
      V_KEY_VALUE_2       :=x1.KEY_VALUE_2;
      V_PARTNER_TYPE      :=x1.PARTNER_TYPE;
      V_PARTNER_ID        :=x1.PARTNER_ID;
      V_EXT_INVC_NO       :=x1.EXT_INVC_NO;
      V_EXT_INVC_DATE     :=x1.EXT_INVC_DATE;
      V_PAID_DATE         :=x1.PAID_DATE;
      V_PAID_AMT          :=x1.PAID_AMT;
      V_COMP_ID           :=x1.COMP_ID;
      V_RECEIPT_DATE      :=x1.RECEIPT_DATE;
      V_ORDER_QTY         :=x1.ORDER_QTY;
      V_RECEIPT_QTY       :=x1.RECEIPT_QTY;
      V_FRT               :=x1.FRT;
      V_DUTY              :=x1.DUTY;
      V_SUPPLIER          :=x1.SUPPLIER;
      V_FLAG              :=nvl(x1.FLAG,'0');
      V_ELC_COST          :=to_char(nvl(x1.ELC_COST,0));
      V_ADJ_ELC           :=to_char(nvl(x1.ADJ_ELC,0));
      V_flatfile_line:=  V_OBLIGATION_KEY||','||
      V_OBLIGATION_LEVEL  ||','||
      V_KEY_VALUE_1       ||','||
      V_KEY_VALUE_2       ||','||
      V_PARTNER_TYPE      ||','||
      V_PARTNER_ID        ||','||
      V_EXT_INVC_NO       ||','||
      V_EXT_INVC_DATE     ||','||
      V_PAID_DATE         ||','||
      V_PAID_AMT          ||','||
      V_COMP_ID           ||','||
      V_RECEIPT_DATE      ||','||
      V_ORDER_QTY         ||','||
      V_RECEIPT_QTY       ||','||
      V_FRT               ||','||
      V_DUTY              ||','||
      V_SUPPLIER          ||','||
    -- V_FLAG            ||','||
      V_ELC_COST          ||','||
      V_ADJ_ELC;
        UTL_FILE.PUT_LINE(V_file, V_flatfile_line);
    end loop
      commit;
       UTL_FILE.fclose(V_file);
    EXCEPTION
      WHEN UTL_FILE.INVALID_PATH
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_PATH');
      WHEN UTL_FILE.INVALID_MODE
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_MODE');
      WHEN UTL_FILE.INVALID_FILEHANDLE
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_FILEHANDLE');
      WHEN UTL_FILE.INVALID_OPERATION
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_OPERATION');
      WHEN UTL_FILE.READ_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: READ_ERROR');
      WHEN UTL_FILE.WRITE_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: WRITE_ERROR');
      WHEN UTL_FILE.INTERNAL_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INTERNAL_ERROR');
      WHEN OTHERS THEN
         --     v_error_code := SQLCODE;
    --          v_error_message := SQLERRM;
    --         dbms_output.put_line('ERROR: '||v_error_code);
       --       dbms_output.put_line('ERROR: '||v_error_message);
              RAISE_APPLICATION_ERROR(-20003,'sbduty - aborted');  
    END;
    /It fails as soon as it encounters the V_FLAG in the V_flat_file_line. The data in the table has nulls for the FLAG, and some -ve numbers for the ELC_COST,ADJ_ELC..but that should'nt cause any problems does it?
    Whats wrong with those 3 columns?
    Errors that i get are:
    SQL>Welcome-->BEGIN wrt_lifungduty; END;
    ERROR at line 1:
    ORA-20003: sbduty - aborted
    ORA-06512: at "RMSBIZ.WRT_LIFUNGDUTY", line 117
    ORA-06512: at line 1
    SQL>Welcome-->117
    117* RAISE_APPLICATION_ERROR(-20003,'sbduty - aborted');
    SQL>Welcome-->
    Thanks,
    Chiru

  • How to get field separator in flat file using GUI_DOWNLOAD function

    hi,
    how to get field separator in flat file using GUI_DOWNLOAD function.
                                    thanking you.

    Hi,
      Use WRITE_FIELD_SEPARATOR = 'X'.
      Check this sample code
    REPORT  z_file_download.
    DATA: w_name(90) TYPE c.
    DATA:
      BEGIN OF fs_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        price    LIKE sflight-price,
        currency LIKE sflight-currency,
      END OF fs_flight.
    DATA:
      BEGIN OF fs_head,
        carrid(10) TYPE c,
        connid(10) TYPE c,
        fldate(10) TYPE c,
        price(10) TYPE c,
        curr(10) TYPE c,
      END OF fs_head.
    DATA:
      t_head LIKE
       TABLE OF
             fs_head.
    DATA:
      t_flight LIKE
         TABLE OF
               fs_flight.
    fs_head-carrid = 'CARRID'.
    fs_head-connid = 'CONNID'.
    fs_head-fldate = 'FLDATE'.
    fs_head-price  = 'PRICE'.
    fs_head-curr   = 'CURRENCY'.
    APPEND fs_head TO t_head.
    SELECT-OPTIONS:
      s_carrid FOR fs_flight-carrid.
    START-OF-SELECTION.
      SELECT carrid
             connid
             fldate
             price
             currency
        FROM sflight
        INTO TABLE t_flight
       WHERE carrid IN s_carrid.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        filename                      = 'D:\flight.xls'
       FILETYPE                      = 'ASC'
    *   APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    *   CONFIRM_OVERWRITE             = ' '
    *   NO_AUTH_CHECK                 = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   WRITE_BOM                     = ' '
    * IMPORTING
    *   FILELENGTH                    =
      tables
        data_tab                      = t_head
    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.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'D:\flight.xls'
          filetype                = 'ASC'
          append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_flight
        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 EQ 0.
        MESSAGE 'Download successful' TYPE 'I'.
      ENDIF.
      IF sy-subrc <> 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

  • How to Create a Flat File using FTP/File Adapter

    Can any body done workaround on creating the Flat file using FTP/File Adapter?.
    I need to create a simple FlatFile either using of delimiter/Fixed length. using the above said adapters we can create XML file, i tried concatinating all the values into a single String and writing into a file, but it does not have proper structure
    Can any body help me out on this..
    Thanks
    Ram

    You can create a text schema while creating a File Adapter. If schema is specified for File Adapter, it takes care of converting XML into fixed length or delimited format.
    Thanks,
    -Ng.

Maybe you are looking for

  • Document numbering for User Define Object

    Hi, Anyone know how to use numbering series in UDO? I've created 3 doc series for the object. one off the series is the default. When i select other doc series on my form, after I add the doc, the series code is captured but the the number is wrong.

  • Custom component class is not detecting url parameter

    I have a hcsp page, on which i have a link something like this : "<$HttpCgiPath$>?IdcService=CUSTOM_SERVICE&var1=value1" m appending one more parameter in this url through java script. so one is the var1 which is directly here in the url and one m ap

  • 11 pm modem mysteriously dialing, connecting, exchanging data

    I've been trying to figure out why my PowerBook has been waking up at 11pm, dialing, making network connection and exchanging data with a remote server. I suspect that it's looking for a software update but have no assurance that it's not something m

  • Too much zooming in NI-HyperTrend locks lookout process.

    I'm using lookout 5.0 over W2K. When I try to zoom-in too much in NI-HyperTrend (Activex control object) Lookout locks and hence I have to end process using the Windows Task Manager. I'm using '+' icon to zoom in. Any idea? (urgent)

  • Toshiba 4015 , Linksys wpc11 , Extreme Base Station cannot connect! Help

    I have one IP address coming into a wired router(linksys bsr41), The router has two good ports. I go directly from one port to a homemade pc and to the airport extreme base station with the second. I have a mac mini wired to the port on the base stat