Skip to Content
0
Former Member
Sep 20, 2007 at 05:23 AM

Validating field in a table while creating new entries.

12 Views

HI all,

I have to validate the 'Todate' field in ztable. Validation is Todate should be greater than 'Fromdate'.

For this i have written some code in maintainance event (05-New entries).It is working fine.See the code below.

----


***INCLUDE LZKM0007F01 .

----


FORM AT_NEWENTRY.

IF ZKM0007-ZTO_DATE LT ZKM0007-ZFROM_DATE.

MESSAGE E001(ZKM) WITH 'ENTER TODATE GREATER THAN FROMDATE'.

ENDIF.

ENDFORM.

If i enter the 'Todate' less than 'fromdate' it is showing an error massege. After showing the error message these two fields are greyed out(disabled). But it should not happened. I want error message and i want to change (or correct) the 'Todate' here itself instead of cancelling and re entering the record line totally.

Rewards to all.

Thanks,

Anu.