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

table maintenance events

Former Member
0 Kudos
389

Hi,

My requirement is in a table i have three fields - field1 , field2 and field3. If field1 is 'XX' then in that case alone field2 only should be filled.Field3 should not be filled. If field1 is not 'XX' then this validation need not happen and even field3 can be filled.

I have used event '05' for the same. I am able to do the validation correctly but the validation happens only if the "enter" key is pressed after entering field2. For exmaple : if the user enters "XX" for field1, presses tab and enters value for field2 presses tab again and enter values for field3 and then on pressing enter,the event gets triggered and my error message is displayed.

If the user presses "enter" after entering data in field2 and then uses tab to move to field3 and enters value the event does not get triggered and saving of data becomes possible. Is there any wya to restrict this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
359

Hello ,

instead of events , u can make use of field - modules

field bkpf-blart module blart.<<<< IN THAT module u can place same validations.

regards

Prabhu

3 REPLIES 3
Read only

Former Member
0 Kudos
360

Hello ,

instead of events , u can make use of field - modules

field bkpf-blart module blart.<<<< IN THAT module u can place same validations.

regards

Prabhu

Read only

Former Member
0 Kudos
359

in that form.

if dbtab-field1 eq 'XX'.

clear dbtab-field3.

if dbtab-field2 is initial.

message 'dbtab-field2 can be empty' type 'I'.

endif.

else.

clear dbtab-field2.

if dbtab-field3 is initial.

message 'dbtab-field3 can be empty' type 'I'.

endif.

endif.

Read only

Former Member
0 Kudos
359

Thanks Prabhu. Your solution works. I have written the code logic inside PAI.