Export Internal Table To E-Mail via attachted html or PDF file

i have an ALV display report for which the data is in the internal table.
Can anybody tell me how can i attach the simple  internal table as an attachment to the mail ...
give me example  code if possible
Maximum points will be given
thanks in advance.

here is the sample code but this code gives you two attachemetns as .xls files you try analyse and try it for PDF
you have to change in the packed_list parameter that is passed to the FM.
REPORT ZDOC_AS_EMAIL_3.
*& Report ZEMAIL_ATTACH *
*& Example of sending external email via SAPCONNECT *
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: l_t_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
*Retrieve sample data from table ekpo
PERFORM data_retrieval.
*Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
*Populate message body text
perform populate_email_message_body.
*Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
                    tables it_message
                            it_attach
                        using p_email
    'Example . xls documnet attachment'
                                 'XLS'
                            'filename'
                    changing gd_error
                          gd_reciever.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
*Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
*Build data table for .xls document
FORM build_xls_data_table.
*CONSTANTS: con_cret(2) TYPE c VALUE '0D', "OK for non Unicode
*con_tab(2) TYPE c VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
class cl_abap_char_utilities definition load.
constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
*Send email
FORM send_file_as_email_attachment tables pit_message
                                          pit_attach
                                       using p_email
                                            p_mtitle
                                            p_format
                                          p_filename
                                    p_attdescription
                                    p_sender_address
                                p_sender_addres_type
                                    changing p_error
                                          p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
*Fill the document data.
w_doc_data-doc_size = 1.
*Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'REPORT'.
w_doc_data-obj_descr = ld_mtitle . "mail description
w_doc_data-sensitivty = 'F'.
*Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
*Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
*Create 1st attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 0.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
**Create 1st attachment notification
*t_packing_list-transf_bin = 'X'.
*t_packing_list-head_start = 0.
*t_packing_list-head_num = 1.
*t_packing_list-body_start = 1.
*DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
*t_packing_list-doc_type = ld_format.
*t_packing_list-obj_descr = ld_attdescription.
*t_packing_list-obj_name = ld_attfilename.
*t_packing_list-doc_size = t_packing_list-body_num * 255.
*APPEND t_packing_list.
**Create 2nd attachment notification
data: x type i.
DESCRIBE TABLE t_attachment LINES X.
append lines of it_attach to t_attachment.
data: start type i,
      end type i,
      cal type i.
start = X + 1.
describe table t_attachment lines end.
cal = end - start.
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 0.
t_packing_list-head_num = 1.
t_packing_list-body_start = start.
t_packing_list-body_num = end.
*DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-obj_descr = 'Eng Change'. "ld_attdescription.
t_packing_list-doc_type = ld_format.
*t_packing_list-obj_name = 'Eng' .
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
*Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
object_header = l_t_objhead
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
*Populate zerror return code
ld_error = sy-subrc.
*Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
*Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 " WITH mode = 'INT'
"WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
*Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODY
Edited by: S@N on Jun 13, 2008 2:06 PM

