# Bank-Specific Salary Payment File Generation

> A program that reads net payment amounts from payroll results after the payroll run and produces the salary file in the format each bank requires. Payments are split by payment type (salary, advance, bonus, severance) and by the employee's bank; IBAN and total checks are performed, and the file is created together with a control list.

- Type: Program, Custom development, Interface
- Module: HCM
- Estimated effort: M (6–10 working days)
- Localization: TR
- Last updated: 2026-11-18
- URL: https://nekuhub.com/en/programs/bank-specific-salary-payment-file-generation/


## Localization and legal basis: Türkiye

- Legal basis: Article 32 of Labour Law No. 4857 and the rules on paying wages through banks.
- The file format is checked against each bank's current salary payment specification during installation; the file is sent through the banking channel the company uses.

## Why is the standard not enough?

PC00_M99_CDTA (PC00_M47_CDTA for Türkiye) runs the preliminary payment program and PC00_M99_FPAYM creates the payment medium; but the payment medium formats do not directly cover the banks' local salary file layouts, the split by payment type or a separate file per bank. Companies run separate Excel conversions per format. The program does this conversion inside SAP using a rule table.

### Closest standard alternatives

- PC00_M99_CDTA: Preliminary payment program; does not produce bank-specific formats or separate files per payment type.
- PC00_M99_FPAYM: Creates files using payment medium formats; local salary file layouts require a separate format development.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| HRPY_RGDIR | Payroll result directory: period, payment date, payment type (driving table) | Read | - | ECC + S/4 |
| PCL2 | Payroll cluster: BT payment details and RT net amount | Read | PCL2-RELID = 'TR' AND PCL2-SRTFD = PERNR + SEQNR | ECC + S/4 |
| PA0009 | Employee bank details and IBAN | Read | PA0009-PERNR = HRPY_RGDIR-PERNR | ECC + S/4 |
| BNKA | Bank name and branch | Read | BNKA-BANKS = PA0009-BANKS AND BNKA-BANKL = PA0009-BANKL | ECC + S/4 |
| T012K | Company's paying bank account | Read | - | ECC + S/4 |
| REGUH | Preliminary payment program result (if used) | Read | REGUH-PERNR = HRPY_RGDIR-PERNR | ECC + S/4 |
| PA0001 | Company code and payroll area | Read | PA0001-PERNR = HRPY_RGDIR-PERNR | ECC + S/4 |

## BAPIs and functions used

- CU_READ_RGDIR: Reads the employee's payroll result directory
- PYXX_READ_PAYROLL_RESULT: Reads the payroll result (BT, RT)
- GUI_DOWNLOAD: Downloads the bank file to the user's computer

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_ABKRS | Payroll area | Single value | PA0001-ABKRS | Yes |
| P_PERIOD | Payroll period | Single value | - | Yes |
| P_PAYDT | Payment date | Single value | HRPY_RGDIR-PAYDT | No |
| S_PAYTY | Payment type (salary, advance, bonus, severance) | Range / multiple | HRPY_RGDIR-PAYTY | No |
| P_HBKID | Paying house bank | Single value | T012K-HBKID | Yes |
| P_TEST | Test run (no file) | Checkbox | - | No |

## Result list columns

| Column | Source |
|---|---|
| Personnel no. | HRPY_RGDIR-PERNR |
| Name | PA0001-ENAME |
| IBAN | PA0009-IBAN |
| Bank | BNKA-BANKA |
| Payment type | Calculated: Salary, advance, bonus or severance |
| Net amount | Calculated: Payment amount from the BT table |
| File | Calculated: File name created per bank |
| Status | Calculated: Added to file, IBAN error or test |

## How does the program work?

1. Payroll area, period and payment date are selected; valid payroll results are read from HRPY_RGDIR with CU_READ_RGDIR, and off-cycle runs are included according to the payment type.
2. The net amount to pay is taken from the RT/BT tables in cluster PCL2 with PYXX_READ_PAYROLL_RESULT; the BT table gives bank details and amount per payment.
3. Alternatively, if the preliminary payment program was run, amounts and payees are read from REGUH, which keeps the selection logic of the standard preliminary program.
4. The employee's IBAN and bank come from PA0009, bank name and branch from BNKA, and the company's paying account from T012K. IBAN length and check digits are validated.
5. A format rule table is selected per bank (field order, fixed length or delimiter, date and amount format, character set, header and total lines) and a separate file is produced for each bank.
6. The file total is compared with the payroll net total; if they differ no file is created. The file is written to the server or downloaded with GUI_DOWNLOAD, and the control list is archived as PDF.

## Authorization objects

- P_PCLX: Authorization to read the payroll result cluster (RELID RU/TR)
- P_ORGIN: Authorization to read employee data by personnel area, employee group and infotype
- S_DATASET: File access authorization to write the file to the application server

## Frequently asked questions

### How long does it take to add a new bank?

If the bank's specification is known, a new set of rows is added to the format rule table; 0.5–1 day is enough for most banks. Banks that want a completely different structure (e.g. XML) add 1–2 days.

### Should the standard preliminary payment program still be run?

It is recommended. If it runs, payment documents and postings stay standard and the program only produces the file format. Without it, the amounts are read directly from the payroll result.

### Does it work on S/4HANA?

Yes. The payroll cluster, HRPY_RGDIR and the bank details infotype are the same on S/4HANA (H4S4); bank master data stays in BNKA.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=hcm-tr-salary-bank-payment-file
