本文適用於德語) (的Microsoft Dynamics NAV。
症狀
在包含附加收費的 Microsoft Dynamics NAV 德文版本中,當你建立外國付款檔案時,會遇到以下錯誤的匯出問題:
- 假設你建立了有收費帳戶的外國付款檔案。 如果收費帳戶與用於付款的銀行帳戶不同,您會注意到付款檔案中寫錯了銀行帳號。
- 檔案中 V-Satz 欄位 (10) 意外地被填入「N」。 你預期現場的數據是空白的。
- 檔案中 T-Satz 欄位 (10a) 意外地被填入「DE」。 你預期欄位裡的資料是「美國」的,因為供應商來自美國,只有銀行帳戶在特拉華州。
此問題發生於以下產品:
- Microsoft Dynamics 2009 服務包 1 (SP1) 的德文版本
- Microsoft Dynamics NAV 2009 R2 的德語版本
解決方式
Hotfix 資訊
Microsoft 現在已經支援熱修補程式。 然而,這僅是為了修正本文所描述的問題。 只應用在遇到這個特定問題的系統上。 此熱修補可能會進行額外測試。 因此,如果您未受到此問題嚴重影響,我們建議您等待下一個 Microsoft Dynamics NAV 2009 服務包或包含此熱修補的 Microsoft Dynamics NAV 版本。
注意:在特殊情況下,若 Microsoft Dynamics 及相關產品的技術支援專業人員判斷特定更新能解決您的問題,通常因支援電話而產生的費用可能會被取消。 一般來說,如果有所描述之特定更新無法解決的其他支援問題,才會收取支援費用。
安裝資訊
Microsoft 僅提供圖例的程式設計範例,不含明示或暗示的擔保。 這包括 (但不限於) 適用于特定目的之可操作性或適用性的暗示擔保。 本文假設您熟悉正在示範的程式設計語言,以及用來建立和進行程式偵錯工具的工具。 Microsoft 技術支援工程師可以協助說明特定程序的功能,但不會修改這些範例以提供附加功能或建構程序來滿足您的特定需求。
注意:安裝此熱修補程式前,請確認所有 Microsoft Navision 用戶端使用者都已登出系統。 這包括Microsoft Navision 應用服務 (NAS) 用戶端使用者。 當你實施這個熱修補時,應該只有你一個登入的客戶端使用者。
要實作這個熱修補,你必須擁有開發者授權。
我們建議在 Windows 登入視窗或資料庫登入視窗中,將使用者帳號分配「SUPER」角色 ID。 若使用者帳號無法被指派「SUPER」角色 ID,您必須驗證該帳號擁有以下權限:
- 你要更改的物件的修改權限。
- 系統物件 ID 5210 的執行權限,以及系統物件 ID 9015 的執行權限。
注意:除非你必須進行資料修復,否則你不必擁有資料儲存的權利。
法規變更
注意:在將修正程式套用到生產電腦之前,務必在受控環境中測試修正。
如果要解決這個問題,請依照下列步驟執行。
在 AZV 代碼單元的 Open Exportfile 函式中, (5001905) 以下方式更改程式碼:
將全域變數的定義更改如下舊定義:Dtaus : Code[150];
新定義:Dtaus:代碼[260];
現有程式碼
... CompanyInfo.GET; // Delete the following line. NameOfCompany := CheckFormat(FORMAT(UPPERCASE(CompanyInfo.Name),27)); FormatAddr.BankAcc(AddrArray,BankAccount); ...替換代碼
... CompanyInfo.GET; // Add the following line. NameOfCompany := COPYSTR(CheckFormat(FORMAT(UPPERCASE(CompanyInfo.Name),27)),1,MAXSTRLEN(NameOfCompany)); FormatAddr.BankAcc(AddrArray,BankAccount); ...在 AZV 編碼單元中,將 FormatBankAcc 函式中的程式碼變更如下 (5001905) :
請建立一個新的本地變數 BankAccount3,如下:BankAccount3@:創紀錄270
現有程式碼
... 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; ...替換代碼
... 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; ...在 AZV 代碼 (5001905) 單元中更改 VendBankFormat 函式中的程式碼如下:
現有程式碼... 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,' '))); ...替換代碼
... 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,' '))); ...在 AZV 代碼單元 (5001905) PaymFileHeader 函式中更改代碼如下:
現有程式碼... IF STRLEN(CompanyNo) <>8 THEN ERROR(Text1105400137,BankAccount."No."); END; Account := BankAccount."Bank Account No."; IF STRLEN(Account) = 0 THEN ...替換代碼
... 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 ...在 AZV 碼單元的 CreateRegistration 函式中, (5001905) 如下更改程式碼:
刪除本地變數 InfoTransitUnsalableInvL: Code[1]現有程式碼
... 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); ...替換代碼
... 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); ...在 AZV 碼單元中的 CheckFormat 函式中, (5001905) 如下方式更改程式碼:
現有程式碼... WHILE STRPOS(FieldContent,'š') >0 DO FieldContent := COPYSTR(FieldContent,1,STRPOS(FieldContent,'š')-1) + Text1105400035 + COPYSTR(FieldContent,STRPOS(FieldContent,'š')+1,MAXSTRLEN(FieldContent)); CheckRec := DELCHR(FieldContent,'=',Text1105400036); ...替換代碼
... 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); ...在 AZV 碼單元的 CheckPaymFile 函式中, (5001905) 更改 Drive 參數的定義如下:
舊定義:Dtaus:驅動力:代碼[150];
新定義:Dtaus:驅動力:代碼[250];
在 AZV 編碼 (5001905) 單元中,請更改 TestCompanyInfo 函式中的程式碼如下:
現有程式碼... 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 ...替換代碼
... 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 ...
先決條件
您必須安裝以下其中一款產品才能套用此熱修補:
- Microsoft Dynamics 2009 服務包 1 (SP1) 的德文版本
- Microsoft Dynamics NAV 2009 R2 的德語版本
移除資訊
你無法移除這個熱修正。
狀態
Microsoft 已確認這是「適用對象」一節中列出的 Microsoft 產品中的問題。
參考資料
VSTF 動力導航SE:245257;254071;277428
注意本文為 Microsoft 支援單位內部直接建立的「快速發佈」文章。 此處包含的資訊是以其現況提供,用於回應新產生的問題。 由於快速發佈,資料可能包含拼字錯誤,並可能會隨時修訂,不另行通知。 請參閱使用條款以瞭解其他相關考量。