*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZENH_HRSFEC_PTP_EE_REPLICATION. "active version
" Store the Config ID in Memory. This shall be read in the BADIs and other custom codes.
" This memory id shall be read in CONSTRUCTOR of Class ZCL_HRSFEC_CE_ITMAP_HELPER.
ZCL_HRSFEC_CE_ITMAP_HELPER=>STORE_CONFIG_IN_MEMORY( mv_sfapi_config_id ).
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
" Store the Config ID in Memory. This shall be read in the BADIs and other custom codes.
" This value shall be useful in determining the Company code, as each config id has first 4 digits
" for Company Code. This way, we dont have to redetermine an employee's company code for
" each BADI implementation.
EXPORT p1 = iv_config_id
TO MEMORY ID mc_memid_ptp_configid. "MEM ID: 'ZHRSFEC_CE_CONFIG'
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZPTP_HRSFEC_EE_MDR_BNDL_PROC. "active version
" Store the Config ID in Memory. This shall be read in the BADIs and other custom codes.
" This value shall be useful in determining the Company Code, as each config id is meant for single Company.
" This memory id shall be read in CONSTRUCTOR of Class ZCL_HRSFEC_CE_ITMAP_HELPER when an object of the class is created.
ZCL_HRSFEC_CE_ITMAP_HELPER=>STORE_CONFIG_IN_MEMORY( input-part_ee_mdr_rep_bndl_req-empl_master_data_repl_bndl_req-compound_employee_query_config ).
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZHRSFEC_APPLICATION_LOG. "active version
* Add Parameter to Application Log, to capture Config ID.
DATA: lo_zzz_itmap_helper TYPE REF TO ZCL_HRSFEC_CE_ITMAP_HELPER.
DATA: LS_ZZZ_PTP_CONFIG TYPE ZCL_HRSFEC_CE_ITMAP_HELPER=>TS_PTP_CONFIG.
DATA: lt_zzz_para TYPE STANDARD TABLE OF SPAR.
FIELD-SYMBOLS: <ls_zzz_para> TYPE spar.
DATA: ls_zzz_log TYPE bal_s_log.
CREATE OBJECT lo_zzz_itmap_helper. "This will set Config ID for the current run
"in Constructor method by performing IMPORT FROM MEMORY.
LS_ZZZ_PTP_CONFIG = lo_zzz_itmap_helper->get_ptp_config( ).
IF NOT LS_ZZZ_PTP_CONFIG-config_id IS INITIAL.
APPEND INITIAL LINE TO lt_zzz_para ASSIGNING <ls_zzz_para>.
<ls_zzz_para>-param = ZCL_HRSFEC_CE_ITMAP_HELPER=>mc_logparam_configid. "CONFIGID
<ls_zzz_para>-value = LS_ZZZ_PTP_CONFIG-config_id.
CALL FUNCTION 'BAL_LOG_HDR_READ'
EXPORTING
i_log_handle = gv_log_handle
IMPORTING
E_S_LOG = ls_zzz_log
EXCEPTIONS
LOG_NOT_FOUND = 1
OTHERS = 2
.
IF sy-subrc EQ 0.
ls_zzz_log-params-t_par = lt_zzz_para. "Update parameters.
" Set callback routine for log header parameters
ls_zzz_log-params-callback-userexitt = space. "Use 'F' in case of FM.
ls_zzz_log-params-callback-userexitp = ZCL_HRSFEC_CE_ITMAP_HELPER=>MC_LOG_CALLBACK_PROGRAM. "E.g. ZHRSFEC_SLG1_PARAMS
ls_zzz_log-params-callback-userexitf = ZCL_HRSFEC_CE_ITMAP_HELPER=>MC_LOG_CALLBACK_ROUTINE. "E.g. BAL_CALLBACK_DETAIL_LOG
CALL FUNCTION 'BAL_LOG_HDR_CHANGE'
EXPORTING
i_log_handle = gv_log_handle
i_s_log = ls_zzz_log
EXCEPTIONS
LOG_NOT_FOUND = 1
LOG_HEADER_INCONSISTENT = 2
OTHERS = 3
.
ENDIF.
ENDIF.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
*--------------------------------------------------------------------
* FORM BAL_CALLBACK_DETAIL_LOG
*--------------------------------------------------------------------
FORM bal_callback_detail_log "#EC CALLED
TABLES
i_t_params STRUCTURE spar.
* We have enhanced (via Enhancement ZHRSFEC_APPLICATION_LOG) the class method: CL_HRSFEC_APPLICATION_LOG->SAVE_APPL_LOG
* by including CONFIGID as parameter in the Application Log Header. This way, we are able to
* tie the App Log entries to Config ID. In there, we specify this Subroutine (BAL_CALLBACK_DETAIL_LOG)
* as CALLBACK routine to view the parameter contents when displayed via SLG1 tcode.
DATA: lv_config TYPE t77sfec_ptp_conf-config_id.
* Get the log parameters
LOOP AT i_t_params ASSIGNING FIELD-SYMBOL(<ls_params>).
CASE <ls_params>-param.
WHEN zcl_hrsfec_ce_itmap_helper=>mc_logparam_configid. "CONFIGID
lv_config = <ls_params>-value.
ENDCASE.
ENDLOOP.
IF NOT lv_config IS INITIAL.
MESSAGE i001(zhrsfec_ptp) WITH lv_config. "Display in an info message Config ID contents
ENDIF.
ENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
26 | |
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |