cancel
Showing results for 
Search instead for 
Did you mean: 

Class specific to Equipment Category

atul_rajmane
Participant
0 Kudos

Dear All,

Can we make a Class specific to equipment category and can we make it mandatory while saving the equipment master?

Regards,

Atul Rajmane

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Atul

Put the following code in the include ZXEQMU02, of user-exit IEQM0003.

IF main_class IS INITIAL.
  MESSAGE: 'Equipment classification is mandatory.' TYPE 'I'.
  RAISE posting_not_allowed.
ENDIF.

IF data_equi-eqtyp = 'M' and main_class <> 'PUMP'.
    MESSAGE: 'Equipment Category ''M'' is necessarily to be classified as ''PUMP''.' TYPE 'I'.
    RAISE posting_not_allowed.
  ENDIF.

This code prevents Equipment Creation without classifying. And it prevents creation of Equipment of category 'M' having class other than 'PUMP'. Means it forces Category 'M' Equipments to be classified as 'PUMP'.

Accordingly you change the 'M' and 'PUMP' values in the above code. I have tested this code. If your requirement is more complex than you stated, then the above code can be easily developed with the help of your ABAPer.

Good luck

0 Kudos

Hello Jogeswara,

How can I make this same check from transaction IQ04?

I found user exit IQSM0005 (OSS Note 92970), but it does not have the parameter MAIN_CLASS.

Thanks in advance.

M.B

Answers (3)

Answers (3)

jogeswararao_kavala
Active Contributor
  • Of-course, that should be understood. The Class type has to be 002 (Equipment class) for the second part of the code to be relevant.
  • First part of the code is suitable for any situation (Making class assignment mandatory)
  • If the situation is not that straight-forward, then the coding needs to use function module ALM_ME_CLASS_CHAR_GETDETAIL , which can take care of both multiple class type and class name situations too. (For ABAPer it is very simple).
  • For simple situations with 002 class type given code should be adequate. However any code is supposed to be used only after thorough testing in DEV clients.
peter_atkin
Active Contributor
0 Kudos

JRK,

You'd need to extend the coding a little to account for:

  • Class type (002). You can have classes with the same name, but different class types. For example PUMP with class types 002 and 300.
  • Multiple class type assignments (read memory SAPLCLFM)KLASTAB[], or database KSSK

PeteA

peter_atkin
Active Contributor
0 Kudos

Atul Rajmane

This is not possible in standard.

You will need to develop a solution possible via user-exit IEQM0003 (See SMOD)

PeteA