Fixed Column Number CSV variable? How to parse

I have the following variable that is a result of a cfexecute that I would like to populate into a database. There doesn't appear to be a Line Feed but there are only three columns. My question is how can I accomplish parsing the 1st value as Column 1, 2nd value as Column 2, 3rd as column 3 and 4th as column 1, 5th as column two.... etc.
Thank you,

That dump looks like it came from BlueDragon, not from ColdFusion?
But anyway, what makes you say there's no line feeds?  If it's based on looking at a <cfdump> result you won't be able to tell because a LF character (ie: chr(10)) does not not render as a line break in a browser,it'll just render as a whitespace character.  It certainly looks to me like there's a whitespace character between each notional row of data in your CSV there.
I think you should verify what the data actually contains before trying any specific solution here.
That said, it's easy enough to have a loop that increments by three each time, and taking the index as the first column, and the index+1 and index+2 as the second on third columns, treating the string as a comma-delimited list.
Adam

Similar Messages

  • Find (fix) column number in report list

    Dear ABAPers,
    Currently I develop a report that can show detail level. I use standard list to display the report.
    In this report I have 3 main fields (FIN Doc No, PO No, and OLA No) in one line that if they are double clicked they will go to another different page.
    The challege is to find out which one on the list that is double clicked, is it FIN No, PO No, or OLA No.
    I use sy-cucol to find the column number but I just notice that sy-cucol will count the column from the beginning of screen shown, not from the very beginning of report. So sy-cucol is number of column relative to SAP left screen side. What I need is number of column fixed from the very beginning of report.
    For example:
    I write field to list as follow
    WRITE:  /2 T_OUT-BELNR,
               160 T_OUT-EBELN,
               182 T_OUT-KONNR.
    And the screen listener as follow
      IF sy-lsind = 1.
        IF sy-cucol > 2 AND sy-cucol < 13.
                  "user double click on FIN Doc No
                  "routine for FIN Doc No
        ELSEIF sy-cucol > 159 AND sy-cucol < 182.
                  "user double click on PO No
                  "routine for PO No
        ELSEIF sy-cucol > 181 AND sy-cucol < 200.
                  "user double click on OLA No
                  "routine for OLA No
        ENDIF.
      ENDIF.
    However this code doesn't work because when I scroll the screen to right sy-cucol is recalculate from 0 in the very left side of screen. So it means that sy-cucol will differenciate when I scroll the report to the right - left.
    Does any body have solution for it? Are there any other system field that can replace sy-cucol?
    Thanks
    Regards
    Hadi

    Hi,
    Use the statement GET CURSOR FIELD XX to determine the column in the list.
    Sample code.
    TABLES mara.
    DATA it_mara TYPE TABLE OF mara.
    DATA  wa_mara TYPE mara.
    DATA gv_field TYPE char30.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    START-OF-SELECTION.
    SELECT *
       FROM mara
       INTO TABLE it_mara
       WHERE matnr IN S_matnr.
    IF sy-subrc = 0.
       LOOP AT it_mara INTO wa_mara.
         WRITE:/ wa_mara-mandt, wa_mara-matnr,wa_mara-mtart.
         HIDE: wa_mara-mandt, wa_mara-matnr.
       ENDLOOP.
    ENDIF.
    AT LINE-SELECTION.
      CASE sy-lsind.
        WHEN 1.
          GET CURSOR FIELD gv_field.
          WRITE 'TEST1'.
      ENDCASE.
    Regards,
    Vasanth

  • Fetch cursor with a variable column number

    Hello guys,
    this is the first time I write to this forum, as far as I remember. hence, if this is not the right place to ask this question, please point me to the right resource.
    I have the following Procedure (the function split splits a string into an array):
    BEGIN
    /* SPLIT IN GROUPS AND BUILD THE PARAMETER STRINGS */
    tokens_in := string_fnc.split(in_groups, '.');
    for i in 1..tokens_in.count loop
    IDX_REM := i;
    sql_par1 := sql_par1 || ', GRP' || i || '.NAME "GROUP_' || i || '"';
    sql_par2 := sql_par2 || ', DEV_XCSA.WFA_GROUP GRP' || i;
    IF i = 1 THEN
    sql_par3 := sql_par3 || ' AND S.ID = GRP1.FK_PARENT_SEC_ID ';
    ELSE
    sql_par3 := sql_par3 || ' AND GRP' || i || '.FK_PARENT_GROUP_ID ( + ) = GRP' || (i-1) || '.ID';
    END IF;
    end loop;
    sql_par3 := sql_par3 || ' AND SGQ.FK_GROUP_ID ( + ) = GRP' || IDX_REM || '.ID';
    /* BUILD THE QUERY STRING */
    sql_stmt := 'SELECT A.NAME "APPRAISAL" , AQ.NAME "PROJECT" , S.NAME "SECTION"';
    sql_stmt := sql_stmt || sql_par1;
    sql_stmt := sql_stmt || ', SGQ.NAME "QUESTION" , SGQ.VALUE "ANSWER"     FROM DEV_XCSA.WFA_APPRAISAL A, DEV_XCSA.WFA_QUESTIONNAIRE AQ, DEV_XCSA.WFA_SECTION S';
    sql_stmt := sql_stmt || sql_par2;                                             
    sql_stmt := sql_stmt || ', DEV_XCSA.WFA_QUESTION SGQ WHERE A.CPHID = ''' ||USER_NAME || ''' AND A.ID = AQ.FK_APPRAISAL_ID     AND AQ.ID = S.FK_QUESTIONNAIRE_ID';
    sql_stmt := sql_stmt || sql_par3;                                             
    /* RUN THE QUERY */
    OPEN QUEST_CUR FOR sql_stmt;
    You can see that now the select statement has a variable number of return columns.
    I would like to fetch the result of the query in a loop assigning the records to variables or to a record variable.
    But after reading the documentation it looks that I can only declare record variables before the query string is built and there is not an easy way to fetch a cursor into a variable number of variables.
    Is it possible to do what I am trying to do? Can you suggest a better approach?
    Please help me,
    TN

    Tremal Naik wrote:
    Ok, thanks to you both.
    Please, bear in mind that I am really a PL/SQL novice and I may have misunderstood BluShadow's hints.
    I will have a closer look at it and let you know my thoughts.Here's a cleaner commented example that should help you to understand what it's doing...
    SQL> CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
      2    v_v_val     VARCHAR2(4000);
      3    v_n_val     NUMBER;
      4    v_d_val     DATE;
      5    v_ret       NUMBER;
      6    c           NUMBER;
      7    d           NUMBER;
      8    col_cnt     INTEGER;
      9    f           BOOLEAN;
    10    rec_tab     DBMS_SQL.DESC_TAB;
    11    col_num     NUMBER;
    12    v_rowcount  NUMBER := 0;
    13  BEGIN
    14    -- create a cursor
    15    c := DBMS_SQL.OPEN_CURSOR;
    16    -- parse the SQL statement into the cursor
    17    DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
    18    -- execute the cursor
    19    d := DBMS_SQL.EXECUTE(c);
    20    --
    21    -- Describe the columns returned by the SQL statement
    22    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    23    --
    24    -- Bind local return variables to the various columns based on their types
    25    FOR j in 1..col_cnt
    26    LOOP
    27      CASE rec_tab(j).col_type
    28        WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
    29        WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
    30        WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
    31      ELSE
    32        DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
    33      END CASE;
    34    END LOOP;
    35    --
    36    -- Display what columns are being returned...
    37    FOR j in 1..col_cnt
    38    LOOP
    39      DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
    40                                                                                when 2 then 'NUMBER'
    41                                                                                when 12 then 'DATE'
    42                                                       else 'Other' end);
    43    END LOOP;
    44    --
    45    -- This part outputs the DATA
    46    LOOP
    47      -- Fetch a row of data through the cursor
    48      v_ret := DBMS_SQL.FETCH_ROWS(c);
    49      -- Exit when no more rows
    50      EXIT WHEN v_ret = 0;
    51      v_rowcount := v_rowcount + 1;
    52      DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
    53      DBMS_OUTPUT.PUT_LINE('--------------');
    54      -- Fetch the value of each column from the row
    55      FOR j in 1..col_cnt
    56      LOOP
    57        -- Fetch each column into the correct data type based on the description of the column
    58        CASE rec_tab(j).col_type
    59          WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
    60                       DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
    61          WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
    62                       DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
    63          WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
    64                       DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
    65        ELSE
    66          DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
    67          DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
    68        END CASE;
    69      END LOOP;
    70      DBMS_OUTPUT.PUT_LINE('--------------');
    71    END LOOP;
    72    --
    73    -- Close the cursor now we have finished with it
    74    DBMS_SQL.CLOSE_CURSOR(c);
    75  END;
    76  /
    Procedure created.
    SQL> exec run_query('select empno, ename, deptno from emp where deptno = 10');
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    Row: 2
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from emp where deptno = 10');
    EMPNO - NUMBER
    ENAME - VARCHAR2
    JOB - VARCHAR2
    MGR - NUMBER
    HIREDATE - DATE
    SAL - NUMBER
    COMM - NUMBER
    DEPTNO - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    JOB : MANAGER
    MGR : 7839
    HIREDATE : 09/06/1981 00:00:00
    SAL : 2450
    COMM :
    DEPTNO : 10
    Row: 2
    EMPNO : 7839
    ENAME : KING
    JOB : PRESIDENT
    MGR :
    HIREDATE : 17/11/1981 00:00:00
    SAL : 5000
    COMM :
    DEPTNO : 10
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    JOB : CLERK
    MGR : 7782
    HIREDATE : 23/01/1982 00:00:00
    SAL : 1300
    COMM :
    DEPTNO : 10
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from dept where deptno = 10');
    DEPTNO - NUMBER
    DNAME - VARCHAR2
    LOC - VARCHAR2
    Row: 1
    DEPTNO : 10
    DNAME : ACCOUNTING
    LOC : NEW YORK
    PL/SQL procedure successfully completed.
    SQL>As you can see, you can use DBMS_SQL to query any SQL string you like, regardless of the number of returned columns and their datatypes and the DBMS_SQL package can tell your code all the information it needs to know so that it can read the names, datatypes and data from that query.

  • How to load a unknown number of variables?

    Hi!
    I'm trying to load a known number of variables. So I set up this code in flash:
    //Laddar pris och namn********************************
    var loader:URLLoader = new URLLoader();
    // specify format as being variables
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, varsLoaded);
    // vars.txt contents:  foo=bar&foo2=bar2
    loader.load(new URLRequest("http://gbgknappen.se/designitonline/dekaldesigner/load_pris.php"));
    function varsLoaded (event:Event):void {
              var string_produkter="";
              var whilecount=0;
              while(loader.data.antal>whilecount){
                        var produkt_load="produkt_"+whilecount;
              trace(loader.data.produkt_load);
                        whilecount=whilecount+1;
         pris_ruta.text=string_produkter;
    It recive "antal"which is how many variables there are. The variables name are named produkt_0 produkt_1 produkt_2 produkt_3 and so on..
    so

    function varsLoaded(event:Event):void
    var loops:uint = loader.data.antal;
    for (var i:uint=0; i<loops; i++)
      trace(loader.data["produkt_"+i]);

  • Can't print from Adobe Acrobat 11.0.07 on my MAC OS 10.6 to HP PSC 1350.  Error: PSTOPDFFILTER/PSTOCUPSRASTER FAILED WITH ERR NUMBER 13.  How do I fix it so I can print?

    Can't print from Adobe Acrobat 11.0.07 on my MAC OS 10.6 to HP PSC 1350.  Error: PSTOPDFFILTER/PSTOCUPSRASTER FAILED WITH ERR NUMBER 13.  How do I fix it so I can print?

    i am getting the same error, suddenly, on 10.9.5

  • How to work with columns in CSV

    How do i get the expected result form the existing data?and also i need to compare column a and d and place the resule in new column, the CSV file has more than 100000 Row.
    Existing Data:
    name
    path
    home
    gk
    \\ts
    \\ts\gk
    gjk
    \\ts
    \\ts\gjk
    kfdk
    \\ts
    \\ts\kfdk
    agtrf
    \\ts
    \\ts\agtrf
    Expected Result:
    name
    path
    home
    Folder
    gk1
    \\ts
    \\ts\gk~
    gk~
    gjk3
    \\ts
    \\ts\gjk
    gjk
    kfdk
    \\ts
    \\ts\kfdk
    kfdk
    agtrf
    \\ts
    \\ts\agtrf
    agtrf

    As I said earlier, it doesn't work because there is no folder component in the UNC paths in the "home" column. 
    A UNC path is \\Server\Share followed by the folder\file path within that share.  
    What you have there labeled "Folder" is actually a share name, which may or may not be the name of the folder being shared.  What the OP requested after you posted the initial solution was how to split the folder name off of a \\server\share\folder
    unc path.
    I agree the split is faster.  Based on that timing it will take the split-path method about 88 seconds go through 100K records, where the split method will take about 7 seconds.
    But I'm willing to bet there's a lot more than that minute and change difference in the time it took to write those two scripts.
    FWIW, for processing large text files you can usually get better results if you can leverage Get-Content with a ReadCount of 1-2000 files, and then use -replace as an array operator to do the text manipulation.  This reduces your disk I/O operations
    by  a factor of -ReadCount while keeping memory utilization under control:
    "gk","\\ts","\\ts\gk"
    "gjk","\\ts","\\ts\gjk"
    "kfdk","\\ts","\\ts\kfdk"
    "agtrf,"\\ts","\\ts\agtrf"
    '@ *25000).split("`n") |% {$_.trim()} | ac testfile.csv
    $OldCsvPath = 'testfile.csv'
    $NewCsvPath = 'testfile2.csv'
    (measure-command {
    $NotFirst = $false
    get-content $OldCsvPath -ReadCount 1000 |
    foreach {
    if ($NotFirst) { $_ -replace '\\([^\\"]+")\s*$','\$1,"$1' }
    else { $_ -replace '"home"\s*$','"home","folder"' -replace '\\([^\\"]+")\s*$','\$1,"$1' }
    } | set-content $NewCsvPath
    }).TotalSeconds
    '*'*20
    Get-Content $NewCsvPath -TotalCount 10
    2.3213534
    "name","path","home","folder"
    "gk","\\ts","\\ts\gk","gk"
    "gjk","\\ts","\\ts\gjk","gjk"
    "kfdk","\\ts","\\ts\kfdk","kfdk"
    "agtrf,"\\ts","\\ts\agtrf","agtrf"
    "gk","\\ts","\\ts\gk","gk"
    "gjk","\\ts","\\ts\gjk","gjk"
    "kfdk","\\ts","\\ts\kfdk","kfdk"
    "agtrf,"\\ts","\\ts\agtrf","agtrf"
    "gk","\\ts","\\ts\gk","gk"
    That's 2.3 seconds for the whole 100,000 rows.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How to put the column name and variable value in the alert message.

    Dear,
    how can i put the column name and variable value in the alert message text. i want to display an alert which tell the user about the empty textboxes. that these textboxes must be filled.
    Regards:
    Muhammad Nadeem
    CHIMERA PVT. LTD.
    LAHORE
    [email protected]

    Hello,
    The name of the item that fires the current trigger is stored in the :SYSTEM.TRIGGER_ITEM system variable.
    The value contained in this item can be retrived with the Name_In() built-in
    value := Name_In( 'SYSTEM.TRIGGER_ITEM') ;
    LC$Msg := 'The item ' || :SYSTEM.TRIGGER_ITEM || ' must be entered' ;
    Set_Alert_Property('my_alert_box', ALERT_MESSAGE_TEXT, LC$Msg ) ;
    Ok := Show_Alert( 'my_alert_box' ) ;
    ...Francois

  • How do I keep account of line and column number within JTextArea?

    How do I keep account of line and column number within JTextArea?
    Thanks.

    hi kamlesh,
    to get the number of columns in a JTextArea u have the function
    getColumns() which gives u the number of columns in the text area.
    To get the number of rows present u have the function
    getRowCount() which returns an int that specifies the number of rows in the text area.
    Hope this helps
    Cheers :)
    Nagaraj

  • I cannot sync my newer contacts I have created on my iPhone to the iCloud so they do not appear in iMessage on my Mac. Only the phone number does. How can I fix this?

    I cannot sync my newer contacts I have created on my iPhone to the iCloud so they do not appear in iMessage on my Mac. Only the phone number does. How can I fix this?

    okay. I looked and my default account and it is my mobile me account... how do I transfer those to the cloud?

  • How to swap column values using variable in sql?

    Hi,
    I have a table and i want to swap two column values using variable
    please help me

    Hi,
    Let us assume that the DeptNAME and DeptNo columns are of type VARCHAR2. However, DeptNO column is VARCHAR2(10) and DeptNAMe is VARCHAR2(100).
    First of all DeptNo column needs to be modified to be 100.
    i) ALTER TABLE DEPT MODIFY DEPTNO VARCHAR2(100);
    Secondly, you will swap DEPTNAME and DEPTNO values using the SQL as follows:
    ii) update dept t1
    set deptname = (select deptno from dept2 t2 where t1.deptno = t2.deptno),
    deptno = (select deptname from dept2 t2 where t1.deptno = t2.deptno);
    Now, finally you want the deptname columns to be VARCHAR2(10)
    iii) ALTER TABLE DEPT MODIFY DEPTNAME VARCHAR2(10).
    If DEPTNO is a NUMBER column, you cannot alter the datatype unless the table is empty; in that case the whole swapping requirement would be moot.
    Trinath Somanchi,
    ( http://www.myospages.com )

  • How to merge two columns in csv file using vbscript?

    How i can merge two column in csv file using vbscript or powershell?
    1  , 2  , 3  , 4  , 5
    1  , 23 ,  4 ,  5
    thanks

    Here are two examples
    http://msdn.microsoft.com/en-us/library/ms191250.aspx
    calulated
    http://msdn.microsoft.com/en-us/library/ms191250.aspx
    Gary Newman MCSE, MCT, CCNA, MCSD, MCPD, MCDBA, MCAD, MCSA, MCTS Developer and Administrator On SharePoint 2013 SharePoint Practice Manager for AmeriTeach Denver, CO.

  • My youngest erased all content and settings on my iphone 4s (prepaid) and now it says it is not activated.I still have my account and number,but it says phone number unknown now.How do i fix this?.

    My youngest erased all content and settings on my iphone 4s (prepaid) and now it says it is not activated.I still have my account and number,but it says phone number unknown now.How do i fix this?.

    If you haven't already tried, see if you can force it into recovery mode to restore it:
    http://support.apple.com/kb/ht1808.  If that doesn't work, the last thing you can try is to put it in DFU mode to restore it: https://discussions.apple.com/thread/2648467?threadID=2648467&tstart=0.

  • How to implement fixed column headers

    Hi Gurus,
    I got a requirement to show a fixed column header in a sql reports. That means no matter how many rows the report returns, when scrolling down, the column headers are fixed and appear on the top.
    Anybody has any comments on this? If I'm not making sense, let me know and I can explain further.
    Thanks in advance.

    Hello Carl,
    Thanks for responding!
    I just realized that I did not include my name in my prior post, its Kyle, sorry about that. I also do not necessarily have an example code to show you, let me explain:
    I am very much a newbie to the HTML environment. Amazingly, I was able to apply a code that would facilitate a scroll bar in my report. This code was applied to the template called Reports Region in the section entitled Definition, it basically looks like this:
    <style>
    .RegionScroll
    width:950px;
    height:225px;
    overflow:auto;
    border:solid 0px;
    </style>
    My next feat was to figure out how to fix the column headings, here is were….. well basically I guessed. First; I looked at the website describing how to implement this in three steps, to be functional in both IE and Fire Fox. I was not sure exactly were to apply the script provided, so I made a logical guess and dropped it in to the same area as my previous code. When I went to view the page the code line:
    onload="MakeStaticHeader('TableId','150px')"
    showed up at the top of the page (no Java script error presented itself). I concluded that I either have the wrong programming syntax, its in the wrong template and or template section. To complicate matters I have no idea of how to identify the correct TableId. I did look to view the HTML source code of the page, but found several candidates with the prefix "ID=".
    Quite honestly, without a good formal understanding of HTML or CSS programming techniques, I may be biting more off than I can chew. If this is the case then would you be kind enough to point me in some direction that might help me get over this hurdle.
    Thanks again for the response.
    Kyle

  • How do I know the Column number after shifting table columns?

    I create a table with column name "a", "b", "c"
    Then I shift those column around..
    Is there a way Java can tell me the column number of heading "b"? (For example)
    Thanks!

    As mentioned above you generally don't need to worry about columns being moved but, from the JTable API, this may be what you are looking for:
    int convertColumnIndexToModel(int viewColumnIndex)
    int convertColumnIndexToView(int modelColumnIndex)

  • Download int table into csv file with each column in separate column in csv

    Hi All,
    I want to download the data in internal table to CSV file. but each column in the table should come as separate column in csv format.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = GD_FILE
          FILETYPE                = 'ASC'
          WRITE_FIELD_SEPARATOR   = 'X'
        tables
          DATA_TAB                = I_LINES_NEW
        EXCEPTIONS
          FILE_OPEN_ERROR         = 1
          FILE_READ_ERROR         = 2
          NO_BATCH                = 3
          GUI_REFUSE_FILETRANSFER = 4
          INVALID_TYPE            = 5
          NO_AUTHORITY            = 6
          UNKNOWN_ERROR           = 7
          BAD_DATA_FORMAT         = 8
          HEADER_NOT_ALLOWED      = 9
          SEPARATOR_NOT_ALLOWED   = 10
          HEADER_TOO_LONG         = 11
          UNKNOWN_DP_ERROR        = 12
          ACCESS_DENIED           = 13
          DP_OUT_OF_MEMORY        = 14
          DISK_FULL               = 15
          DP_TIMEOUT              = 16
          OTHERS                  = 17.
      IF SY-SUBRC NE 0.
        WRITE: 'Error ', SY-SUBRC, 'returned from GUI_DOWNLOAD SAP OUTBOUND'.
        SKIP.
      ENDIF.
    with the above values passd , I am getting csv file but all the columns in one column separated by some square symbol.
    How to separate them into different columns.
    Thanks in advance
    rgds,
    Madhuri

    Below example might help you understand on dowloading CSV file:
    TYPE-POOLS: truxs.
    DATA: i_t001 TYPE STANDARD TABLE OF t001,
          i_data TYPE truxs_t_text_data.
    SELECT * FROM t001 INTO TABLE i_t001 UP TO 20 ROWS.
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
      EXPORTING
        i_field_seperator          = ','
    *   I_LINE_HEADER              =
    *   I_FILENAME                 =
    *   I_APPL_KEEP                = ' '
      TABLES
        i_tab_sap_data             = i_t001
    CHANGING
       i_tab_converted_data       = i_data
    EXCEPTIONS
       conversion_failed          = 1
       OTHERS                     = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    DATA: file TYPE string VALUE 'C:\testing.csv'.
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename                = file
      CHANGING
        data_tab                = i_data[]
      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
        not_supported_by_gui    = 22
        error_no_gui            = 23
        OTHERS                  = 24.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Regards
    Eswar

Maybe you are looking for

  • [Tutorial] How to Disconnect Spotify from Facebook

    How to Disconnect Spotify from Facebook This is not an officially supported Spotify workaround.  It seems to be a common request on the community to want to disconnect accounts from Facebook.  If you wish to do this, then follow the instructions belo

  • Takes a long time for Apple logo to show up on boot up

    My 13" mpb early 2011 takes a long time for the Apple logo to show up... Is there a way to fix this? (It should show up within 2 seconds after the initial chime) I have Win7 installed, could it be that? Since it might be detecting which partition to

  • Payment terms in PO and vendor master

    PO should be able to override payment terms of the vendor master when a payment term in PO is different from the payment term in vendor master.How do I make it work? Regards - SS

  • API for office 365

    Hi, I'm looking to access Office 365 mail, calendar, contacts. Is there are REST API available for this? I found I can use SOAP, but when authenticating against https://outlook.office365.com/EWS/Exchange.asmx I'm not getting anything. Is there anythi

  • Install cd doesnt work

    i have a 3rd generation ipod, and a new macbook. ive tried installing the cd, but it says i need a networking update for mac os x, which i am not sure what it is and if it will actually help. is there another way to install my ipod besides the cd? or