Skip to Content
avatar image
Former Member

Time constraint 2 for custom tables

Hi

Generally we activate time constraints for (custom) infotypes. But in one of the requirements we need to activate time constraint 2, for one of the custom table which is having both BEGDA and ENDDA (primary keys). When I tried to use TOTAL and EXTRACT structures in Table events (new entry event) its working fine (during save). But when I go back and see the table contents, changes will not be present.

Can any one please let me know the exact procedure to activating time constraint 2 for custom tables .

Your help is much appreciated .

Many Thanks

Sunny

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 21, 2015 at 03:46 PM

    Hi, you can add a control in the event to validate whether the begin and end dates of newly entered are not overlapping with existing record.

    By this way you can achieve time constraint 2 for custom table.  Check and let me know if further inputs required.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

        I hope you aware of event concept.

        You can try with '05 - creating new entry' event with the following code:

      * check for overlap as follows

        LOOP AT total      "total contains the data already stored in table

             WHERE <other key fields comparision>

                   AND endda GE <current record-begda>

                   AND begda LE <current record-endda>.

      *     If control comes here means there is overlapping, so raise error message.      

        ENDLOOP.

      * if control doesn't go inside the loop means there is no overlapping and it should be saved that's it.

      Hope it is clear.  Try this and let me know if any issues.