SAP RH_BUILD_EVENT_SCHEDULE Function Module for Module for creating schedule from schedule model









RH_BUILD_EVENT_SCHEDULE is a standard rh build event schedule SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Module for creating schedule from schedule model processing and below is the pattern details for this FM, 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 build event schedule FM, simply by entering the name RH_BUILD_EVENT_SCHEDULE into the relevant SAP transaction such as SE37 or SE38.

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



Function RH_BUILD_EVENT_SCHEDULE 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_BUILD_EVENT_SCHEDULE'"Module for creating schedule from schedule model
EXPORTING
PLVAR = "Plan version
EVENT_OTYPE = "'Business event' object type
EVENT_OBJID = "Business event ID
* ISTAT = "Status
BEGDA = "Start date
* CALID = "
* DAYSOFF = "

TABLES
SCHEDULE_TAB = "Schedule of business event (O)
DISP_SCHEDULE = "Schedule model of a business event type (I)

EXCEPTIONS
CALID_NOT_ACTIVATED = 1 NO_ENTRY_FOR_CALID = 2 NO_DISP_SCHEDULE = 3 NO_SCHEDULE = 4 ERROR_IN_SCHEDULE = 5 BEGDA_NOT_RIGHT = 6
.



IMPORTING Parameters details for RH_BUILD_EVENT_SCHEDULE

PLVAR - Plan version

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

EVENT_OTYPE - 'Business event' object type

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

EVENT_OBJID - Business event ID

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

ISTAT - Status

Data type: PLOG-ISTAT
Optional: Yes
Call by Reference: No ( called with pass by value option)

BEGDA - Start date

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

CALID -

Data type: P1027-CALID
Optional: Yes
Call by Reference: No ( called with pass by value option)

DAYSOFF -

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

TABLES Parameters details for RH_BUILD_EVENT_SCHEDULE

SCHEDULE_TAB - Schedule of business event (O)

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

DISP_SCHEDULE - Schedule model of a business event type (I)

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

EXCEPTIONS details

CALID_NOT_ACTIVATED - Factory calendar is not active

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

NO_ENTRY_FOR_CALID - No factory calendar found

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

NO_DISP_SCHEDULE - No schedule found for business event type

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

NO_SCHEDULE - The schedule pattern stored is not in T770B

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

ERROR_IN_SCHEDULE - Schedule stored incorrectly for business event type

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

BEGDA_NOT_RIGHT - Start date different than the one stored for the business event type

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

Copy and paste ABAP code example for RH_BUILD_EVENT_SCHEDULE 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_plvar  TYPE PLOG-PLVAR, "   
lt_schedule_tab  TYPE STANDARD TABLE OF HRVSCHED, "   
lv_calid_not_activated  TYPE HRVSCHED, "   
lv_event_otype  TYPE PLOG-OTYPE, "   
lt_disp_schedule  TYPE STANDARD TABLE OF HRV1042A, "   
lv_no_entry_for_calid  TYPE HRV1042A, "   
lv_event_objid  TYPE PLOG-OBJID, "   
lv_no_disp_schedule  TYPE PLOG, "   
lv_istat  TYPE PLOG-ISTAT, "   
lv_no_schedule  TYPE PLOG, "   
lv_begda  TYPE PLOG-BEGDA, "   
lv_error_in_schedule  TYPE PLOG, "   
lv_calid  TYPE P1027-CALID, "   
lv_begda_not_right  TYPE P1027, "   
lv_daysoff  TYPE C. "   

  CALL FUNCTION 'RH_BUILD_EVENT_SCHEDULE'  "Module for creating schedule from schedule model
    EXPORTING
         PLVAR = lv_plvar
         EVENT_OTYPE = lv_event_otype
         EVENT_OBJID = lv_event_objid
         ISTAT = lv_istat
         BEGDA = lv_begda
         CALID = lv_calid
         DAYSOFF = lv_daysoff
    TABLES
         SCHEDULE_TAB = lt_schedule_tab
         DISP_SCHEDULE = lt_disp_schedule
    EXCEPTIONS
        CALID_NOT_ACTIVATED = 1
        NO_ENTRY_FOR_CALID = 2
        NO_DISP_SCHEDULE = 3
        NO_SCHEDULE = 4
        ERROR_IN_SCHEDULE = 5
        BEGDA_NOT_RIGHT = 6
. " RH_BUILD_EVENT_SCHEDULE




ABAP code using 7.40 inline data declarations to call FM RH_BUILD_EVENT_SCHEDULE

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 PLVAR FROM PLOG INTO @DATA(ld_plvar).
 
 
 
"SELECT single OTYPE FROM PLOG INTO @DATA(ld_event_otype).
 
 
 
"SELECT single OBJID FROM PLOG INTO @DATA(ld_event_objid).
 
 
"SELECT single ISTAT FROM PLOG INTO @DATA(ld_istat).
 
 
"SELECT single BEGDA FROM PLOG INTO @DATA(ld_begda).
 
 
"SELECT single CALID FROM P1027 INTO @DATA(ld_calid).
 
 
 


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!