Skip to Content
avatar image
Former Member

i want to send an internal table with html mail.

hi,

i created a fm. and i want to give an internal table to imports value. then i want to send this internal table with html mail. but how can i give internal table to fm. because data type is unknown. it can changes. please help me.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    Dec 28, 2014 at 12:20 PM

    Hi,

    I had some extra time so here it is .

    global-y_r_eitan_tests_05.txt - This go to the gloabl (support class)

    y_r_eitan_tests_05.txt - The function - generate html table and send by using cl_bcs .

    Using:

    FORM test_07 .

    DATA: it_sflight TYPE TABLE OF sflight .

    SELECT * INTO TABLE it_sflight

    FROM sflight

    UP TO 100 ROWS .

    DATA: it_receivers TYPE somlreci1_t .

    APPEND '<receiver mail>' TO it_receivers .

    CALL FUNCTION 'Y_R_EITAN_TESTS_05'

    EXPORTING

    i_subject = 'Hi there'

    it_receivers = it_receivers

    it_data = it_sflight.

    ENDFORM . "test_07

    Regards.


    Add comment
    10|10000 characters needed characters exceeded

  • Dec 26, 2014 at 02:50 PM

    Hi,

    You can use parameter type table .

    You can use cl_salv_ddic=>get_by_data to find out the structure of the table .

    regards.

    FUNCTION y_r_eitan_tests_05 .
    *"----------------------------------------------------------------------
    *"*"Local Interface:
    *" IMPORTING
    *" REFERENCE(IT_DATA) TYPE TABLE
    *"----------------------------------------------------------------------

    DATA: it_ddfields TYPE ddfields .
    FIELD-SYMBOLS: <st_ddfields> LIKE LINE OF it_ddfields .

    * Get DDIC Information
    CALL METHOD cl_salv_ddic=>get_by_data
    EXPORTING
    data = it_data
    RECEIVING
    t_dfies = it_ddfields.

    ENDFUNCTION.


    See http://scn.sap.com/message/14309154#14309154

    In program y_r_eitan_test_10_02

    FORM mail_1_prep_2 the use of cl_salv_ddic=>get_by_data to generate html table .


    screenshot_01.png (12.6 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      Please upload the program mention and study "FORM mail_1_prep_2"

      The program sends many types of attachments.

      "error generating the test frame"

      You cannot test this function using se37 .

      Write a program that send a table to the function.

      Regards.

  • Dec 27, 2014 at 11:01 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 26, 2014 at 02:27 PM

    Hi Burak,

    Can you provide bit more information about your requirement?

    Is the FM should work with all type of Internal Table?

    Regrads.

    Praveer.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 28, 2014 at 03:58 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded