Skip to Content
0

Class specific to Equipment Category

Jan 23, 2017 at 07:28 AM

73

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
K Jogeswara Rao Jan 23, 2017 at 04:16 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Peter Atkin Jan 23, 2017 at 12:52 PM
0

Atul Rajmane

This is not possible in standard.

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

PeteA

Share
10 |10000 characters needed characters left characters exceeded
Peter Atkin Jan 24, 2017 at 08:24 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
K Jogeswara Rao Jan 24, 2017 at 10:43 AM
0
  • 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.
Share
10 |10000 characters needed characters left characters exceeded