SAP APPT_RULE_EDITOR_INIT_DATA Function Module for









APPT_RULE_EDITOR_INIT_DATA is a standard appt rule editor init data 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 appt rule editor init data FM, simply by entering the name APPT_RULE_EDITOR_INIT_DATA into the relevant SAP transaction such as SE37 or SE38.

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



Function APPT_RULE_EDITOR_INIT_DATA 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 'APPT_RULE_EDITOR_INIT_DATA'"
EXPORTING
* DISPLAY_MODE = "Processing type
* NO_PERIOD = 'X' "Do Not Display Time Period
* RULE = "Table For Rules
* PERIOD_START_DATE = "
* PERIOD_END_DATE = "
* AVAILABLE_RULES = "Structure of Permitted Rules
* MAXIMAL_NUMBER_OF_RULES = "
* FCAL_REQUIRED = ' ' "
* HCAL_REQUIRED = ' ' "
* AVAILABLE_EXCEPTIONS = "
* AVAILABLE_WEEKLY_FRQ = "
* NAME_OF_RULE_ENTITY = 'Regel'(001) "
* ALLOW_ONLY_DAY_OFF_EXC = ' ' "
* FACTORY_CALENDAR = ' ' "Factory Calendar ID (Proposal)
* HOLIDAY_CALENDAR = ' ' "Public Holiday Calendar ID (Proposal)
* OWNER_OF_DEFAULT_SETTINGS = SY-UNAME "Users Whose Settings Are To Be Used
* TIMEZONE = "Proposal for time zone
* RULE_TYPE = 'W ' "Proposal for rule
* TIME_FROM = "Proposal for From Time
* TIME_TO = "Proposal for To Time

IMPORTING
PARAMETER_ERROR_OCCURED = "

EXCEPTIONS
TOO_MANY_RULES = 1
.



IMPORTING Parameters details for APPT_RULE_EDITOR_INIT_DATA

DISPLAY_MODE - Processing type

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

NO_PERIOD - Do Not Display Time Period

Data type: SC_FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

RULE - Table For Rules

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

PERIOD_START_DATE -

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

PERIOD_END_DATE -

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

AVAILABLE_RULES - Structure of Permitted Rules

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

MAXIMAL_NUMBER_OF_RULES -

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

FCAL_REQUIRED -

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

HCAL_REQUIRED -

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

AVAILABLE_EXCEPTIONS -

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

AVAILABLE_WEEKLY_FRQ -

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

NAME_OF_RULE_ENTITY -

Data type:
Default: 'Regel'(001)
Optional: Yes
Call by Reference: No ( called with pass by value option)

ALLOW_ONLY_DAY_OFF_EXC -

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

FACTORY_CALENDAR - Factory Calendar ID (Proposal)

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

HOLIDAY_CALENDAR - Public Holiday Calendar ID (Proposal)

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

OWNER_OF_DEFAULT_SETTINGS - Users Whose Settings Are To Be Used

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

TIMEZONE - Proposal for time zone

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

RULE_TYPE - Proposal for rule

Data type: SCSRULES-TYPE
Default: 'W '
Optional: Yes
Call by Reference: No ( called with pass by value option)

TIME_FROM - Proposal for From Time

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

TIME_TO - Proposal for To Time

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

EXPORTING Parameters details for APPT_RULE_EDITOR_INIT_DATA

PARAMETER_ERROR_OCCURED -

Data type: SC_FLAG
Optional: No
Call by Reference: Yes

EXCEPTIONS details

