SAP RH_GRAPH_RESOURCE_OCCUPANCY Function Module for









RH_GRAPH_RESOURCE_OCCUPANCY is a standard rh graph resource occupancy SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rh graph resource occupancy FM, simply by entering the name RH_GRAPH_RESOURCE_OCCUPANCY into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHVG
Program Name: SAPLRHVG
Main Program: SAPLRHVG
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RH_GRAPH_RESOURCE_OCCUPANCY pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RH_GRAPH_RESOURCE_OCCUPANCY'"
EXPORTING
* STATUS = 'GRAPHIK' "Graphics status for various resource types
* UNIT = 'D' "Time period of graphic
* MODIFY = ' ' "Graphics in change mode
RES_STEXT = "Resource type text
BEGDA = "Start date of time axis
ENDDA = "End date of time axis

TABLES
RES_BOXES = "Resource type table for boxes
OCC_NODES = "Reservations table for bars
.



IMPORTING Parameters details for RH_GRAPH_RESOURCE_OCCUPANCY

STATUS - Graphics status for various resource types

Data type: SY-PFKEY
Default: 'GRAPHIK'
Optional: Yes
Call by Reference: No ( called with pass by value option)

UNIT - Time period of graphic

Data type: PP0J-UNIT
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

MODIFY - Graphics in change mode

Data type: PP0V-MODIFY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

RES_STEXT - Resource type text

Data type: P1000-STEXT
Optional: No
Call by Reference: No ( called with pass by value option)

BEGDA - Start date of time axis

Data type: P1000-BEGDA
Optional: No
Call by Reference: No ( called with pass by value option)

ENDDA - End date of time axis

Data type: P1000-ENDDA
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RH_GRAPH_RESOURCE_OCCUPANCY

RES_BOXES - Resource type table for boxes

Data type: RHVG_BOXES
Optional: No
Call by Reference: No ( called with pass by value option)

OCC_NODES - Reservations table for bars

Data type: RHVG_NODES
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RH_GRAPH_RESOURCE_OCCUPANCY Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_status  TYPE SY-PFKEY, "   'GRAPHIK'
lt_res_boxes  TYPE STANDARD TABLE OF RHVG_BOXES, "   
lv_unit  TYPE PP0J-UNIT, "   'D'
lt_occ_nodes  TYPE STANDARD TABLE OF RHVG_NODES, "   
lv_modify  TYPE PP0V-MODIFY, "   SPACE
lv_res_stext  TYPE P1000-STEXT, "   
lv_begda  TYPE P1000-BEGDA, "   
lv_endda  TYPE P1000-ENDDA. "   

  CALL FUNCTION 'RH_GRAPH_RESOURCE_OCCUPANCY'  "
    EXPORTING
         STATUS = lv_status
         UNIT = lv_unit
         MODIFY = lv_modify
         RES_STEXT = lv_res_stext
         BEGDA = lv_begda
         ENDDA = lv_endda
    TABLES
         RES_BOXES = lt_res_boxes
         OCC_NODES = lt_occ_nodes
. " RH_GRAPH_RESOURCE_OCCUPANCY




ABAP code using 7.40 inline data declarations to call FM RH_GRAPH_RESOURCE_OCCUPANCY

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single PFKEY FROM SY INTO @DATA(ld_status).
DATA(ld_status) = 'GRAPHIK'.
 
 
"SELECT single UNIT FROM PP0J INTO @DATA(ld_unit).
DATA(ld_unit) = 'D'.
 
 
"SELECT single MODIFY FROM PP0V INTO @DATA(ld_modify).
DATA(ld_modify) = ' '.
 
"SELECT single STEXT FROM P1000 INTO @DATA(ld_res_stext).
 
"SELECT single BEGDA FROM P1000 INTO @DATA(ld_begda).
 
"SELECT single ENDDA FROM P1000 INTO @DATA(ld_endda).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!