cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a predefined email

Former Member
0 Kudos

Hello,

I'm trying to send a predefined email which contains the subject and the body text in my bsp/abap application but it doesn't work. <i><b>Does anyone could help me, please?</b></i>

I have this error message :

<b>Exception CX_SY_DYN_CALL_PARAM_MISSING</b>

<b>Method</b> : OninputProcessing

<u>This is my abap source code in my OninputProcessing</u> :

data : adress_mail type AD_SMTPADR.
  adresse_mail = 'MyEmail@myProvider.com'.
  data msg(200) VALUE 'Data stored :'.
  data : subject type SO_OBJ_DES.
  data : subj type SOLI.

      subject = 'New event - Please check'. 

      concatenate msg subj into subject separated by
space.
   

* Add data at the end of the mail
    if not ( strlen( subj ) = 0 ).
      append subj to texttab.
    endif.

* Send email 
    CALL FUNCTION 'Z_YX_SEND_SMTP'
      exporting
        I_SAV_SMTP_RECEIVER  = adress_mail
        I_SAV_SUBJECT        = subject
      
      exceptions
        when others = 1.

    if sy-subrc <> 0.
      error_code = 'SEND-001'.
    endif.

endif.

Accepted Solutions (1)

Accepted Solutions (1)

eddy_declercq
Active Contributor
0 Kudos

Hi,

You don't specify what's in your 'Z_YX_SEND_SMTP'

Check things like http://help.sap.com/saphelp_nw70/helpdata/en/58/97c43af280463ee10000000a114084/frameset.htm

and

/people/eddy.declercq/blog/2006/04/03/unknown-thus-unloved

Eddy

-


PS. Reward useful answers and earn points yourself

Former Member
0 Kudos

Hello,

Thanks for your answers. I managed to find a solution in order to send an email with a predifined subject. Unfortunalty, my subject string is always cut when I received my email.

I've declared my subject as a SO_OBJ_DES but it's only a 50 characters. Do you know another longer type than SO_OBJ_DES ?

Answers (1)

Answers (1)

GrahamRobbo
Active Contributor
0 Kudos

This exception means that "<i>The function expects a parameter that was not specified by the caller</i>".

Cheers

Graham