cancel
Showing results for 
Search instead for 
Did you mean: 

WBS field to be mandatory

Former Member
0 Kudos

I want WBS field to be mandatory at the time of creation on order in location tab

I make the field mandatory in Field setting of PM order but  I have to click on location tab to get the Mandatory.

It should not allow to save the order to the user even until and unless he does not input WBS in the Field.

Regards

Sandeep

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello SANDEEP,

Somehow I missed this thread. It is one of the disadvantages in checks through Configuration setting. So the remedy, (as Paul mentioned) is user-exit IWO10009. Put the following simple code in the include ZXWOCU07 of this exit and your job is done.

IF caufvd_imp-proid IS INITIAL.
   MESSAGE 'WBS field in the Location tab can not be empty.' TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.

When user tries to Create/Save the Order without filling WBS field of Location tab, then it throws the following error.

If you want to limit this condition to a particular Order type say PM03, then the code becomes:

IF caufvd_imp-auart = 'PM03' AND caufvd_imp-proid IS INITIAL.
   MESSAGE 'WBS field in the Location tab can not be empty.' TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.

Good luck

KJogeswaraRao

Answers (2)

Answers (2)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello SANDEEP,

You have many open threads. You should review these and close wherever relevant. I' hope you know how threads are closed. However Please see this:

This is how you close a discussion.

  • When you click on 'Correct answer' in any one of the received replies, you closed the discussion.
  • In case you felt, there was no Correct answer to your query and yet you want to close the discussion, then you click on 'Mark as assumed answered' below the title of your query. This too closes the discussion.
  • Also you may click on 'Helpful answer' for other replies found useful.

Regards

KJogeswaraRao

paul_meehan
Advisor
Advisor
0 Kudos

Hi,

The mandatory field check will only function on the active tab. Some fields may have built in mandatory check but for fields set through customizing it is necessary to click on the relevant tab. An option is to use a user exit to verify a value has been set and reject saving if not. Exit IWO10009 can be used for this.

Alternatively use exit IWO10010 to set a default WBS value.

-Paul