This article applies to Microsoft Dynamics NAV for the German (de) language locale.
Symptoms
In the German version of Microsoft Dynamics NAV with the AddOn Payments included, when you create a foreign payment file, you encounter the following incorrect export problems:
-
Assume that you create the foreign payment file that has a charges account. If the charges account differs from the bank account that is used for the payment, you notice that an incorrect bank account number is written into the payment file.
-
The V-Satz field (10) in the file is filled in "N" unexpectedly. You expect the data in the field to be empty.
-
The T-Satz field (10a) in the file is filled in "DE" unexpectedly. You expect the data in the field to be "US" because the vendor is from the US and only the bank account is in DE.
This problem occurs in the following products:
-
The German version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
-
The German version of Microsoft Dynamics NAV 2009 R2
Resolution
Hotfix information
A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics NAV 2009 service pack or the next Microsoft Dynamics NAV version that contains this hotfix.
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
Installation information
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.
To implement this hotfix, you must have a developer license.
We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:
-
The Modify permission for the object that you will be changing.
-
The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.
Note You do not have to have rights to the data stores unless you have to perform data repair.
Code changes
Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:
-
Change the code in the Open Exportfile function in the AZV codeunit (5001905) as follows:
Change the definition of the global variable as follows-
Old definition: Dtaus : Code[150];
-
New definition: Dtaus : Code[260];
Existing code
...
CompanyInfo.GET;
// Delete the following line.
NameOfCompany := CheckFormat(FORMAT(UPPERCASE(CompanyInfo.Name),27));
FormatAddr.BankAcc(AddrArray,BankAccount);
...Replacement code
...
CompanyInfo.GET;
// Add the following line.
NameOfCompany := COPYSTR(CheckFormat(FORMAT(UPPERCASE(CompanyInfo.Name),27)),1,MAXSTRLEN(NameOfCompany));
FormatAddr.BankAcc(AddrArray,BankAccount);
... -
-
Change the code in the FormatBankAcc function in the AZV codeunit (5001905) as follows:
Create a new local variable BankAccount3 as follows:
BankAccount3@ : Record 270
Existing code...
IF (PaymLedgEntry."Account No. Charges"<>") AND (PaymLedgEntry."Account No. Charges"<>PaymLedgEntry."Bank Account No.") THEN
BEGIN
// Delete the following lines.
BankAccount.GET(PaymLedgEntry."Account No. Charges");
"Bank Code" := BankAccount."Bank Branch No.";
IF STRLEN("Bank Code") = 0 THEN
ERROR(Text1105400002,BankAccount."No.");
BankCodeBank := FormatBankCode("Bank Code");
IF STRLEN(BankCodeBank) <> 8 THEN
ERROR(Text1105400003,BankAccount."No.");
BankCodeRec3 := BankCodeBank;
Account := BankAccount."Bank Account No.";
IF STRLEN(Account) = 0 THEN
ERROR(Text1105400004,BankAccount."No.");
AccountBank := FormatAccount(Account);
IF STRLEN(AccountBank) >10 THEN
ERROR(
Text1105400005,BankAccount."No.");
AccountRec3 := AccountBank;
// End of the deleted lines.
END ELSE BEGIN
BankCodeRec3 := PADSTR('',8,'0');
AccountRec3 := PADSTR('',10,'0');
END;
...Replacement code
...
IF (PaymLedgEntry."Account No. Charges"<>") AND (PaymLedgEntry."Account No. Charges"<>PaymLedgEntry."Bank Account No.") THEN
BEGIN
// Add the following lines.
BankAccount3.GET(PaymLedgEntry."Account No. Charges");
IF STRLEN(BankAccount3."Bank Branch No.") = 0 THEN
ERROR(Text1105400002,BankAccount3."No.");
BankCodeRec3 := FormatBankCode(BankAccount3."Bank Branch No.");
IF STRLEN(BankCodeRec3) <> 8 THEN
ERROR(Text1105400003,BankAccount3."No.");
IF STRLEN(BankAccount3."Bank Account No.") = 0 THEN
ERROR(Text1105400004,BankAccount3."No.");
AccountRec3 := FormatAccount(BankAccount3."Bank Account No.");
IF STRLEN(AccountRec3) >10 THEN
ERROR(
Text1105400005,BankAccount3."No.");
//End of the added lines.
END ELSE BEGIN
BankCodeRec3 := PADSTR('',8,'0');
AccountRec3 := PADSTR('',10,'0');
END;
... -
Change the code in the VendBankFormat function in the AZV codeunit (5001905) as follows:
Existing code...
ERROR(Text1105400129,Country."Bank Country Code");
END;
// Delete the following line.
VendCountry := Country."Bank Country Code";
IF PostedAZV.IBAN <>'' THEN BEGIN
Account := DELCHR(PostedAZV.IBAN);
Account := CheckFormat(UPPERCASE(PADSTR(Account,34,' ')));
...Replacement code
...
ERROR(Text1105400129,Country."Bank Country Code");
END;
// Add the following line.
VendCountry := PostedAZV."Country Code";
IF PostedAZV.IBAN <> '' THEN BEGIN
Account := DELCHR(PostedAZV.IBAN);
Account := CheckFormat(UPPERCASE(PADSTR(Account,34,' ')));
... -
Change the code in the PaymFileHeader function in the AZV codeunit (5001905) as follows:
Existing code...
IF STRLEN(CompanyNo) <>8 THEN
ERROR(Text1105400137,BankAccount."No.");
END;
Account := BankAccount."Bank Account No.";
IF STRLEN(Account) = 0 THEN
...Replacement code
...
IF STRLEN(CompanyNo) <>8 THEN
ERROR(Text1105400137,BankAccount."No.");
// Add the following lines.
END ELSE BEGIN
IF CompanyNo = '' THEN
CompanyNo := PADSTR('',8,'0');
// End of the added lines.
END;
Account := BankAccount."Bank Account No.";
IF STRLEN(Account) = 0 THEN
... -
Change the code in the CreateRegistration function in the AZV codeunit (5001905) as follows:
Delete the local variable InfoTransitUnsalableInvL: Code[1]
Existing code...
PassagingTransitL := 'N';
BrokenTransitL := 'N';
// Delete the following line.
InfoTransitUnsalableInvL := 'N';
InfoTransitUnsalableForeignL := 'N';
IF RegistrationSet."Passaging Transit" THEN
PassagingTransitL := 'J';
IF RegistrationSet."Broken Transit" THEN BEGIN
BrokenTransitL := 'J';
RegistrationSet.TESTFIELD("Add. Information Transit");
Transit := COPYSTR(Transit,1,62) +
PADSTR(CheckFormat(FORMAT(UPPERCASE(RegistrationSet."Add. Information Transit"),40)),40,' ');
END;
// Delete the following lines.
IF RegistrationSet."Info Transit unsalable Inv" THEN
InfoTransitUnsalableInvL := 'J';
// End of the deleted lines.
IF RegistrationSet."Info Transit unsalable forei." THEN
InfoTransitUnsalableForeignL := 'J';
Z := Text1105400025 +
PADSTR(RegistrationSet."Itemname Trading Goods",27,' ') +
NumToString(RegistrationSet."Capitel No. Goods",2,'0') +
PADSTR('',7,'0') +
PADSTR(BankCountries."Bank Country Short Name",7,' ') +
PADSTR(RegistrationSet."Country Code",3,' ') +
NumToString(FORMAT(ROUND(MAmount,1,'<'),12,1),12,'0') +
PassagingTransitL +
BrokenTransitL +
// Delete the following line.
InfoTransitUnsalableInvL +
InfoTransitUnsalableForeignL +
Transit;
Exportfile.SEEK(Exportfile.POS-2);
...Replacement code
...
PassagingTransitL := 'N';
BrokenTransitL := 'N';
InfoTransitUnsalableForeignL := 'N';
IF RegistrationSet."Passaging Transit" THEN
PassagingTransitL := 'J';
IF RegistrationSet."Broken Transit" THEN BEGIN
BrokenTransitL := 'J';
RegistrationSet.TESTFIELD("Add. Information Transit");
Transit := COPYSTR(Transit,1,62) +
PADSTR(CheckFormat(FORMAT(UPPERCASE(RegistrationSet."Add. Information Transit"),40)),40,' ');
END;
IF RegistrationSet."Info Transit unsalable forei." THEN
InfoTransitUnsalableForeignL := 'J';
Z := Text1105400025 +
PADSTR(RegistrationSet."Itemname Trading Goods",27,' ') +
NumToString(RegistrationSet."Capitel No. Goods",2,'0') +
PADSTR('',7,'0') +
PADSTR(BankCountries."Bank Country Short Name",7,' ') +
PADSTR(RegistrationSet."Country Code",3,' ') +
NumToString(FORMAT(ROUND(MAmount,1,'<'),12,1),12,'0') +
PassagingTransitL +
BrokenTransitL +
// Add the following line.
PADSTR('',1,' ') +
InfoTransitUnsalableForeignL +
Transit;
Exportfile.SEEK(Exportfile.POS-2);
... -
Change the code in the CheckFormat function in the AZV codeunit (5001905) as follows:
Existing code...
WHILE STRPOS(FieldContent,'š') >0 DO
FieldContent := COPYSTR(FieldContent,1,STRPOS(FieldContent,'š')-1) + Text1105400035 +
COPYSTR(FieldContent,STRPOS(FieldContent,'š')+1,MAXSTRLEN(FieldContent));
CheckRec := DELCHR(FieldContent,'=',Text1105400036);
...Replacement code
...
WHILE STRPOS(FieldContent,'š') >0 DO
FieldContent := COPYSTR(FieldContent,1,STRPOS(FieldContent,'š')-1) + Text1105400035 +
COPYSTR(FieldContent,STRPOS(FieldContent,'š')+1,MAXSTRLEN(FieldContent));
// Add the following lines.
WHILE STRPOS(FieldContent,'&') > 0 DO
FieldContent := COPYSTR(FieldContent,1,STRPOS(FieldContent,'&')-1) + ' ' +
COPYSTR(FieldContent,STRPOS(FieldContent,'&')+1,MAXSTRLEN(FieldContent));
WHILE STRPOS(FieldContent,'$') > 0 DO
FieldContent := COPYSTR(FieldContent,1,STRPOS(FieldContent,'$')-1) + ' ' +
COPYSTR(FieldContent,STRPOS(FieldContent,'$')+1,MAXSTRLEN(FieldContent));
WHILE STRPOS(FieldContent,'*') > 0 DO
FieldContent := COPYSTR(FieldContent,1,STRPOS(FieldContent,'*')-1) + ' ' +
COPYSTR(FieldContent,STRPOS(FieldContent,'*')+1,MAXSTRLEN(FieldContent));
WHILE STRPOS(FieldContent,'%') > 0 DO
FieldContent := COPYSTR(FieldContent,1,STRPOS(FieldContent,'%')-1) + ' ' +
COPYSTR(FieldContent,STRPOS(FieldContent,'%')+1,MAXSTRLEN(FieldContent));
//End of the added lines.
CheckRec := DELCHR(FieldContent,'=',Text1105400036);
... -
Change the definition of Drive parameter in the CheckPaymFile function in the AZV codeunit (5001905) as follows:
-
Old definition: Dtaus : Drive : Code[150];
-
New definition: Dtaus : Drive : Code[250];
-
-
Change the code in the TestCompanyInfo function in the AZV codeunit (5001905) as follows:
Existing code...
CompanyInfo.GET;
// Delete the following line.
CompName := CheckFormat(FORMAT(UPPERCASE(CompanyInfo.Name),27));
BankAccount.GET(Bacc);
"Bank Code" := BankAccount."Bank Branch No.";
IF STRLEN("Bank Code") = 0 THEN
...Replacement code
...
CompanyInfo.GET;
// Add the following line.
CompName := COPYSTR(CheckFormat(FORMAT(UPPERCASE(CompanyInfo.Name),27)),1,MAXSTRLEN(CompName));
BankAccount.GET(Bacc);
"Bank Code" := BankAccount."Bank Branch No.";
IF STRLEN("Bank Code") = 0 THEN
...
Prerequisites
You must have the one of the following products installed to apply this hotfix:
-
The German version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
-
The German version of Microsoft Dynamics NAV 2009 R2
Removal information
You cannot remove this hotfix.
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
VSTF DynamicsNAV SE: 245257; 254071; 277428
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.