cancel
Showing results for 
Search instead for 
Did you mean: 

Send Email with Webdynpro for Abap

Former Member
0 Kudos

Hi,

i want to send an email without a attachment after the customer has filled a form.

The Webdynpro for Abap action must send a notification Email to the

service department about these new request.

Has anyone an example how to send an email with Webdynpro for Abap.

Thanks

Thomas

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Thomas,

Refer the below links.

[https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/sampleCodeforprocessingInboundMailwithAdobeInteractive+Forms]

[http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d] -> Using PDF forms -> Java Mail API

Hope it will help.

Thanks.

baskaran00
Active Participant
0 Kudos

Hi,

u can check this blog

/people/thomas.jung3/blog/2004/09/08/sending-e-mail-from-abap--version-610-and-higher--bcs-interface

hope it will be useful.

Thanks...

Sm1tje
Active Contributor
0 Kudos

after entering the form, make sure that the data is submitted to the form (backend or whatever) via a button. Create an action for this button and in the event handler of the action, you can call methods from CL_BCS classes or use FM SO_NEW_DOCUMENT_SEND_API1.

Former Member
0 Kudos

Hi Micky,

thanks for your help. I trying to used the SO_NEW_DOCUMENT_SEND_API1 in

a action of my webdynpro for Abap. But I getting the error message that a structure parameter responce an error.

Here the Code of the Action:

DATA HEADER TYPE TABLE OF STRING.

DATA RECEIVERS TYPE STRING.

RECEIVERS = 'my-mailadress'.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_DATA = 'nothing'.

  • DOCUMENT_TYPE = 'RAW'

  • PUT_IN_OUTBOX = ' '

  • COMMIT_WORK = ' '

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

TABLES

OBJECT_HEADER = HEADER.

  • OBJECT_CONTENT =

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

RECEIVERS = RECEIVERS.

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

ENDIF.

What's wrong ?

Thanks for your help.

Thomas

Sm1tje
Active Contributor
0 Kudos

what is the exact message?

do you get this message during design time, or error message during execution of the code?

This message is returned from the FM?

I don't see any return code from FM according to your error message??!!

Did you read the documentation on how to use this FM?

If you don't get it to work yet, try to have a look at this blog:

[sending e-mail from ABAP - API Interface|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/781] [original link is broken] [original link is broken] [original link is broken];