cancel
Showing results for 
Search instead for 
Did you mean: 

Change deadline time

former_member227141
Active Participant
0 Kudos

Hi all, I would like to know if is it possible to feed some deadline time using for TVARV variables.

If I use expression instead of Work Item Creation and take one global variable with sy-datlo + days in TVARV would that work?

Is that a good practice? is better to chance that by SWI1 or SWIA?

Thanks in advance for your guidance...

Regards

Accepted Solutions (1)

Accepted Solutions (1)

SandySingh
Active Contributor
0 Kudos

Yes it is a good practise to store the deadline in custom or Standard TVARV table to avoid a program change when you have to change deadline dates. This helps in central maintenance(quick view) of workflow deadlines and is quite useful for production support /workflow admin team.

You can use the combination of "Expression" + Time Zone + hrs/min/days/months/years in the Decision task.

Regards

Sandy

former_member227141
Active Participant
0 Kudos

Thanks, I created a variable in container to store the date, then I created a previous task to set the value, for testing purpose now I'm setting v_date = sy-datlo... And I made this in Requested End tab:


But apparently the date is not visible at this point because if I change &DATEEND& for %SY-DATLO% it works fine, but with variable doesn't... am I missing something?

SandySingh
Active Contributor
0 Kudos

Hello

sy-datlo belongs the logged on user current system date. Make sure WF-BATCH time zone settings are maintained in SU01. You can also use sy-datum instead if sy-datlo

regards

sandy

former_member227141
Active Participant
0 Kudos

Thanks, I think I missing something else... well I have the following:

In Calculate Deadline I set DEADLINE_DATE = SY-DATLO, and it's working fine... after that task DEADLINE_DATE is current date.

First I execute with this variables:

The deadline is reached...

But, when I try with the variable instead... which is current date also... the deadline is never reached.

Just one worked.

How can I do this?

I think I'm doing this right, here someone said it worked for him http://scn.sap.com/thread/3356058

Is something in binding?

He as well used container element variables...

SandySingh
Active Contributor
0 Kudos

what is the data type of container element &deadline date& . This issue could be due to data type mis match . Use syst datum as data type

regards

sandy

former_member227141
Active Participant
0 Kudos

I was using:

I changed it but the problem remains...

former_member185167
Active Contributor
0 Kudos

If you look in the workflow log, what is the deadline set to when you use &DEADLINE_DATE&?

former_member227141
Active Participant
0 Kudos

Current date... in both cases I see the variable set, but is like the variable is not reachable for

Approval process step.

SandySingh
Active Contributor
0 Kudos

Hello

Try to check the deadlines using FM SAP_WAPI_GET_DEADLINES.

Put a breakpoint in FM SWF_CREATE_DEADLINES and check the results.

If nothing works, raise an OSS Message to report the issue. As a workaround, create a background step to calculate the deadlines using TIMLO and variable and in decision step; just use two Variables - date and Time  and no time zone option.

Regards

Sandy

gaurang_gujar
Active Participant
0 Kudos

Hi Karina,

This might me silly but are you getting values in the the workflow container which you are using as expression in requested end. Also you might use the workflow container exactly same workflow creation date and time.

Regards,

Gaurang

former_member185167
Active Contributor
0 Kudos

Hello,

I'd rather see what the value of DEADLINE _DATE is at workflow level in the log.

regards

Rick

former_member227141
Active Participant
0 Kudos

Is not set..

former_member185167
Active Contributor
0 Kudos

Ta-da, there's the problem! Fix the bindings (task to workflow) and you're done.

former_member227141
Active Participant
0 Kudos

Thanks! it was the binding, now works!

Answers (1)

Answers (1)

pokrakam
Active Contributor
0 Kudos

Yes, very possible and even recommended.

You can either use an existing object and add the deadline as an attribute &MM_UTIL.DEFAULT_DEADLINE&, or you can code it into a static functional method.