Send Internal table to mail with Colman name

Hi,
how can i send the content of internal table to mail ,
i try to convert to HTML and send it but the problem is that i don't get the column name ,
there is another way to send the IT with the column name ?
any e.g will help i am stuck ....
Regards

you can use upto here..and then you can send html table as attachement in  the mail
DATA:
t_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE,
" Html Table
*- Declare Internal table and Fieldcatalog
it_fcat TYPE lvc_t_fcat WITH HEADER LINE." Fieldcatalog
DATA: i_table TYPE REF TO data,
wa_line TYPE REF TO data.
FIELD-SYMBOLS: <fs_tab> TYPE STANDARD TABLE,
<fs_wa> TYPE ANY.
DATA:
v_lines TYPE i,
v_field(40).
*-Fieldsymbols
FIELD-SYMBOLS: <fs> TYPE ANY.
PARAMETERS: p_table(30) TYPE c.
* S T A R T - O F - S E L E C T I O N
START-OF-SELECTION.
*-Populate the Fieldcatalog
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_table
CHANGING
ct_fieldcat = it_fcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
* Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
  EXPORTING
    it_fieldcatalog = it_fcat[]
  IMPORTING
    ep_table = i_table.
ASSIGN i_table->* TO <fs_tab>.
* Create dynamic work area and assign to FS
CREATE DATA wa_line LIKE LINE OF <fs_tab>.
ASSIGN wa_line->* TO <fs_wa>.
SELECT *
FROM (p_table)
INTO TABLE <fs_tab>
UP TO 20 ROWS.
* E N D - O F - S E L E C T I O N
END-OF-SELECTION.
*-Fill the Column headings and cell properties
DELETE it_fcat WHERE fieldname = 'MANDT'.
t_html-line = '<html>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<td><h1>DB Details</h1></td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<table border = "1">'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate HTML columns from Filedcatalog
LOOP AT it_fcat.
CONCATENATE '<th bgcolor = "green" fgcolor = "black">'
it_fcat-scrtext_l
'</th>' INTO t_html-line.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
DESCRIBE TABLE it_fcat LINES v_lines.
*-Populate HTML table from Internal table data
LOOP AT <fs_tab> ASSIGNING <fs_wa>.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate entire row of HTML table
DO v_lines TIMES.
READ TABLE it_fcat INDEX sy-index.
CONCATENATE '<FS_WA>-' it_fcat-fieldname INTO v_field.
ASSIGN (v_field) TO <fs>.
t_html-line = '<td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = <fs>.
APPEND t_html.
CLEAR t_html.
t_html-line = '</td>'.
APPEND t_html.
CLEAR t_html.
CLEAR v_field.
UNASSIGN <fs>.
ENDDO.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</table>'.
APPEND t_html.
CLEAR t_html.

Similar Messages

  • How to declare internal table in BADI with variable name beginning with 0..

    Gurus,
    How to declare an internal table within a BADI. I have to implement a BADI UC_TASK_CUSTOM for BCS to BW load and there i have to  declare an internal table like:
    TYPES:          BEGIN OF t_cube_data,
                    0cs_version       TYPE /bi0/oics_version,
                    0sem_cgcomp       TYPE /bi0/oisem_cgcomp,
                    bcs_vers          TYPE /bic/oibcs_vers,
                    bcs_lcus          TYPE /bic/oibcs_lcus,
                    bcs_ldch          TYPE /bic/oibcs_ldch,
                    bcs_invcom       TYPE /bi0/oibcs_invcom,
                    bcs_litem         TYPE /bic/oibcs_litem,
                    bcs_llob          TYPE /bic/oibcs_llob,
                    bcs_lmay          TYPE /bic/oibcs_lmay,
                    0move_type        TYPE /bi0/oimove_type,
                    pcompany         TYPE /bi0/oipcompany,
                    bcs_lprg          TYPE /bic/oibcs_lprg,
                    figlxref3         TYPE /bic/oifiglxref3,
                    fiscyear         TYPE /bi0/oifiscyear,
                    fiscper3         TYPE /bi0/oifiscper3,
                    fiscvarnt        TYPE /bi0/oifiscvarnt,
                    curkey_gc        TYPE /bi0/oicurkey_gc,
                    unit             TYPE /bi0/oiunit,
                    cs_trn_gc        TYPE /bi0/oics_trn_gc,
                    cs_trn_qty       TYPE /bi0/oics_trn_qty,
              END OF t_cube_data
    But with this declaration it gives a error saying that u cannot have a variable beginning with 0...like 0cs_version....
    but i have to do it for my functionality to wrk...
    Please help me do it....
    how can i declare a internal table that allows me to have variable names that start with 0....
    Please help....Its URGENT....
    Thanks
    Sam

    Murali,
    I need to have 0 before the variable name in the declaration of the internal table....how can i attain that....
    Please suggest...
    Thanks
    Sam

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            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.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • Mail in Mavericks not replacing existing mail with same name

    Mail in Mavericks not replacing existing mail with same name.
    Thanks

    I have the same situation as you - sending out pdfs of designed pages and wanting to overwrite them continually. It used to happen on an older version of Mail, then it disappeared and now it's back with the latest version.
    It's more than annoying, it's downright driving me nuts. In the last hour I had to quit Mail seven times.
    Please send a fix for this Apple.

  • I'm trying to unlock an Iphone 4. The celular company allready unlocked it. and send me an E Mail with the instructions to do it myself. I have done every step, and in itunes apears that my Iphone is Unlocked. But I can not use a sim CArd from another Co

    Im tying to unlock an Iphone 4.
    the celular company make it by its system, and send me an E mail with the instructions to finsh the process by myself, throug itunes.
    I did every step, and at the end appers a message telling that my Iphone is unlocked.
    but it does not work with other celular company sim card.
    It only works with the original sim Card company.
    In the Iphone appears a message teeling that has no service with another company's sim CArd.
    I don't know what to do.
    I've been doing this, with different Sim cards.
    sometimes appears a message informing that the SIM card is locked with a PIN. That i must instal the last itunes version and connect it again.
    but every Sim card I have are with PIN.
    If you can help me I;ll be very glad.
    Thank you very Much.
    nicanorfrommon

    Chrisj4203, thank you for your kind answer.
    I have done a lot of restores to the Iphone, and resets also.
    I;ve done holding both buttons as you sugested, but there is no signal appearing.
    I am in Uruguay, South America and the original company is Movistar ( Telefonica) and the new sim card is from ANTEL ( the officail and biggest company in my country).
    I don;t knoe what todo.
    I have been trying for more than one mont.
    I have gone several times to both companies. Aldo two times to Apple uruguay, and nobody can help me.

  • How do I stop  my mail from send out my e-mails with the mobile me acct instead of my default provider?  I have checked the "use only this server" in my provider account.

    How do I stop  my mail from send out my e-mails with the mobile me acct instead of my default provider?  I have checked the "use only this server" in my provider account.

    There is no such option/setting on an iPhone to determine this. Whether you can view the attachment has more to do with your connection, WiFi or cellular, and the size of the attachment than anything else. There will be a paperclip indicating the message includes an attachment regardless if downloaded with the message or not. When connected to the cellular network, if an attachment is below a designated size the attachment will be downloaded automatically. If over a certain size, you must select the attached file icon in the body of the message to download the attachment. The size limit varies by carrier/provider.
    Tell her you're gonna leave her out of the Will if she doesn't stop .

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

  • Error to send a report via mail with BI Publisher

    Hello,
    I am working with BIP 10.1.3.4 over Windows Server 2003 Standard Edition, and I would like to send a report via mail.
    I added one Email server navigation via Admin>Delivery Configuration > Email with the server name and host.
    Then Send report via Email, got error.
    oracle.apps.xdo.service.delivery.DeliveryException: oracle.apps.xdo.delivery.DeliveryException: smtp
         at oracle.apps.xdo.service.delivery.impl.DeliveryServiceImpl.deliverToEmail(DeliveryServiceImpl.java:228)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.deliver(XDOJob.java:1190)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.execute(XDOJob.java:478)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    Caused by: oracle.apps.xdo.delivery.DeliveryException: smtp
         at oracle.apps.xdo.delivery.smtp.SMTPDeliveryRequestHandler.submitRequest(Unknown Source)
         at oracle.apps.xdo.delivery.AbstractDeliveryRequest.submit(Unknown Source)
         at oracle.apps.xdo.service.delivery.impl.DeliveryServiceImpl.deliverToEmail(DeliveryServiceImpl.java:222)
         ... 4 more
    Caused by: javax.mail.NoSuchProviderException: smtp
         at javax.mail.Session.getService(Session.java:764)
         at javax.mail.Session.getTransport(Session.java:689)
         at javax.mail.Session.getTransport(Session.java:632)
         at javax.mail.Session.getTransport(Session.java:612)
         ... 7 more
    I have followed this SR, and I applied the solution, but it isn't solved the issue (ID: 1072742.1)
    https://support.oracle.com/CSP/ui/flash.html#tab=KBHome%28page=KBHome&id=%28%29%29,%28page=KBNavigator&id=%28from=BOOKMARK&viewingMode=1143&bmDocTitle=BI%20Publisher%20With%20JDE%20Fails%20To%20Send%20Email,%20Error:%20javax.mail.NoSuchProviderException:&bmDocID=1072742.1&bmDocType=PROBLEM&bmDocDsrc=KB%29%29
    Regards,
    Mónica.

    Hi Christian.
    You could put the lines of your list in a table of type SOLISTI1 and then use the function module SO_NEW_DOCUMENT_SEND_API1 to send the content of this table. You have to fill the table RECEIVERS with the address you want to send the report to.
    Hope that helps,
    Timo.

  • Send internal table to pdf and then email.

    hi experts.
    i want to send my alv data or any other data like internal table in pdf through email.
    anybody help me out plz.

    Hi Harris,
    You got to use two FMs to achieve this.
    First one to get the contents in to an internal table
    Second one to send an e-mail with the content selected already.
    So, better search SDN to get more info...

  • Sending internal table data to application server as an XML file

    Hi All,
    I am trying to send the internal table data to application server which should be stored in XML format.
    I am using the following code:
    DATA:
              result TYPE xstring.
            CALL TRANSFORMATION id
            SOURCE tab = p_output-xsfdata
            RESULT XML result.
            OPEN DATASET l_xml_full_path FOR OUTPUT IN BINARY MODE.
            TRANSFER  result TO l_xml_full_path.
            CLOSE DATASET l_xml_full_path.
    And the content in the internal table is :
    3C3F786D6C2076657273696F6E3D22312E30223F3E3C736620786D6C6E733D2275726E3A736
    73796D206E616D653D22534653592D44415445223E30362F31302F323030393C2F73796D3E2
    50617961626C653C6E65772D6C696E652F3E50617274206F6620746865204E616D653C6E657
    .......and so on
    With this a file is getting created on the application server, but the data is not correct. I am getting the data something like:
    <?xml version="1.0" encoding="utf-8"?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><TAB><item>
    PD94bWwgdmVyc2lvbj0iMS4wIj8+PHNmIHhtbG5zPSJ1cm46c2FwLWNv
    MDA6eHNmIj48c21hcnR4c2Y+PGhlYWRlcj48Z2VuZXJhbD48dmVyc2lvbj4xLjE0LjI8L3ZlcnNp
    b24PGZvcm0WkJMX1NESU5WX0xfMzwvZm9ybT48bGFuZ3VhZ2U+RU48L2xhbmd1YWdlPjxkZXZp
    Y2UUFJJTlRFUjwvZGV2aWNlPjxvdXRwdXQtZGV2aWNlPlNYU0Y8L291dHB1dC1kZXZpY2UPC9n
    ZW5lcmFsPjxwYWdlIG5hbWU9IkZJUlNUIiBpZD0iMDAxIi8PC9oZWFkZXIPGRhdGEgeG1sOnNw
    YWNlPSJwcmVzZXJ2ZSIgc3R5bGU9Ii9TTUIxMS9CTF9TRiI+PGdyYXBoaWNzIG5hbWU9IkNPTUxP
    R08iIG9iam5hbWU9Ii9TTUI0MC9MRUFGIiBvYmplY3Q9IkdSQVBISUNTIiBpZD0iQk1BUCIgdHlw
    ZT0iQkNPTCIgcGFnZT0iRklSU1QiIHBhZ2UtaWQ9IjAwMSIgcmVzb2x1dGlvbj0iMDEwMCIvPjx3
    aW5kb3cgbmFtZT0iU0VOREVSIiBwYWdlPSJGSVJTVCIgcGFnZS1pZD0iMDAxIj48dGV4dCBuYW1l
    PSJDT01BRERSIiBzdHlsZT0iL1NNQjExL0JMX1NGIiBvYmpuYW1lPSIvU01CMTEvQkxfU0VOREVS
    IiBsYW5nPSJFTiIPHAgbmFtZT0iWlMiPkJhc2VsaW5lIENvbXBhbnk8L3APHAgbmFtZT0iWlMi
    PjM0NzUgRGVlciBDcmVlazx0YWIvPlBob25lOjx0YWIvPisxICg2NTApIDg0OS00MDAwPC9wPjxw
    IG5hbWU9IlpTIj5QYWxvIEFsdG8sIENBIDk0MzA0PHRhYi8+RmF4Ojx0YWIvPisxICg2NTApIDg0
    OS00MjAwPC9wPjxwIG5hbWU9IlpTIj5VU0E8dGFiLz5JbnRlcm5ldDo8dGFiLz5odHRwOi8vd3d3
    LnNhcC5jb208L3A+PC90ZXh0Pjwvd2luZG93Pjx3aW5kb3cgbmFtZT0iUEFHRSIgcGFnZT0iRklS
    U1QiIHBhZ2UtaWQ9IjAwMSI+PHRleHQgbmFtZT0iUEFHRU5VTUJFUiIgc3R5bGU9Ii9TTUIxMS9C
    TF9TRiIgbGFuZz0iRU4iPjxwIG5hbWU9IlROIj5QYWdlIDxzeW0gbmFtZT0iU0ZTWS1QQUdFIj4x
    PC9zeW0IG9mIDxzeW0gbmFtZT0iU0ZTWS1KT0JQQUdFUyIvPjwvcD48cCBuYW1lPSJUTiIPA==</item>
    <item>c3ltIG5hbWU9IlNGU1ktREFURSI+MDYvMTAvMjAwOTwvc3ltPiA8c
    RSIMTQ6MDg6MDM8L3N5bT48L3APC90ZXh0Pjwvd2luZG93Pjx3aW5kb3cgbmFtZT0iTkFNRSIg
    cGFnZT0iRklSU1QiIHBhZ2UtaWQ9IjAwMSI+PHRleHQgbmFtZT0iRk9STVVMQVJUSVRFTCIgc3R5
    bGU9Ii9TTUIxMS9CTF9TRiIgbGFuZz0iRU4iPjxwIG5hbWU9IlROIj48Y2hyIG5hbWU9Ik1MIj48
    c3ltIG5hbWU9IlRJVExFIj5JbnZvaWNlPC9zeW0PC9jaHIPC9wPjwvdGV4dD48L3dpbmRvdz48
    d2luZG93IG5hbWU9IkJJTExUT1BBUlRZIiBwYWdlPSJGSVJTVCIgcGFnZS1pZD0iMDAxIj48dGV4
    dCBuYW1lPSJXSU5ET1dfVEVYVCIgc3R5bGU9Ii9TTUIxMS9CTF9TRiIgbGFuZz0iRU4iPjxwIG5h
    bWU9IlRIIj5CaWxsLVRvLVBhcnR5PC9wPjwvdGV4dD48YWRkcmVzcyBuYW1lPSJCSUxMQUREUkVT
    UyIgYWRkcm51bWJlcj0iMDAwMDAyMjQyNyI+PHRleHQgbmFtZT0iQklMTEFERFJFU1MiIHN0eWxl
    PSIvU01CMTEvQkxfU0YiIGxhbmc9IkVOIj48cCBuYW1lPSJUMiI+VGVjaCBJbmM8bmV3LWxpbmUv
    Could anyone tell me the reason why am I getting the data in this way?
    Thanks in advance,
    Swapna.
    Edited by: NagaSwapna Thota on Jun 10, 2009 5:44 PM

    HI,
    Use this FM SAP_CONVERT_TO_XML_FORMAT to convert the data to XML format and then upload the convert data from the internal table to Application server.

  • How to send Internal table records to Idoc Inbound posting FM to create Ido

    Hello Experts,
    I have all the data necessary to create shipments in one internal table inside my ABAP program.
    I can use BAPI_SHIPMENT_CREATE to create shipments. But associated with this BAPi there is one ALE message type SHIPMENT_CREATEFROMDATA. Now my requirement is to use this message type to cretae my shipments via idocs for one scenario for some of the records in the internal table.
    For this message type, I got the inbound function module IDOC_INPUT_SHIPMENT_CREATEFROM from TBDBE table.
    Can anybody please let me know how to send the data from the internal table to this inbound function  module?
    Becasue it has mandatory parameters INPUT_METHOD, MASS_PROCESSING. What values should be passed to these parameters if the data has to be sent to this function module?
    Regards.

    Hi Ravikanth,
    Thankyou very much for your quick reply.
    So If I split my internal table data and populate IDOC_DATA and IDOC_CONTROL and pass to the inbound function module directly in my ABAP program, will that be going to create idocs and post shipments?
    I mean is it enough to call the Inbound posting function module directly in my ABAP program or any other FMs to be called to take care of ALE settings and shipment creation?
    Please confirm.
    REgards.

  • Download internal table to excel with header

    Hi All,
    I have a requirement to download internal table contents to excel with field headings. I tried searching in forums before posting but didn't got much help.
    I have used GUI_DOWNLOAD, WS_DOWNLOAD and EXCEL_OLE_STANDARD_DAT.
    But unable to download the header in excel..along with data...
    EXCEL_OLE_STANDARD_DAT is getting field header in excel but not downloading automatically , need to save manually which is not the requirement.
    The data is huge with around 151 columns....I got 2 internal tables.
    One for the data and the other with field names.
    Many Thanks,
    Ravi K

    Hi Ravi,
    You need to have 2 different internal tables for achieving the needful. One internal table would be having your data and another would store your table field names i.e., declare a structure of length 100 characters,
    TYPES : BEGIN OF GTY_FIELDNAMES,
                    TITLE(100),
                  END   OF GTY_FIELDNAMES.
    DATA: GIT_FIELDNAMES TYPE STANDARD TABLE OF GTY_FIELDNAMES,
                GWA_FIELDNAMES TYPE GTY_FIELDNAMES.
    DATA : GD_FILENAME TYPE STRING,
                GD_PATH     TYPE STRING,
                GD_FULLPATH TYPE STRING,
                GD_RESULT   TYPE I.
    Now have a subroutine where by you append your headings into the internal table i.e.,GIT_FIELDNAMES
       CLEAR GWA_FIELDNAMES.
       GWA_FIELDNAMES-TITLE = 'Material Number'.
       APPEND GWA_FIELDNAMES TO GIT_FIELDNAMES.
       CLEAR GWA_FIELDNAMES.
       GWA_FIELDNAMES-TITLE = 'Material Description'.
       APPEND GWA_FIELDNAMES TO GIT_FIELDNAMES.
    Once you are done with it you can call up the save dialog
    * Display save dialog window
       CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
         EXPORTING
           WINDOW_TITLE           = 'Save File As...'
           DEFAULT_EXTENSION  = 'XLS'
           DEFAULT_FILE_NAME  = 'SalesPlan'
           INITIAL_DIRECTORY      = 'C:\'
         CHANGING
           FILENAME                      = GD_FILENAME
           PATH                               = GD_PATH
           FULLPATH                      = GD_FULLPATH
           USER_ACTION               = GD_RESULT.
    * Check user did not cancel request
       CHECK GD_RESULT EQ '0'.
       CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
           FILENAME              = GD_FULLPATH
           FILETYPE                = 'ASC'
    *     APPEND                = 'X'
           WRITE_FIELD_SEPARATOR = 'X'
    *     CONFIRM_OVERWRITE     = 'X'
         TABLES
           DATA_TAB                 = GIT_FINAL                  " Internal table having data
           FIELDNAMES            = GIT_FIELDNAMES     " Internal table having headings
         EXCEPTIONS
           FILE_OPEN_ERROR       = 1                         "#EC ARGCHECKED
           FILE_WRITE_ERROR      = 2
           OTHERS                           = 3.
    Hope this gets sorted your problem.
    Thanks & Regards,
    Varun Kumar Sahu

  • How to populate dynamic internal table according to the field names

    Hi ,
          Iam having a dynamic internal table <DYN_TABLE> , it has fields like
    MATNR   MAKTX       MEINS    BISMT     MTART  ...
    Now my requirement is i need to fill them according to the fieldname from another internal table (static) .
    The order of  internal table (static) and dynamic internal are not same. 
    kindly help me.

    Hi,
    Here is the code. Please reward points if helpful.
    REPORT z_dynamic.
    TYPE-POOLS : abap.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>,
                   <dyn_field>.
    DATA: dy_table TYPE REF TO data,
          dy_line  TYPE REF TO data,
          xfc TYPE lvc_s_fcat,
          ifc TYPE lvc_t_fcat.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_table(30) TYPE c DEFAULT 'T001'.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      PERFORM get_structure.
      PERFORM create_dynamic_itab.
      PERFORM get_data.
      PERFORM write_out.
    *&      Form  get_structure
          text
    FORM get_structure.
      DATA : idetails TYPE abap_compdescr_tab,
             xdetails TYPE abap_compdescr.
      DATA : ref_table_des TYPE REF TO cl_abap_structdescr.
    Get the structure of the table.
      ref_table_des ?=
          cl_abap_typedescr=>describe_by_name( p_table ).
      idetails[] = ref_table_des->components[].
      LOOP AT idetails INTO xdetails.
        CLEAR xfc.
        xfc-fieldname = xdetails-name .
        xfc-datatype = xdetails-type_kind.
        xfc-inttype = xdetails-type_kind.
        xfc-intlen = xdetails-length.
        xfc-decimals = xdetails-decimals.
        APPEND xfc TO ifc.
      ENDLOOP.
    ENDFORM.                    "get_structure
    *&      Form  create_dynamic_itab
          text
    FORM create_dynamic_itab.
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = ifc
        IMPORTING
          ep_table        = dy_table.
      ASSIGN dy_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    ENDFORM.                    "create_dynamic_itab
    *&      Form  get_data
          text
    FORM get_data.
    Select Data from table.
      SELECT * INTO TABLE <dyn_table>
                 FROM (p_table).
    ENDFORM.                    "get_data
    *&      Form  write_out
          text
    FORM write_out.
    Write out data from table.
      LOOP AT <dyn_table> INTO <dyn_wa>.
        DO.
          ASSIGN COMPONENT  sy-index
             OF STRUCTURE <dyn_wa> TO <dyn_field>.
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
          IF sy-index = 1.
            WRITE:/ <dyn_field>.
          ELSE.
            WRITE: <dyn_field>.
          ENDIF.
        ENDDO.
      ENDLOOP.
    ENDFORM.                    "write_out

  • Having problems with maverick and outgoing mail with domain name

    hi
    i just upgraded my operating system from mountain lion to maverick. i did a clean install on a new hard drive.
    anyways, my desktop mac mini computer using mountain lion is having no problems with my outgoing mail with my domain name.
    smtp.1and1.com
    custom port 993
    SSL
    password
    using the exact same info on my laptop with maverick
    no dice.
    mail comes in but can't email out with my domain name
    i tried  -  smtp.1and1.com:(email address)
    any suggestions
    thanks
    phil

    Hi, Phillip Chin. 
    Thank you for the question.  The article below will help you troubleshoot the issue that you are experiencing with mail.
    OS X Mail: Troubleshooting sending and receiving email messages
    http://support.apple.com/kb/ts3276
    Cheers,
    Jason H.

  • Internal Table to Excel with Column Header line

    Hello everyone,
    I need to download Internal table data to excel with a column header line.
    My Code is as follows:
    TYPES:  BEGIN OF y_hdr,
            head(30) TYPE c,
            END OF y_hdr.
    Data:  t_hdr TYPE STANDARD TABLE OF y_hdr.
    Fill internal table t_adrcdata
    fill the header table t_hdr
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename                      = C:\test.xls
            filetype                        = 'DBF'
        IMPORTING
          TABLES
            data_tab                        =  t_adrcdata
           fieldnames                       =  t_hdr
         EXCEPTIONS
           file_write_error                = 1
           no_batch                        = 2
    This code gives me a row with column headers.
    However they are all truncated after 10 chars.
    The truncation is independent of column data length. Data could be of length 2,5 or 40 but the header always displays upto 10 chars.
    Keeping the filename as test.xls, when I download it in ASC format instead of DBF the headers are of proper length.
    What could I be doing wrong?
    I know this topic has been discussed before but my question is pertaining to DBF Format download. The reason I chose DBF format is because it downloads the data in DB format and does not give in to Excel formatting.
    FOr example in ASC format:
    1, A field of type Char(12) used to get downloaded into excel without the leading zeros. 000012345678 --> 12345678
    2. Date in format dd-MMM-yyyy in a char(11) field used to get downloaded to excel in dd-MMM-yy format.
    When I chose DBF, this issue was resolved. However, the column headers got truncated at 10 chars.
    Please feel free to recommend any other way of downloading to Excel and preserving format if this method is incorrect/ there is a better way.

    Hi,
    Take 'ASC' format for file type.
    But when you declare your internal table to pass for FM you have to create all the fields with char.
    Example:
    data: begin of it_exl occurs 0,
            bukrs(04) type c,
            belnr(10) type c,
            buzei(03) type c,
    end of ut_exl.
    You need to manipulate your date format and other stuff before appending to this internal table.
    Thanks,
    Deepak.

