How to send html in an email (46C) using SO_NEW_DOCUMENT_SEND_API1

I am having trouble sending an email so that it appears in HTML format, nice and pretty.  I have been experimenting with FM SO_NEW_DOCUMENT_SEND_API1 and ATTSEND_API1.  I have been able to successfully send an email to myself (using an email address outside of SAP), but all I see is the html source code.   If I set the DOC_TYP to "HTM", I get the error "Message cannot be processed as it cannot be converted.".  Below is my sample code.   Has anyone been able to do this in 46C ?
Thanks,  Mark
REPORT ZYR_EMAIL_TEST1 .
* SAP 46C
data: maildata   type sodocchgi1,
      mailhdr    type table of solisti1    with header line,
      mailtxt    type table of solisti1    with header line,
      mailbin    type table of solisti1    with header line,
      mailpack   type table of sopcklsti1  with header line,
      mailrec    type table of somlreci1   with header line,
      tab_lines  type i.
define bld_txt.
     clear mailtxt.
     mailtxt = &1.
     append mailtxt.
end-of-definition.
define bld_bin.
     clear mailbin.
     mailbin = &1.
     append mailbin.
end-of-definition.
start-of-selection.
  clear:    maildata, mailhdr, mailtxt,  mailbin, mailrec, tab_lines.
  refresh:  mailhdr, mailtxt, mailbin, mailrec.
  perform build_header.
  perform build_message.
  perform build_pack_list.
  perform build_receivers.
  perform send_mail_nodialog..
* Use form initiate_mail_execute_program OR process
* with txn SCOT.  Check status of mail with txn SOST.
*  perform initiate_mail_execute_program.
  write: / 'End of program.'.
*      Form  BUILD_HEADER
form build_header.
  maildata-obj_name   = 'Email_Name'.
  maildata-obj_descr  = 'Email_Description'.
*  maildata-obj_langu  =
*  maildata-obj_sort   =
  mailhdr  = 'MYTEST.HTM'.
  append mailhdr.
endform.
*      Form  BUILD_MESSAGE
form build_message.
  bld_txt '<html>'.
  bld_txt '<head>'.
  bld_txt '<title>Untitled Document</title>'.
  bld_txt '<meta http-equiv="Content-Type" content="text/html;'.
  bld_txt 'charset=iso-8859-1">'.
  bld_txt '</head>'.
  bld_txt '<body>'.
  bld_txt '<div align="center"><em><font' .
  bld_txt 'color="#0000FF" size="+7" face="Arial,'.
  bld_txt 'Helvetica, sans-serif">THIS'.
  bld_txt '  IS A TEST </font></em><br><font' .
  bld_txt 'color="#0000FF" size="+7" face="Arial,'.
  bld_txt 'Helvetica, sans-serif">Yahoo</font>'.
  bld_txt '</div>'.
  bld_txt '</body>'.
  bld_txt '</html>'.
* Doc_Size is length of last line + ( nbr of other lines x 255 ).
  describe table mailtxt lines tab_lines.
  read     table mailtxt index tab_lines.
  maildata-doc_size = ( ( tab_lines - 1 ) * 255 ) + strlen( mailtxt ).
endform.
*      Form  BUILD_PACK_LIST
form build_pack_list.
  clear mailpack.
  refresh mailpack.
*  mailpack-transf_bin = 'X'.
  mailpack-head_start = 1.
  mailpack-head_num = 0.
  mailpack-body_start = 1.
  describe table mailtxt lines tab_lines.
  mailpack-body_num = tab_lines.
  mailpack-doc_type = 'HTM'.
  append mailpack.
endform.
*      Form  BUILD_RECEIVERS
form build_receivers.
  mailrec-receiver  = '[email protected]'.
  mailrec-rec_type  = 'U'.
  mailrec-com_type = 'INT'.
  append mailrec.
endform.
*      Form  SEND_MAIL
form send_mail.
  call function 'SO_NEW_DOCUMENT_SEND_API1'
       exporting
            document_type              = 'HTM'
            document_data              = maildata
*           put_in_outbox              = ' '
       tables
            object_header              = mailhdr
            object_content             = mailtxt
            receivers                  = mailrec
       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 <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    write: / 'There was error.  sy-subrc = ', sy-subrc.
  endif.
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.

