Mail to be send with subject 250 characters - Urgent

Hi,
Can somebody pls help me with any standard function modules to send a mail with subjext greater than 250 characters.
Thnx in advance.
regards,
Leeza.

Hi please check whteher the following code helps u.
REPORT z_email_abap_report.
E-mail an Abap report                                               *
Author : Michel PIOUD                                               *
Email : [email protected]  HomePage : http://www.geocities.com/mpioud *
DATA : w_name TYPE sos04-l_adr_name.
SELECT-OPTIONS :
Recipient address
  s_name FOR w_name DEFAULT sy-uname NO INTERVALS.
START-OF-SELECTION.
E-mail Abap report
  PERFORM f_send_mail.
Form f_send_mail
FORM f_send_mail.
Data Declaration
  DATA:
    l_datum(10),
    ls_docdata    TYPE sodocchgi1,
    lt_objpack    TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
    lt_objhead    TYPE TABLE OF solisti1   WITH HEADER LINE,
    lt_objtxt     TYPE TABLE OF solisti1   WITH HEADER LINE,
    lt_objbin     TYPE TABLE OF solisti1   WITH HEADER LINE,
    lt_reclist    TYPE TABLE OF somlreci1  WITH HEADER LINE,
    lt_listobject TYPE TABLE OF abaplist   WITH HEADER LINE,
    l_tab_lines TYPE i,
    l_att_type  LIKE soodk-objtp.
  WRITE sy-datum TO l_datum.
List of Users According to Logon Date and Password Change
NOTE: Create ALI/OTF Document in Spool
  SUBMIT rsusr200 WITH valid = 'X'
                  WITH notvalid = space
                  WITH unlocked = 'X'
                  WITH locked = space
             EXPORTING LIST TO MEMORY AND RETURN.
Read list from memory into table
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = lt_listobject
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.
  IF sy-subrc <> 0.
  Error in function module &1
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
       WITH 'LIST_FROM_MEMORY'.
  ENDIF.
Because listobject is of size RAW(1000)
and objbin is of size CHAR(255) we make this table copy
  CALL FUNCTION 'TABLE_COMPRESS'
    TABLES
      in             = lt_listobject
      out            = lt_objbin
    EXCEPTIONS
      compress_error = 1
      OTHERS         = 2.
  IF sy-subrc <> 0.
  Error in function module &1
    MESSAGE ID '61' TYPE 'E' NUMBER '731'
       WITH 'TABLE_COMPRESS'.
  ENDIF.
NOTE: Creation of attachment is finished yet.
For your report, the attachment should be placed into table
objtxt for plain text or
objbin for binary content.
Now create the message and send the document.
Create Message Body
Title and Description
  ls_docdata-obj_name = 'USERS_LIST'.
  CONCATENATE 'List of Users' sy-sysid '-' l_datum          "#EC *
        INTO ls_docdata-obj_descr SEPARATED BY space.
Main Text
  lt_objtxt = 'List of Users According to Logon Date' &
              ' and Password Change'.                       "#EC *
  APPEND lt_objtxt.
Write Packing List (Main)
  DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
  READ TABLE lt_objtxt INDEX l_tab_lines.
  ls_docdata-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
  CLEAR lt_objpack-transf_bin.
  lt_objpack-head_start = 1.
  lt_objpack-head_num = 0.
  lt_objpack-body_start = 1.
  lt_objpack-body_num = l_tab_lines.
  lt_objpack-doc_type = 'RAW'.
  APPEND lt_objpack.
Create Message Attachment
Write Packing List (Attachment)
  l_att_type = 'ALI'.
  DESCRIBE TABLE lt_objbin LINES l_tab_lines.
  READ TABLE lt_objbin INDEX l_tab_lines.
  lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objbin ).
  lt_objpack-transf_bin = 'X'.
  lt_objpack-head_start = 1.
  lt_objpack-head_num = 0.
  lt_objpack-body_start = 1.
  lt_objpack-body_num = l_tab_lines.
  lt_objpack-doc_type = l_att_type.
  lt_objpack-obj_name = 'ATTACHMENT'.
  lt_objpack-obj_descr = 'List_of_Users'.                   "#EC *
  APPEND lt_objpack.
Create receiver list
  LOOP AT s_name.
    lt_reclist-receiver = s_name-low.
    lt_reclist-rec_type = 'B'.
    APPEND lt_reclist.
  ENDLOOP.
Send Message
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = ls_docdata
      put_in_outbox              = ''
    TABLES
      packing_list               = lt_objpack
      object_header              = lt_objhead
      contents_bin               = lt_objbin
      contents_txt               = lt_objtxt
      receivers                  = lt_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 = 0.
  Document sent
    MESSAGE ID 'SO' TYPE 'S' NUMBER '022'.
  ELSE.
  Document <&> could not be sent
    MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
       WITH ls_docdata-obj_name.
  ENDIF.
ENDFORM.
Satish

