[Solved] : Error: String or binary data would be truncated. Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp)
Error: Cannot execute a data definition language command on Vendor (VendLedgerReconciliationTmp). Date: .The SQL database has issued an error.
SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated.
SQL statement: INSERT INTO tempdb."DBO".t10799_95B4A012AC0F4D298A6CA7C554A0C4B6 (ACCOUNTINGDATE,VOUCHER,VENDAMOUNTMST,POSTINGPROFILE,ARRIVAL,APPROVED,VENDORACCOUNTID,VENDGROUP,VENDORNAME,RECVERSION,PARTITION) SELECT T1.TRANSDATE,T1.VOUCHER,T1.AMOUNTMST,T1.POSTINGPROFILE,T1.ARRIVAL,T1.APPROVED,T2.ACCOUNTNUM,T2.VENDGROUP,T3.NAME,1,5637144576 FROM VENDTRANS T1 CROSS JOIN VENDTABLE T2 CROSS JOIN DIRPARTYTABLE T3 WHERE (((T1.PARTITION=5637144576) AND (T1.DATAAREAID=N'rsa')) AND ((((((T1.TRANSDATE>={ts '2019-07-22 00:00:00.000'}) AND (T1.TRANSDATE<={ts '2019-07-22 00:00:00.000'})) AND (T1.VOUCHER>='')) AND (T1.VOUCHER<=N'ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°ï½°')) AND (T1.POSTINGPROFILE>=N'Default')) AND (T1.POSTINGPROFILE<=N'Default'))) AND (((T2.PARTITION=5637144576) AND (T2.DATAAREAID=N'rsa')) AND (T2.ACCOUNTNUM=T1.ACCOUNTNUM)) AND ((T3.PARTITION=5637144576) AND (T3.RECID=T2.PARTY))
Solution:
Here, we can see the issue is with VendLedgerReconciliationTmp table.
1. Go to General ledger > Area page > Reports > Reconciliation > Vendor > Vendor to run the report.
2. If you are getting the same error open your development environment by pressing CTRL + D.
3. Go to AOT\Data Dictionary\Tables\VendLedgerReconciliationTmp and select the VendorName field.
4. Change the VendorName properties as follows:
ExtendedDataTypes = DirPartyName
Note: It will replace existing EDT 'Name' which is having 60 letters that is actually less to insert 'Vendor Name' is case Vendor name data is larger than 60 letters. So here, we used 'DirPartyName' which is actually 100 letters long.
5. Run the report now, no error should display.
Note: Still you facing this issue, comment on this post, I'll provide you more solution for this issue.
Author:
Chirag Gupta
Microsoft Dynamics 365 AX Technical Consultant at IBM Bangalore
Date:
30-Aug-2019
Happy Learning !!
YtempcuFnia-daPortland Alexis Sanchez https://wakelet.com/wake/OHwpUMMn82nQ7lLnCRlKk
ReplyDeletecaleanelbo