Triggering of mails for different actions
I have to trigger different mails for different actions. Eg: A2 - Confirmation Action and A3 - Promotion Action.
In dynamic action I have written:
0000 06 4 P T001P-MOLGA='40'
0000 06 6 P P0000-MASSN='A2'/X
0000 06 7 P P0000-MASSN='A3'
0000 06 8 M M0001
and in M0001 feature I have maintained :
A Master Data and Time Data
INFTY Infotype
0000
SUBTY Subtype
A3
IDTXT MAIL_FOR_I0002
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
A2
IDTXT MAIL_FOR_I0006
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
It doesnt work but if i maintain dynamic action as
0000 06 4 P T001P-MOLGA='40'
0000 06 6 P P0000-MASSN='A2'
0000 06 8 M M0001
and in M0001 feature I have maintained :
A Master Data and Time Data
INFTY Infotype
0000
IDTXT MAIL_FOR_I0002
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
the mails are getting triggered with no problem. Im not sure where i am goin wrong. Please help as I have send out different mails for different actions and i have 9 types of actions to take into account here.
Points wil be rewarded
Hi BI ,
Did you try the dynamic action by including '/X' and try to maintain
M0001 feature as u had maintained earlier.
A Master Data and Time Data
INFTY Infotype
0000
SUBTY Subtype
A3
IDTXT MAIL_FOR_I0002
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
A2
IDTXT MAIL_FOR_I0006
RECV1 X
RECV2 X
RECV3 X
OUTBX X
NAME1 RCNEW
Similar Messages
-
Hello. I have two devices and two accounts, so what i want is this:
I only want to store mail from both accounts in a remote place and copy most important mails to local folders.
(I will be grateful for any ideas as to where/how this "cloud" can be - specially free places)
* Can I have a copy of these local folders in both devices and the remote storage?
* Could i synchronize devices so that: when i move a mail to a local folder in any device, its copied to the same folders in
the other device and the remote storage place?
* The remote storage place will have many other folders. When I open Thunderbird, I also want to see these and the mail
inside, and also be able to move mail from the inbox to these folders.
* One of the accounts is gmail. In Account Setting tool, there is an option for synchronization. If there is no easier way, I can have mail for other account copied to gmail, and just syncronize gmail mail. For this, how will I copy my present folder structure to gmail. And how can I syncronize the local folders on the two devices?
Thanks in advance.The first awkwardness I see is that there's no obvious format in which to store messages remotely such that you can work with them in an email client. It may be possible to set the "Local Directory" option in the account in Thunderbird to point at some remote folder (DropBox comes to mind) but I have never tried this and I'd be nervous about what happens if connection can't be made, or if you happened to access it from two different places simultaneously. The other concern is that mail stores get big, quickly, and you'd be forever uploading and downloading large (multi gigabyte) files. Thunderbird stores what looks like a folder containing many separate messages as one big file, so there's no simple opportunity for incremental changes to be up/down loaded.
The whole idea of Local Folders in Thunderbird is to detach messages from servers, so they don't track what happens on servers. I say this to point out the distinction between files stored locally and permanently ("Local Folders"), versus cached copies of online files ("synchronized"). It's not safe to regard your synchronized folders as permanent.
So, synchronized folders on an IMAP server are "mirrored" in Thunderbird so you do have a local (albeit temporary and transient) copy of messages; this is done mainly to avoid repeatedly downloading messages if you re-read them, and it makes searching faster an more efficient. But these "synchronized" message track what's being done on the server, and so if they are deleted anywhere, all synchronized devices will at some point also see the deleted messages vanishing. (Unless you made a local copy in the Local Folders account.)
I use a gmail account pretty much as you have described; I copy or move messages to that account so they are visible in my phone, my tablet, my own laptop and my works computer. It's free, and it's "in the cloud"; the only reservation I have is its privacy. There are other providers (e.g. 1&1/gmx) who don't seem to have the data collection fetish that google thrives on.
It's fairly simple to create filters in Thunderbird to automatically copy messages to your "cloud account"; even better is to set up forwarding rules on the other accounts' servers, so your messages are automatically sent on and waiting for you when you next login, already in the cloud account. -
Triggering multiple mails for external Mail id when PO is created
Hi,
I configured PO workflow and i used a standard program to send the mail to the external Mail id's of the users.
The thing is when a PO is created the user whos has to release the PO is getting a Mail in Business Workplace through work flow and simoultaneously a mail will go to his external mail with a message that So and so PO is created please release it.
As he cant keep on monitor his SAP Business workplace,whenever he get a mail to his external id,he will login to SAP and approves or rejects the PO.
Here the probelm is the external mail is keep on triggering for every 15 min as we scheduled the Job for ever 15 min.
So for the same PO number it is giving multiple mails to the external id until it is released.
It should be like one mail should trigger for one PO number instead of multiple mails for the sam PO number.
I'am unable to find the solution.
Please guide me with a solution.
With Regards,
PraveenHi Praveen,
1> Goto transaction SWO1.
2> Enter Object/Interface Name as BUS2012 and click on Create Subtype.
3> Enter the required values (you can give ZBUS2012 everywhere....only give Application as R). Place cursor on methods and click on create. Enter details and finally give name of your function module (which you would be creating with the logic of sending mails to selected users) in ABAP tab.
4> Place cursor on method name and click on parameters and create the required parameters. These parameters would receive value from task container.
5> Finally goto transaction SWO6 and delegate this BO to parent BO (which is BUS2012). This would enable the methods of child BO to be available to the parent one.
Try the steps and let me know wherever you get stuck.
Best regards,
Abir -
SAP SCRIPT SO10 and Email Notification for different actions
I am working on a SAP Script now to send a notification whenever there is a Prehire ,New Hire or Termination scenario. I am a functional SAP person and need some help in one of the scenarios.
The notification seems to work fine except for two things -
I am able to get the values for MASSN (Action) and MASSG (reason code) but not the text. For e.g. I am able to get 01 with reason code 02. Action 01 is New Hire activation and reason code 02 is Addition. I want these text in my notification. How can I get it ?
Secondly , we do a Prehire action when the employee accepts the offer. We just create IT0000, IT0001 , IT0041 and IT0002. But the employee stays in INACTIVE status untill new hire activation action is done. When I do a Prehire action, I am able to get only IT0000 related data ie. MASSN and MASSG but not position or emp group etc. Why it is not giving me the IT0001 related info ? Here is what my SO10 text looks like now --
Action on &sy-datum&
/: DEFINE &CHANGEDON& = &P0000-AEDTM&
/: DEFINE &USER& = &P0000-UNAME&
/: DEFINE &ACTION& = &P0000-MASSN&
/: DEFINE &REASONCODE& = &P0000-MASSG&
/: DEFINE &FIRSTNAME& = &P0002-VORNA&
/: DEFINE &LASTNAME& = &P0002-NACHN&
/: DEFINE &HIREDATE& = &P0041-DAT01&
/: DEFINE &PERSAREA& = &P0001-WERKS&
/: DEFINE &EMPGROUP& = &P0001-PERSG&
/: DEFINE &ACTIONTEXT& = &T5885-DTEXT&
/: DEFINE &PERNR& = &P0000-PERNR&
/: DEFINE &POSITION& = &P0001-PLANS&
/: PERFORM EXT_TEXT IN PROGRAM ZHR_RETR_TXT
/: USING &PERNR&
/: CHANGING &POSITION&
/: ENDPERFORM
L THIS IS TO NOTIFY YOU THAT EMPLOYEE &PERNR&,&FIRSTNAME& &LASTNAME& WAS HIRED
ON &CHANGEDON& BY &USER& FOR &ACTION& WITH &REASONCODE&
/ THE ORIGINAL HIRE DATE (START DATE) OF THIS EMPLOYEE IS &HIREDATE&.
THIS EMPLOYEE WAS HIRED AS &POSITION& FOR &PERSAREA& AS A &EMPGROUP&.
I will appreicate your help.
SanghamitraHI,
Please have a look at the following doc:
http://www.renet-web.net/2009/07/23/automated-emails-in-sap-solution-manager-made-easy/
U may need to make some minor modifications to get ur requirement. I hope u will be able to do that once u go through this.
Rajeev. -
Sending a text mail for different user in
Hi Abapers,
I am trying to use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send a Text mail like "Purchase order is pending" .But how i can send a text mail .
Here we are not attach any document only the text message we need to different mail id.Or is there any other FM to send text mail.
Please help me if u have any sample code to send a text mail.
Thanks
NaniHi
You can use the fun module
UWSP_SEND_MAIL_TO_WEB
see the sample program using both he fun modules for sending some mails
REPORT zm_reservation_alert
NO STANDARD PAGE HEADING
MESSAGE-ID zm_msg.
D A T A B A S E T A B L E S D E C L A R A T I O N
T Y P E S D E C L A R A T I O N S
Reservations Main Structure
TYPES: BEGIN OF s_res,
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
usnam TYPE usnam, " User Name
bwart TYPE bwart, " Movement Type
aufnr TYPE aufnr, " Order Number
rsart TYPE rsart, " Record Type
bdart TYPE bdart, " Reservation Type
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
usrid TYPE sysid, " User ID
END OF s_res.
Output Main Structure
TYPES: BEGIN OF s_rep,
usnam TYPE usnam, " User Name
rsnum TYPE rsnum, " Reservation No
rspos TYPE rspos, " Item No
matnr TYPE matnr, " Material No
bdter TYPE bdter, " Req Date
menge TYPE menge_d, " Quantity
kostl TYPE kostl, " Cost Center
aufnr TYPE aufnr, " Order Number
END OF s_rep.
User Dept Details
TYPES: BEGIN OF s_dept,
pernr TYPE persno, " Personal No
usrid TYPE sysid, " User ID
orgeh TYPE orgeh, " Orgn Unit
orgtx TYPE orgtx, " Dept Name
END OF s_dept.
For Send Mail Purpose
DATA : i_doc_data LIKE sodocchgi1.
DATA : BEGIN OF i_pack_list OCCURS 0.
INCLUDE STRUCTURE sopcklsti1.
DATA : END OF i_pack_list.
DATA : BEGIN OF i_receivers OCCURS 0.
INCLUDE STRUCTURE somlreci1.
DATA : END OF i_receivers.
DATA : BEGIN OF i_contents OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_contents.
DATA : BEGIN OF i_header OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_header.
DATA : BEGIN OF i_att OCCURS 0.
INCLUDE STRUCTURE solisti1.
DATA : END OF i_att.
Internal table for bdcdata
DATA : it_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
Internal table to handle messages
DATA : it_messages LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
D A T A D E C L A R A T I O N S
DATA: gv_lines TYPE sy-index, " Total Lines int Table
gv_days TYPE i, " Difference Days
gv_date TYPE sy-datum, " Date
gv_date1 TYPE sy-datum, " Date
gv_date2 TYPE sy-datum, " Date
gv_text(85), " Text Field
gv_mesg(70), " Error Messages
gv_bdc, " BDC Flag
gv_flag TYPE i, " Flag
gv_ernam TYPE ernam. " User ID
C O N S T A N T S D E C L A R A T I O N S
CONSTANTS: c_x VALUE 'X', " Flag
c_endda TYPE endda VALUE '99991231'. " Date
I N T E R N A L T A B L E S D E C L A R A T I O N S
DATA: i_res TYPE STANDARD TABLE OF s_res WITH HEADER LINE, " Reservns
i_dept TYPE STANDARD TABLE OF s_dept WITH HEADER LINE, " Dept
i_rep TYPE STANDARD TABLE OF s_rep WITH HEADER LINE. " Output
S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Fetch main data
PERFORM fetch_data.
Process data
PERFORM process_data.
*& Form fetch_data
Fetching the Reservations related data from Database Tables
FORM fetch_data .
CLEAR: gv_date, gv_date1, gv_date2.
gv_date = sy-datum.
gv_date1 = sy-datum - 10.
gv_date2 = sy-datum + 10.
CLEAR i_res.
REFRESH i_res.
SELECT a~rsnum " Reservation No.
b~rspos " Reservation Item
a~usnam " User Name
a~bwart " Movement Type
a~aufnr " Order Number
b~rsart " Record Type
b~bdart " Reservation Type
b~matnr " Material No
b~bdter " Req Date
INTO TABLE i_res
FROM rkpf AS a JOIN resb AS b
ON arsnum = brsnum
WHERE ( b~bdter BETWEEN gv_date1 AND gv_date2 ) AND
b~xloek EQ ' '.
SORT i_res BY rsnum rspos.
DELETE ADJACENT DUPLICATES FROM i_res COMPARING matnr.
Add userid into the i_usr int table
LOOP AT i_res.
i_res-usrid = i_res-usnam.
MODIFY i_res INDEX sy-tabix.
ENDLOOP.
IF NOT i_res[] IS INITIAL.
Get the User Dept Name
CLEAR i_dept.
REFRESH i_dept.
SELECT a~pernr " Personal No
a~usrid " User ID
b~orgeh " Orgn Unit
c~orgtx " Dept Name
INTO TABLE i_dept
FROM pa0105 AS a JOIN pa0001 AS b
ON apernr = bpernr JOIN t527x AS c
ON borgeh = corgeh
FOR ALL ENTRIES IN i_res
WHERE a~usrid = i_res-usrid AND
a~endda EQ c_endda AND
b~endda EQ c_endda.
ENDIF.
SORT i_dept BY pernr.
DELETE ADJACENT DUPLICATES FROM i_dept COMPARING pernr.
Move the Creator of Reservation to a diff table
LOOP AT i_res.
MOVE-CORRESPONDING i_res TO i_rep.
APPEND i_rep.
CLEAR i_rep.
ENDLOOP.
SORT i_rep BY usnam rsnum rspos.
ENDFORM. " Fetch_Data
*& Form process_data
Process the Reservations related data for Expiry Date
FORM process_data .
DATA: lv_date1 LIKE sy-datum,
lv_date2 LIKE sy-datum,
lv_date3(10),
lv_menge(13),
lv_tabix LIKE sy-tabix.
LOOP AT i_rep.
CLEAR: gv_days, gv_text, lv_date1, lv_date2,lv_date3.
lv_tabix = sy-tabix.
AT NEW usnam.
Populate the Contents Table
CLEAR i_att.
REFRESH i_att.
i_att = 'Reservations Reminder'(014).
APPEND i_att.
i_att = '----
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
READ TABLE i_dept WITH KEY usrid = i_rep-usnam.
CONCATENATE 'Name:'(003) i_rep-usnam 'Dept:'(015) i_dept-orgtx
INTO i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
i_att = 'Please find the List of expiring Reservations'(004).
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE 'Reservation #'(006) 'Material #'(007) ' Quantity'(002)
'Due Date'(008) 'Work Center/CC'(005) INTO
i_att-line SEPARATED BY space.
APPEND i_att.
CONCATENATE '--' '' '--
' INTO
i_att-line SEPARATED BY space.
APPEND i_att.
i_att-line = ' '.
APPEND i_att.
ENDAT.
gv_days = i_rep-bdter - gv_date.
lv_date1 = i_rep-bdter + 5.
lv_date2 = i_rep-bdter + 10.
MOVE i_rep-menge TO lv_menge.
WRITE i_rep-bdter TO lv_date3.
IF gv_days = 10.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 10 days. Please collect'(009)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_days = 5.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is due for 5 days. Please collect'(010)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date1.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is getting cancelled on'(011) lv_date2
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
ENDIF.
IF gv_date = lv_date2.
IF i_rep-aufnr <> space.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-aufnr 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ELSE.
CONCATENATE i_rep-rsnum i_rep-matnr lv_menge lv_date3
i_rep-kostl 'is being cancelled'(012)
INTO gv_text SEPARATED BY space.
ENDIF.
i_att-line = gv_text.
APPEND i_att.
CLEAR i_att.
CLEAR gv_text.
Mark the Reservation Item 'DELETED' using BDC.
UPDATE resb SET xloek = c_x.
PERFORM delete_item_resb.
ENDIF.
AT END OF usnam.
IF ( gv_days = 10 OR gv_days = 5 OR gv_date = lv_date1 OR
gv_date = lv_date2 ).
Read the User who creates the Reservn and send a mail alert to him
CLEAR : i_receivers,gv_ernam.
REFRESH: i_receivers.
READ TABLE i_rep INDEX lv_tabix.
gv_ernam = i_rep-usnam.
IF gv_ernam <> space.
Send mail Alert to PR Creator(SAP inbox)
PERFORM send_alert_data.
Send Mail to External Mail ID of the SAP USER
PERFORM send_mail_external.
ENDIF.
ENDIF.
ENDAT.
ENDLOOP.
ENDFORM. " Process_data
*& Form delete_item_resb
Set the Deletion Indicator for the Res. Item in RESB
FORM delete_item_resb.
gv_bdc = 'N'.
Perform to fill it_bdcdata.
PERFORM fill_it_bdcdata.
Call the Transaction MB22
CALL TRANSACTION 'MB22' USING it_bdcdata MODE 'A' UPDATE 'S'
MESSAGES INTO it_messages.
IF sy-subrc <> 0.
gv_flag = 1.
If error occurs in transaction mode run bdc session for that data
PERFORM bdc_process.
ENDIF.
Handles error messages
PERFORM error_messages.
CLEAR : it_bdcdata, it_messages.
REFRESH : it_bdcdata, it_messages.
IF gv_bdc = 'O'.
close bdc if it is open
PERFORM close_bdc.
ENDIF.
ENDFORM. "delete_item_resb
*& Form FILL_IT_BDCDATA
Filling Bdcdata structure with data
FORM fill_it_bdcdata.
PERFORM bdc_dynpro USING 'SAPMM07R' '0560'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RM07M-RSPOS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RM07M-RSNUM'
i_rep-rsnum.
PERFORM bdc_field USING 'RM07M-RSPOS'
i_rep-rspos.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-XLOEK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RESB-XLOEK'
c_x.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
PERFORM bdc_dynpro USING 'SAPMM07R' '0510'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RESB-ERFMG'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_dynpro USING 'SAPLKACB' '0002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'COBL-KOSTL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTE'.
ENDFORM. " FILL_IT_BDCDATA
*& Form BDC_DYNPRO
Filling the it_bdcdata table with program name & screen number
FORM bdc_dynpro USING program LIKE bdcdata-program
dynpro LIKE bdcdata-dynpro.
it_bdcdata-program = program.
it_bdcdata-dynpro = dynpro.
it_bdcdata-dynbegin = 'X'.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
Filling it_bdcdata with field name and field value
FORM bdc_field USING fnam LIKE bdcdata-fnam
fval.
it_bdcdata-fnam = fnam.
it_bdcdata-fval = fval.
APPEND it_bdcdata.
CLEAR it_bdcdata.
ENDFORM. " BDC_FIELD
*& Form ERROR_MESSAGES
Displaying error messages
FORM error_messages.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = sy-langu
IMPORTING
msg = gv_mesg
EXCEPTIONS
not_found = 1
OTHERS = 2.
LOOP AT it_messages WHERE msgtyp = 'E'.
WRITE : / 'Message :'(001) ,gv_mesg.
CLEAR it_messages.
ENDLOOP.
ENDFORM. " ERROR_MESSAGES
*& Form BDC_PROCESS
Open bdc session if call transaction fails
FORM bdc_process.
IF gv_bdc = 'N'.
open bdc session
PERFORM open_bdc.
gv_bdc = 'O'.
ENDIF.
IF gv_bdc = 'O'.
insert data into bdc session
PERFORM insert_bdc.
ENDIF.
ENDFORM. " BDC_PROCESS
*& Form OPEN_BDC
Calling function module to open bdc session
FORM open_bdc.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'ZMM'
keep = 'X'
user = sy-uname
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
ENDFORM. " OPEN_BDC
*& Form INSERT_BDC
Insert it_bdcdata into bdc by calling function module bdc_insert
FORM insert_bdc.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'MB22'
TABLES
dynprotab = it_bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7.
ENDFORM. " INSERT_BDC
*& Form CLOSE_BDC
Closing bdc session
FORM close_bdc.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
ENDFORM. " CLOSE_BDC
*& Form send_alert_data
Send Alert for the Expired Contract
FORM send_alert_data .
CLEAR: gv_lines,i_receivers, i_header, i_contents,i_doc_data.
REFRESH : i_receivers,i_header,i_contents.
DESCRIBE TABLE i_att LINES gv_lines.
i_receivers-receiver = gv_ernam.
i_receivers-receiver = 'SSHEIK'.
i_receivers-rec_type = 'B'.
i_receivers-rec_date = sy-datum.
i_receivers-express = 'X'.
i_receivers-com_type = 'INT'.
i_receivers-notif_del = 'X'.
APPEND i_receivers.
i_doc_data-obj_name = 'SAPoffice'(013).
i_doc_data-obj_descr = 'Reservations Reminder'(014).
i_doc_data-obj_langu = 'E'.
i_doc_data-no_change = c_x.
i_doc_data-obj_prio = 1.
i_doc_data-priority = 1.
i_doc_data-doc_size = ( gv_lines - 1 ) * 255 + 135.
i_pack_list-transf_bin = c_x.
i_pack_list-head_start = '1'.
i_pack_list-head_num = '1'.
i_pack_list-body_start = '1'.
i_pack_list-body_num = gv_lines.
i_pack_list-doc_type = 'DOC'.
i_pack_list-obj_name = 'SAPoffice'(013).
i_pack_list-obj_descr = 'Reservations Reminder'(014).
i_pack_list-obj_langu = 'E'.
i_pack_list-doc_size = ( gv_lines - 1 ) * 255 + 135.
APPEND i_pack_list.
i_header-line = 'Header'. APPEND i_header.
Data for contents
i_contents-line = 'Please find the Reservations Due List'(016).
APPEND i_contents.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = i_doc_data
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = i_pack_list
object_header = i_header
contents_bin = i_att
contents_txt = i_contents
receivers = i_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 i000 WITH 'Mail Sucessfully sent'(017).
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " send_alert_data
*& Form send_mail_external
Send mail to External MAIL ID of the PR Creator
FORM send_mail_external.
DATA : lv_str(24), lv_str1(40),
lv_pernr LIKE adr6-persnumber,
lv_adrnr LIKE adr6-addrnumber,
lv_usrid LIKE pa0105-usrid,
lv_mail LIKE adr6-smtp_addr,
lv_sendor TYPE syuname,
lv_receiver TYPE string,
lv_header TYPE string,
lv_body TYPE string.
CLEAR: lv_pernr, lv_usrid, lv_adrnr,
lv_mail, lv_sendor, lv_receiver,
lv_header, lv_body .
lv_usrid = gv_ernam.
SELECT SINGLE persnumber addrnumber FROM usr21
INTO (lv_pernr,lv_adrnr)
WHERE bname = lv_usrid.
IF sy-subrc = 0.
SELECT SINGLE smtp_addr INTO lv_mail FROM adr6
WHERE addrnumber = lv_adrnr AND
persnumber = lv_pernr.
IF sy-subrc <> 0.
CONCATENATE lv_usrid '@anc.com' INTO lv_mail.
lv_receiver = lv_mail.
ELSE.
lv_receiver = lv_mail.
ENDIF.
lv_receiver = '[email protected]'.
lv_sendor = 'JALKHATAM'.
lv_header = 'Reservations Reminder'(014).
lv_str = 'Pls check your SAP Inbox'(019).
lv_str1 = 'for the status of Reservations Due List'(020).
CONCATENATE lv_str lv_str1 INTO lv_body
SEPARATED BY space.
Call Function Module To send mail
CALL FUNCTION 'UWSP_SEND_MAIL_TO_WEB'
EXPORTING
id_header = lv_header
id_body = lv_body
id_receiver = lv_receiver
id_sender = lv_sendor
ID_HTML_MAIL =
id_commit_work = 'X'
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDFORM. " send_mail_external
Reward points for useful Answers
Regards
Anji -
Triggering a mail for a Particular payload
Dear Friends,
I am doing a file to file scenario beween the same system.
My requirement is that if the payload of the file has flag value as 'S' i should put it in output folder in the ftp.
But if the flag is 'E' then i should trigger a mail.
Where this validation can be done and a mail can be triggered.
Please tell how to handle the same with out using the BPM.
Thanks
PremHi Prem
This can be done without using BPM.
You need to set conditions in the receiver determination.
Go to Receiver determination in ID
Configured receivers
set conditions
refer help link
http://help.sap.com/saphelp_nw70/helpdata/EN/43/a513f2632c332ce10000000a11466f/content.htm
for Flag S -> OP (=) put in folder so select receiver service for file adapter
for Flag E -> OP (=) send error email and select the receiver for the mail adapter etc.
Thanks
Gaurav -
Automatic triggering of idoc for Personal Actions T Code ( PA40 )
Hi Experts,
I wanted to do automatic triggering of idoc after performing Personal Actions by transaction PA40.
Needed some info .
Thanx in Advance,
PradiptaHi Pradipta,
You can use the change pointers for this. Just check for what fields you want to trigger an IDOC. But this can not be triggered immediately. You have to run RBDMIDOC frequently. It will take the input as messaeg type and generate the IDOCs.
Before that please check if the change pointers are activated for this message type or not.
shylesh -
Setting up Mail for different locations
I have enjoyed using a MacBook Pro at several locations including my home and office. I use wireless at home (airport extreme) and connect using ethernet or wireless at work. While my programs and safari work seamlessly at both locations, I cannot access my e-mail using Mail unless I am at home on my home network. I used the Connection Doctor while at work, but it only indicated that I wasn't connected. While it was saying that, I was simultaneously searching for solutions to this problem on safari and updating my software using software update. Does anyone have any suggestion for how to set up Mail at work?
I would suggest posting this question in the "Applications > Mail and Address book" Discussion board.
-
Triggering E-mail for failed outbound idoc (Without using workflow)
Hi Experts,
In my secnario Idoc to file, where any failures of Idoc( Inbound/Outbound ) at SAP R/3 side will generate and send Emails to the required group. How to do this without using Work flow. If anybody knws please help me out its very urget.
Regards,
venkateshHi,
Create a Distribution list using SO23 and add Users whom to recieve messages.
Modify your Inbound function module to handle if idoc failed to post by calling the function module: SO_NEW_DOCUMENT_SEND_API1
Reward points if it is helpful.
Ashok -
Problem in Triggering the Mail to SAP Inbox
Dear Experts,
I have a problem for triggering the Mail option to SAP Inbox.
We created a Job assigning the program RSEIDOCA,RSWUWFML2 by creating a variant for those programs. We are scheduling the job, It is showing as
24.11.2010 12:43:46 Job started 00 516 S
24.11.2010 12:43:46 Step 001 started (program RSEIDOCA, variant ZRSEIDOCA, user ID__ ) 00 550 S
24.11.2010 12:43:48 Error situation found by evaluation E0 596 S
24.11.2010 12:43:48 Step 002 started (program RSWUWFML2, variant ZRSWUWFML2, user ID__) 00 550 S
24.11.2010 12:43:49 Job finished 00 517 S
But while checking in SOST, we are unable to see those mails. eventhough the user is unable to get those mail in SAP INBOX.
I think, is there any authorization problem while triggering the mail for that particular user id.. Please tell me the solution, this is very high requirement for me.
Thanks in Advance.
Regards,
SriniHi Chandra,
Thanks for your reply. Actually i am not workflow consultant, thats why i asking this question. Where to assign the Receipient Type and Recipient Notification.
you give Recipient Type as position and Recipient of Notification must be position of the reciepient,
Regards,
Srini -
The same output message for different partner roles
Hi All,
Is it possible to create automaticaly in PO the same output message type ( for example - 'mail') for different partner roles( for example - 'VN' and 'OA') ?
If it's possible,then how?
Thanks.
LizaHi,
Thank you ,but I have a next problem:
When I tried in transaction mn05 to add second record for the same output type for other partner roles.
I got error message "The condition record entered already exists".
Regards,
L. -
How to Block mails for HR only
Dear expert/guru
Please let me know how to block mails for HR only.
We don't want to block mails for all.....Juan Reyes wrote:
There is no way to block mails based on a "Module", as Olivier said you can only filter mails per domain under the node config in SCOT.
>
> I don't understand why would anyone see a benefit by stopping people on an specific are from receiving mail. In anycase you can stop the SAPCONNECT job and filter the mails to be sent manually from SOST but thats a lot of work!.
>
> Regards
> Juan
>
> PS: Also you can simply stop the jobs creating the "HR mails" in the first place.... huh?
hi,
Issue is given below:
My SAP HR Team has some leave issues.
Due to which they need to stop the triggering of mails for few mins in Production system -
How can I configure Mail for pop servers when it wants to make it an IMAP account?
When starting Mail for the first time, I enter my account credentials and Mail sets it up as an IMAP account. For the past several years, I've needed to configure the pop server settings for this account on different devices. The IMAP configuration Mail came up with won't work. How can
The way of setting up Mail for different account types is to:
Open Preferences
Click Accounts
Click +
Enter username and password, then hold down the option key when clicking Continue. -
Different mail ID for different workflows
Hi All,
As per my knowledge if we use mail task in work flow a e-mail will be triggered from mail ID maintained for user wf_batch , is there any way to send mail through different mail iD for different workflows by using mail tasks only, not by using a separate task and using some function modules in that to send mails.
Thanks
VinodHi,
I have done this once. It is not the best I admit as many things must be considered, yet it worked.
In the binding of an activity step, prior to the mail send step, I have included the calling to a custom FM.
In this FM I have dinamically changed the mail address of WF-BATCH (the address was set in an ad-hoc paramenter.
Then right after the mail send step, again in the following binding, I have run the very same FM, with different paramenters of course, to put the address back to where it was.
Corrado -
Monitoring availability - Different action for Production/Non-production
Hi there,
We've configured availability monitoring on our central monitoring system using CCMSPING agent. Everything is configured correctly and working nicely. However, I have a problem how to take a different action depending on whether alert was raised for production or non-production system.
I've configured an autoreaction method for MTE class Availability_SysPercent_ABAP. This class is not dependent on the remote system. It is the same for all monitored systems, which is the reason for my problems.
If I assign an autoreaction method to the MTE class, the same method will be called if there is an alert for any of the monitored systems. The autoreaction method automatically logs a new ticket in our call handling system. Unfortunately the call handling system can't parse the email to find out which system was the alert generated for. It can only raise a ticket based on some keywords in the content of the email.
The way we configure CCMS for everything (apart from availability) is that we assign different autoreaction methods to different MTE classes. It can't be done in this case as there is only one MTE class. We can't assign different autoreaction method to individual MT elements as this is lost (see note 660126). One of the options could be to change CCMSPING to generate a different MTE class for production and non-production systems, but I haven't found a way of doing it. Another option was to have 2 CCMSPINGs, but they both use the same MTE class.
Has anyone got any experience with this or can suggest anything we can try?
Thanks,
RobHi,
Its still available.
You can still assign different method to nodes.
Its working fine , we are using.
You can assign different method to different systems in RZ20 itself.
Regards,
Maybe you are looking for
-
Graphics going bad -- Monitor or graphics card failure?
My graphics are starting to go haywire. It came on sort of gradually. The screen is all pixelated, and it's dominated by red pixels. My sense is that it's a hardware failure, not a software problem. But how can I determine if it's the monitor, or
-
Help me catch my hacker...please!
Hi. I have an old Mac Pro 1,1 (2007 I believe), OSX 10.7.5 that has been hacked. I have read some of the questions here so I'll try to include all the necessary info. some of the things that have happened are that a new admin user account is on my co
-
I bought Lion from the App Store. It installed to my laptop and I would like to install it on another machine. Can I do this without having to buy another copy?
-
Synchronize TOC greyed out?
I have a RobohelpHTML project, everything is great except when you click on pages in the TOC the TOC does not stay highlighted or automatically expand a book to give the user context as to where they are. As far as I can tell from reading around, I n
-
Archiso-live-2009-12-08 live CD not usable
I have recently downloaded the archiso-live-2009-12-08 live CD but I am unable to use it. I did a md5 check of the iso, and that is ok. It boots into something that remotely resembles a desktop. I have a Nvidia 9600GT graphics card for which X ins