Export Internal Table to XML in Background

Hi
I need to export a internal table into xml file in background using open dataset. The file is getting created but i am not able to open the file using IE/XML editor . When i open the file uisng wordpad i can see some charcters at the end of file which prevents it from opening in xml editor. if i delete the characters(box like) and save the file. i am able to open the file
When i downalod the same internal table via frontend using ws_downlod it works pefectly. no junk charcters are appended in the end. and hence files opens perfectly
below is the extract of program
START-OF-SELECTION.
   PERFORM get_data.
   PERFORM create_xml.
FORM get_data.
   REFRESH accesos.
   CLEAR accesos.
   MOVE: '45050' TO accesos-socio-numero,
                 'MOISES MORENO' TO accesos-socio-nombre,
                 '0' TO accesos-socio-reposicion.
   APPEND accesos.
ENDFORM.
i am using the following function modules
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
        EXPORTING
             name         = 'ACCESOS'
             dataobject   = accesos[]
        IMPORTING
             data_as_dom  = l_dom
CHANGING
             document     = m_document
        EXCEPTIONS
             illegal_name = 1
             OTHERS       = 2.
       CHECK NOT l_dom IS INITIAL.
w_rc = m_document->append_child( new_child = l_dom ).
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
document      = m_document
IMPORTING
xml_as_string = w_string
size          = w_size
TABLES
xml_as_table  = it_xml
EXCEPTIONS
no_document   = 1
OTHERS        = 2.
LOOP AT it_xml INTO xml_tab-d.
     APPEND xml_tab.
   ENDLOOP.
The following syntax for open datset which does not work
  lv_physcial_file = '
hdat03\test.xml'.
OPEN DATASET lv_physcial_file IN BINARY MODE   FOR OUTPUT MESSAGE l_msg.
   LOOP AT xml_tab.
     TRANSFER xml_tab TO lv_physcial_file.
   ENDLOOP.
The ws_download function works
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
               BIN_FILESIZE = W_SIZE
               FILENAME = GK_RUTA
               FILETYPE = 'BIN'
TABLES
               DATA_TAB = XML_TAB
EXCEPTIONS
               OTHERS = 10.
many thnaks

Hi Chetan,
Can you just try changing the syntax to the following, I not sure if that will help but just try and see.
OPEN DATASET  lv_physcial_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
Regards
Mohamed

