‎2010 Nov 08 11:34 AM
Hi,
I am trying to validate field plans(position) of IT0001 in the program ZP000100. I am trying to give an error message in PAI, but it is not making the fields editable.
I know that we need to add the fields inside CHAIN END CHAIN which we need to validate. But the problem is it is a standard field and i would not be able to add that field in the CHAIN END CHAIN of the program ZP000100.
Currently i am displaying error message like this,
MESSAGE w000(zxx) WITH p0001-plans begda DISPLAY LIKE 'E'.
but when save is clicked without changing the value, it is showing the error message but when i hit ENTER, it gets saved and goes to the next screen.
i dont want this to happen.
Please let me know is there any way to avoid this.
‎2010 Nov 08 1:11 PM
Dear Arunsri,
You can using user exit's to avoid that case.
call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
exporting
prelp = innnn
importing
pnnnn = lx_pXXXX.
-
YOUR CODE IS HERE
-
call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
exporting
pnnnn = lx_pXXXX
importing
prelp = innnn.
Nice to help you...
Regard's
Andri.
Edited by: endru86 on Nov 8, 2010 2:12 PM
‎2010 Nov 09 6:55 PM
Try using an (e)rror message instead of your (w)arning.
MESSAGE e000(zxx) WITH p0001-plans begda DISPLAY LIKE 'E'.
Edited by: Ron Mulig on Nov 9, 2010 7:57 PM
‎2010 Nov 10 1:33 AM
Hi,
I think you need to clear OK_CODE after you display the warning message as 'E'. Then it will not save, because you cleared the OK_CODE for saving.
MESSAGE w000(zxx) WITH p0001-plans begda DISPLAY LIKE 'E'.
CLEAR: OK_CODE.
Cheers,