cancel
Showing results for 
Search instead for 
Did you mean: 

Reference Date/Time

Former Member
0 Kudos

Hello,

I have a requirement where I have to adjust the date/time of the deadline depending on the other work items in the users activitiy box. Eg.

User is working from 9 am: 6 pm in the day .It is assumed that the total time required is 4 hours for the review and some addition by the key users of each department

Date / time of a new work item should be automatically configured to start time when it arrived + 4 hours. on the same day or next day when 4 hours are over.

if there are work items already available in the workflow then adjust the starttime = end date/ time of the previous item. + 4 hours is the end time.

Should take care of holidays and weekends.

Can you please suggest how to do this ?

Any idea on the available BADI's where we can write the logic ?

Or how to find the BADI which is triggerred.

Can you suggest how to implement the expression for this kind of requirement where the start time endtime depends on the previous item in mailbox. ?

Detailed requirements and limitations:

u2022 Time limitation for each approval: no more than 4 hours per contract;

u2022 Time adjustments (increase of time limits) should be realized when one department (key user) has several contracts to be approved;

u2022 Working time (from 9-00 till 18-00) should be taken into account when calculating the approval time limits;

u2022 Weekends and holidays should also be taken into account during calculation of the approval time limits;

Example:

One of the approval process participants gets a request to approve a new Contract Card at

9-00 (Contract 1). The next document is received at 10-00 (Contract 2). According to the existing procedure, each department must complete the contract approval within 4 hours.

It is necessary to take into account the time available for the first document approval and calculate the time available for the second document approval.

The time available for Contract 2 approval (from 13-00 till 17-00) starts from the moment when the time for Contract 1 approval is over (from 9-00 till 13-00).

If another document (Contract 3) is received at 11-00, then the time available for its approval will be moved forward to the next day, because the start time for its approval will be calculated as 17-00.

Regards,

Ravi Sharma

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can try out the following steps:

1. Maintain factory calendar including working times, weekly holidays and public holidays.

2. Write a custom Function module to calculate exact date and time if you add 4 hours to start date and time of the workitem having taken the factory calendar into consideration.

3. Call this function module as a background step at the beginning of your workflow. Pass Workitem start date and time as input and store the (+ 4 hour) calculated date and time in workflow container elements

4. In whichever step you need calculated date and time as deadline, use the respective container elements in the Date and Time fields of "latest end" tab after selecting the value "Expression" in the Refer.date/time dropdown and select + 0 (Zero) Minutes.

regards,

Javed.