[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 !!

Comments

Post a Comment

Popular posts from this blog

AX 2012 - Command prompt compilation / AxBuild.exe for Parallel Compile on AOS of X++ to P-code / Parallel Compilation

AX 2012 - How to send SSRS report in email as an attachment using X++

AX 2012 - How to stop AOS when services got stuck at stopping status

AX 2012 - How to make a form field mandatory

Error: There was no endpoint listening at net.tcp://your_server_name:8201/Dynamics AX/Services…

Fetch vendor address using X++ in AX 2012

AX 2012 - How to print current date and time on SSRS Report

[Error] - Error in unit of amount in currency KES. Must be rounded to 0.01 | The unit of 37.563.5343100000000000 KES being posted to account 32710001-- is outside the current penny rounding threshold | Posting has been canceled

[Solved] : AX 2012 - No connection could be made because the target machine actively refused it 192.168.10.249:8201