SAP Reports / Programs

RHCMPCR0 SAP ABAP Report - Compa-Ratio Analysis







RHCMPCR0 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Compa-ratios You can use this report to calculate the compa-ratio, that is where individual employees sit in their respective salary bands...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter RHCMPCR0 into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RHCMPCR0. "Basic submit
SUBMIT RHCMPCR0 AND RETURN. "Return to original report after report execution complete
SUBMIT RHCMPCR0 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: MOLGA_SL = Country grouping
Selection Text: SLREG_SL = Pay grade area
Selection Text: SLTYP_SL = Pay grade type
Selection Text: TARIFGRP = Pay grade
Selection Text: TARIFSTF = Pay grade level
Selection Text: ZEINH = Time unit for amount field
Title: Compa-Ratio Analysis
Text Symbol: ERR = Error list
Text Symbol: H01 = Salary
Text Symbol: H02 = Basic pay
Text Symbol: STT = Selection key date
Text Symbol: T01 = Key country grouping
Text Symbol: T02 = Key pay gr. type
Text Symbol: T03 = Key. pay gr. area
Text Symbol: T04 = Key personnel area
Text Symbol: T05 = Key personnel subarea
Text Symbol: T06 = Org. unit description
Text Symbol: T07 = Job description
Text Symbol: ZEB = Time unit


INCLUDES used within this REPORT RHCMPCR0

INCLUDE: FHCMPD04, " ERROR HANDLING
MPALV_GR, " STANDARD ALV INCLUDE


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

HRCM_COMPENSATION_PLVAR_SET CALL FUNCTION 'HRCM_COMPENSATION_PLVAR_SET' EXPORTING read_level = 2 * READ_CASCADE = ' ' * READ_ONLY = ' ' * MESSAGE_MODE = 0 reaction = no_msg IMPORTING plvar = plvar * PLVAR_LEVEL = TABLES error_table = error_table.

HR_BEN_HANDLE_ERROR CALL FUNCTION 'HR_BEN_HANDLE_ERROR' EXPORTING pernr = pernr-pernr msg_class = 'HRCMP00REPORTING' msg_number = '103' msg_par1 = pernr-pernr msg_par2 = datum severity = 8 reaction = no_msg TABLES error_table = error_table EXCEPTIONS OTHERS = 1.

HR_BEN_HANDLE_ERROR CALL FUNCTION 'HR_BEN_HANDLE_ERROR' EXPORTING pernr = pernr-pernr msg_class = 'HRCMP00REPORTING' msg_number = '102' msg_par1 = pernr-pernr msg_par2 = datum severity = 8 reaction = no_msg TABLES error_table = error_table EXCEPTIONS OTHERS = 1.

HR_BEN_HANDLE_ERROR CALL FUNCTION 'HR_BEN_HANDLE_ERROR' EXPORTING pernr = pernr-pernr msg_class = '3F' msg_number = '154' msg_par1 = datum severity = 8 reaction = no_msg TABLES error_table = error_table EXCEPTIONS OTHERS = 1.

HR_BEN_HANDLE_ERROR CALL FUNCTION 'HR_BEN_HANDLE_ERROR' EXPORTING pernr = pernr-pernr msg_class = 'HRCMP00REPORTING' msg_number = '115' severity = 4 reaction = no_msg TABLES error_table = error_table EXCEPTIONS OTHERS = 1.

RH_READ_OBJECT CALL FUNCTION 'RH_READ_OBJECT' EXPORTING plvar = plvar otype = stell objid = p0001-stell * REALO = ' ' * ISTAT = ' ' begda = pn-begda endda = pn-endda * LANGU = SY-LANGU * OINTERVAL = 'X' * STORE = 'X' * CHECK_STRU_AUTH = 'X' * READ_DB = ' ' IMPORTING stext = stext * TABLES * EXISTENCE = EXCEPTIONS not_found = 1 OTHERS = 2 .

