SAP Function Modules

HRHAPCN_0DOC_SCREEN_DATA_INIT SAP Function module - Display/Change/Create Appraisal Document







HRHAPCN_0DOC_SCREEN_DATA_INIT 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 HRHAPCN_0DOC_SCREEN_DATA_INIT into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM HRHAPCN_0DOC_SCREEN_DATA_INIT - HRHAPCN 0DOC SCREEN DATA INIT





CALL FUNCTION 'HRHAPCN_0DOC_SCREEN_DATA_INIT' "Display/Change/Create Appraisal Document
* EXPORTING
*   add_on_application =        " hap_add_on_application  Add-On Application for Appraisal Systems
*   mode = ' '                  " char1         ' '=Display; 'X'=Change; 'N'=New
*   administrator =             " hap_administrator  Flag: Administrator
*   plan_version =              " hap_plan_version  Plan Version
*   s_appraisal_id =            " hap_s_appraisal_id  Appraisal ID
*   new_suppress_in_preparation = ' '  " char1  'X'=Skip In Preparation phase and go directly in the next status
*   new_template_id =           " hap_template_id  (MODE='N') Appraisal template (PATH VALUE)
*   new_start_date =            " hap_ap_start_date  (MODE='N') Start date of the appraisal period
*   new_end_date =              " hap_ap_end_date  (MODE='N') End date of the appraisal period
*   t_new_appraiser =           " hap_t_header_appraiser  (MODE='N') Header - Appraiser
*   t_new_appraisee =           " hap_t_header_appraisee  (MODE='N') Header - Appraisee
*   todo_list = 'R'             " hap_todo_list  <> SPACE - Create To-Do List (only if APPRAISAL_ID is initial)
*   todo_list_dialog = 'X'      " char1         'X'=To-Do List Dialog to choose selection direction
*   s_display_ui =              " hap_s_display_ui  Display UI, 'D' -> Display 'X' -> Change
  IMPORTING
    template_id =               " hap_template_id  Appraisal Template
    s_validity_period =         " hap_s_period_validity  Validity Period
    t_todo_list =               " hap_t_alv_todo_list  To-Do List
    todo_mode =                 " hap_todo_list  To-Do List Type
    t_fcodes =                  " ui_functions  Function Code Table
    title =                     " text70        Title
    repid =                     " syrepid       ABAP program, current main program
    dynnr =                     " sydynnr       ABAP program, number of current screen
  EXCEPTIONS
    LEAVE_SCREEN = 1            "
    CANCELLED = 2               "               Action was cancelled
    .  "  HRHAPCN_0DOC_SCREEN_DATA_INIT

ABAP code example for Function Module HRHAPCN_0DOC_SCREEN_DATA_INIT





The ABAP code below is a full code listing to execute function module HRHAPCN_0DOC_SCREEN_DATA_INIT 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).

DATA:
ld_template_id  TYPE HAP_TEMPLATE_ID ,
ld_s_validity_period  TYPE HAP_S_PERIOD_VALIDITY ,
ld_t_todo_list  TYPE HAP_T_ALV_TODO_LIST ,
ld_todo_mode  TYPE HAP_TODO_LIST ,
ld_t_fcodes  TYPE UI_FUNCTIONS ,
ld_title  TYPE TEXT70 ,
ld_repid  TYPE SYREPID ,
ld_dynnr  TYPE SYDYNNR .

