10-21-2015 8:09 AM
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
10-21-2015 4: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.
10-25-2015 6:00 PM
Hi Surendra,
Could you please provide a reference document or link for the same
Thanks
10-26-2015 9:26 AM
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.