cancel
Showing results for 
Search instead for 
Did you mean: 

Email to a group of people

Former Member
0 Kudos
94

Ok the problem is this. I want to implement 2 functionalities

1) After i get a table filled with data ( on the result page ) , i want to save this data in an excel , using BSP.

2) One of these columns has email ids's , so i want to collect all these ids and and open lotus notes where all these ids are in the 'To' field.

If possible , please send me the code for the above 2 functionalities.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1) check out the thread

2) you may use Fms like SO_OBJECT_SEND to send emails to sap and external email ids.

hope this helps.

regards,

manasa

Former Member
0 Kudos

Hi Manasa

I checked but i am not able to figure out how to use that FM.

In case i make an internal table of email ids , so i pass it as receivers table , or what ?

Former Member
0 Kudos

here is a sample code:

MOVE: SY-LANGU TO OBJECT_HD-OBJLA, "language

PRIORITY TO OBJECT_HD-OBJPRI, "priority

'MAILMESSAGE' TO OBJECT_HD-OBJNAM, "object name

SUBJECT TO OBJECT_HD-OBJDES, "subject of the mail

SENSITIVITY TO OBJECT_HD-OBJSNS. "sensitivity (F/O/P/C)

CLEAR RECEIVERS.

RECEIVERS-SNDEX = 'X'.

TRANSLATE MAILFLAG TO UPPER CASE.

  • load the user IDs to receive mail into receivers table

IF RECEIVER <> ' '. " send a copy to the receiver (user ID)

IF MAILFLAG = 'S' OR MAILFLAG = 'B'.

RECEIVERS-RECESC = ' '.

RECEIVERS-RECNAM = RECEIVER.

APPEND RECEIVERS.

ENDIF.

IF MAILFLAG = 'C' OR MAILFLAG = 'B'.

RECEIVERS-RECNAM = RECEIVER.

RECEIVERS-RECESC = 'U'.

IF RECEIVER CA '@'.

RECEIVERS-RECEXTNAM = RECEIVER.

ELSE.

CONCATENATE RECEIVER '@' INTER_ADDR INTO RECEIVERS-RECEXTNAM.

ENDIF.

APPEND RECEIVERS.

ENDIF.

ENDIF.

  • Mail senden

CALL FUNCTION 'SO_OBJECT_SEND'

EXPORTING

OBJECT_HD_CHANGE = OBJECT_HD

OBJECT_TYPE = 'RAW'

TABLES

OBJCONT = OBJCONT

RECEIVERS = RECEIVERS

PACKING_LIST = PACKING_LIST

ATT_CONT = ATT_CONT

EXCEPTIONS

ACTIVE_USER_NOT_EXIST = 1

COMPONENT_NOT_AVAILABLE = 2

FOLDER_NO_AUTHORIZATION = 3

FOLDER_NOT_EXIST = 4

FORWARDER_NOT_EXIST = 5

NOTE_NOT_EXIST = 6

OBJECT_NO_AUTHORIZATION = 7

OBJECT_NOT_EXIST = 8

OBJECT_NOT_SENT = 9

OBJECT_TYPE_NOT_EXIST = 10

OPERATION_NO_AUTHORIZATION = 11

OWNER_NOT_EXIST = 12

PARAMETER_ERROR = 13

SUBSTITUTE_NOT_ACTIVE = 14

SUBSTITUTE_NOT_DEFINED = 15

USER_NOT_EXIST = 16

X_ERROR = 17.

yes. pass the email ids in the receivers tab.

Former Member
0 Kudos

if you want to test the FM first then use below steps:

populate OBJECT_HD_CHANGE with the general data like language (EN)

OBJNAM = MAILMESSAGE

OBJDES = TEST MAIL

OBJPRI = 9

OBJSNS = F

OBJECT_TYPE = 'RAW'

ORIGINATOR_TYPE = J

IN THE TABLE OBJCONT = 'THIS IS THE CONTENT OF THE EMAIL'.

IN THE TABLE RECEIVERS:

RECESC ='U'

RECNAM = 'YOURNAME'

RECEXTNAM = YOUR EMAIL ID

Former Member
0 Kudos

HI manasa

I am not able to find

OBJPRI = 9

OBJSNS = F

OBJECT_TYPE = 'RAW'. Are they in some other import parameters.

and i am unable make any entry in the field mentioned below.

RECEXTNAM = YOUR EMAIL ID

Former Member
0 Kudos

OBJECT_HD_CHANGE import parameter has the OBJPRI and OBJSNS.

OBJECT_TYPE is one of the import parameters.

if you still dont see them then which sap version r u using currently? this is there in 4.6c and 4.7.

recextnam is in the receivers table. you should be able to enter data there by adding a new line with plus sign.

Message was edited by: manasa

Former Member
0 Kudos

Manasa thanks a lot

Former Member
0 Kudos

no problem!

If your issue is solved please close the thread and assign the points accordingly.

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks all