This website is not affiliated with, sponsored by, or approved by SAP AG.

Workflow changes - send reminder email on X - 1 days

Business WorkFlow

Moderators: Snowy, thx4allthefish

Workflow changes - send reminder email on X - 1 days

Postby khan1978 » Thu May 22, 2008 4:09 pm

Hello Everyone,
I new to workflow and I came across a workflow scenario where I am confuse, that what should I do in order to make it work. Luckily we are running only one workflow in the system which is time off request, We copied standard workflow class “CL_PT_REQ_WF_ATTRIBS” to Z version and introduced some new method to send email to employees managers as well as employee and HR .

We also have something called workflow item cancel thing . Lets say if workflow is not approved by manger within X bossiness days it got cancel and employee has to submit the new time off request again. After doing a little bit research I came to know that there is standard job which checks and calculate the X days thing. Work flow is running fine from last 1 year.

Last week, we been asked to create reminder from X-1 day and sends to employee manager saying “ This is a reminder and one day is left “ .



I wanted to know how I can achieve that, I have to filter the employee by reading employee’s molga as we want to do it for specific countries then I have to read employee manager which I can do using different FM and then I have to send email to employee's manager .

Like I said It should happen BEFORE x-1 business days when employee submits the time off …

Here what I am thinking , I can read table “SWWWIHEAD” with field WI_TYPE = ‘W’ . and pass work_id to FM " SWW_WI_CONTAINER_READ " and read the container like the INCLUDE MWS20000081HO01


CALL FUNCTION 'SWW_WI_CONTAINER_READ'
EXPORTING
wi_id = wi_id


READ_FOR_UPDATE = ' ' *
TABLES
wi_container = wi_container
EXCEPTIONS
container_does_not_exist = 1 "message from function
others = 99.
IF SY-SUBRC = 0.
SWC_GET_ELEMENT WI_CONTAINER 'ACTUALSTATE' ACTUALSTATE130100.
ELSE.
CLEAR ACTUALSTATE130100.
ENDIF.

IF ACTUALSTATE130100 = 'N'.
CALL TRANSACTION 'WS20000081M'.
LEAVE PROGRAM.
ENDIF.


From container I can read employee number and approver . Get molga via pernr and can filter the employee ..who ever submits the request system date – 4 .. I can send out the reminder email …


Is there any other way around or any other efficient way of doing that … I hope you understand this thing is conditional … As far as I am concern I new to workflow so please bear with me ..


Waiting
Khan

FYI- I have gone through several post which task about deadlines monitoring Etc .. using fork & wait blah blah .. but It didn’t get any clue where to start and how to start …
SAP Consultant
USA....
khan1978
 
Posts: 98
Joined: Mon Apr 25, 2005 12:57 am
Location: Who cares

Return to Business WorkFlow

Who is online

Users browsing this forum: No registered users and 2 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.