Skip to Content
0
Former Member
Nov 16, 2010 at 12:16 PM

i have problem sending a email ..spool not created using custom FM

29 Views

Hi experts,

i have problem sending a email ..spool not created using custom FM...this the custom FM

* Send email notification
      lv_subject = text-037.
      lv_attachment = text-038.
      CALL FUNCTION 'Z_SEND_EMAIL_FROM_SPOOL'
        EXPORTING
          email1            = lv_email1
          email2            = lv_email2
          email3            = lv_email3
          subject           = lv_subject
          attachment_name   = lv_attachment
        EXCEPTIONS
          spool_not_created = 1
          OTHERS            = 2.

Source code

this is the source code for this FM

IF sy-batch EQ 'X'.
    PERFORM get_job_details.
    PERFORM obtain_spool_id.

    PERFORM convert_spool_to_pdf.
    IF sy-subrc IS NOT INITIAL.
      MESSAGE e040(zhrcd) RAISING spool_not_created.
    ENDIF.
    PERFORM process_email USING email1
                                email2
                                email3
                                subject
                                attachment_name.

    WAIT UP TO 5 SECONDS.
    SUBMIT rsconn01 WITH mode   = 'INT'
                    WITH output = 'X'
                    AND RETURN.
  ENDIF.....

Please let me know

Edited by: Thomas Zloch on Nov 16, 2010 5:53 PM - please use code tags