cancel
Showing results for 
Search instead for 
Did you mean: 

How to define Expression in action condition definition?

Former Member
0 Kudos

Hello all,

I have a question about expression definition for action.

I want to take yesterday's date from system. But there is no available Container Element.

So i want to use system field %DATLO%(system currect date = today's date) to decrease one day. For example: %DATLO% - 1.

But it is error, i don't know how to express.

If need to creat a new element, how to evaluate the new element?

Thank you very much.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You can try what I suggested in this thread

Former Member
0 Kudos

Hi Xi Ming,

I had a similar requirement. You can do this by creating a new container element/parameter. Select Object Type and choose CL ABAP Class. Create a new class (SE24) and implement interface IF_BUSINESS_OBJECT_PPF. This makes sure that your class is available for selection. Create in this class a new method (i.e. YESTERDAY) with a returning parameter (i.e. RESULT). Make sure it is a type that is compatible with the field you want to compare it to. Within in this method you can make a line like 'result = sy-datlo - 1.'

It probably isn't current for you but it may help people experiencing a similar issue.

With kind regards,

Roel van den Berge

Former Member
0 Kudos

I would say to follow the following path.

Create two container elements.

1. ZZYESTERDAY with type SYST-DATUM

2. ZZ1DAY with type CHECKNUM and Initial Value = 1

Now create one Container Operation in your workflow before the condition where you want to check.

Give some STEP Name.

Result Element = ZZYESTERDAY

Assignment = =

Expression = %DATUM%

Oprator = Subtract ( - - )

Expression = ZZ1DAY

Now when workflow runs you will gate the date value of yesterday in ZZYESTERDAY Container element which you can use in your workflow.

Former Member
0 Kudos

Hello. Are you find ansver on your problem? A have the same problem too.

Former Member
0 Kudos

No. the issue remain to exist.

Maybe, only can enhance container parameter.