DATA(ld_add_on_application) = 'Check type of data required'.
DATA(ld_mode) = 'Check type of data required'.
DATA(ld_administrator) = 'Check type of data required'.
DATA(ld_plan_version) = 'Check type of data required'.
DATA(ld_s_appraisal_id) = 'Check type of data required'.
DATA(ld_new_suppress_in_preparation) = 'Check type of data required'.
DATA(ld_new_template_id) = 'Check type of data required'.
DATA(ld_new_start_date) = 'Check type of data required'.
DATA(ld_new_end_date) = 'Check type of data required'.
DATA(ld_t_new_appraiser) = 'Check type of data required'.
DATA(ld_t_new_appraisee) = 'Check type of data required'.
DATA(ld_todo_list) = 'Check type of data required'.
DATA(ld_todo_list_dialog) = 'Check type of data required'.
DATA(ld_s_display_ui) = 'Check type of data required'. . CALL FUNCTION 'HRHAPCN_0DOC_SCREEN_DATA_INIT' * EXPORTING * add_on_application = ld_add_on_application * mode = ld_mode * administrator = ld_administrator * plan_version = ld_plan_version * s_appraisal_id = ld_s_appraisal_id * new_suppress_in_preparation = ld_new_suppress_in_preparation * new_template_id = ld_new_template_id * new_start_date = ld_new_start_date * new_end_date = ld_new_end_date * t_new_appraiser = ld_t_new_appraiser * t_new_appraisee = ld_t_new_appraisee * todo_list = ld_todo_list * todo_list_dialog = ld_todo_list_dialog * s_display_ui = ld_s_display_ui IMPORTING template_id = ld_template_id s_validity_period = ld_s_validity_period t_todo_list = ld_t_todo_list todo_mode = ld_todo_mode t_fcodes = ld_t_fcodes title = ld_title repid = ld_repid dynnr = ld_dynnr EXCEPTIONS LEAVE_SCREEN = 1 CANCELLED = 2 . " HRHAPCN_0DOC_SCREEN_DATA_INIT
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 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_template_id  TYPE HAP_TEMPLATE_ID ,
ld_add_on_application  TYPE HAP_ADD_ON_APPLICATION ,
ld_s_validity_period  TYPE HAP_S_PERIOD_VALIDITY ,
ld_mode  TYPE CHAR1 ,
ld_t_todo_list  TYPE HAP_T_ALV_TODO_LIST ,
ld_administrator  TYPE HAP_ADMINISTRATOR ,
ld_plan_version  TYPE HAP_PLAN_VERSION ,
ld_todo_mode  TYPE HAP_TODO_LIST ,
ld_s_appraisal_id  TYPE HAP_S_APPRAISAL_ID ,
ld_t_fcodes  TYPE UI_FUNCTIONS ,
ld_title  TYPE TEXT70 ,
ld_new_suppress_in_preparation  TYPE CHAR1 ,
ld_repid  TYPE SYREPID ,
ld_new_template_id  TYPE HAP_TEMPLATE_ID ,
ld_dynnr  TYPE SYDYNNR ,
ld_new_start_date  TYPE HAP_AP_START_DATE ,
ld_new_end_date  TYPE HAP_AP_END_DATE ,
ld_t_new_appraiser  TYPE HAP_T_HEADER_APPRAISER ,
ld_t_new_appraisee  TYPE HAP_T_HEADER_APPRAISEE ,
ld_todo_list  TYPE HAP_TODO_LIST ,
ld_todo_list_dialog  TYPE CHAR1 ,
ld_s_display_ui  TYPE HAP_S_DISPLAY_UI .

ld_add_on_application = 'Check type of data required'.
ld_mode = 'Check type of data required'.
ld_administrator = 'Check type of data required'.
ld_plan_version = 'Check type of data required'.
ld_s_appraisal_id = 'Check type of data required'.
ld_new_suppress_in_preparation = 'Check type of data required'.
ld_new_template_id = 'Check type of data required'.
ld_new_start_date = 'Check type of data required'.
ld_new_end_date = 'Check type of data required'.
ld_t_new_appraiser = 'Check type of data required'.
ld_t_new_appraisee = 'Check type of data required'.
ld_todo_list = 'Check type of data required'.
ld_todo_list_dialog = 'Check type of data required'.
ld_s_display_ui = 'Check type of data required'.

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 HRHAPCN_0DOC_SCREEN_DATA_INIT or its description.