Working on MT940 importer

Martin Preuss martin at aquamaniac.de
Sat Sep 13 09:13:57 CDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On Friday 12 September 2003 13:06, Best, Jan-Pascal van wrote:
[...]
> That should do nicely. By the way, does this handle the case (my
> bank does this) of statements for multiple days in a single file?
> I'll just try it anyway, and see what happens.
Yes, it does. This is needed by OpenHBCI, where in many cases you receive 
statements for multiple days.

However, the parser only reads ONE MT940 per call. It returns the position 
where it finished reading the last MT940, so you can simply call the parser 
with the same string again and again until it returns a position outside the 
string.
And it also accepts statements for multiple days inside a single MT940 
(normally each MT940 should only contain the statements of a single day, but 
many banks interprete the standard otherwise).

[C-wrappers for SWIFTparser]
> > And in fact this is quite easy. I think I will add C wrappers
> > later today.
And so he did. Now also the needed file (swiftparser.h) is installed by 
OpenHBCI, so the parser is now available to the outside. However, since there 
is a latency of about one day at sourceforge don't expect the changes to be 
in public CVS before Saturday/Sunday.

[booking code]
> Okay. For my bank, it tells what kind of transaction it is (transfer,
> automatic transfer, cash withdrawal, etc.). Not documented, of course.
> I've asked the bank Wednesday, but I haven't had a response yet.
I've observed the same thing with one of my banks. However, my other bank uses 
999 for any transaction statement, so in this case the code is kinda' 
useless.

> My :86: fields contain things like this (I've anonymized some
> names&numbers). It's almost completely unstructured. Maybe in combination
> with the booking code there's a logic to it. It would be a good thing to be
> able to interpret at least part of it, since they often contain the
> destination accounts for transfers.
>
> If you want, I can send you a larger mt940 file by private mail.
[...]
> :86:RENTEAFSLUITING
>
> CREDITRENTE               25,04C
>
> :62F:C030707EUR285,46
Hmm, that's completely different from how it is supposed to be...
However, my parser could check for fields within the :86: tag (they are 
introduced by a question mark followed by a 2 digit number), and if there is 
none it could simply add the :86: data to the HBCI::Transaction.

The content of your tag looks like a purpose description, maybe we should add 
it to the Transaction::description member. Whould that be ok with you ?


regards
Martin



- -- 
LibChipcard - http://www.libchipcard.de
OpenHBCI - http://www.openhbci.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/YrWowcZBcYAOyGYRAmgzAJ969fs6HBg0moVzA6ypToqOeRv+7QCfeudE
5XgHLE8uynOVlMAoXq+LiLY=
=xKGf
-----END PGP SIGNATURE-----



More information about the gnucash-devel mailing list