Custome Workflow will send mail after 6 months from a document added
Hi,
I have created a custom sequential workflow in Visual studio. As per the requirement, the workflow will send mail to approvers after 6 months from the document added date. Is that possible? I don't want to use timer job, as there is some other issue. Can
I do the same in workflow itself? Which event will work for the same?
Thanks
Hi,
You can setup retention policy to start workflow after 6 months from created date:
http://blogs.askcts.com/2013/05/14/creating-a-timed-workflow-in-sharepoint-2010/
http://community.office365.com/en-us/f/154/t/252993.aspx
Hope it helps!
Thanks,
Avni Bhatt
If this helped you resolve your issue, please mark it Answered
Similar Messages
-
Sending mail after converting from otf to pdf
Hi all,
i have an requirement of converting script output i.e., otf to pdf converting and i want send that account statement to the mail id which is maintatined in XD03 t.code,based on different customers differnt account statement should post ,
please suggest me ASAP.use the function module
CONVERT to pdf
SX_OBJECT_CONVERT_OTF_PDF
- Email the PDF data using
SO_NEW_DOCUMENT_ATT_SEND_API1
examples
Option 1.
- converting OTF data returned from CLOSE_FORM (requested in OPEN_FORM) to PDF format using SX_OBJECT_CONVERT_OTF_PDF
- Email the PDF data using SO_NEW_DOCUMENT_ATT_SEND_API1
Result
>> Everything works fine except that the output cannot be sent to spool and previewed (due the request of OTF table in OPEN_FORM)
>> The PDF attachment can be downloaded and view directly.
Option 2.
- converting spool to PDF format using CONVERT_OTFSPOOLJOB_2_PDF
- Email the PDF data using
SO_NEW_DOCUMENT_ATT_SEND_API1
Result
>> The output can be previewed and sent to spool. No error returned from sending mail.
>> However, the attachment of PDF file cannot be downloaded (from SBWP Business Workspace). An error message "Database error for <GET DATA FROM KPRO>" was displayed when I try to download the PDF file
You can try something like this
IF SY-UCOMM = 'VIEW'.
CLEAR ITCPO-TDGETOTF.
ENDIF.
***OPEN_FORM
*etc
***CLOSE_FORM
IF NOT SY-UCOMM = 'VIEW'.
**SEND MAIL
ENDIF.
example code
REPORT ZSENDPDF NO STANDARD PAGE HEADING.
TABLES: TST05,
TSP01,
NAST,
T685B,
USR01.
DATA: BEGIN OF TAB_PDF OCCURS 0,
TLINE(255).
DATA : END OF TAB_PDF.
DATA: BEGIN OF TAB_OTF OCCURS 0,
TLINE(255).
DATA : END OF TAB_OTF.
DATA: BEGIN OF TAB_DATA_SET OCCURS 0,
DATA_LENGTH(5),
PRECOL(1),
DATA_LINE(1000).
DATA : END OF TAB_DATA_SET.
DATA: BEGIN OF TAB_OTF_PAGE OCCURS 0.
INCLUDE STRUCTURE ITCOO.
DATA: END OF TAB_OTF_PAGE.
DATA : BEGIN OF TAB_OTF_PAGE_INDEX OCCURS 0,
LINE_NUM TYPE P.
DATA : END OF TAB_OTF_PAGE_INDEX.
DATA: BEGIN OF TAB_DATA_SET_LINE,
DATA_LENGTH(5),
PRECOL(1),
DATA_LINE(1000).
DATA : END OF TAB_DATA_SET_LINE.
DATA : BEGIN OF TAB_TSP01 OCCURS 0,
RQIDENT LIKE TSP01-RQIDENT,
RQCOPIES LIKE TSP01-RQCOPIES.
DATA : END OF TAB_TSP01.
DATA :
LEN_OUT LIKE SOOD-OBJLEN,
LEN_IN LIKE SOOD-OBJLEN,
OTF_PAGES TYPE P,
*otf_max_pages type p value 100,
OTF_MAX_PAGES TYPE P VALUE 1000,
DATA_SET_LINECOUNT TYPE P,
*data_set_max_lines type p value 1000000,
DATA_SET_MAX_LINES TYPE P VALUE 100000,
DATA_SET_IS_OTF TYPE C VALUE ' ',
DATA_SET_LENGTH(5) TYPE C,
DSN_TYPE( TYPE C,
RC(10) TYPE C,
ERRMSG(100) TYPE C,
LINE_MAX TYPE P VALUE '100000',
STATUS LIKE SY-SUBRC,
H_PATH(20) TYPE C,
H_MASK(20) TYPE C VALUE ',.pdf ,.pdf. ',
FILE_NAME(20),
FILENAME LIKE RLGRAP-FILENAME,
C_PAGE_BREAK TYPE I,
K_PAGE_BREAK TYPE I.
PARAMETER : P_RQID(5) TYPE C.
START-OF-SELECTION.
END-OF-SELECTION.
PERFORM GET_TAB_OTF.
CLEAR K_PAGE_BREAK.
LOOP AT TAB_OTF_PAGE WHERE TDPRINTCOM = 'EP'.
ADD 1 TO K_PAGE_BREAK.
ENDLOOP.
CLEAR C_PAGE_BREAK.
LOOP AT TAB_OTF_PAGE.
IF TAB_OTF_PAGE-TDPRINTCOM EQ 'EP'.
ADD 1 TO C_PAGE_BREAK.
IF C_PAGE_BREAK GE 3 AND C_PAGE_BREAK LT K_PAGE_BREAK.
TAB_OTF-TLINE = 'EP'.
APPEND TAB_OTF.
ENDIF.
ENDIF.
TAB_OTF-TLINE = TAB_OTF_PAGE.
APPEND TAB_OTF.
ENDLOOP.
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
FORMAT_SRC = 'OTF'
FORMAT_DST = 'PDF'
DEVTYPE = 'ASCIIPRI'
LEN_IN = LEN_IN
IMPORTING
LEN_OUT = LEN_OUT
TABLES
CONTENT_IN = TAB_OTF
CONTENT_OUT = TAB_PDF
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2.
PERFORM GET_PATH USING 'PDF_FILE'.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'BIN'
BIN_FILESIZE = LEN_OUT
TABLES
DATA_TAB = TAB_PDF
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
*& Form GET_tab_otf
FORM GET_TAB_OTF.
DATA: PART(4) VALUE '0001',
BEGIN OF MSG,
A(40),
B(40),
C(40),
END OF MSG.
REFRESH TAB_DATA_SET.
DATA_SET_LINECOUNT = 0.
DATA_SET_IS_OTF = ' '.
OTF_PAGES = 0.
REFRESH TAB_OTF_PAGE_INDEX.
CALL 'RSPOACSD'.
SELECT * FROM TST05 WHERE DTHREAD = 'X'.
CALL 'RSPOAOSD'
ID 'ID' FIELD P_RQID
ID 'TYPE' FIELD TST05-DTYPE
ID 'RECTYP' FIELD 'VYL----'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
IF STATUS = 0.
DSN_TYPE = TST05-DTYPE.
IF DSN_TYPE(3) = 'OTF'.
DATA_SET_IS_OTF = 'X'.
ENDIF.
ENDIF.
IF STATUS <> 24. EXIT. ENDIF.
ENDSELECT.
DATA_SET_MAX_LINES = ( LINE_MAX * '1.1' ) + 100.
DO.
CLEAR: TAB_DATA_SET_LINE, DATA_SET_LENGTH.
CALL 'RSPOARSD'
ID 'BUFF' FIELD TAB_DATA_SET_LINE+5
ID 'DATALEN' FIELD DATA_SET_LENGTH
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
IF STATUS = 36.
WHILE STATUS = 36.
CALL 'RSPOACSD'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
ADD 1 TO PART.
IF DATA_SET_IS_OTF = ' '.
CALL 'RSPOAOSD'
ID 'ID' FIELD P_RQID
ID 'TYPE' FIELD DSN_TYPE
ID 'PART' FIELD PART
ID 'RECTYP' FIELD 'VYL----'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
ELSE.
CALL 'RSPOAOSD'
ID 'ID' FIELD P_RQID
ID 'PART' FIELD PART
ID 'TYPE' FIELD DSN_TYPE
ID 'RECTYP' FIELD 'VYL----'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
ENDIF.
IF SY-SUBRC NE 0. EXIT. ENDIF.
CLEAR: TAB_DATA_SET_LINE, DATA_SET_LENGTH.
CALL 'RSPOARSD'
ID 'BUFF' FIELD TAB_DATA_SET_LINE+5
ID 'DATALEN' FIELD DATA_SET_LENGTH
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
ENDWHILE.
ENDIF.
IF STATUS <> 0 AND STATUS <> 40. EXIT. ENDIF.
TAB_DATA_SET = TAB_DATA_SET_LINE.
IF NOT ( DATA_SET_LENGTH IS INITIAL ).
TAB_DATA_SET-DATA_LENGTH = DATA_SET_LENGTH - 1.
ENDIF.
APPEND TAB_DATA_SET.
ADD 1 TO DATA_SET_LINECOUNT.
IF DATA_SET_IS_OTF = ' '.
IF DATA_SET_LINECOUNT >= DATA_SET_MAX_LINES.
CLEAR TAB_DATA_SET.
APPEND TAB_DATA_SET.
MOVE '----
' TO TAB_DATA_SET-DATA_LINE.
APPEND TAB_DATA_SET.
CLEAR TAB_DATA_SET.
APPEND TAB_DATA_SET.
WRITE: 'Abbruch nach'(029) TO MSG-A.
WRITE: DATA_SET_MAX_LINES TO MSG-B.
WRITE: 'Zeilen.'(030) TO MSG-C.
CONDENSE MSG.
TAB_DATA_SET-DATA_LINE = MSG.
APPEND TAB_DATA_SET.
EXIT.
ENDIF.
ELSE.
MOVE TAB_DATA_SET_LINE-DATA_LINE TO TAB_OTF_PAGE.
APPEND TAB_OTF_PAGE.
IF TAB_OTF_PAGE(2) = 'EP'.
ADD 1 TO OTF_PAGES.
IF OTF_PAGES >= OTF_MAX_PAGES.
MESSAGE S229(PO) WITH OTF_MAX_PAGES.
EXIT.
ENDIF.
ELSEIF TAB_OTF_PAGE(2) = 'OP'.
TAB_OTF_PAGE_INDEX-LINE_NUM = DATA_SET_LINECOUNT.
APPEND TAB_OTF_PAGE_INDEX.
ENDIF.
ENDIF.
ENDDO.
IF STATUS <> 0 AND STATUS <> 12.
CALL 'RSPOACSD'.
MESSAGE E112(PO) WITH STATUS RC ERRMSG.
ENDIF.
CALL 'RSPOACSD'.
STATUS = SY-SUBRC.
IF STATUS <> 0.
MESSAGE E112(PO) WITH STATUS RC ERRMSG.
ENDIF.
ENDFORM.
*& Form GET_PATH
FORM GET_PATH USING P_FILENAME.
CLEAR: H_PATH, FILE_NAME.
FILE_NAME = P_FILENAME.
CALL FUNCTION 'WS_QUERY'
EXPORTING
QUERY = 'CD' "// Current Directory
IMPORTING
RETURN = H_PATH.
CONCATENATE FILE_NAME '.pdf' INTO FILE_NAME.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = FILE_NAME
DEF_PATH = H_PATH
MASK = H_MASK
MODE = 'O'
IMPORTING
FILENAME = FILENAME"dbname
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
ENDFORM. " GET_PATH
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Mar 5, 2008 9:50 AM -
Postfix doesn't send mail after upgrade from tiger to leopard
Here is what's in my /var/log/mail.log:
Dec 31 08:26:01 weegee postfix/master[257]: master exit time has arrived
Dec 31 08:26:01 weegee postfix/master[258]: daemon started -- version 2.4.3, co\
nfiguration /etc/postfix
Repeated lots of times. I already changed my main.cf to use _postfix and _postdrop.
Thanks for the help.I figured this out myself. The system upgrade didn't upgrade /etc/postfix/master.cf for some reason. Instead it left a new default in /etc/postfix/master.cf.system_default. Copying that over master.cf and reloading postfix did the trick.
-
Unable to send mails to outlook from sap system through workflow
Hi ,
Iam unable to send mails to outlook from sap system through work flow .Actually we r able to send mails from sap inbox to outlook successfully.But when trying with workflow we r not able to send.Please guide me that is there any configurations required from BASIS side for work flow.Actually we configured everything like default domain .
Please find the errors belows that traced from sost t code
02/13/2012 17:50:12 0380 MIME_MESSAGE_GENERATE G Error when generating MIME flow
02/13/2012 17:50:12 0382 MIME_MESSAGE_GENERATE G Required 'From' header is initial
02/13/2012 17:50:12 0167 SO_OBJECT_MIME_GET G Error during MIME Generation
02/13/2012 17:50:12 0777 UPDATE_SOSC G Cannot process message in SAP System
Regards
RAGHAVENADARHello,
Actually i checked the mail ID for WF-BATCH using su01 .But i didnt find any mail ID for WF-BATCH then i added the email address of the user.Then we tried sending mail it was successfull.
But later i removed the email address what i entered in WF-BATCH user .Even after removing the email address also iam able to send the mails through workflow.
So iam confused whether it needs an mail address or not.But now we are able to send a mail to outlook through work flow but not able to send mails to GMAILor yahoo.For that we need to do any settings.
ABAPer is sending mails through work flow.
Regards
RAGHAVENDAR M -
Send mails to Agents from Infotype 105 External mails / SAP Inbox
Hi,
1) Whenever there is a change in the Address the change has to be notified to HR Business partner (HRBP) and Manager (MGR)
a) The mail has to be sent to the Extermail id.
b) OR it has to be sent to the SAPID (Inbox)
2) These mail ID /SAPID will be taken from the INFOTYPE PA0105, where two custom fields will carry this Mail / SAPIDs
3) Sending mail To external mail id is been done using the Function module in the rule (Inside the function module i have written a program which will collect the mail id from PA0105 and send mails)
4) Huv can i send mail to SAPINBOX from there if i have SAPID instread of external mail IDs.
Please help me to solve .
Richard ACheck the Business Object that is relevant to you
ADDRESS Address for sending documents
ADDRESSEMP Employee Address
BUS4001 Addresses of companies and organizations
BUS4002 Address of natural oerson
BUS4003 Address of "Person in company"
After selecting the Business object check which event is getting triggered when you change address. If no event getting triggered try toi configure in SWEHR3
You can take reference of the following Wflow Template
01000015
01000080
You can just use SAP User Id in mail if email address is maintained in SU01d.
<b>Reward points if useful and close thread if resolved</b> -
Workflow to send mail 20 day before the expiry date
Dear All,
I created a workflow to send mail when a calculated column date is equal to today as follows:-
Step1
add -20 days to Current Item:Expiry Date (Output to Variable : date)
then set variable : Notification1 to Variable : date
Step2
If variable:notification1 equals (ignoring time) Today
email users
Now when i add a new item to the list , the workflow status is set to In progress , and when i refresh the page the status is changed to Completed before the condition is met and!!
Any help
RegardsIf I Understood your question correctly, you need to send email to user 20 days before expiration date.
From above you workflow I can see, you are just checking your condition once a item is created. As your Step2 condition is not met your workflow is completed without any error. I suggest you might want to try below workflow
Step1
add -20 days to Current Item:Expiry Date (Output to Variable : date)
then set variable : Notification1 to Variable : date
then Pause until Variable:date
Step2
email users
Above workflow design will pause you workflow till 20 days before expiry date. and then send email to user.
Please ignore syntax, I just tried to put logic.
Below is explantion on how to use Pause Action(from MSDN) in Sharepoint workflow
This action is initially displayed in a workflow step as Pause until this time.
Use this action to pause the workflow until a particular date. You can add a current date, a specific date, or a lookup.
Following are examples of what the action might look like in a workflow step,
Pause until 1/1/2010 12:00:00 AM
Pause until Variable: A week from Modified
If this helps Please mark it answer or vote as helpful.
Thanks
Siddharth -
Sending mails after running the audit
Hi,
Please let me know if there is any standard workflow available for sending mails after running the audit. I want to inform students that they have failed in audit because of such and such subrequirement is not met.
Regards
Vinod KumarHi Vinod,
If you are on Ehp4 you can use the BRF as a framework to create a custom developed event/action to send out the e-mail. Or you can copy the standard bulk program of audit calculations and create to functionality to send out e-mails after the run.
There is currently no standard e-mail related to this process. You could check the standard workflow HRIQ_ADM_UG template to retrieve tasks to be copied in your own workflow (example HRIQ_APP1).
Good luck
Rob -
PO Workflow for sending mails to outlook
Hi Guys,
When a PO is created or changed it will send a notification to the default inbox in ECC as the workflow is being triggered, I need some information like if the workflow is triggered it will send mails to 5 different persons on there outlook.Hi,
before posting a query please try to check in SDN. i had a sane issue. i found here only.
any way.
first it should be configured to the workflow.
open a PO.
on left top, we have active object->workflow.
check wheater configuered workflows exist or not.
thank
vinod. -
Send mail with attachment from webdynpro application
hi,
From a webdynpro application, the user will upload any files through the File upload ui element.These uploaded files has to go as an attachment in the mail which is being send to a particular ID ,when the user clicks the submit button in the form.
can you please give me the code regarding this and help me in sending mail with attachment from a webdynpro application.
Thanks in advance,
shami.Hai,
Properties props = System.getProperties();
props.put("mail.smtp.host", "xx.xx.x.xx");
Session session = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress("[email protected]"));
msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse("[email protected]", false));
msg.setSubject(subject);
msg.setText(body);
msg.setHeader("X-Mailer", " Email");
msg.setSentDate(new Date());
MimeBodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText("Hai , This mail Generated By the Program");
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource("C:\nag.xls");//Here you need to give the Path of uploaded File
messageBodyPart.setDataHandler( new DataHandler(source));
messageBodyPart.setFileName("nag.xls");
multipart.addBodyPart(messageBodyPart);
// Put parts in message
msg.setContent(multipart);
Transport.send(msg);
Regards,
Naga -
Send mail after jobs get succeeded or failed in EM console ?
Hi,
Is there solution to send mail after jobs get succeeded and failed in EM console. if job get failed in em console the mail should send with error codeHi,
For dbms_scheduler this ability is built-in from 11.2 and up. For EM jobs, you might want to ask on the Enterprise Manager forum here
Enterprise Manager
Thanks,
Ravi. -
Send mail after transaction code COR2
Hello gurus,
Anyone knows the badi or userexit which is getting calld after successfull change in TCode COR2?
I need this enhancement to send mail after successfull entery.Dear ,
Transaction Code - COR2 Change Process Order
Following are the list of user exit which are available for Process order Managment.
- PPCO0006 to predefine entries for order header fields when creating
an order
- PPCO0001 to provide information at the time of saving (for
production orders and process orders)
- PPCO0007 to check or change header data when saving
- PPCO0002 to add additional checks that are to take place when
setting the deletion flag or deletion indicator
- PPCO0003 to prevent changes in sales order items that would cause
changes in the process order for static assembly processing
- STATTEXT to format the status line
- PPCO0008 to check components that have been changed or added
Hope this will be useful
Regards
JH -
Since approx 7am GMT I've been getting "Error in sieve filter" message with each incoming mail, worse though, since about 12 noon I cannot recieve or send mail to or from my iCloud account apart from I've been getting emails from Apple (ie I've just received a welcome one from Apple Support Communities...)!! I've had this account for years, never had a problem - it can't be the OSX Mail server because the problem is the same when I log directly into iCloud. I've tried sending emails from my Hotmail account to my iCloud account (a .mac) and just get undeliverable messages back. I'm really in the s**t now at work. : ( I just set up a Smart TV yesterday with a wireless dongle - that's the only thing I've done out of the ordinary. I've spoken to Sky who are my ISP and they say all's fine with them (although the router kept kicking my off the internet this morning which was strange...). Router seems fine now though. I'm really hoping someone here can help!!
Many thanks!!Do you think once Apple sort this out I'll get my missing emails back?
-
Further changes to workflow to send mail while creating material.
Hi,
I have created a workflow which sends mail to users when a material is created.
Now, I want to send mails to specific users depending upon the Industry sector and Material type.
For eg:
1) user1 should receive mail if the new material belongs to 'Aerospace & Defense' Industry sector and 'Raw material' Material type.
2) user2 should receive mail if the new material belongs to 'Retail' Industry sector and 'Semifinished goods' Material type.
Is there a way where I can create a condition for a mail to be sent?
Thanks & Regards.self answered
-
Problems sending mail after update
Is anyone having difficulty sending mail after the most recent ipad IOS update? Getting message saying that cannot connect to outgoing server. Know server is fine for other apple devices.
Can you receive emails on the account?
Reset/restart your router and try gain.
Try deleting the account and setting it up again. -
Can i send mail to yahoo from work flow
can i send mail to yahoo from work flow if it is possible how do i do that ? is this program enough if yes how do i do that ? do i need to write or change any coding
Hi Neo ,
You can use Function module 'SO_OBJECT_SEND' from your BO Method.
For this Function module to work Email configuration should be done for
external addresses..Please check with your Basis team for necessary config.
Thank you
Srinivas
Maybe you are looking for
-
I'm using Photoshop CS2. Is Lightroom just a packaged product for the photographer demographic? Can I do everything LightRoom can do within my Photoshop CS2? What are the advantages of having it?
-
Custom Subtypes for IT0021 not appearing in ESS
We are in ECC 6.0 and using custom subtypes like FM01 - FM06 for IT0021 (Family Member/Dependents). Now we are doing ESS implementation and we are not able to display Family details through ESS. I have maintained the subtypes in table V_T7XSSPERSUBTY
-
How to avoid Java Studio Creator 2 to use the regional settings?
How to avoid Java Studio Creator 2 to use the regional settings to select the language that will be used to display the IDE in a certain language? My country settings are set to Belgium (French) but I want to have my IDE running in English. What shou
-
I just upgraded my ipad to 6.0. I can no longer expand my audio files so that I can move forwards and backwards. I used to get a diagonal arrow to enlarge the screen and then have a bar that I can move to navigate. Can you help?
-
Apple ID not signing into Facetime
I have just updated to ios7 and signed out of facetime and imessage to update my apple id info. now it wont sign in again. its either saying it has an a network error or the password is wrong which i am 100% sure that is is correct. Help!!! please