Similar Messages

  • CFMAIL (CF5) sends with many corrupted characters

    I'm maintaining a system that sends out email mailings. The
    same server hosts some Cf applications that also send out some
    mails every once in a while. It has been working fine for a long
    time. However, in the past few weeks, the server started sending
    out the emails with many corrupted characters in them.
    There is no error in the logfiles or something, but it seems
    like when CF gets too busy sending emails, it starts sending memory
    dumps in the mail or so.
    What happens exactly is this. I send out mailings to about
    10.000 people. It loops over a query that gets these people and
    sends out one mail for every 100 persons with the code:
    <CFMAIL from="#attributes.from#" to="#attributes.to#"
    bcc="#attributes.addresses#" subject="#attributes.subject#"
    type="HTML">
    #mailcontent#
    </CFMAIL>
    the attribute 'addresses' contains a list of a 100 email
    addresses.
    In many cases, this works fine. Only when the server appears
    to be quite busy, it sometimes sends out the mails like the example
    below.
    CF-SERVER-02 ˆo
    ¸o
    èo
    €o
    H€o
    CF-SERVEx€o
    ¨€o
    ؀o
    o
    8o
    ho
    CF-SERVER-02 ˜o
    ȁo
    øo
    (‚o
    X‚o
    CF-SERVER-02 ˆ‚o
    ¸‚o
    è‚o
    ƒo
    Hƒo
    n tcp xƒo
    ¨ƒo
    ؃o
    tcp np „o
    Dƒo
    lpc 4%õ x„o
    ,‹o
    @ ¨Åe 4¹ÿ
    ´u ú
    ‘1 p
    ¸M_ÿÿÿÿ¸M_ì„o
    @ ¨Åe 4¹ÿ
    ´ £ (×¢ß äp
    ¸M_ÿÿÿÿ¸M_ìŠo
    @ ¨Åe 4¹ÿ
    4£ ;×8¡ß T
    p
    ¸M_ÿÿÿÿ¸M_¬„o
    @ ¨Åe 4¹ÿ
    4£ Kׄªß 4 5
    ¸M_ÿÿÿÿ¸M_,…o
    @ ¨Åe 4¹ÿ
    ´‰£
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
    Transitional//EN">
    <HTML>
    </HTML>
    ƒo
    Hƒo
    n tcp xƒo
    ¨ƒo
    ؃o
    tcp np „o
    Dƒo
    lpc 4%õ x„o
    ,‹o
    @ ¨Åe 4¹ÿ
    ´u ú
    ‘1 p
    ¸M_ÿÿÿÿ¸M_ì„o
    @ ¨Åe 4¹ÿ
    ´ £ (×¢ß äp
    ¸M_ÿÿÿÿ¸M_ìŠo
    @ ¨Åe 4¹ÿ
    4£ ;×8¡ß T
    p
    ¸M_ÿÿÿÿ¸M_¬„o
    @ ¨Åe 4¹ÿ
    4£ Kׄªß 4 5
    ¸M_ÿÿÿÿ¸M_,…o
    @ ¨Åe 4¹ÿ
    ´‰£
    The code between the HTML tags is exactly as it should be ,
    only mailclients don't understand this anymore and show the
    complete HTML code as a text message.
    This happens when I send out HTML mails, but when sending
    text-emails, the very same happens sometimes.
    It's running on CF5 on win2k.
    I really hope that somebody can help me out!

    In iTunes, select your Music Library (the first entry at the top left in the side bar)
    Press cmd & A keys (Select All)
    In the menu bar, go to Advanced > Convert ID3 tags. Click on "None" to reveal the choices available and choose version 2.4, then on click OK.
    Note: this will not repair damaged accented characters on songs you have already played since updating to iTunes 7.7. You should correct these before updating the tags.

  • Mail from no sender with no topic and no message

    For the past month or so I have been getting messages from no sender, with no subject line and no content.
    Does anyone know what this is and how I can stop it?
    Thanks,
    Ivan

    Hi Ivan,
    It's some problem outside of your control most likely, I've seen a few myself as well as other reports of this. I get a few mails not even addressed to me.
    You can make a Rule that if From does not contain @, them move to trash.
    Still, if you think it may be an issue on your end, this can fix myriad Mail problems...
    Safe Boot from the HD, (holding Shift key down at bootup), it will try to repair your Disk Directory while the spinning radian is happening, so let it go, run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move these folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.
    One other possibility... did you show long Headers, is there any info there?

  • Mail hanging during send with large attachments

    Have been having this problem off and on since upgrading to Lion.  When sending an email with a fairly large attachment (say, 6mb), Mail will just hang and never complete the send.  My only work around is to delete the message from my outbox, shut down Mail and then resend the message through another client.
    My mail data is hosted by Rackspace on Exchange Server.  I can send the same message that hangs up in Mail via Rackspace's webmail app with no problem, so it's not a problem with my upload speed.  I can also avoid this problem by using Outlook as the client, but I'd really prefer to use Mail. It's as if Mail just loses contact with the server and keeps trying to reestablish. 
    Are there any known issues with Lion and Rackspace's Exchange hosing?

    Hi,
    "embedded jpegs" is not good terminology. If the JPEGs are attachments, they are not embedded -- don't confuse embedded with View in Place, btw.
    How large a JPEG have you been able to attach and sent? How is the computer connected -- wireless or via ethernet cable?
    Ernie

  • Mail sending with subject and attachment

    hai all,
           my requiremnet is i want to send a mail with a body and pdf attachemnt , but with the below code iam able to send both as attachment , but how to send along with body.
    *& Report  ZV_TEST                                                     *
    Report  ZV_TEST no standard Page heading line-size 200.
    Tables: Pa0105,
            pernr,
            QPPNP,
            HRPY_RGDIR,
            SSCRFIELDS,
            pa0002.
    Constants
    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 '<NEW-PAGE>',
    end of F__CMD.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    Data Declaration
    DATA:Begin of Itab occurs 0,
           pernr like HRPY_RGDIR-PERNR,
           SEQNR like HRPY_RGDIR-SEQNR,
           PAYSLIP_VARIANT like BAPI7004-PAYSLIP_VARIANT,
         end of itab.
    data: P_INFO like PC407,
          P_INFO1 like PC407,
          P_FORM like PC408 occurs 0 with header line,
          P_P_FORM like PC408 occurs 0 with header line,
          RETURN like BAPIRETURN1 occurs 0 with header line,
          PAY_VAR like BAPI7004-PAYSLIP_VARIANT value 'ESS_PAYSLIPS' ,
          P_LIST like ABAPLIST occurs 1 with header line,
          P_IDX type I.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
          end of P_INDEX.
    data: OBJBIN like SOLISTI1 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,
          TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: PDF_TAB like TBL1024 occurs 0 with header line,
          OTF_TAB like TBL1024 occurs 0 with header line.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    data: PDF_CONTENT TYPE XSTRING,
          PDF_FSIZE   TYPE I.
    data: error        TYPE sysubrc.
    DATA: v_dest LIKE tsp01-rqdest,
          v_handle LIKE sy-tabix,
          v_spool_id LIKE tsp01-rqident,
          v_rc TYPE c,
          v_errmessage(100) TYPE c,
          v_text(70) TYPE c.
    data: PAYSLIP     LIKE     BAPI7004_PAYSLIP occurs 0 with header line.
    Data: v_index like sy-index value 1.
    Data: Begin of I_Sent occurs 0,
            pernr like pernr-pernr,
            name(20),
            usrid_long like pa0105-usrid_long,
            Status(3),
          End of I_sent.
    Data: Begin of I_NSent occurs 0,
             pernr like pernr-pernr,
            usrid_long like pa0105-usrid_long,
          End of I_Nsent.
    DATA: I_FCODE TYPE TABLE OF sy-ucomm.
    data: v_text1(255),
          v_text2(255),
          v_text3(255).
    data: month_names like T247 occurs 0 with header line,
          v_month(2) type c.
    ***********************Selection Screen********************
    selection-screen Begin of Block b2 WITH FRAME TITLE TEXT-BL1 .
    Parameters: P_Print type c default 'X' radiobutton group g1
                                          user-command CMD,
                P_DISP  Type C  Radiobutton Group g1.
    Selection-screen end of Block b2.
    selection-screen Begin of Block b1 WITH FRAME TITLE TEXT-BL2 .
    Recipient address and Period
    SELECT-OPTIONS :   s_name   FOR PERNR-PERNR Modif id M1,
                       s_period for HRPY_RGDIR-FPPER Modif id M1.
                      s_year for QPPNP-PABRJ Modif id M1.
    SELECT-OPTIONS:    p_num    FOR PERNR-PERNR Modif id M2 .
    Selection-screen end of Block b1.
    *SELECTION-SCREEN FUNCTION KEY 1.
    *SELECTION-SCREEN PUSHBUTTON /10(20) CHARLY USER-COMMAND ABCD.
    ***********************At Selection Screen Output**************
    at selection-screen output.
      Loop at screen.
        if P_Print = 'X'.
          if screen-group1 = 'M2'.
            screen-active = 0.
          endif.
        else.
          if screen-group1 = 'M1'.
         if screen-name = 'S_NAME-LOW' Or screen-name = 'S_PERIOD'.
            screen-active = 1.
          endif.
        Endif.
        Modify Screen.
      Endloop.
    ***********************INITIALIZATION********************
    INITIALIZATION.
    MOVE 'Preview' TO SSCRFIELDS-FUNCTXT_01.
    MOVE 'Preview' TO CHARLY.
      p_print = 'X'.
    v_text1 =
    'Please find enclosed your salary slip for the month of Apr 2006 as
    *attachment. This is confidential '.
    ***********************AT SELECTION-SCREEN******************
    AT SELECTION-SCREEN.
    if p_print = 'X'.
       if s_name[] is initial.
          message e000(8i) with 'Make Entry into Personal Number Field'.
       endif.
    else.
       if p_num[] is initial.
          message e000(8i) with 'Make Entry into Personal Number Field'.
       endif.
    endif.
    ***********************Start-of-Selection********************
    Start-of-Selection.
      if p_print = 'X'.
        APPEND 'NEXT' TO i_fcode.
        APPEND 'PREV' TO i_fcode.
        set pf-status 'ZHRF' excluding I_FCODE.
        Perform Get_values.
       Perform Print using v_index.
        perform Write_Values.
      else.
        set pf-status 'ZHRF'.
      Perform Get_values.
        Perform Print using v_index.
      endif.
    ***********************Top-of-page***************************
    Top-of-page.
      skip 2.
      if p_print = 'X'.
        write:50 'The Pay Slip Sent details'.
        skip 1.
        uline at 1(70).
        write :/ sy-vline,2 'Personal Number',18 sy-vline,
                         19 'Name',40 sy-vline,
                         41 'User Mail-Ids',63 sy-vline,
                         64 'Status',70 sy-vline.
        ULINE /1(70).
      endif.
      set left scroll-boundary Column 0.
    *&      Form  Get_values
          text
    -->  p1        text
    <--  p2        text
    FORM Get_values .
      select  *
              from HRPY_RGDIR
              into corresponding fields of table itab
              where PERNR in s_name
              AND
              FPPER IN S_PERIOD.
      if sy-subrc eq 0.
        loop at itab.
          Create receiver list
          refresh RECLIST.
          clear RECLIST.
          select single *
                        from PA0105
                        where PERNR eq ITAB-PERNR
                          and USRTY eq '0010'.
          if SY-SUBRC <> 0.
            I_sent-PERNR = ITAB-PERNR.
            i_sent-status = 'NO'.
            select single *
                          from pa0002
                          where pernr eq itab-pernr.
            concatenate pa0002-VORNA pa0002-NACHN into i_sent-name
                                             separated by space.
            append i_Nsent.
            continue.
          else.
            refresh reclist.
            RECLIST-RECEIVER = pa0105-usrid_long.
            translate RECLIST-RECEIVER to lower case.
            RECLIST-REC_TYPE = 'U'.
            append RECLIST.
          endif.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = itab-PERNR
              SEQUENCE_NUMBER = itab-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          loop at P_FORM
              where LINDA eq F__CMD-NEWPAGE
              and LTYPE eq F__LTYPE-CMD.
            P_INDEX-INDEX = SY-TABIX.
            append P_INDEX.
          endloop.
          P_IDX = 1.
          refresh P_P_FORM.
          append lines of P_FORM from P_IDX to P_INDEX-INDEX
          to P_P_FORM.
          P_IDX = P_INDEX-INDEX.
          export P_P_FORM to memory id '%%_P_FORM_%%'.
          export P_INFO to memory id '%%_P_INFO_%%'.
          submit RPCEDT_LIST_TO_MEMORY exporting list to memory and return.
          call function 'LIST_FROM_MEMORY'
            TABLES
              LISTOBJECT = P_LIST.
          call function 'TABLE_COMPRESS'
            TABLES
              IN     = P_LIST
              OUT    = OBJBIN
            EXCEPTIONS
              others = 1.
          Read table RECLIST index 1.
          I_sent-PERNR = ITAB-PERNR.
          i_sent-usrid_long = RECLIST-RECEIVER.
          select single *
                        from pa0002
                        where pernr eq itab-pernr.
          concatenate pa0002-VORNA pa0002-NACHN into i_sent-name
                                           separated by space.
          i_sent-status = 'YES'.
          append i_sent.
         concatenate ' Payslip-'  '(' ITAB-PERNR+4(4) ')'
        into DOCDATA-OBJ_DESCR.
          CALL FUNCTION 'MONTH_NAMES_GET'
           EXPORTING
             LANGUAGE                    = SY-LANGU
            TABLES
              MONTH_NAMES                 = month_names
           EXCEPTIONS
             MONTH_NAMES_NOT_FOUND       = 1
             OTHERS                      = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
         if sy-datum+4(2)  = '01'.
            v_month = '12'.
         else.
            v_month = sy-datum+4(2) - 1.
         endif.
         read table month_names with key mnr = v_month.
         concatenate 'Salary Slip for the month of' month_names-LTX
                      sy-datum+0(4) '-' i_sent-name
                      into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Dear Mr.'.
          concatenate OBJTXT i_sent-name into objtxt.
          append OBJTXT.
          append initial line to objtxt.
          OBJTXT = 'Please find enclosed your salary slip for the month of'.
          concatenate OBJTXT month_names-LTX sy-datum+0(4)
                                      into objtxt separated by space.
           append OBJTXT.
    OBJTXT =
    'as attachment This is confidential document and not be disclosed'.
          append OBJTXT.
    OBJTXT =
    'shared with any other employee.In case of any queries on this subject'.
    append OBJTXT.
    OBJTXT =
    'you are requested to contact the Payroll administrator “Sabitha” '.
    OBJTXT = 'email:[email protected]'.
    append OBJTXT.
    append initial line to objtxt.
    append initial line to objtxt.
    OBJTXT = 'With Kind Regards'.
    append OBJTXT.
    append initial line to objtxt.
    append initial line to objtxt.
    OBJTXT = 'Sabitha'.
    append OBJTXT.
    OBJTXT = 'Payroll Administrator'.
    append OBJTXT.
    OBJTXT = 'Enteg Infotech Pvt Lyd.'.
    append OBJTXT.
    OBJTXT = 'Banaglore'.
    append OBJTXT.
          Write Packing List (Main)
           describe table objtxt.
           read table OBJTXT index sy-tfill.
          DOCDATA-DOC_SIZE = ( sy-tfill - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = sy-tfill.
          OBJPACK-DOC_TYPE = 'TXT'.
          append OBJPACK.
    Create Message Attachment
    Write Packing List (Attachment)
          ATT_TYPE = 'ALI'.
          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.
    Send the document
          call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
            EXPORTING
              DOCUMENT_DATA              = DOCDATA
              PUT_IN_OUTBOX              = ''
              COMMIT_WORK                = 'X'
            TABLES
              PACKING_LIST               = OBJPACK
              OBJECT_HEADER              = OBJHEAD
              CONTENTS_BIN               = OBJBIN
              CONTENTS_TXT               = OBJTXT
              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.
        endloop.
      endif.
    ENDFORM.                    " Get_values
    *****************************At User Command*************************
    at User-Command.
      case Sy-ucomm.
        When 'NEXT'.
          describe table itab.
          if sy-tfill GT v_index.
            v_index = v_index + 1.
            Perform Print using v_index.
          else.
            message E000(8i) with 'You Have Reached the Last Entry'.
          endif.
        When 'PREV'.
          if v_index LE 1.
            Message E000(8i) with 'You Have Reached the First Entry'.
          else.
            v_index = v_index - 1.
            Perform Print using v_index.
          endif.
        When 'BACK'.
          leave to screen 0.
        WHen 'EXIT'.
          set Screen 0.
          leave screen.
      Endcase.
    *&      Form  Print
          text
    -->  p1        text
    <--  p2        text
    FORM Print using v_index.
      if v_index = 1.
        select  *
               from HRPY_RGDIR
               into corresponding fields of table itab
               where PERNR in P_num
      endif.
      if not itab[] is initial.
        sort itab by pernr .
        read table itab index v_index.
        select single *
                      from PA0105
                      where PERNR eq ITAB-PERNR
                        and USRTY eq '0010'.
        call function 'GET_PAYSLIP'
          EXPORTING
            EMPLOYEE_NUMBER = itab-PERNR
            SEQUENCE_NUMBER = itab-SEQNR
            PAYSLIP_VARIANT = PAY_VAR
          IMPORTING
            RETURN          = RETURN
            P_INFO          = P_INFO
          TABLES
            P_FORM          = P_FORM.
        loop at P_FORM
            where LINDA eq F__CMD-NEWPAGE
            and LTYPE eq F__LTYPE-CMD.
          P_INDEX-INDEX = SY-TABIX.
          append P_INDEX.
        endloop.
        P_IDX = 1.
        refresh P_P_FORM.
        append lines of P_FORM from P_IDX to P_INDEX-INDEX
        to P_P_FORM.
        P_IDX = P_INDEX-INDEX.
           export P_P_FORM to memory id '%%_P_FORM_%%'.
           export P_INFO to memory id '%%_P_INFO_%%'.
      IMPORT P_P_FORM FROM MEMORY ID '%%_P_FORM_%%'.
      IMPORT P_INFO FROM MEMORY ID '%%_P_INFO_%%'.
        new-page                                                "VKIK008647
        line-size p_info-pcols
        line-count p_info-psize
        no-title
        no-heading.
        SET BLANK LINES ON.
        LOOP AT P_P_FORM.
          if sy-tabix lt 20.
            NEW-LINE NO-SCROLLING.
          endif.
          CASE P_P_FORM-LTYPE.
         WHEN F__LTYPE-TXT.
            WRITE:/ P_P_FORM-LINDA.
            WHEN F__LTYPE-CMD.
              IF P_P_FORM-LINDA EQ F__CMD-NEWPAGE.
                NEW-PAGE.
              ENDIF.
            WHEN others.
              hide: itab,v_index.
              WRITE:/ P_P_FORM-LINDA.
              if sy-tabix lt 20.
                NEW-LINE NO-SCROLLING.
              else.
                NEW-LINE SCROLLING.
              endif.
          ENDCASE.
        ENDLOOP.
        SET BLANK LINES OFF.
    v_index = 1.
      endif.
    ENDFORM.                    " Print
    *&      Form  Write_Values
          text
    -->  p1        text
    <--  p2        text
    FORM Write_Values .
      if p_print = 'X'.
        loop at i_sent.
          write :/ sy-vline,2 i_sent-pernr,18 sy-vline,
                            19 i_sent-name,40 sy-vline,
                            41 i_sent-usrid_long,63 sy-vline,
                            64 i_sent-status,70 sy-vline.
          ULINE /1(70).
        endloop.
      endif.
    ENDFORM.                    " Write_Values
    i want to send the contents of objtxt has body.
    cheers

    Hi,
    in the below code, BOLD Characters coming as body text in my mail.after that i am attaching V_LINE as the attachment.pl compare this with ur code.
    revert, if you need any clarifications.
    <b>*-populate body text</b>
      CONCATENATE <b>'Japan BOL details for the Delivery#'
                    V_VBELN
                   ',is attached'</b>               INTO WA_OBJTXT SEPARATED BY SPACE.
      APPEND WA_OBJTXT TO IT_OBJTXT.
    <b>*---- Append Date and Time into Body of email.</b>
      MOVE 'File is generated on'(004) TO V_INFO.
      V_TIME = SY-UZEIT.
    WRITE : SY-UZEIT TO V_TIME USING EDIT MASK '__:__:__'.
      CONCATENATE V_TIME+0(2)
                  V_TIME+2(2)
                  V_TIME+4(2)
                  INTO
                  V_TIME2 SEPARATED BY ':'.
       WRITE : sy-datum MM/DD/YYYY TO lv_date .
      CONCATENATE SY-DATUM+4(2)
                  SY-DATUM+6(2)
                  SY-DATUM+0(4)
                  INTO V_DATE.
      CONCATENATE <b>V_INFO
                  V_DATE
                  'At'
                  V_TIME2
                  INTO V_INFO</b>              SEPARATED BY SPACE.
      <b>WA_OBJTXT = V_INFO.</b>  APPEND WA_OBJTXT TO IT_OBJTXT.
    *-document size
      CLEAR : V_TABLE_LINES.
      DESCRIBE TABLE IT_OBJTXT LINES V_TABLE_LINES.
      READ TABLE IT_OBJTXT INTO WA_OBJTXT INDEX V_TABLE_LINES.
      X_DOC_CHNG-DOC_SIZE =
                     ( V_TABLE_LINES - 1 ) * 255 + STRLEN( WA_OBJTXT ).
    *-populate packing list for body text
    CLEAR IT_OBJPACK-TRANSF_BIN.
      WA_OBJPACK-HEAD_START = 1.
      WA_OBJPACK-HEAD_NUM = 0.
      WA_OBJPACK-BODY_START = 1.
      WA_OBJPACK-BODY_NUM = V_TABLE_LINES.
      WA_OBJPACK-DOC_TYPE = 'RAW'.
      APPEND WA_OBJPACK TO IT_OBJPACK.
      CLEAR WA_OBJPACK.
    *--for attachment
    *--add Internal table lines here, as attachment.
      WA_OBJBIN = V_LINE.
      APPEND WA_OBJBIN TO IT_OBJBIN.
      CLEAR  WA_OBJBIN.
    *-get total no.of lines of Object table(attachment)
      CLEAR : V_TABLE_LINES.
      DESCRIBE TABLE IT_OBJBIN LINES V_TABLE_LINES.
    *-populate object header
      CONCATENATE  'Delivery#'(005)
                     V_VBELN
                     SY-DATUM
                     V_TIME
                     INTO
                     WA_OBJHEAD SEPARATED BY SPACE.
      APPEND WA_OBJHEAD TO IT_OBJHEAD.
      CLEAR  WA_OBJHEAD.
    *-packing list for attachment
      WA_OBJPACK-TRANSF_BIN = C_X.
      WA_OBJPACK-HEAD_START = 1.
      WA_OBJPACK-HEAD_NUM = 1.
      WA_OBJPACK-BODY_START = 1.
      WA_OBJPACK-BODY_NUM = V_TABLE_LINES .
    WA_OBJPACK-DOC_TYPE = 'CSV' .
      WA_OBJPACK-DOC_TYPE = 'RAW' .
      WA_OBJPACK-OBJ_NAME = 'POTR'.
    CONCATENATE 'Delivery details for '(005)
      CONCATENATE TEXT-005
                V_VBELN
                SY-DATUM
                V_TIME
                '.CSV'
                INTO
                WA_OBJPACK-OBJ_DESCR SEPARATED BY SPACE.
      BREAK-POINT.
      WA_OBJPACK-DOC_SIZE = V_TABLE_LINES * 255.
      APPEND WA_OBJPACK TO IT_OBJPACK.
      CLEAR  WA_OBJPACK.

  • Send purchase order via email (external send) with special Czech characters

    Hi all,
    I am sending a purchase order created with ME21N via email to the vendor using "external send".
    The mail is delivered without any problems, PO is attached to the mail as PDF file.
    Problem is that special Czech characters as "ž" or "u0161" are not displayed, a "#" (hash) appears instead.
    This problem occurs when language for PO output = EN.
    Tests with language = CS worked out fine, but the whole form incl. all texts are in Czech as well; so no valid solution since it needs to be in English.
    We checked SAPCONNECT configuration and raised note 665947; this is working properly.
    When displaying the PO (ME23N) special characters are shown correctly as well.
    Could you please let me know how to proceed with that issue?!
    Thanks.
    Florian

    Hi!
    No, it's not a Unicode system.
    It is maintained as:
    Tar.          Lang.        Lang.        Output Format                           Dev. type
    Format
    PDF     EN     English                                                     PDF1
    Using this option, character "ž" was not displayed correctly, but "Ú" was ok.
    All other Czech special characters are not tested so far.
    Thanks,
    Florian
    Edited by: S. SCE - Stock Mngmnt on Aug 14, 2008 10:19 AM

  • Mac Mail doesn't send with parentheses in signature...

    I met with someone at the Apple Genius Bar today to try and troubleshoot a problem I've been having with sending mail via Comcast.
    In short we were able to find a workaround  I decided to post what we concluded in the case that someone else can clarify or benefit from what we learned... which is that any parentheses in the e-mail signature prevents the e-mail from being sent.
    We attempted, almost 40 e-mails, of various configurations of the signature which contained a phone number.  regardless of its position, formatting including newline characters, when the phone number didn't have the parentheses the mail sent.
    And all these tests occurred with a fresh new e-mail account which by default set perfectly every time. Attachments, pasted and graphics, made no difference. All the previous mailboxes were also removed and plans were trashed so we were starting from a clean start.
    This is with Mail version 4.5 and OS 10.6.8 on an iMac... I can't go to mail 5 I need to run Rosetta.

    I'm getting a similar problem. Snow Leopard Mail for me seems to be choking on large attachments - sending them, forwarding them, or even moving them from one IMAP folder to another.
    My mails are getting through, but it takes a long time and they are dragging the whole system to a crawl in the process.

  • E-mail won't send with wifi

    I can receive all e-mails from my office server (microsoft exchange), but I can only send e-mails when wifi is turned off. The error message says that the connection to the cwmx.com server failed. Can you help? Thanks.

    Does your office email account have an authenticated SMTP server?
    If not, you will have problems sending messages with this account when not connected to your company's network. Internet Service Providers impose restrictions on using an SMTP server that is outside of their network on Port 25 which is the default port for SMTP servers. Most ISPs allow the use of an authenticated SMTP server that is outside of their network on Port 25 but some block its use regardless. These restrictions are in place as part of an overall effort to prevent spam emanating from the ISP's domain but as with just about anything else, it is usually the few that take advantage of a situation for not above board deeds that spoil it for everyone else that need to use it for legitimate reasons.
    You can try using 587 for the SMTP server port but having an authenticated SMTP server is the ticket. I access a .Mac account and a business POP account with my iPhone. Both have authenticated SMTP servers and I haven't had any trouble sending messages with either account regardless how or where I'm connected - via various Wi-Fi networks or EDGE.

  • Mail won't send with outlook

    I cannot get my mail to send thru Outlook. I'm getting a sending error. Something to do with server settings?

    I'm using a .mac address

  • Mail attempts to send with an old deleted account.

    I created an account for my wife in Mail which she has never used. Mail started trying to send messages from her account, unsuccessfully.
    I cancelled her account except the two I use for myself but Mail still tries to use her account, every so often but not all the time. Nevertheless, when MAIL has decided to send an email with this account it just sits in the Outbox, trying over and over.
    This started before I upgraded to 10.4.5, which I have also re-installed since with no changes to the way Mail behaves.
    Because I did not create that account on my other disk, I attempted to install a Mail app from the other disk but it still tries to send from the cancelled account on this machine.
    Is it possibly in the cache or plist files?
    Marcus

    No one responded to my question in a few days, so I had a look around at questions that were responded to and tried to make my question sound more interesting.
    It worked. After re-phrasing my question I got replies and Ernie Stamper solved the problem quite easily.

  • Mail will not send with attachments

    Recently, people have been complaining that they did not receive e-mails. Isolated it down to emails with file attached (i.e., word excel, etc). Mail does not get sent, even though in the out box shows as sent and audible sent mail sounds. Nothing gets returned or no mail delivery failures indicated. Tried converting a MS word documents to .pdf and was sent okay. Is anybody else having a similar problem or the solution with out changing to another mail application? Still using leopard 10.5.8 on Mac Book Pro, iMac... seen similar discussions in snow leopard.

    It has to be Mail issue or a combination of both the service provider and Mail. I can send the same attachments using eudora on my Mac, No problems and everything works. I have been transitioning to Mail after a recent purchase of a iphone. The original problem was on my bosses Mac which was also synced w/ his iphone. Two Mac's (imac G5 intel & macbook pro G5 intel) 2 different computers using same OS 8.5 and same ISP same problem and both has been synced to iphone. Other users, same configuration but no iphone don't have the problem. Recipients of the mail doesn't receive anything (not even the e-mail message) so it is not being stripped... more like the whole message and attachment trashed/blocked. Recipients are on several different mail servers and when it does this, nobody gets anything. Sometimes it sends it all and other times it is just gone to the great inbox in the sky.

  • TS3276 Mail putting incorrect sender with email

    Yesterday I discovered I wasn't receiving all my email on Mail on my iMac. I knew they were missing because I saw them on my iPad and wanted to reply from my iMac. I also checked my account on my browser. I rebooted, checked accounts, re-entered my password, online status, etc., when finally today, it re-loaded. Now it's really messed up!!! The sender doesn't correspond with the emails!!!
    I upgraded to Mountain Lion a few weeks ago and didn't notice anything weird, but maybe it's been happening longer than just this past week. I don't think so, though. Mail has always worked beautifully before.
    Thank you for any help/suggestions.

    Thanks, guys . . .
    I kind of knew that Mail couldn't possibly be sending emails to people without my being aware of it but I just wanted to double check.
    As far as the other email programs go, for some insane reason all the ones I try (Thunderbird, for one) have problems connecting with my SMTP (outgoing) server. In one case, there's no way to change my account setting from IMAP to POP . . . the way these programs are set up, just configuring your settings requires a B.S. in network technology . . . every time these things happen, I end up on the phone with the local ISP for two hours and most of them have no idea what a Mac is  . . .
    I think in this case I wll just stick wth the Devil I Know. Every email program has its drawbacks and Mail is clunky and unintuitive but thank God, it integrates with SpamSieve, the only junk mail killer that really, really works (I just learned how WELL it works when I tried Thunderbird and it downloaded all the mail I'm REALLY getting s opposed to the mail that I end up seeing -- for every legit email that SpamSieve lets through, there are at least 75 that it doesn't. I don't know about anyone else, but I'm inundated with at LEAST 400 junk emails A DAY for my two accounts and without SpamSieve I'd be in the First Circle of ****, but I digress).
    It's been a year now with Mail and although I despise it at least now I think I'm getting used to it, and your reassurances about people getting unwanted mail definitely removed my last doubts.
    I'll stick with Mail, since the others don't look exactly like champs either, and just pray Apple doesn't "Upsdate" anything for a good long while.
    Cheers, mates
    Nick

  • Mail won't send with my user account

    My main user account recently started having the problem of not sending email (I can, however, receive). When logged as Admin, I can send. Can this be resolved by purging or deleting a preference file?
    (We have tried Disk Utility, setting up new user accounts in Mail.app, etc., to no avail).
    Suggestions appreciated!

    Troubleshooting Apple Mail
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

  • Mail Won't Send with New WiFi

    Just switched internet providers. Internet and incoming mail work fine, but outgoing messages won't send. My outgoing mail server is my sever at work. How do I get my messages to send?

    tridaddy wrote:
    Just switched internet providers. Internet and incoming mail work fine, but outgoing messages won't send. My outgoing mail server is my sever at work. How do I get my messages to send?
    You should post this to the Mail forum under Mac OSX 10.6.
    There are literally dozens of things that need to be done to fix this, up to and including your new internet provider blocks SMTP mail servers.

  • I use the same e-mail account on my PC and ipad.  Lately I have been getting an e-mail that says no sender with no content and a date of 1969.  It shuts down some of my e-mails and goes away later.  this does not occur on my PC

    I keep getting on my e-mail a no sender with a date of 1969, wipes out my e-mails temporarily but doesn't happen on my PC?

    Try turning the account off and on : Settings > Mail, Contacts, Calendars , then tap the account on the right, slide Mail to 'off', exit settings and go back into the Mail app, and then go back to Settings and slide Mail back to 'on'
    If that doesn't work then try closing the Mail app via the iPad’s multitasking bar (I'm assuming that your iPad is on iOS 7) : double-click the home button to open the taskbar and then swipe or drag the Mail app's 'screen' up and off the top of the screen to close it, and click the home button to close the taskbar.
    And do a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

Maybe you are looking for

  • A few questions about this "cure"

    Okay so we all get it.... click back and forth between music and iPhone.... how about some specifics? how long has everyone been waiting to let it connect to the server before clicking on something else? are u just clicking back and forth? couild i a

  • I wanted to know the audio chipset in ipad 4 (retina)?

    Hi, I was wondering if anyone can answer this question. I searched for it but couldn't find any detail! "What is the audio chipset used in iPad 4th gen. i.e retina display ?"

  • Printing from CS3

    My background - Windows PC user for years. Reasonably competent with Photoshop CS3 (Windows). Just bought new iMac with latest OS (Leopard). I like most of what I see so far but still very much in the learning curve stage. Have bought Mac version of

  • What new printer to buy?

    My niece needs a new printer to use with her 3 year old iBook. It doesn't have USB 2.0 and I think she's running 10.2.8. Her free printer that she got when she purchased the iBook has died. She prints mostly text and the occasional photo or color pag

  • While typing an email on iphone the letters and words don't appear for me to see but they appear for recipient of email

    When using my iphone 5 to type an email the letters and words do not appear for me to see what I'm typing but when I send to recipient the words and letters appear for them to see. Why is this happening and how can I fix it?  Thanks, kmg