on 2006 Oct 27 3:49 PM
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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
Thanks all
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.