Maybe you are looking for

  • External  Hard Drive stuck on Read Only

    I just moved an external hard drive that had been attached to a Vista PC over to my Mac. However, I can't edit anything on the disk from my Mac, because it's in Read Only mode. I'm sure Vista set some sort of security on it, but from Vista I gave eve

  • AMD Switchable Graphics crashing Illustrator CC 2014

    I have recently updated Illustrator to CC 2014 and I am unable to open any files or create new ones since then. It says the graphic card is not supported, however, it was supported and fully working in Illustrator CC Here's the system info: Component

  • Changing the ID on Photoshop Elements 10 and 9.

    Even tho' I use the Photoshop Elements 11 the most I still use the 10 and 9 and need to change the ID on both of them. Can someone help me?? I really need to use them since I only have the Revel on the min mode? HELP please!

  • Change keyboard shortcuts, e.g. command-tab to control-tab

    Any utilities for changing OS X keyboard shortcuts listed in http://support.apple.com/kb/ht1343 such as  control-tab  rather than  command-tab  for  'Switch application–cycle forward'  ? (Not the same as swapping  control  key for  command key)

  • Hide column until you select drill down to see details.

    I am relatively new to SSRS, so please excuse my ignorance. I am using Visual Studio 2012 and the Business Intelligence templates to build a report.  I currently have a report thats grouped on Doctor and in my tablix I have various columns selected.