Similar Messages

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

  • Internal Table to XML

    Hallo Experts,
    I have retrived a Internal Table from FM.
    CALL FUNCTION 'SRTUTIL_CONVERT_XML_TO_TABLE'
        EXPORTING
          xdoc             = lv_xstring
    IMPORTING
    *   ERROR_TEXT       =
         data             = lt_xml
    I have manipulated the Tagnames in the Internal Table lt_xml.
    Now I want to change the internal table to xml.
    Is there any FM or a class. can anyone help me??
    Thanks
    Kind regards
    rana Waseem

    Hallo,
    Thanks for your Reply. I am trying to manipulate the xml attributes in print report. I have the data in xstring form. I have changed it to internal Table with following code.
    CALL FUNCTION 'SRTUTIL_CONVERT_XML_TO_TABLE'
        EXPORTING
          xdoc             = lv_xstring
    IMPORTING
    *   ERROR_TEXT       =
         data             = lt_xml
    After the change in the table lt_xml I am trying to have once again a xstring to give to the Print Report. I have tried it with class
    LOOP AT lt_xml INTO ls_xml.
        CALL METHOD cl_soap_xml_helper=>transform_to_xml
          EXPORTING
            tag_name          = ls_xml-tag_name
            data              = ls_xml-tag_value
            data_type         = ls_xml-tag_type
            ignore_init_value = 'X'
    *    ignore_exception  =
          CHANGING
            xml               = lv_xstring_two
    *  ENDLOOP.
    but when I try to check the XML become an error
    The XML cannot be showed, when Stylesheet XSL  is used Remove the error and try again.
    I cannot understand where is the error. Because the orignal xstring from system is shown correct. But when I create the new xstring give error .
    Thanks for your help
    kind regards
    waseem

  • 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

  • Writing from internal table to xml format

    Hi,
    I searched all the forum and I have a question on writing the data from internal table in xml format to the file on app.server.
    Data: ITAB1   TYPE TABLE OF SPFLI,
             L_XML  TYPE REF TO CL_XML_DOCUMENT.
      SELECT * FROM SPFLI INTO TABLE ITAB1.
    CREATE THE XML OBJECT
      CREATE OBJECT L_XML.
    CONVERT THE DATA TO XML
      CALL METHOD L_XML->CREATE_WITH_DATA( DATAOBJECT = ITAB1[] ).
    after this how to move the XML data in the object to a file on app.server.
    Thanks

    p_ufile is the path of the application server
    p_output is the internal table with data to be moved to app serv.
    OPEN DATASET p_ufile FOR OUTPUT IN TEXT MODE.
    LOOP AT p_output INTO wa_file.
    TRANSFER wa_file TO p_ufile.
    CLEAR wa_file.
    ENDLOOP.
    CLOSE DATASET p_ufile.
    for XML I guees the path p_ufile ill be <b>sap/usr/tmp/file.xml</b>

  • Problem while exporting internal table to memory id using EXPORT

    Hi friends,
    Iam facing a following problem.
    I have 4 line items in my va01 tcode.
    now when i give material number and quantity and hit enter the processing for that line item starts.
    iam moving that current line item to a internal table lt_vbap in userexit_check_vbap.
    now for the 2nd line item also i have to move to internal table lt_vbap.
    but my problem is that in internal table lt_vbap iam not getting all the line items.
    every time the current line item is being processed the the previous line items are being refreshed.
    from lt_vbap internal table.
    how can i export internal table.
    code
    move vbap to lt_vbap.
    append lt_vbap.
    export lt_vbap to memory id 'ZXYZ'.

    >
    Prakash Pandey wrote:
    > Hi Priyanka,
    >
    > The internal table lt_vbap will always be empty unless you import it from the Memory ID (in your case ZXYX).
    >
    > Use the code this way:
    >
    > IMPORT lt_vbap FROM MEMORY ID 'ZXYX'.
    >
    > move vbap to lt_vbap.
    >
    > append lt_vbap.
    >
    > export lt_vbap to memory id 'ZXYZ'.
    >
    > Regards,
    > Prakash Pandey
    The memory id shud be same in both cases

  • Export INTERNAL TABLE to shared buffer

    Hi all,
    My requirement:
    Export INTERNAL TABLE to shared buffer or SAP Memory.
    Any help will be appreciated.
    Can SET/GET parameter be adopted for internal tables?
    Thanks,
    Tabraiz

    EXPORT (OBJ_TAB) TO MEMORY ID 'ABCD'
    also refer to
    http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/content.htm

  • Import/export internal tabl

    Hi,
    This is regarding import/export internal table to 2 different prog, somehow when i execute in prog ztest_hl7, it doesnt work. Please help.
    report ztest_hl7.
    TYPES:
    BEGIN OF tab_type,
    para TYPE string,
    dobj TYPE string,
    END OF tab_type.
    DATA:
    id TYPE c LENGTH 10 VALUE 'TEXTS',
    text1 TYPE string VALUE `IKE`,
    text2 TYPE string VALUE `TINA`,
    line TYPE tab_type,
    itab TYPE STANDARD TABLE OF tab_type.
    line-para = 'P1'.
    line-dobj = 'TEXT1'.
    APPEND line TO itab.
    line-para = 'P2'.
    line-dobj = 'TEXT2'.
    APPEND line TO itab.
    EXPORT itab TO MEMORY ID id.
    submit ztest_hl6 and return.
    report ztest_hl6.
    data : id TYPE c LENGTH 10 VALUE 'TEXTS'.
    TYPES:
    BEGIN OF tab_type,
    para TYPE string,
    dobj TYPE string,
    END OF tab_type.
    DATA: itab TYPE STANDARD TABLE OF tab_type,
         wa_itab type tab_type.
    IMPORT itab FROM MEMORY ID id.
    loop at itab into wa_itab.
    write:
    wa_itab-para,
    wa_itab-dobj.
    endloop.
    Edited by: Hui Leng Yeoh on Jun 26, 2008 11:25 AM

    Hi There are few syntax errors. Comment ur code and Paste this code and check. It is working fine.
    report ztest_hl7.
    TYPES:
    BEGIN OF tab_type,
    para TYPE string,
    dobj TYPE string,
    END OF tab_type.
    DATA:
    id(10) TYPE c VALUE 'TEXTS',
    text1 TYPE string, " VALUE `IKE`,
    text2 TYPE string, " VALUE `TINA`,
    line TYPE tab_type,
    itab TYPE STANDARD TABLE OF tab_type.
    text1 = 'IKE'.
    text2 = 'TINA'.
    line-para = 'P1'.
    line-dobj = 'TEXT1'.
    APPEND line TO itab.
    line-para = 'P2'.
    line-dobj = 'TEXT2'.
    APPEND line TO itab.
    EXPORT itab TO MEMORY ID id.
    SUBMIT z7569411 AND RETURN.
    data : id(10) TYPE c VALUE 'TEXTS'.
    TYPES:
    BEGIN OF tab_type,
    para TYPE string,
    dobj TYPE string,
    END OF tab_type.
    DATA: itab TYPE STANDARD TABLE OF tab_type,
    wa_itab type tab_type.
    IMPORT itab FROM MEMORY ID id.
    loop at itab into wa_itab.
    write:
    wa_itab-para,
    wa_itab-dobj.
    endloop.
    Thanks,
    vinod.

  • Exporting internal table in a oops

    hi friends,
    I have to pass internal table to a method and export that internal table.
    now when i am passing this internal table i am getting the last value of the table..
    i am enclosing code here please go through and modify me regarding this..
    REPORT  ZTEST_ABAP_PROXY.
    DATA PRXY TYPE REF TO ZCO_MI_PROXY_OUTBOUND.
    DATA: BEGIN OF I_MARA OCCURS 0,
      MATNR LIKE MARA-MATNR,
      ERNAM LIKE MARA-ERNAM,
      END OF I_MARA.
    CREATE OBJECT PRXY.
    DATA IT TYPE  ZMT_PROXY_OUTBOUND OCCURS 0 WITH HEADER LINE.
    TRY.
        SELECT MATNR ERNAM INTO TABLE I_MARA FROM MARA UP TO 10 ROWS.
        LOOP AT I_MARA.
          IT-MT_PROXY_OUTBOUND-MATNR = I_MARA-MATNR.
          IT-MT_PROXY_OUTBOUND-ERNAM = I_MARA-ERNAM.
          APPEND IT.
        ENDLOOP.
        CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS
          EXPORTING
            OUTPUT = IT.
        COMMIT WORK.
      CATCH CX_AI_SYSTEM_FAULT .
        DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
        CREATE OBJECT FAULT.
        WRITE :/ FAULT->ERRORTEXT.
    ENDTRY.
    i need to pass all the values of internal table to output at once..
    Thanks and Regards
    Vijay

    Hi Vijay,
    I think the problem is with the output parameter.
    Might be I'll give you the background and then explain you the problem. This may help.
    In the older release of ABAP there used to be Tables as one of the tabs where one could import/export tables to/from the FM. The problem was that it would difficult to identify what table are being imported and what are bein exported.
    So with later releases of ABAP this tab was removed and currently there are Exporting/Importing/Changing tabs. You can use changing in your case if you are passing the table to modify the same.
    Now the problem.
    As stated above the OUTPUT is a line type (means structure) while IT is a internal table with header lines. So the record in the wa of this table is only transferred to OUTPUT.
    What needs to be done.
    You need to change the type of the OUTPUT to table type. I am not sure if you know about table type.
    You can create a Table Type is se11 under Data Type.
    I hope this helps.
    Regards,
    Saurabh

  • Storing internal table from XML File into DDIC

    Hi everybody,
    im trying to store an internal table <b>without</b> knowing the content - means the structure (fields)- into th DDIC, but i failed. The code is:
    DATA xslt_error TYPE REF TO cx_xslt_exception.
    TRY .
    perform load_file  using 'D:/usr/YTGVF_asXML.xml'    changing itab_XMLResult.
          refresh itab_tableA.
          call transformation id
            source xml itab_XMLResult
            result GREATEST = itab_tableA.
    CATCH cx_xslt_exception INTO xslt_error.
      DATA: xslt_message type string .
      xslt_message = xslt_error->get_text( ).
      write xslt_message.
    ENDTRY.
    form load_file
      using    path type localfile
      changing tab type table.
      data:    s type string,
               filelength type i.
      s = path.
      refresh tab.
      call function 'GUI_UPLOAD'
        exporting  filename   = s
                   filetype   = 'BIN'
        importing  filelength = filelength
        tables     data_tab   = tab
        exceptions others     = 1.
    endform.                    "load_file
    So, how can i store itab_tableA, without knowing the content (fields) of the table? The XML-File is of type asXML - i guess there should be a solution.
    Thanks for all replies!
    BG, Jim

    Absolutely, I don't see why that would be a problem.
    After parsing through the schema or DTD, you would know what the structure of the XML file coming through would be. So it would be basically uploading the file to SAP and then parsing the schema or DTD file, you will come to know the structure of your XML.
    And once you know the structure, you can create your <a href="/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table internal table</a>, and put the values from the XML file in the same.
    Considering my limited knowledge in XML, I am not able to provide information regarding , if there are any function modules/classes which SAP supports to directly read an XML schema/DTD and create a table of that sort. But the above inputs should help you in your way...
    Regards,
    Subramanian V.

  • Download internal table in XML format

    Hi experts,
    I want to download an internal table into an XML format.
    How can I achieve this?
    I have used the GUI_DOWNLOAD earlier for XLS purpose, will that work in this case too?
    Thanks,
    Ajay.

    Hi Ajay,
      You can use the below format
    DATA : gs_xml TYPE lvc_t_fccl.
    (Fill lt_Table here)
        TRY.
            CALL TRANSFORMATION id SOURCE root = lt_Table
                 RESULT XML gs_xml.
          CATCH cx_st_error.
    ENDTRY.
    Then Call GUI_DOWNLOAD, passing gs_XML as data_tab and filetype = BIN
    Note : GUI_DOWNLOAD will not work in background.
    Hope this solves your problem
    Regards,
    Seema

  • Internal table to XML data in Application Server

    Dear Experts,
    I have converted the internal table data into XML format using CL_XML_DOCUMENT class and CREATE_WITH_DATA - method. Here I have to upload this XML converted file in the given application server path. Kindly suggest me some methods or class, other options to do this.
    I need to upload the XML file in to specified application server path. Kindly give some ideas.
    Regards,
    Sakthi

    I guess you want to transfer XML document type ref to IF_IXML_DOCUMENT (which is instantiated with this method and stored in attribute M_DOCUMENT ) to a file on application server. Is that right?
    If so please refer below program you should get the idea
    DATA: gr_ixml TYPE REF TO if_ixml,
          gr_ixml_doc TYPE REF TO if_ixml_document.
    gr_ixml = cl_ixml=>create( ).
    "here you have the same kind of XML document
    "as the one created with method CREATE_WITH_DATA
    gr_ixml_doc = gr_ixml->create_document( ). 
    DATA  gr_ixml_element TYPE REF TO if_ixml_element.
    CALL METHOD gr_ixml_doc->create_element
      EXPORTING
        name = 'JOBS'
      RECEIVING
        rval = gr_ixml_element.
    CALL METHOD gr_ixml_doc->append_child
      EXPORTING
        new_child = gr_ixml_element.
    CALL METHOD gr_ixml_element->set_attribute
      EXPORTING
        name  = 'OBJID'
        value = '566677890'.
    "serialization
    DATA g_encoding_type TYPE string.
    DATA g_stream_factory TYPE REF TO if_ixml_stream_factory.
    DATA gr_encoding TYPE REF TO if_ixml_encoding.
    g_stream_factory = gr_ixml->create_stream_factory( ).
    gr_encoding = gr_ixml->create_encoding( byte_order = 0
                                           character_set = 'UTF-8' ).
    DATA b_xml TYPE xstring.
    DATA gr_ostream TYPE REF TO if_ixml_ostream.
    gr_ostream = g_stream_factory->create_ostream_xstring( b_xml ).
    CALL METHOD gr_ostream->set_encoding
      EXPORTING
        encoding = gr_encoding.
    CALL METHOD gr_ixml_doc->render
      EXPORTING
        ostream = gr_ostream
        recursive = 'X'.
    DATA g_resize TYPE i.
    g_resize = gr_ostream->get_num_written_raw( ).
    data ex_tab type table of x255.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer                = b_xml
      tables
        binary_tab            = ex_tab.
    "now open file on application server
    OPEN DATASET dset FOR OUTPUT IN BINARY MODE.
    "and transfer ex_tab to dset
    Regards
    Marcin

  • Export internal table to Excel file pressing a new button created in ALV

    Hello, I am trying to implement the functionality to export to excel file inside a button that i have created into my ALV. I don't want to use FileDownload UI.
    The code I have set for event handler of this button is the following:
    METHOD attach_files .
      TYPES:
        BEGIN OF tipo_alv_tab,
          tipod    TYPE objid,
          descd   TYPE p1000-stext,
          begda   TYPE begdatum,
          endda   TYPE enddatum,
          pernr     TYPE pernr_d,
          nombre  TYPE ad_namefir,
          email     TYPE ad_smtpadr,
          posicion TYPE p1000-stext,
          uodesc   TYPE p1000-stext,
        END OF tipo_alv_tab.
      DATA:
        i_alv_tab    TYPE TABLE OF tipo_alv_tab,
        conv_out     TYPE REF TO cl_abap_conv_out_ce,
        content      TYPE xstring,
        lv_filename  TYPE string,
        xml_out      TYPE string.
    Fill values from memory
      IMPORT name1 TO i_alv_tab  FROM MEMORY ID 'ZCA'.
    Build XML file with internal table information
      CALL TRANSFORMATION ('ID') SOURCE tab = i_alv_tab[] RESULT XML xml_out.
    Build XSTRING with XML
      CALL FUNCTION 'CRM_IC_XML_STRING2XSTRING'
        EXPORTING
          instring   = xml_out
        IMPORTING
          outxstring = content.
    Format XSTRING
      conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8'  ).
    Convert data
      conv_out->convert( EXPORTING data = xml_out IMPORTING buffer = content ).
    Save file
      CALL METHOD cl_wd_runtime_services=>attach_file_to_response
        EXPORTING
          i_filename      = 'Excel File.xls'
          i_content       = content
          i_mime_type     = 'application/msexcel'
          i_in_new_window = i_in_new_window
          i_inplace       = i_inplace.
    ENDMETHOD.
    When pressing the button, the file created is without extension, and with a rare name. When trying to open the file, it seems to be corrupted.
    Does anyone know what am I doing wrong???
    Please, help is really really appreciated!!!!

    Hi Jorge,
    The export data to excel functionality is available inbuilt in ALV and you dont have to write any implementation. However, if you want to create your own button for it, you can do so as below.
    data:
    lr_button type ref to cl_salv_wd_fe_button,
    lr_function type ref to cl_salv_wd_function.
    CREATE OBJECT lr_button.
    lr_button->set_text( 'Export to excel' ).
    lr_button->set_tooltip( 'Export data to excel' ).
    lr_function = l_alv_model->if_salv_wd_function_settings~create_function( id = 'EXCEL' ).
    lr_function->set_function_std( IF_SALV_WD_C_STD_FUNCTIONS=>EXPORT_EXCEL ).
    lr_function->set_editor( lr_button ).
    Now, you have created your own button, created a user defined function for the ALV and set this button as editor for the function. And using the set_function_std method, we have just mapped the functionality of your new button to the existing export to excel functionality in ALV.
    Hope this is what you are looking for.
    Regards
    Nithya

  • Exporting Internal Table from Methods

    Hi Experts,
    I wanted to export an internal table from Methods and I am using below syntax and its not working.
    METHODS get_data IMPORTING value(s_matnr) type mara-matnr
                     exporting it_tab TYPE STANDARD TABLE itab.
    Please let me know what is the proper syntax.
    Thanks
    Basanagouda

    Hi,
    Define itab as a 'table type' of standard table.
    Example: TYPES: t_sflight TYPE STANDARD TABLE OF sflight.
    METHODS : get_data IMPORTING s_carrid type sel_carrid
    EXPORTING e_tab type t_sflight.
    ENDCLASS

  • How to export internal table and pass the internal table to another screen?

    Hi,
    I have a sql SELECT statement that select data from table into internal table. I would like to export out the internal table and pass to another screen and display the data in ALV list. How to export it out? I try but the error given was " The type of "OUT_SELECT_ITAB" cannot be converted to the type of  "itab_result".
    Another question is, how to pass the internal table that i export out from the function module to another screen?
    Here is the code
    ==============================================================
    FUNCTION ZNEW_SELECT_ZSTUD00.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IN_SELECT_YEAR) TYPE  ZSTUD00-EYEAR
    *"  EXPORTING
    *"     REFERENCE(OUT_RESULT) TYPE  CHAR9
    *"     REFERENCE(OUT_SELECT_ITAB) TYPE  ZSTUD00
    *& Global Declarations
    DATA: itab TYPE ZSTUD00,
          itab_result TYPE TABLE OF ZSTUD00.
    *& Processing Blocks called by the Runtime Environment
    itab-eyear = IN_SELECT_YEAR.
    SELECT *
    FROM ZSTUD00
    INTO TABLE itab_result
    WHERE eyear = IN_SELECT_YEAR.
    IF sy-subrc = 0.
      out_result = 'Success'.
      OUT_SELECT_ITAB = itab_result.
    ELSE.
      out_result = 'Fail'.
    ENDIF.
    ENDFUNCTION.
    ===============================================================
    Please advise. Thanks
    Regards,
    Rayden

    Hi Nagaraj,
    I try to change it in Tables tab page but it state that TABLES parameters are obsolete. when i "Enter". I try to "Enter" again. it seem to be ok but it stil give me the same error.
    ================================================================
    FUNCTION ZNEW_SELECT_ZSTUD00.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(IN_SELECT_YEAR) TYPE  ZSTUD00-EYEAR
    *"  EXPORTING
    *"     REFERENCE(OUT_RESULT) TYPE  CHAR9
    *"  TABLES
    *"      OUT_SELECT_ITAB STRUCTURE  ZSTUD00
    *& Global Declarations
    DATA: itab TYPE ZSTUD00,
          itab_result TYPE TABLE OF ZSTUD00.
    *& Processing Blocks called by the Runtime Environment
    itab-eyear = IN_SELECT_YEAR.
    SELECT *
    FROM ZSTUD00
    INTO TABLE itab_result
    WHERE eyear = IN_SELECT_YEAR.
    IF sy-subrc = 0.
      out_result = 'Success'.
      OUT_SELECT_ITAB = itab_result.
    ELSE.
      out_result = 'Fail'.
    ENDIF.
    ENDFUNCTION.
    ===============================================================
    regards,
    Rayden

