SAP Reports / Programs

HVECPSH0 SAP ABAP Report - Profit share calculation in payroll







HVECPSH0 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for External routine of the profit share processing functions...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 HVECPSH0 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 HVECPSH0. "Basic submit
SUBMIT HVECPSH0 AND RETURN. "Return to original report after report execution complete
SUBMIT HVECPSH0 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: TOTPY2 = Profit share amount
Selection Text: TOTPY12 = Profit share amount
Selection Text: TOTPY11 = Profit share amount
Selection Text: TOTPY10 = Profit share amount
Selection Text: TOTPY1 = Profit share amount
Selection Text: TOTPY = Profit share amount
Selection Text: SOC = Company Code
Selection Text: SEP2 = Advance
Selection Text: SEP1 = Payment
Selection Text: PERMO = Change period
Selection Text: PERC = Advance percentage
Selection Text: PEN_BAL = Amount of pending loan
Selection Text: OCT2 = Advance
Selection Text: OCT1 = Payment
Selection Text: NUMPER = Personnel number
Selection Text: NOV2 = Advance
Selection Text: NOV1 = Payment
Selection Text: DATUM2 = Payment/advance date
Selection Text: DATUM12 = Payment/advance date
Selection Text: DATUM11 = Payment/advance date
Selection Text: DATUM10 = Payment/advance date
Selection Text: DATUM1 = Payment/advance date
Selection Text: DATUM = Payment/advance date
Selection Text: BEGDA = Start date of period
Selection Text: BAS_SAL = Basic wage
Selection Text: AGO2 = Advance
Selection Text: AGO1 = Payment
Selection Text: A2 = Advance
Selection Text: A1 = Payment
Selection Text: MET1 = Paid
Selection Text: MET2 = Estimated
Selection Text: MAY2 = Advance
Selection Text: MAY1 = Payment
Selection Text: M2 = Advance
Selection Text: M1 = Payment
Selection Text: JUN2 = Advance
Selection Text: JUN1 = Payment
Selection Text: JUL2 = Advance





Selection Text: JUL1 = Payment
Selection Text: F2 = Advance
Selection Text: F1 = Payment
Selection Text: ENDDA = End date of period
Selection Text: E2 = Advance
Selection Text: E1 = Payment
Selection Text: DIC2 = Advance
Selection Text: DIC1 = Payment
Selection Text: DATUM9 = Payment/advance date
Selection Text: DATUM8 = Payment/advance date
Selection Text: DATUM7 = Payment/advance date
Selection Text: DATUM6 = Payment/advance date
Selection Text: DATUM4 = Payment/advance date
Selection Text: DATUM3 = Payment/advance date
Selection Text: TOTPY9 = Profit share amount
Selection Text: TOTPY8 = Profit share amount
Selection Text: TOTPY7 = Profit share amount
Selection Text: TOTPY6 = Profit share amount
Selection Text: TOTPY4 = Profit share amount
Selection Text: TOTPY3 = Profit share amount
Title: Profit share calculation in payroll
Text Symbol: 055 = Internal error
Text Symbol: 054 = Payts/Adv.
Text Symbol: 053 = Payments / Advances
Text Symbol: 052 = Date
Text Symbol: 051 = Type
Text Symbol: 041 = Subtotal
Text Symbol: 040 = Total
Text Symbol: 038 = Advance amount:
Text Symbol: 035 = Advance
Text Symbol: 034 = Payment
Text Symbol: 030 = Employee no.:
Text Symbol: 029 = Mth:
Text Symbol: 028 = Error. Advance is for an invalid period
Text Symbol: 027 = Error in resource calendar
Text Symbol: 026 = Error in modifier assigned to period/company
Text Symbol: 025 = Calculation method
Text Symbol: 024 = You must register all periods previous or equal to monthly period
Text Symbol: 023 = Non-valid period modifier





Text Symbol: 022 = twelfth period
Text Symbol: 021 = Eleventh period
Text Symbol: 020 = Tenth period
Text Symbol: 019 = Ninth period
Text Symbol: 018 = Eighth period
Text Symbol: 017 = Seventh period
Text Symbol: 016 = Sixth period
Text Symbol: 015 = Fifth period
Text Symbol: 014 = Fourth period
Text Symbol: 013 = Third period
Text Symbol: 011 = Second period
Text Symbol: 010 = First period
Text Symbol: 009 = Previous period data
Text Symbol: 004 = Start date greater than end date
Text Symbol: 001 = General data


INCLUDES used within this REPORT HVECPSH0

INCLUDE: PCALDVE0,


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:

HR_GET_PAYROLL_RESULTS CALL FUNCTION 'HR_GET_PAYROLL_RESULTS' EXPORTING PERNR = p_pernr PERMO = p_permo PABRJ = lv_execution_year TABLES RESULT_TAB = lt_result_table.

REUSE_ALV_LIST_DISPLAY ** call function 'REUSE_ALV_LIST_DISPLAY' ** exporting ** i_callback_program = g_repid ** i_structure_name = 'WA_ALV' ** is_layout = g_layout ** it_fieldcat = fieldcat ** it_events = it_events ** tables ** t_outtab = it_alv ** exceptions ** program_error = 1 ** others = 2.

HR_PAL_LOG_AND_ALV_DISPLAY CALL FUNCTION 'HR_PAL_LOG_AND_ALV_DISPLAY' EXPORTING I_S_DISPLAY_PROFILE = ls_display_profile I_CALLBACK_PROGRAM = g_repid I_STRUCTURE_NAME = 'WA_ALV' IS_LAYOUT = g_layout IT_FIELDCAT = fieldcat IT_EVENTS = it_events TABLES T_OUTTAB = it_alv EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2.

HR_READ_INFOTYPE call function 'HR_READ_INFOTYPE' EXPORTING pernr = p_numper infty = '0001' begda = begda "#EC DOM_EQUAL endda = endda "#EC DOM_EQUAL IMPORTING subrc = subrc TABLES infty_tab = i0001 EXCEPTIONS infty_not_found = 1 others = 2.

MONTH_NAMES_GET call function 'MONTH_NAMES_GET' EXPORTING language = sy-langu IMPORTING return_code = subrc TABLES month_names = names_month EXCEPTIONS month_names_not_found = 1 others = 2.

HR_PAL_PERNR_MSG_ADD CALL FUNCTION 'HR_PAL_PERNR_MSG_ADD' EXPORTING I_PERNR = gv_pernr I_MSGID = 'RP' I_MSGTY = 'E' I_MSGNO = '016' I_MSGV1 = l_s_msg-msgv1 EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2.

HRVE_GET_CURRENCY call function 'HRVE_GET_CURRENCY' exporting iv_currency_determination_date = p_currency_determination_date IMPORTING EV_CURRENCY = p_currency EV_CURRENCY_RATE_DATE = p_currency_rate_date ev_error_text = lv_error_text EXCEPTIONS ERROR = 1 OTHERS = 2 .



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