Similar Messages

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

  • I am running Vista and Windows Mail, I can not open PDF files when in Windows Mail, I must save to Desktop first, this has changes recently and I do not know why or how to fix

    I am running Vista and Windows Mail, I can not open PDF files when in Windows Mail, I must save to Desktop first, this has changes recently and I do not know why or how to fix.
    Why after 6 year's this has changed?
    I would like to open PDF's straight from Window Mail.

    Good day Jeff.
    I am running most current Adobe Reader X.
    Tks Mark

  • I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button

    I have a document made up of separate PDF files which reside in a folder and are linked to each other via hyperlinks. Each pdf file is set to open with bookmarks displayed, however if I link from one PDF file to another and use the "Previous View" button to navigate back to my starting point the bookmarks are replaced by "page thumbnails". Is there anyway to stop this from happening?

    Hi Pusman,
    While setting up the links, if you choose to open the file in a new window then you won't face this issue, then you can simply switch to the previous file and bookmark view will remain as it is.
    Does that helps with your query?
    Regards,
    Rahul

  • Hello, is there a way to export or save layers from Indesign to separate png or pdf -files?

    Hello, is there a way to export or save layers from Indesign to separate png or pdf -files? I have a Indesign document with serveral layers and I need them as separate png files.
    I know that is is possible with Illustrator but can't find it for Indesign.
    Thanks a lot.

    The script Peter's noting is in #122 here:
    how to export indesign layers to photoshop layers (same structure)
    It is OSX only and exports PDFs for creating Photoshop layers. The exported PDFs get trashed so if you can use AppleScript I can edit out the Photoshop part post a version that only saves the PDFs

  • How to export a Graph or Chart from a BW report to PDF file

    Hi All,
    I am new for BI7.  i have one clarification 
    "How the system shall provide the users the ability to export a Graph or Chart from a BW report to PDF file in WAD"
    Thanks In Advance
    Ravi

    You have to use this command and assign your web items to this command to get graphs and charts
    http://help.sap.com/saphelp_nw70/helpdata/en/44/85de4943af5919e10000000a1553f7/frameset.htm

  • 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

  • Export internal table to application server

    hello all!
    i would like to export the contents of an internal table to the appliation server. i tried via OPEN DATASET, but my itab contains not only character type data.
    i do not want to copy all content into a parallel structure with all character type colums
    do you know a way to export an internal table on application server, in a way that it is readable by ms excel?
    thanks!

    Hi Matthias, i think that the only solution is using a parallel structure with all character type colums.  Also use 'SAP_CONVERT_TO_CSV_FORMAT' to convert the internal table to csv format in order to be readable by ms excel.
    Regards,
    Andrez

  • 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

  • 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 send internal table data through mail from report in foreground

    hi all,
    iam trying  to convert the internal table data into excel format and sending it through mail by runnning the report in foreground.
    mail is going sucessfully with excel format,but iam facing the problem in the excel format of the material column as follows:
    the matrno shows the wrong format -2.63E+11  instead of displaying correct format-263215000000.
    Pls suggest the alternative process for the above mentioned problem.
    Thanks,
    Sivagopal R.

    Hi Siva,
      Try to copy 263215000000 in one of the cells of excel sheet and press enter.It will automatically convert into -2.63E+11 .
      This means the default formatting of the excel sheet makes this happen.If you convert the format of the cell to "NUMBER" then u will get the required result.
      But I doubt whether or not it is possible through ABAP programming.
    Regards,
    Vimal.

  • 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

  • Export internal table to memory in User Exit FM

    Hi all,
    My scenario here is to export an internal table in one user exit FM and import it back in another user exit FM.
    I was trying to use
    Export lt_table to memory id 'LABEL'.
    then
    Import lt_table from memory id 'LABEL'.
    But then i hit error in the import statement. How can I rectify this?
    Thanks. Answer will be rewarded.

    Refer to the below related threads
    Export an internal table to memory and import from memory into an internal
    http://help.sap.com/saphelp_erp2005/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Santosh

Maybe you are looking for

  • Is there a way to have iPhoto NOT use the Photo Library on the Main drive?

    I have thousands of pictures going waaay back to when iPhoto first came out. Most are on disc and on backup drives. I want to use the external drives to work from, within iPhoto. Is this possible? I just got a Mac Mini and since i have a lot of exter

  • BOM explosion in Sales order with material variants

    Dear all, we would like to work with Variant Matching in the Sales Order. Additionaly we would like to explode the BOM....according to the SAP help this is not possible.... http://help.sap.com/erp2005_ehp_06/helpdata/en/bd/05a7d69d3211d190380000e8a49

  • Need full resolution HDMI audio and 2 CH optical simultaneously

    Am working on an install for a customer who has a Mac Mini.  He is running XBMC for all his movies.  I need to run HDMI to his surround processor with full resolution audio while running the optical out in 2 channel pcm for his whole house audio.  Is

  • Acrobat adds extra page

    When scanning from a Fujitsu scanner, using the color document option in Acrobat 9.1.3, Acrobat adds and extra page between scanned pages so instead of getting say a 3 page document I end up with 6.  It works normally using a black and white document

  • Pax Titanium HD V1.50

    ?Pax Titanium HD V.50 ? Creative all rights be long to Creative and logos. Creative giving me there writing persimmon by Robert McClelland. PAX related logos and software and drivers are own by PAX ? - Please don't remod my work with out permission y