Functional location classification


Below is the ABAP code which can be used to retrieve the classifiaction details of a functional location. These details are accessed via the functional location master data transaction IL02, Once you have executed the transaction and entered the specific func loc you, need to press enter and then hit the 'classification' button.

data: it_AUSP type STANDARD TABLE OF AUSP,
      wa_ausp like LINE OF it_ausp,
      wa_OBJEK type AUSP-OBJEK.
wa_OBJEK = FUNCT_LOC.
* get func loc classifiaction details
CALL FUNCTION 'CLFM_SELECT_AUSP'
  EXPORTING
    MAFID                    = 'O'
    CLASSTYPE                = '003'
    OBJECT                   = wa_OBJEK
*   FEATURE                  =
*   CLEAR_BUFFER             = ' '
*   KEY_DATE                 =
*   WITH_CHANGE_NUMBER       = ' '
*   TABLE                    =
*   I_ATZHL_SAME_INI         = ' '
*   I_AENNR                  = ' '
 TABLES
   EXP_AUSP                 = it_AUSP
 EXCEPTIONS
   NO_VALUES                = 1
   OTHERS                   = 2
          .
IF SY-SUBRC EQ 0.
*Note: Need to replace '0000000550' with code of detail you wish to retrieve
  loop at it_AUSP into wa_ausp where atinn = '0000000550'.
    wa_header-LOC_WK_CTR = wa_ausp-atwrt.
  endloop.
ENDIF.


Related Articles

Change name of tab within SAP PM transactions IW32 and IW33
Add new and set default tab entry for SAP PM transactions IW32 and IW33
SAP PM - Example code and information for developing ABAP in the Plant maintenance area of SAP
SAP PM database structure for work orders, maintenance orders