cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Workflow - DynamicDeadline monitoring- Latest end date/time

Former Member
0 Kudos

Hi All,

I am working on a workflow where in it requires dynamic deadline monitoring (48hrs for one company code, 24 hrs for another company code etc).

wf-deadline.png

After each dead line passed, workflow should remove the work item logically and recreate a new work item until there is an action.

First dead line date/time = Workitem creation date/time + (deadlinehours)

Second dead line date/time = First deadline date/time + (deadlinehours)

I understand we can use expression inside the latest end date/time by calculating the deadline date/time in another step by some method etc.

  1. My question is Where exactly (at which step) do I determine the dead line date and time - Before User decision step, the work item would not have been created, after decision step the workflow is waiting at User decision for user action
  2. If user's time zone is different to system time zone, where should the conversion of time take place
  3. I tried using functional method as below, thought of changing the date and time to container variables but this gives 'Error in the evaluation of expression'

&DEADLINE.GET_DEAD_LINE_DATE(WI_CREATION_DATE='20180313' ;WI_CREATION_TIME= '095400' )& &DEADLINE.GET_DEAD_LINE_TIME(WI_CREATION_DATE='20180313' ;WI_CREATION_TIME= '095400' )&

Any help is much appreciated

I had gone through multiple threads, but I couldn't find what I am looking.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186746
Active Contributor
0 Kudos

Hi,

You could create a simple method with company code as input and deadline date and time for the user decision. Just call it prior to the user decision.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Rob,

thanks for your reply.

I understand a method can be used to get the calculated dead line date and time, however If I call the step just prior to the user decision the WI creation date will usually be the workflow creation date and time, not the work item creation date/time.

If this step is used in loop, It always try to calculate the workflow creation date/time + deadline hours(company code). I would like to pass the new work item (created after logically deleting the previous work item) creation date/time for calculation of the next deadline.

Am I missing something here?

Siva

former_member186746
Active Contributor
0 Kudos

Hi Siva,

I think you're missing something. In your method to calculate de deadline date simply use current date and time of execution of the code and add your hours/days for the deadline date.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Rob,

Thank you very much.

That is much helpful. I was always thinking of using some container variables for start date and time but completely ignored about current date and time.

Answers (0)