Maybe you are looking for

  • Authorisation for creator to confirm his messages in support desk

    Hi Friends, I have configured support desk functionality where user creates a support message.This message is handled by 1st level support team.If  1st level  is not able to resolve it is sent to 2nd level. Also support message can be created by 1st

  • Importing Video Without Copying

    Hi, on the Mountain Lios OSX iMovie i had the option to Import Videos to the Event Library just moving, without doing a duplicate copy. I dont want my MAC to waste time doing the COPYING because I have 120 Gbs files and it takes a lot of time doing t

  • SRM and Goods Receipt

    Hi, How does it generally work with the goods receipt in the SRM. Let's say at the standard scenario. Employee has ordered something. The order has been approved. Now the order is gone into the backend. What happens now. Does the goods receipt takes

  • FPS Setting Is Ignored in QT Export

    Greetings. When I export a project to QuickTime, the FPS of the output file is always 29.97, no matter what FPS I set. Have tested exports in H.264, MPEG-4 Video, and Sorensen Video 3. Have tried choosing a preset FPS (15) and entering a custom one.

  • BP Identification and Creation through ICWeb

    For Account Identification B2B scenario is chosen. Incase, an account has 2 relationships one as Contact Person and other as say Ship-to-party, then on searching from the ICWeb, contact person is picked. The other relationship is not shown in the sea