Stéphane Wierzbicki 45 Posted May 24 Hello, Could someone help me? I'm searching some Delphi code to quicly help me implementing the SWIFT RT940 protocol. I've so far googled for it but I can't find anything in Pascal/Delphi language. Thanks in advance. Kind regards, Stéphane Share this post Link to post
DelphiUdIT 178 Posted May 24 (edited) Nothing ... I was wrong Edited May 24 by DelphiUdIT Share this post Link to post
sh17 26 Posted May 27 I'm interested in it too. Or does anyone know an implementation in C# or Java? Share this post Link to post
Die Holländer 45 Posted May 27 Hello, I've sent you both a DM with a basic reader. 1 Share this post Link to post
LunaApeg 0 Posted July 14 You'll need to parse the SWIFT messages to extract relevant fields and information. SWIFT messages are structured with specific fields that you need to handle programmatically. If you need to create SWIFT messages (MT940 in your case), you'll need to format the data according to SWIFT standards. RT940 refers to real-time MT940 messages. MT940 is a standard SWIFT message format for transmitting balance and transaction information for accounts. You'll need to parse these messages to extract account information, transactions, balances, and other relevant data. Here’s a basic example of how you might approach parsing an MT940 message in Delphi: procedure ParseMT940(Message: TStringList); var i: Integer; begin // Assume Message is a TStringList containing lines of the MT940 message for i := 0 to Message.Count - 1 do begin // Example: Parsing the statement line if StartsText(':61:', Message) then begin // Extract transaction details // Example: Date, Amount, Transaction Type, etc. // Parse fields according to the SWIFT MT940 specification // Example: // Date := Copy(Message, 5, 6); // Extract date // Amount := StrToFloat(Copy(Message, 16, Length(Message)-15)); end; // Example: Parsing the balance line if StartsText(':60F:', Message) then begin // Extract balance details // Example: Balance amount, Date, Currency, etc. // Example: // BalanceAmount := StrToFloat(Copy(Message, 7, Length(Message)-6)); end; // Continue parsing other lines as needed end; end; Share this post Link to post
emileverh 21 Posted July 15 On 5/27/2024 at 3:41 PM, Die Holländer said: Hello, I've sent you both a DM with a basic reader. Can you send me the reader too? Thx! Share this post Link to post
jeroenp 26 Posted July 15 The C# library Raptorious.Finance.Swift.Mt940 has been ported 5 years ago to .NET core at https://github.com/mjebrahimi/SharpMt940Lib.Core/tree/master I have used the raptorious one to successfully parse ABN AMRO MT940 files and convert them to CD at https://github.com/jpluimers/MT940-to-CSV It should be relatively straightforward to port them to Delphi. --jeroen 1 Share this post Link to post
Die Holländer 45 Posted July 15 1 hour ago, emileverh said: Can you send me the reader too? Thx! See your messages. Share this post Link to post
emileverh 21 Posted July 15 14 minutes ago, jeroenp said: The C# library Raptorious.Finance.Swift.Mt940 has been ported 5 years ago to .NET core at https://github.com/mjebrahimi/SharpMt940Lib.Core/tree/master I have used the raptorious one to successfully parse ABN AMRO MT940 files and convert them to CD at https://github.com/jpluimers/MT940-to-CSV It should be relatively straightforward to port them to Delphi. --jeroen Thanks! Share this post Link to post