Skip to Content
avatar image
Former Member

How to define Expression in action condition definition?

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 05, 2010 at 02:31 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 10, 2011 at 08:49 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Jun 22, 2011 at 08:13 PM

    You can try what I suggested in this thread

    Add comment
    10|10000 characters needed characters exceeded