Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error Message for IT0001

Former Member
0 Likes
664

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.

3 REPLIES 3
Read only

Former Member
0 Likes
568

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

Read only

MrWhan
Participant
0 Likes
568

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

Read only

Former Member
0 Likes
568

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,