Hi All,
I have created a screen, as there is date field in the screen, I have kept a validation in the screen that if future date is entered it should trigger an error and the cursor should position in to that field. the code is a below
DATA dt TYPE i.
DATA pos TYPE i.
dt = yorderb-zproposed_date - sy-datum.
IF dt > 0.
SET CURSOR FIELD 'YORDERB-ZPROPOSED_DATE' OFFSET 0.
set PF-STATUS 'ZYORDERB'.
MESSAGE e005(zmsg) WITH 'Future Date ' yorderb-zproposed_date 'is not allowed'.
ENDIF.
but the cursor is positioning into date field.
Please help me
Thanks in Advance.