Yes, the OBJ_HTM function exists.  I found these also, that exist on our system.
SX_OBJECT_CONVERT        
SX_OBJECT_CONVERT_ALI_HTM
SX_OBJECT_CONVERT_ALI_PRT
SX_OBJECT_CONVERT_ALI_RAW
SX_OBJECT_CONVERT_ALI_TXT
SX_OBJECT_CONVERT_INT_RAW
SX_OBJECT_CONVERT_OBJ_HTM
SX_OBJECT_CONVERT_OBJ_R3O
SX_OBJECT_CONVERT_OTF_PDF
SX_OBJECT_CONVERT_OTF_PRT
SX_OBJECT_CONVERT_OTF_RAW
SX_OBJECT_CONVERT_RAW_SCR
SX_OBJECT_CONVERT_RAW_TXT
SX_OBJECT_CONVERT_SCR_OTF
SX_OBJECT_CONVERT_TO_AFX 
SX_OBJECT_CONVERT_TXT_INT
And these are the entries I see in the SXCONVERT table:
SX_OBJECT_CONVERT_ALI_HTM 
SX_OBJECT_CONVERT_ALI_PRT 
SX_OBJECT_CONVERT_ALI_RAW 
SX_OBJECT_CONVERT_ICS_RAW 
SX_OBJECT_CONVERT_INT_RAW 
SX_OBJECT_CONVERT_OBJ_HTM 
SX_OBJECT_CONVERT_OTF_PDF 
SX_OBJECT_CONVERT_OTF_PRT 
SX_OBJECT_CONVERT_OTF_RAW 
SX_OBJECT_CONVERT_RAW_SCR 
SX_OBJECT_CONVERT_RAW_TXT 
SX_OBJECT_CONVERT_SCR_OTF 
SX_OBJECT_CONVERT_TXT_INT 
SX_OBJECT_CONVERT_OBJL_HTM

