Upload data from Internal table to text file with  '~' separator

can anyone help me to download data from internal table to flat file with  ''  separator. GUI_DOWNLOAD is not working in my case ....like for ''  separator

Here it is
REPORT  zkb_test1.
TYPE-POOLS: truxs.
DATA: i_scarr TYPE TABLE OF scarr,
i_conv_data TYPE truxs_t_text_data.
SELECT * FROM scarr INTO TABLE i_scarr.
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
  EXPORTING
    i_field_seperator    = '~'
  TABLES
    i_tab_sap_data       = i_scarr
  CHANGING
    i_tab_converted_data = i_conv_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.
CALL METHOD cl_gui_frontend_services=>gui_download
  EXPORTING
    filename                = 'C:\Test1.txt'
    filetype                = 'ASC'
  CHANGING
    data_tab                = i_conv_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
Kathirvel

Similar Messages

  • Downloading data from internal table to xls file leading zeros are not disp

    Hai abap gurus,
    when i am downloading data from internal table to excle file. some field values in a column are with leading zeros and some others dont have leading zeros.but in the output it is showing without leading zeros. then how to get with exact values.
    Ex:
    <b>ECC Code.</b>
    045234
      88567
    098456 
    but output is giving like this:
    45234
    88567
    98456
    how to get the actual values.....
    plz help me in this matter.

    Dear Kiran,
    Those field in the internal table having Leading Zeroes, make those fields' datatype as character.
    Then use the function module to download the content of the internal table to the excel file.
    Regards,
    Abir
    Don't forget to Reward Points  *

  • Download data from internal table to flat file.

    I need to download the data from Internal table to Flat file. can any one suggest how to do it? i suppose WS_Download OR GUI_DOWNLOAD.
    but if it is please guide me how to use this.
    is thre any other F.M. please provide the information.
    Thanks in advance

    Hi,
    Try this,
    * File download, uses older techniques but achieves a perfectly
    * acceptable solution which also allows the user to append data to
    * an existing file.
      PARAMETERS: p_file like rlgrap-filename.
    * Internal table to store export data  
      DATA: begin of it_excelfile occurs 0,
       row(500) type c,
       end of it_excelfile.
      DATA: rc TYPE sy-ucomm,
            ld_answer TYPE c.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                query    = 'FE'  "File Exist?
                filename = p_file
           IMPORTING
                return   = rc.
      IF rc NE 0.                       "If File alread exists
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
    *          TITLEBAR              = ' '
    *          DIAGNOSE_OBJECT       = ' '
               text_question         = 'File Already exists!!'
               text_button_1         = 'Replace'
    *          ICON_BUTTON_1         = ' '
               text_button_2         = 'New name'
    *          ICON_BUTTON_2         = ' '
    *          DEFAULT_BUTTON        = '1'
    *          DISPLAY_CANCEL_BUTTON = 'X'
    *          USERDEFINED_F1_HELP   = ' '
    *          START_COLUMN          = 25
    *          START_ROW             = 6
    *          POPUP_TYPE            =
          IMPORTING
               answer                = ld_answer
    *     TABLES
    *         PARAMETER              =
          EXCEPTIONS
              text_not_found         = 1
              OTHERS                 = 2.
    * Option 1: Overwrite
        IF ld_answer EQ '1'.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
    *            BIN_FILESIZE            =
                 filename                = p_file        "File Name
                 filetype                = 'ASC'
    *       IMPORTING
    *            FILELENGTH              =
            TABLES
                data_tab                = it_excelfile   "Data table
            EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                OTHERS                  = 5.
          IF sy-subrc <> 0.
            MESSAGE i003(zp) WITH
                     'There was an error during Excel file creation'(200).
            exit. "Causes short dump if removed and excel document was open 
          ENDIF.
    * Option 2: New name.
        ELSEIF ld_answer EQ '2'.
          CALL FUNCTION 'DOWNLOAD'
            EXPORTING
                 filename            = p_file          "File name
                 filetype            = 'ASC'           "File type
    *             col_select          = 'X'            "COL_SELECT
    *             col_selectmask      = 'XXXXXXXXXXXXXXXXXXXXXXXXXX'
    *                                                   "COL_SELECTMASK
                 filetype_no_show    = 'X'     "Show file type selection?
    *       IMPORTING
    *             act_filename        = filename_dat
            TABLES
                 data_tab            = it_excelfile    "Data table
    *            fieldnames          =
            EXCEPTIONS
                 file_open_error     = 01
                 file_write_error    = 02
                 invalid_filesize    = 03
                 invalid_table_width = 04
                 invalid_type        = 05
                 no_batch            = 06
                 unknown_error       = 07.
        ENDIF.
      ELSE.                               "File does not alread exist.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
    *          BIN_FILESIZE            =
               filename                = p_file         "File name
               filetype                = 'ASC'          "File type
    *     IMPORTING
    *          FILELENGTH              =
          TABLES
               data_tab                = it_excelfile   "Data table
          EXCEPTIONS
               file_write_error        = 1
               no_batch                = 2
               gui_refuse_filetransfer = 3
               invalid_type            = 4
               OTHERS                  = 5.
        IF sy-subrc <> 0.
          MESSAGE i003(zp) WITH
                   'There was an error during Excel file creation'(200).
          exit. "Causes short dump if removed and excel document was open 
        ENDIF.
      ENDIF.
    Regards,
    Raghav

  • Convert data from internal table to XML file.

    Hi All,
    I am selecting data from database into one internal table.
    Now I want to convert data from internal table to xml file format and save in to my desktop. Please suggest me how I can achieve my requirement.
    Kindly reply me ASAP.

    Use this FM. SAP_CONVERT_TO_XML_FORMAT
    Check this link too -
    Re: Data Export in XML format
    XML files from ABAP programs

  • Error while downloading data from internal table into XML file

    hi all,
    i developed a program to download data from into internal table to xml file like this.
    tables: mara.
    parameters: p_matnr like mara-matnr.
    data: begin of itab_mara occurs 0,
                matnr like mara-matnr,
                ernam like mara-ernam,
                aenam like mara-aenam,
                vpsta like mara-vpsta,
          end of itab_mara.
    data: lv_field_seperator type c,     " value 'X',
          lv_xml_doc_name(30) type c,    " string value ‘my xml file’,
          lv_result type i.
          lv_field_seperator = 'x'.
          lv_xml_doc_name = 'my xml file'.
    types: begin of truxs_xml_line,
              data(256) type x,
          end of truxs_xml_line.
    types:truxs_xml_table type table of truxs_xml_line.
    data:lv_tab_converted_data type truxs_xml_line,
         lt_tab_converted_data type truxs_xml_table.
    data: lv_xml_file type rlgrap-filename value 'c:\simp.xml'.
    select matnr ernam aenam vpsta from mara into table itab_mara up to 5
           rows where matnr = p_matnr.
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
    EXPORTING
       I_FIELD_SEPERATOR          = lv_field_seperator
      I_LINE_HEADER              =
      I_FILENAME                 =
      I_APPL_KEEP                = ' '
       I_XML_DOC_NAME             = lv_xml_doc_name
    IMPORTING
       PE_BIN_FILESIZE            = lv_result
      TABLES
        I_TAB_SAP_DATA             = itab_mara
    CHANGING
       I_TAB_CONVERTED_DATA       = lt_tab_converted_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.
    open dataset lv_xml_file for output in binary mode.
    loop at lt_tab_converted_data into lv_tab_converted_data.
    transfer lv_tab_converted_data to lv_xml_file.
    endloop.
    close dataset lv_xml_file.
    this program is syntactically correct and getting executed, but when i open the target xml file it is showing the following error.
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing resource 'file:///C:/simp.xml'.
    will anyone show me the possible solution to rectify this error
    thanks and regards,
    anil.

    Hi,
    Here is a small sample program to convert data in an internal table into XML format and display it.
    DATA: itab  TYPE TABLE OF spfli,
          l_xml TYPE REF TO cl_xml_document.
    * Read data into a ITAB
    SELECT * FROM spfli INTO TABLE itab.
    * Create the XML Object
    CREATE OBJECT l_xml.
    * Convert data in ITAB to XML
    CALL METHOD l_xml->create_with_data( name = 'Test1'
                                         dataobject = t_goal[] ).
    * Display XML Document
    CALL METHOD l_xml->display.
    Here are some other sample SAP programs to handle XML in ABAP:
    BCCIIXMLT1, BCCIIXMLT2, and BCCIIXMLT3.
    Hope this helps,
    Sumant.

  • Export data from a table to text file using srcipt task

    Hi
    i am new to SSIS
    i have to export data from a table and append it into a existing file through SSIS script task
    please help
    Thanks
    Umesh

    Hi Umesh,
    The data structure of the source table and the structure of the destination file are the same, right? Is the destination file a flat file? Do you have to do it through Script Task? If the destination file is a flat file, this can be done easily by using
    the stock tasks/components other than .NET code. In the Data Flow Task, we choose the appropriate source adapter (such as OLE DB Source or ADO.NET Source) to extract data from the source table, perform transformation if necessary, and then load to the destination
    file via a Flat File Destination. When setting up the Flat File Destination, uncheck the “Overwrite data in the file” option so that the extracted data will be appended to the existing file.
    If you need to implement it through Script Task/Component indeed, you may benefit from the following code examples:
    http://stackoverflow.com/questions/8070163/how-to-add-custom-footer-to-an-ssis-flat-file-seperate-component-or-script-tas 
    http://stackoverflow.com/questions/8467326/add-header-and-footer-row-flat-file-ssis 
    If you need further help about the script, I suggest that you ask a new question in .NET forums where you can get more dedicated support:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=netdevelopment 
    Regards,
    Mike Yin
    TechNet Community Support

  • Loading data from oracle table to text file........

    how can i load data from a oracle table to a text file or CSV file using PL/SQL procedures where the pls/sql code will take the table name dynamically.........
    soumen

    Try this thread..
    Is it possible to export a pl/sql region as a csv file?

  • Download internal table as text file with comma separation

    hi all
    I wanted text file separated by comma. I used the CSV function module, but the result is separeted by semicolon,instead i need comma.
    Kindly suggest some solution.
    Thanks
    Subha

    use this fm to convert to csv file
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
        EXPORTING
          I_FIELD_SEPERATOR    = ','
        TABLES
          I_TAB_SAP_DATA       = ITAB_FINAL
        CHANGING
          I_TAB_CONVERTED_DATA = ITAB_OUTPUT
        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.
    itab_output is of type ITAB_OUTPUT TYPE TRUXS_T_TEXT_DATA,
    and then download using gui_download
    CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            FILENAME                = W_FILENAME
            FILETYPE                = 'ASC'
          TABLES
            DATA_TAB                = ITAB_OUTPUT
          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.

  • Using abap code data from internal table to XML file create

    Hi ALL,
    i am using methods
      L_VALUE = GS_DOCUMENT-U_MITARBEITER.
      L_RC = L_ELEMENT_FLIGHTS->SET_ATTRIBUTE( NAME = 'U_Mitarbeiter' VALUE = L_VALUE ).
      CLEAR: L_VALUE,
             L_RC.
      L_VALUE = GS_DOCUMENT-VORNAME .
      L_RC = L_ELEMENT_FLIGHTS->SET_ATTRIBUTE( NAME = 'Vorname' VALUE = L_VALUE ).
         ENDLOOP.
      LOOP AT GS_DOCUMENT-GI_TIMETABLE INTO GS_TIMETABLE.
        L_ELEMENT_AIRLINE  = L_DOCUMENT->CREATE_SIMPLE_ELEMENT(
            NAME = 'Timetable'
            PARENT = L_ELEMENT_FLIGHTS  ).
          Create attribute 'code' of node 'airline'
        L_VALUE = GS_TIMETABLE-BEGINNUHRZEIT.
        L_RC = L_ELEMENT_AIRLINE->SET_ATTRIBUTE( NAME = 'Beginnuhrzeit' VALUE = L_VALUE ).
        L_VALUE = GS_TIMETABLE-BEMERKUNGEN.
        L_RC = L_ELEMENT_AIRLINE->SET_ATTRIBUTE( NAME = 'Bemerkungen' VALUE = L_VALUE ).
        L_VALUE = GS_TIMETABLE-ENDEUHRZEIT  .
        L_RC = L_ELEMENT_AIRLINE->SET_ATTRIBUTE( NAME = 'Endeuhrzeit' VALUE = L_VALUE ).
        L_VALUE = GS_TIMETABLE-BUCHUNGSDATUM.
        L_RC = L_ELEMENT_AIRLINE->SET_ATTRIBUTE( NAME = 'Buchungsdatum' VALUE = L_VALUE ).
      ENDLOOP.
      Creating a stream factory
      L_STREAMFACTORY = L_IXML->CREATE_STREAM_FACTORY( ).
      Connect internal XML table to stream factory
      L_OSTREAM = L_STREAMFACTORY->CREATE_OSTREAM_ITABLE( TABLE = L_XML_TABLE ).
      Rendering the document
      L_RENDERER = L_IXML->CREATE_RENDERER( OSTREAM  = L_OSTREAM
                                            DOCUMENT = L_DOCUMENT ).
      L_RC = L_RENDERER->RENDER( ).
      Saving the XML document
      L_XML_SIZE = L_OSTREAM->GET_NUM_WRITTEN_RAW( ).
    i am geting the output,
    line1
    <?xml version="1.0"?><Head Document="002_TMA1_KW1_SAP.XML" Innenauftragsnummer="008004000800" Kalenderwoche="17" MonatJahr="04/2008" Name="" Personalnummer="91003139" Projektnummer="1400000700" Regionalstelle="B" U_Entleiher="1" U_Mitarbeiter="1" Vorname=
    line 2
    Ricky"><Timetable Beginnuhrzeit="08:00" Bemerkungen="" Endeuhrzeit="16:30" Buchungsdatum="21.04.2008"/><Timetable Beginnuhrzeit="08:00" Bemerkungen="" Endeuhrzeit="16:30" Buchungsdatum="22.04.2008"/><Timetable Beginnuhrzeit="08:00" Bemerkungen="" Endeuhrz
    line 3
    it="16:30" Buchungsdatum="23.04.2008"/><Timetable Beginnuhrzeit="08:00" Bemerkungen="" Endeuhrzeit="16:30" Buchungsdatum="24.04.2008"/><Timetable Beginnuhrzeit="08:00" Bemerkungen="" Endeuhrzeit="16:30" Buchungsdatum="25.04.2008"/></Head>
    but i want this type line by line
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Document Dokumentnummer="001_TMA7_KW2_MAN" Dokumenttyp="TN_HE" Innenauftragsnummer="8004750104" Kalenderwoche="15" MonatJahr="04/2008" Name="Banana" Personalnummer="166326" Projektnummer="1400000203" Regionalstelle="RV1" U_Entleiher="1" U_Mitarbeiter="1" Vorname="Sepp">
    <TimeTable Beginnuhrzeit="08:00" Bemerkungen="" Buchungsdatum="07.04.2008" Endeuhrzeit="16:00"/>
    <TimeTable Beginnuhrzeit="08:00" Bemerkungen="" Buchungsdatum="08.04.2008" Endeuhrzeit="16:00"/>
    <TimeTable Beginnuhrzeit="08:00" Bemerkungen="" Buchungsdatum="09.04.2008" Endeuhrzeit="16:30"/>
    <TimeTable Beginnuhrzeit="08:00" Bemerkungen="" Buchungsdatum="10.04.2008" Endeuhrzeit="16:30"/>
    <TimeTable Beginnuhrzeit="08:00" Bemerkungen="" Buchungsdatum="11.04.2008" Endeuhrzeit=""/>
    </Document>
    for line breaking, please give me solution
    Regards,
    Santha

    Hi,
    Please give me more inforamtion, how to use this
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    cl_abap_char_utilities=>newline
    Regards,
    Santha

  • How to download leading zeros from internal table to XL file

    Hi,
    i am dowanloading data from interna table to XL file using GUI_DOWNLOAD FM. i want download the leading zeros  also into xl file
    EX: 012345
    at present only "12345" is down loading into XL file. But i want "012345" into XL file.
    Please help me.

    Hi,
    Can you try with DBF format(Pass FILETYPE = 'DBF'? I remember that in this format data will be downloaded in database storage format. Just check and update if it works!!!
    This is what FM documentation says.
    'DBF' :
    The data is downloaded in dBase format. With this format, the data types are stored as well, For this reason, import problems can be avoided - for example, problems with Microsoft Excel. In particular, you can avoid problems with the interpretation of numeric values.
    Thanks,
    Vinod.

  • FM for uploading data into internal table from Excel sheet

    Hi,
    I have a slight problem in one of the function modules that I have created. Actually it has been copied from a standard SAP function module “KCD_EXCEL_OLE_TO_INT_CONVERT”. Now my created function module is throwing me a dump suggesting “Data objects in a Unicode program are not convertible”. Can anybody help me out in removing the error .
    Actually the need of copying the standard FM to a ZFM is to increase the length of the column which can be uploaded thru this FM. The standard FM has a restriction of being able to upload 32 characters whereas my requirement is to upload data having at least 150 characters. So in order to care the need I made a ZStructure ZAKHIL_CELLS taking the Value parameters as 150 characters instead of 32 characters.
    Well this is all done because I wanted to upload a excel sheet into an internal table and not use a tab delimited file. Can anybody help in this regard or suggest some other function module which can upload more than 150 characters from a excel sheet .
    ‘m also attaching structure of my ZStructure for ur reference .
    STRUCTURE ZAKHIL_CELLS1 .
    ROW KCD_EX_ROW_N NUMC 4 Flexible Excel upload: row number
    COL KCD_EX_COL_N NUMC 4 Column
    VALUE KCD_VALUE CHAR 150 External Data Transfer: Values of Parameters or Variables
    Thanks & Rgds,
    Akhil

    hi,
    sample excel sheet.
    coloumn 1 is name and column 2 is age
    name age
    A     8
    C     13
    D     55
    DATA : int_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    data : record like db_name_age occurs 0 with header line.
    DATA : v_start_col TYPE i VALUE '1', "starting col
           v_start_row TYPE i VALUE '1', " starting row
           v_end_col   TYPE i VALUE '2', " total columns
           v_end_row   TYPE i VALUE '10'. "total no of record
    FORM f_upload .
      CLEAR : int_excel, int_excel[].
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = wf_filename
          i_begin_col             = v_start_col
          i_begin_row             = v_start_row
          i_end_col               = v_end_col
          i_end_row               = v_end_row
        TABLES
          intern                  = int_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
    *Message is 'Unable to upload data from  '  wf_filename.
        MESSAGE e169(zm050) WITH wf_filename.
      ELSE.
        SORT int_excel BY row col.
        REFRESH : record.
        CLEAR   : record.
        LOOP AT int_excel.
          CASE int_excel-col. "go thru each column.
            WHEN 1.
              record-name  = int_excel-value.
            WHEN 2.
              record-age = int_excel-value.     
          ENDCASE.
          AT END OF row.
            APPEND record.
            CLEAR record.
          ENDAT.
        ENDLOOP.
    *inserting into table
      ENDIF.
    if this helped pld rewrd points,
    rgrds
    anver

  • How to send data from internal table to the shared folder in ABAP

    Hi experts,
             My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is  "
    xxx\y\z....".
    I do not have any idea on how to send data from internal table to the shared folder path.
    can anybody please help me out how to do this?
    Thanks & Regards
    Sireesha.

    Where that folder is located, its on presentation server i.e. desktop or application server.
    If its on presentation server, use FM GUI_UPLOAD.
    If its on application server, then use DATASET functions. Have a look at below link.
    [File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
    I hope it helps.
    Thanks,
    Vibha
    Please mark all the useful answers

  • Gui_download for transferring the data from internal table to excel sheet.

    hi all,
    i am using gui_download for transferring the data from internal table to excel sheet.
    I have a internal table with 3 columns col1,col2,col3 and I am getting the file at the specified path,but my problem is that,in the excel sheet(path specified) all the 3 columns values are printed in one column.Please help me.
    Thanks in advance.

    Hi Venkata,
    plz use FM 'SAP_CONVERT_TO_XLS_FORMAT' :
      call function 'SAP_CONVERT_TO_XLS_FORMAT'
        exporting
    *   I_FIELD_SEPERATOR          =
    *   I_LINE_HEADER              =
          i_filename                 = p_file
    *   I_APPL_KEEP                = ' '
        tables
          i_tab_sap_data             = t_mbew
    * CHANGING
    *   I_TAB_CONVERTED_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.
    Hope this helps,
    Erwan

  • In PL-SQL archive data from a table to a file

    I am currently developing a vb app where I need to archive data from a table to a file. I was hoping to do this with a stored procedure. I will also need to be able to retrieve the data from the file for future use if necessary. What file types are available? Thanks in advance for any suggestions.

    What about exporting in an oracle binary format? The export files cannot be modifiable. Is there a way to use the export and import utility in PL/SQL?
    null

  • Reading Data from Internal Table

    Hi,
    Can anyone please tell me how to read data from Internal Tables in the Event Handler without using the Select statement OnInitialization?
    Thanks,
    Gaurav

    Hi Siddhartha,
    Can you tell me the problem in my code. I tried to work on the way you suggested. Though I have not finished with the coding, I just wanted to know whether I am going in the direction or not.
    I have declared the the structure in Type Defination as
    TYPES: BEGIN OF TEST_STRUC,
             BEGDA TYPE BEGDA,
             ENDDA TYPE ENDDA,
           END OF TEST_STRUC.
    TYPES: TEST_TAB_TYPE TYPE TABLE OF TEST_STRUC.
    In the Event Handler, I have added the following code on OnInputProcessing:
    event handler for checking and processing user input and
    for defining navigation
    DATA TEST_INFO LIKE LINE OF TEST_TAB.
    DATA: MYTAB6 TYPE TABLE OF PA0006,
          MYTAB6_WA LIKE LINE OF MYTAB6.
    REFRESH TEST_TAB.
    CLEAR TEST_INFO.
    MYTAB6_WA-BEGDA = REQUEST->GET_FORM_FIELD( STARTDATE ).
    MYTAB6_WA-ENDDA = REQUEST->GET_FORM_FIELD( ENDDATE ).
    IF EVENT->NAME EQ 'button'
       AND EVENT->SERVER_EVENT EQ 'click'.
      LOOP AT MYTAB6 INTO MYTAB6_WA.
        TEST_INFO-BEGDA = MYTAB6_WA-BEGDA.
        TEST_INFO-ENDDA = MYTAB6_WA-ENDDA.
      ENDLOOP.
      APPEND TEST_INFO TO TEST_TAB.
      CLEAR TEST_INFO.
      NAVIGATION->SET_PARAMETER( NAME = 'test_tab'
      VALUE = 'begda' ).
      NAVIGATION->SET_PARAMETER( NAME = 'test_tab'
      VALUE = 'endda' ).
      NAVIGATION->GOTO_PAGE( 'MyBSP2.htm').
    ENDIF.
    P.S. MyBSP2.htm is my next page.
    Thanks,
    Gaurav

Maybe you are looking for

  • Overdrive console compatibility with iTunes 12

    After downloading iTunes 12, the overdrive media console that works with many libraries will no longer transfer audio books to the ipod.  Anyone else have the problem:

  • A periodic fast signal to put out randomly to two different lines

    thank you so patient to answer me so fragmentary question. What I want is a two random fast digital output.However,two of outputs is related. superpose them will produce a periodic fast singal.In other words,when the line 1 put out "1",the line 2 put

  • Where could we find the CT and PT values  for Particular Device ???

    I 'm facing a scenario in  a report  i need to place a  field device number and assosiated  CT's and PT's . where could we find the CT and PT values  for Particular Device ??? basically im MM consultant   we don't ahave  DM consultant  please help wi

  • Database structure documentation tool

    I have been asked to include the database structure of our application in the help. It doesn't look as though there is a tool within RH that will do this but I thought it was worth asking in case it's hidden away somewhere. If not, there are plenty o

  • Tabs on the actual bottom of the page?

    Hi. Is there a way to make tabs appear on the actual VERY bottom of the page? And I don't mean that "bottom" which is still on top, gosh, who named that feature? Basically, I want all my tabs to appear at the bottom but I'm not keen on using any plug