Codeunit "Payment Export Mgt"
Codeunit 1210 "Payment Export Mgt" manages the export of payment data to bank files. Handles data exchange creation, payment line processing, column mapping, and file export operations for various payment export formats including SEPA and bank-specific formats.
Remarks
Integrates with Data Exchange Framework for flexible payment file formats. Supports both server-side and client-side file exports. Provides extensibility through integration events for custom export logic and validation.
Properties
| Name | Value |
|---|---|
| Permissions | TableData "Gen. Journal Line" = rm, TableData "Data Exch." = rimd, TableData "Data Exch. Field" = rimd, TableData "Payment Export Data" = rimd |
Methods
CreateDataExch
Creates a new data exchange record for payment export.
procedure CreateDataExch(var DataExch: Record "Data Exch.", BankAccountCode: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| DataExch | Table System.IO."Data Exch." |
Data exchange record to be created |
| BankAccountCode | Code[20] |
Bank account code for export format lookup |
CreatePaymentLines
Creates payment lines in the data exchange from payment export data.
procedure CreatePaymentLines(var PaymentExportData: Record "Payment Export Data")
Parameters
| Name | Type | Description |
|---|---|---|
| PaymentExportData | Table Microsoft.Bank.Payment."Payment Export Data" |
Payment export data to process |
ProcessColumnMapping
Processes column mapping for payment export data exchange.
procedure ProcessColumnMapping(DataExch: Record "Data Exch.", RecRef: RecordRef, LineNo: Integer, DataExchLineDefCode: Code[20], TableID: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DataExch | Table System.IO."Data Exch." |
Data exchange record |
| RecRef | RecordRef |
Record reference containing source data |
| LineNo | Integer |
Line number in the data exchange |
| DataExchLineDefCode | Code[20] |
Data exchange line definition code |
| TableID | Integer |
Table ID of the source record |
ProcessColumnMapping
procedure ProcessColumnMapping(var DataExch: Record "Data Exch.", RecRef: RecordRef, var DataExchFlowFieldGrBuff: Record "Data Exch. FlowField Gr. Buff." temporary, LineNo: Integer, DataExchLineDefCode: Code[20], TableID: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| DataExch | Table System.IO."Data Exch." | |
| RecRef | RecordRef | |
| DataExchFlowFieldGrBuff | Table System.IO."Data Exch. FlowField Gr. Buff." | |
| LineNo | Integer | |
| DataExchLineDefCode | Code[20] | |
| TableID | Integer |
EnableExportToServerTempFile
procedure EnableExportToServerTempFile(NewMode: Boolean, NewExtension: Text[3])
Parameters
| Name | Type | Description |
|---|---|---|
| NewMode | Boolean | |
| NewExtension | Text[3] |
GetServerTempFileName
procedure GetServerTempFileName(): Text[1024]
Returns
| Type | Description |
|---|---|
| Text[1024] |
Events
OnProcessColumnMappingOnBeforeCheckLength
Integration event raised before checking the length of a mapped value during payment export processing. Enables custom length validation logic for export field values.
[IntegrationEvent(False,False)]
local procedure OnProcessColumnMappingOnBeforeCheckLength(var ValueAsString: Text[250], DataExchFieldMapping: Record "Data Exch. Field Mapping", DataExchColumnDef: Record "Data Exch. Column Def")
Parameters
| Name | Type | Description |
|---|---|---|
| ValueAsString | Text[250] |
The string value to validate |
| DataExchFieldMapping | Table System.IO."Data Exch. Field Mapping" |
Field mapping configuration for the export |
| DataExchColumnDef | Table System.IO."Data Exch. Column Def" |
Column definition for the export field |
OnOnProcessColumnMappingOnBeforeFormatToText
Integration event raised before formatting a value to text during column mapping in payment export. Enables custom text formatting logic for export values.
[IntegrationEvent(False,False)]
local procedure OnOnProcessColumnMappingOnBeforeFormatToText(var ValueAsString: Text[250], ValueAsDestType: Variant, DataExchDef: Record "Data Exch. Def", DataExchColumnDef: Record "Data Exch. Column Def", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ValueAsString | Text[250] |
The string value being formatted |
| ValueAsDestType | Variant |
The value in destination data type |
| DataExchDef | Table System.IO."Data Exch. Def" |
Data exchange definition for the export |
| DataExchColumnDef | Table System.IO."Data Exch. Column Def" |
Column definition for the export field |
| IsHandled | Boolean |
Set to true to skip standard formatting processing |
OnBeforeCheckLength
Integration event raised before checking the length of an export value against column definition limits. Enables custom length validation for payment export fields.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckLength(Value: Text, FieldRef: FieldRef, DataExchDef: Record "Data Exch. Def", DataExchColumnDef: Record "Data Exch. Column Def", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Value | Text |
The text value to check |
| FieldRef | FieldRef |
Field reference for the value being checked |
| DataExchDef | Table System.IO."Data Exch. Def" |
Data exchange definition for the export |
| DataExchColumnDef | Table System.IO."Data Exch. Column Def" |
Column definition with length constraints |
| IsHandled | Boolean |
Set to true to skip standard length validation |
OnBeforeFormatToText
Integration event raised before formatting a value to text for payment export. Enables custom formatting logic for export field values.
[IntegrationEvent(False,False)]
local procedure OnBeforeFormatToText(ValueToFormat: Variant, DataExchDef: Record "Data Exch. Def", DataExchColumnDef: Record "Data Exch. Column Def", var ResultText: Text[250], var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ValueToFormat | Variant |
The value to be formatted |
| DataExchDef | Table System.IO."Data Exch. Def" |
Data exchange definition for the export |
| DataExchColumnDef | Table System.IO."Data Exch. Column Def" |
Column definition for formatting rules |
| ResultText | Text[250] |
The formatted text result |
| IsHandled | Boolean |
Set to true to skip standard formatting processing |
OnBeforeCastToDestinationType
Integration event raised before casting a value to its destination data type during payment export. Enables custom type conversion logic for export values.
[IntegrationEvent(False,False)]
local procedure OnBeforeCastToDestinationType(var DestinationValue: Variant, SourceValue: Variant, DataExchColumnDef: Record "Data Exch. Column Def", Multiplier: Decimal, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| DestinationValue | Variant |
The value after type conversion |
| SourceValue | Variant |
The original source value |
| DataExchColumnDef | Table System.IO."Data Exch. Column Def" |
Column definition with type information |
| Multiplier | Decimal |
Multiplier value for numeric conversions |
| IsHandled | Boolean |
Set to true to skip standard type conversion |