TOO_MANY_RULES -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for APPT_RULE_EDITOR_INIT_DATA 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_display_mode  TYPE SY-INPUT, "   
lv_too_many_rules  TYPE SY, "   
lv_parameter_error_occured  TYPE SC_FLAG, "   
lv_no_period  TYPE SC_FLAG, "   'X'
lv_rule  TYPE RULE_TAB, "   
lv_period_start_date  TYPE SCRULES-START_DATE, "   
lv_period_end_date  TYPE SCRULES-END_DATE, "   
lv_available_rules  TYPE SCAVAILABL, "   
lv_maximal_number_of_rules  TYPE I, "   
lv_fcal_required  TYPE SC_FLAG, "   SPACE
lv_hcal_required  TYPE SC_FLAG, "   SPACE
lv_available_exceptions  TYPE SCAVAILEXC, "   
lv_available_weekly_frq  TYPE SCAVAILWEEK, "   
lv_name_of_rule_entity  TYPE SCAVAILWEEK, "   'Regel'(001)
lv_allow_only_day_off_exc  TYPE SC_FLAG, "   SPACE
lv_factory_calendar  TYPE SCAL-FCALID, "   SPACE
lv_holiday_calendar  TYPE SCAL-HCALID, "   SPACE
lv_owner_of_default_settings  TYPE SY-UNAME, "   SY-UNAME
lv_timezone  TYPE TIMEZONE, "   
lv_rule_type  TYPE SCSRULES-TYPE, "   'W '
lv_time_from  TYPE SCRECDATES-TIME_FROM, "   
lv_time_to  TYPE SCRECDATES-TIME_TO. "   

  CALL FUNCTION 'APPT_RULE_EDITOR_INIT_DATA'  "
    EXPORTING
         DISPLAY_MODE = lv_display_mode
         NO_PERIOD = lv_no_period
         RULE = lv_rule
         PERIOD_START_DATE = lv_period_start_date
         PERIOD_END_DATE = lv_period_end_date
         AVAILABLE_RULES = lv_available_rules
         MAXIMAL_NUMBER_OF_RULES = lv_maximal_number_of_rules
         FCAL_REQUIRED = lv_fcal_required
         HCAL_REQUIRED = lv_hcal_required
         AVAILABLE_EXCEPTIONS = lv_available_exceptions
         AVAILABLE_WEEKLY_FRQ = lv_available_weekly_frq
         NAME_OF_RULE_ENTITY = lv_name_of_rule_entity
         ALLOW_ONLY_DAY_OFF_EXC = lv_allow_only_day_off_exc
         FACTORY_CALENDAR = lv_factory_calendar
         HOLIDAY_CALENDAR = lv_holiday_calendar
         OWNER_OF_DEFAULT_SETTINGS = lv_owner_of_default_settings
         TIMEZONE = lv_timezone
         RULE_TYPE = lv_rule_type
         TIME_FROM = lv_time_from
         TIME_TO = lv_time_to
    IMPORTING
         PARAMETER_ERROR_OCCURED = lv_parameter_error_occured
    EXCEPTIONS
        TOO_MANY_RULES = 1
. " APPT_RULE_EDITOR_INIT_DATA




ABAP code using 7.40 inline data declarations to call FM APPT_RULE_EDITOR_INIT_DATA

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 INPUT FROM SY INTO @DATA(ld_display_mode).
 
 
 
DATA(ld_no_period) = 'X'.
 
 
"SELECT single START_DATE FROM SCRULES INTO @DATA(ld_period_start_date).
 
"SELECT single END_DATE FROM SCRULES INTO @DATA(ld_period_end_date).
 
 
 
DATA(ld_fcal_required) = ' '.
 
DATA(ld_hcal_required) = ' '.
 
 
 
DATA(ld_name_of_rule_entity) = 'Regel'.
 
DATA(ld_allow_only_day_off_exc) = ' '.
 
"SELECT single FCALID FROM SCAL INTO @DATA(ld_factory_calendar).
DATA(ld_factory_calendar) = ' '.
 
"SELECT single HCALID FROM SCAL INTO @DATA(ld_holiday_calendar).
DATA(ld_holiday_calendar) = ' '.
 
"SELECT single UNAME FROM SY INTO @DATA(ld_owner_of_default_settings).
DATA(ld_owner_of_default_settings) = SY-UNAME.
 
 
"SELECT single TYPE FROM SCSRULES INTO @DATA(ld_rule_type).
DATA(ld_rule_type) = 'W '.
 
"SELECT single TIME_FROM FROM SCRECDATES INTO @DATA(ld_time_from).
 
"SELECT single TIME_TO FROM SCRECDATES INTO @DATA(ld_time_to).
 


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!