cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Validations in "User fields" of Work order operation

Former Member
0 Kudos

Hi Team,

Is there any way through which I can put validations in the fields which we configure for Work order Operations (Task Lists -> Operation Data -> Define User Fields) ?

For example, i need to have validations for some set of values for a text field.

Need to have validation for "time format" for a text field...

Is there any exit/BADI available for validation?

Thanks and Best Regards

Anish

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hi Anish,

I have just tested this and seen working.

I wrote this code in this enhancement.

IF AFVGD_IMP-USR00 < 1500.
   MESSAGE: 'The value in field ''KJR'' can not be below 1500.'TYPE 'E'.
ENDIF.

I have given a value 1000 in the field KJR (AFVGD-USR00)

When I press enter with this value, i get this error message as per the code.

When the value is 1500 or more , I did not get any error, the value is accepted.

So you can have your Validation codes accordingly.

Jogeswara Rao K

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks it worked

peter_atkin
Active Contributor
0 Kudos

In the ABAP code, make sure you check which field-key these checks refer to, otherwise you may find the checks also work for other field-keys too..

So the code could be:

* perform the ususal order type, plant, SY-BATCH/SY-BINPT, authorisation checks as required

IF AFVGD_IMP-SLWID = '00000001'.

  IF AFVGD_IMP-USR00 is not initial and AFVGD_IMP-USR00 > 1500

    MESSAG E123(00).

  ENDIF.

ENDIF.

PeteA

jogeswararao_kavala
Active Contributor
0 Kudos

Hi Anish,

If you are done, please close the thread.

Jogeswara Rao K

jogeswararao_kavala
Active Contributor
0 Kudos

Hi Anish,

A very clear Enhancement namely IWO10016  has been provided for this purpose. Please try.

Jogeswara Rao K