SAP Function Modules

SMON_HARDWARE_OBJECT_VIEWER SAP Function module







SMON_HARDWARE_OBJECT_VIEWER is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name SMON_HARDWARE_OBJECT_VIEWER into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SMON
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM SMON_HARDWARE_OBJECT_VIEWER - SMON HARDWARE OBJECT VIEWER





CALL FUNCTION 'SMON_HARDWARE_OBJECT_VIEWER' "
* EXPORTING
*   hw_logical_destination = SPACE  " rfcdes-rfcdest  Logical OS Collector Destination
*   hw_locality = 'LOCAL'       " def_par_fu-loc_remote  Locality (Local, Internal, Remote)
  EXCEPTIONS
    NO_HW_OBJECT_DESCR_FOUND = 1  "             No hardware object description found
    INVALID_HW_OBJECT_DESCR = 2  "              Hardware object description contains a syntax error
    CANT_READ_HW_OBJECT_DESCR = 3  "            Cannot read hardware object description
    ERROR_SHOWING_HW_TREE = 4   "               Error when displaying the hardware tree
    .  "  SMON_HARDWARE_OBJECT_VIEWER

ABAP code example for Function Module SMON_HARDWARE_OBJECT_VIEWER





The ABAP code below is a full code listing to execute function module SMON_HARDWARE_OBJECT_VIEWER including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

 

SELECT single RFCDEST
FROM RFCDES
INTO @DATA(ld_hw_logical_destination).


DATA(ld_hw_locality) = some text here . CALL FUNCTION 'SMON_HARDWARE_OBJECT_VIEWER' * EXPORTING * hw_logical_destination = ld_hw_logical_destination * hw_locality = ld_hw_locality EXCEPTIONS NO_HW_OBJECT_DESCR_FOUND = 1 INVALID_HW_OBJECT_DESCR = 2 CANT_READ_HW_OBJECT_DESCR = 3 ERROR_SHOWING_HW_TREE = 4 . " SMON_HARDWARE_OBJECT_VIEWER
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_hw_logical_destination  TYPE RFCDES-RFCDEST ,
ld_hw_locality  TYPE DEF_PAR_FU-LOC_REMOTE .


SELECT single RFCDEST
FROM RFCDES
INTO ld_hw_logical_destination.


ld_hw_locality = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SMON_HARDWARE_OBJECT_VIEWER or its description.