Skip to Content

Class specific to Equipment Category

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 23, 2017 at 04:16 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • Jan 24, 2017 at 10:43 AM
    • 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.
    Add comment
    10|10000 characters needed characters exceeded

  • Jan 23, 2017 at 12:52 PM

    Atul Rajmane

    This is not possible in standard.

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

    PeteA

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 24, 2017 at 08:24 AM

    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

    Add comment
    10|10000 characters needed characters exceeded