Similar Messages

  • How to send pdf's by email automatically using report RSTXPDF4

    Hi gurus!!
    I need some aditional information about the report RSTXPDF4 and how should we use it to send our billing documents by mail to an specific customer. We are not sure but we think that we have to create an output type which is determined automatically only for this customer and include the code to convert the spool to pdf. On the other hand we also know that we have to set the medium as 5.
    Do we have to make any aditional set up?
    Thanks in advance.

    Please check whether this link could be of helpful to you
    [How to send SAP reports in PDF format|http://searchsap.techtarget.com/tip/0,289483,sid21_gci1185359,00.html]
    thanks
    G. Lakshmipathi

  • How to send .CSV file via email in Oracle10g/11g PL/SQL

    Hi Guys,
    Can any one let me know or suggest me how to send .csv file via email attachment using Oracle PL/SQL.
    Thanks in advance!
    Regards,
    LRK

    A FAQ. Use UTL_MAIL (if attachment is 32KB less). Else use UTL_SMTP. Search this forum. Search using google.

  • How to send html email made in dreamweaver

    how to send html email made in dreamweaver

    Make sure you upload all of the images used in your email to a server you control. Then, change your image paths to point to those uploaded images with absolute links.
    You will get marked as spam if you attempt to send images as attachments to a large list of recipients and most email clients won't download images to begin with, so make sure your html email makes sense with broken pictures.
    CSS support is spotty across email clients, if you use css, make sure it's inline, not embedded in the <head> or externally linked in the <head>. Some email clients strip out the <head> section entirely.
    Basically, you need to design your html email as if you haven't moved out of the 90's yet, as far as web design is concerned, in order to get maximum cross client compatibility.
    Then, when you're ready, I would suggest using a service like www.icontact.com or www.constantcontact.com if your subscriber list is anywhere over 100 or so recipients.

  • How to send HTML page via an email

    Hi..
    I wanna send HTML page with images via an email, it should not go as an attachment.
    Is there any Tool or Software available to send HTML Pages via email.
    i just wanna send my advertisement as a HTML page via email
    So plz. help me out

    Java Message Service (JMS) For more info u can visite http://java.sun.com/products/jms/tutorial/
    It is usefull only when u r using some Application servers like WebLogic, WebSpeher, or JBoss
    Bye

  • How to send html newsletter via Mail app

    I want crystal and clear instruction as all the ones I have found either old fashioned and not relevant or skip that interesting part.
    I have already done html page (newsletter). Now I want to transform it somehow and send via Mail app so my contacts could receive it as html newsletter. If I need to attach txt message please add it to the instruction. I need complete how to send html newsletter.

    alabanco wrote:
    thanks. Now we've got to the most interesting part and intriguing one. Why should I upload html page to the server. I do understand uploading the images to server which will be used as links in my html mail. But why and how should I store that page in my server if I have CMS post instead from which I used pictures as links. SHould I create yet another type of post in CMS that is my html newsletter? That's not cool. What is the industry standard approach for that?
    By the way Mail.app uses that baby design templates for your messages. Why don't we have an option to delete all these creepy childish templates and store solid bold corporate style templates for newsletters and send it somehow? Or will it just attach the images to the message then? If so then it is not what I want and it is really depressing.
    The industry convention/"standard" is not to use html in email. Wheteher or not your html newsletter displays as you intended is at the mercy of the recipient and their email client settings.
    If you want to preserve your html layout and styles, save your newsletter as a pdf document and attach the pdf document to your email. Or, as already suggested, use a web server to serve your html newsletter.

  • How to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == This happened ==
    Every time Firefox opened
    == Always

    Check with your web mail service provider for help with that issue.

  • How to send HTML mail with images multipart/related message

    Hi,
    Could any body tell me how to send HTML mail with images in "multipart/related" message,if any body can give the code ,it would be helpful.
    Thanks

    Hi,
    Could any body tell me how to send HTML mail with
    ith images in "multipart/related" message,if any body
    can give the code ,it would be helpful.
    ThanksHi!
    Refer to
    http://developer.java.sun.com/developer/onlineTraining/JavaMail/index.html
    I've found it very helpful.
    Look at the last part for a code showing how to send HTML mail!
    Regards

  • How to send a delayed notification email?

    How to send a delayed notification email?
    I have a requirement to send an email to the service requestor 2 days after the main fulfillment task is completed.  I know I can create a task that auto-completes using the Dummy adapter, but is there a way to make it auto complete after a certain amount of time has elapsed?  I was thinking about creating a second fulfillment task that would send this email upon completion, but I can't figure out how to delay its start or its end. 

    Hi Tylor,
    James is onto a potential approach here. However, the only way I know of that could work is to use the Scheduled Start feature. This would require that you compute/project the start date of the auto-complete task before the delivery moment begins.
    You would need to do a date calculation and then store the projected date in a hidden field. You could then have your auto-complete task fire on that computed date, using the Scheduled Start feature.
    The wrinkle here, of course, is t

  • How to send active links in email from firefox

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == Operating system ==
    Windows 7

    Check with your web mail service provider for help with that issue.

  • How to send puchase report in email ?

    how to send puchase report in email ?

    Search SCN, you will get lot of post for this.
    Here is an example.
    http://scn.sap.com/thread/321890

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to send HTML DOM to Servlet?

    How to send HTML DOM to Servlet?

    What exactly you mean by sending DOM to servlet?? if you want to post the entire html to servlet use XMLHttp object and post the entire html to servlet. You can get more info on XMLHttp at microsoft's MSDN site.

  • How to send a file as an attachment using mailx

    Hi
    Can any one tel me how to send a file as an attachment using mailx command in shell script.
    Thanks,
    Suman.

    Wrong forum where to ask such questions.
    Check this one link:
    http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254

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

Maybe you are looking for

  • Decimal places in excel

    Hi,    I am sending quantity field to excel with three decimal places but when I open the excel after generating it shows only two decimal places.How can i obtain this function with excel it should show only 3 decimal places with thousand seperator.

  • How can I label the peak in the waveform graph!

    Hello, my question is a little vague. I try to narrate it clearly. Thank you for your patience! I work with Labview 7.1. At a word, My question is how to label the peaks when using the while loop and the event structure with the dobule click event! 1

  • Itunes recognizing ipod after system restore?

    I recently had to restore my computer to factory settings due to a problem with a virus. I had to reload Itunes and now it doesn't recognize my ipod. I tried taking itunes off and reinstalling it with the updated version. It gives me an error message

  • Time not disappearing when using safari and email. How do I make it go back to normal.

    My ipad has just started keeping the time and battery settings displayed all the time. Not sure why its doing this and can't Find where to turn it off in settings. Help

  • Has Adobe ended support for Photoshop CS5

    I use Secunia PSI to monitor my software for updates. Right around the time CS6 shipped, PSI started reporting all of my CS5 applications as "end of life" meaning no more patches will be released. Is it correct that CS5 is no longer supported with pa