SAP Knowledge Base Article - Public

3745372 - How to Control the Step Buttons "Start", "Repeat" and "Confirm" in Payroll Control Center (PCC)

Symptom

You want to control the availability or behavior of the step buttons (e.g.,"Start", "Repeat" and "Confirm" ) in Payroll Control Center (PCC) based on custom business logic. 

Environment

  • Human Capital Management (HCM)
  • SAP enhancement package for SAP ERP
  • SAP S/4HANA
  • SAP Payroll Control Center (PCC)

Cause

The standard step buttons of the PCC process are always available as per SAP standard logic. Certain scenarios require that buttons are enabled, disabled, or hidden based on additional checks or user decisions.

Resolution

You can use the method VETO_CHECK in the step runtime class to programmatically control whether step buttons are enabled or disabled based on your own custom logic.

The standard signature is as follows:

METHOD veto_check.
  " rv_veto_raised = abap_false → allow operation (button is enabled)
  " rv_veto_raised = abap_true  → block operation (button is disabled)
  rv_veto_raised = abap_false.
ENDMETHOD.

Within this method, you can use the operation type iv_rd_type to identify the different buttons to be controlled.
The parameter iv_rd_type can take values defined in CL_PYC_PT_STS_EXE=>GCS_OPERATION and CL_PYC_PT_STS_ERR=>GCS_OPERATION.

For example:

CASE iv_rd_type.

  WHEN cl_pyc_pt_sts_exe=>gcs_operation-close.
    rv_veto_raised = abap_true.    "Disable Confirm
    RETURN.

  WHEN cl_pyc_pt_sts_err=>gcs_operation-main_act.
    rv_veto_raised = abap_true.    "Disable Start
    RETURN.

  WHEN cl_pyc_pt_sts_err=>gcs_operation-addl_act.
    rv_veto_raised = abap_true.    "Disable Subset Start
    RETURN.

  WHEN cl_pyc_pt_sts_err=>gcs_operation-reset.
    rv_veto_raised = abap_true.    "Disable Repeat
    RETURN.

  OTHERS.
    rv_veto_raised = abap_false.   "Allow other operations

ENDCASE.

Keywords

 PCC, step button, veto_check, payroll control center, enable/disable step button, custom check. , KBA , PY-XX-PYP , Payroll Control Center , How To

Product

SAP SuccessFactors HCM Core 2511