RH_READ_OBJECT CALL FUNCTION 'RH_READ_OBJECT' EXPORTING plvar = plvar otype = orgeh objid = p0001-orgeh * REALO = ' ' * ISTAT = ' ' begda = pn-begda endda = pn-endda * LANGU = SY-LANGU * OINTERVAL = 'X' * STORE = 'X' * CHECK_STRU_AUTH = 'X' * READ_DB = ' ' IMPORTING stext = stext * TABLES * EXISTENCE = EXCEPTIONS not_found = 1 OTHERS = 2 .

HRCM_SAL_STRUC_GET CALL FUNCTION 'HRCM_SAL_STRUC_GET' EXPORTING pernr = pernr-pernr datum = pn-begda * crvar = molga = p_001p-molga it0001 = p0001 it0008 = p0008 * IT0008_SUBTY = '0 ' currency = mdp_curr zeinh_out = zeinh reaction = no_msg IMPORTING ssmid = extra-midpoint ctamt = extra-ctamt slref = extra-slref * Frequ_out = * FREQU_OUT_TEXT = TABLES error_table = error_table .

HR_BEN_HANDLE_ERROR CALL FUNCTION 'HR_BEN_HANDLE_ERROR' EXPORTING pernr = pernr-pernr msg_class = 'HRCMP00REPORTING' msg_number = '116' msg_par1 = p_001p-molga msg_par2 = p0008-trfar msg_par3 = p0008-trfgb msg_par4 = pn-endda severity = 8 reaction = no_msg TABLES error_table = error_table EXCEPTIONS OTHERS = 1.

RP_CALC_DATE_IN_INTERVAL CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL' EXPORTING date = pn-begda days = 0 months = 0 signum = '-' years = 1 IMPORTING calc_date = it0015_begda.

HRCM_EMPLOYEE_PERIOD_SALARY CALL FUNCTION 'HRCM_EMPLOYEE_PERIOD_SALARY' EXPORTING annual_salary_flg = l_crsal personnel_number = pernr-pernr salary_wage_type = space salary_currency = p0008-waers salary_as_of_date = pn-begda salary_frequency = zeinh use_it0008 = 'X' use_it0014 = 'X' use_it0015 = 'X' it0015_begda = it0015_begda it0015_endda = it0015_endda s0001 = p0001 s0008 = p0008 IMPORTING salary = itab-ansal salary_curcy = itab-ancur * IT0008_FREQUENCY = L_FREQUENCY EXCEPTIONS error_read_0001 = 1 error_read_0008 = 2 error_read_0014 = 3 error_read_0015 = 4 no_entry_t511 = 5 no_entry_t001p = 6 no_entry_t503 = 7 error_at_indirect_evaluation = 8 internal_error = 9 OTHERS = 10.

HR_BEN_HANDLE_ERROR CALL FUNCTION 'HR_BEN_HANDLE_ERROR' EXPORTING pernr = pernr-pernr msg_class = 'HRCMP00REPORTING' msg_number = l_msgno msg_par1 = pernr-pernr severity = 8 reaction = no_msg TABLES error_table = error_table EXCEPTIONS OTHERS = 1. "end N371733

HRCM_COMPA_RATIO_CALCULATE CALL FUNCTION 'HRCM_COMPA_RATIO_CALCULATE' EXPORTING pernr = pernr-pernr keyda = pn-begda it0015_begda = it0015_begda it0015_endda = it0015_endda crvar = 'D' molga = p_001p-molga it0001 = p0001 it0008 = p0008 * IT0008_SUBTY = '0 ' reaction = no_msg IMPORTING compa_ratio = extra-compa TABLES error_table = error_table.

HR_BEN_SHOW_ERROR_POPUP CALL FUNCTION 'HR_BEN_SHOW_ERROR_POPUP' EXPORTING * CUCOL = '2' * CUROW = '4' title = 'Fehlerliste'(err) * LOG_HANDLE = TABLES error_table = error_table.

DDUT_DOMVALUE_TEXT_GET CALL FUNCTION 'DDUT_DOMVALUE_TEXT_GET' EXPORTING name = 'PFREQ' value = dd07v_wa-domvalue_l * LANGU = SY-LANGU texts_only = 'X' IMPORTING dd07v_wa = dd07v_wa EXCEPTIONS not_found = 1 illegal_input = 2 OTHERS = 3 .



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.







The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RHCMPCR0 or its description.