2010 Mar 12 7:43 AM
hi,
I would like to know the validations of fileds in module pool program.
i have two problems in field validations
1. i have written validation CODE for the filed Age
FILED AGE VALUES ( BETWEEN '20' AND '120') in table control between chain and chain.
it show error while entering age like 20 ,21......, validation is not working.
2. i want keep cursor where fields are showing the error, when i pressed enter or something.
i have validation code for all fileds.
thanks & regard
spnadana
2010 Mar 12 11:00 PM
FIELD ... VALUES is deprecated. Use modules instead.
Look at the examples in SE38, menu Environment | Examples | ABAP examples, then select User interfaces | Screens in the tree
2010 Mar 13 9:33 AM
hi
Try this code.
INSIDE OF PAI MODULE WRITE THIS CODE.
DATA : CURSORFIELD(25), "DECLEAR IN TOP INCLUDE
PERFORM GET_CURSOR.
FORM GET_CURSOR .
IF AGE GE '20' AND AGE LE '120'.
CLEAR : CURSORFIELD.
GET CURSOR FIELD CURSORFIELD.
MESSAGE 'text xyz' TYPE 'S' DISPLAY LIKE 'E'.
ENDIF.
ENDFORM. " GET_CURSOR
****************************************************************
INSIDE OF PBO WRITE THIS CODE.
PERFORM SET_CURSOR.
FORM SET_CURSOR .
SET CURSOR FIELD CURSORFIELD.
ENDFORM. " SET_CURSOR
cursor position set into ur Age Text box.
it will work.
Regards,
Abhilash