Error Pulling Negative Numbers from SAP using SSMS RRS feed

  • Question

  • I ran into a problem using the BizTalk 2010 SAP Adapter (.Net Framework Data Provider for mySAP Business Suite) with SQL Server Management Studio 2008.  When I try to Import SAP data into an SQL Server table using "SELECT TOP 10 MATNR, WERKS, ZZAPU FROM MARC WHERE ZZAPU<0;" and preview the results, I get the following error:

    When I use the exact same SQL code with SQL Server Management Studio 2005 and the old (SQL2005 NET Data Provider for mySAP Business Suite) data provider, I get:

    [I get similar errors when pulling data using VS2008 and VS2010.]  I only see errors when ZZAPU is negative.

    Does anyone know what I am doing wrong?  Are there some settings I need to change?

    [BTW, I am not using the BizTalk Server, just the SAP BizTalk Adapter.  I am pulling data from SAP and populating a SQL Server DB.]

    Thursday, March 21, 2013 1:47 PM

All replies

  • More information:

    The definition of the output table being created by the new data provider (the one that fails) is:

    The definition of the output table being created by the old data provider (the one that works) is:

    Thursday, March 21, 2013 1:51 PM
  • Is there more exception data in the error dialog you get? If yes, could you copy paste that?

    -- My new site is

    Thursday, March 21, 2013 5:40 PM
  • Here's the full error message:


    The preview data could not be retrieved. (SQL Server Import and Export Wizard)


    Input string was not in a correct format. (mscorlib)

    Program Location:

       at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       at Microsoft.Data.SAPClient.ReadSelectDataReader.IntFieldExtractor.InternalGetValue(String val)
       at Microsoft.Data.SAPClient.ReadSelectDataReader.IntFieldExtractor.GetValue(String row)
       at Microsoft.Data.SAPClient.ReadSelectDataReader.internalGetValue(Int32 i)
       at Microsoft.Data.SAPClient.SAPDataReader.GetValue(Int32 i)
       at Microsoft.SqlServer.Dts.DtsWizard.Preview.LoadPreview()


    Thursday, March 21, 2013 11:47 PM
  • Hi,

    For your issue, you can try to follow the similar thread below:

    Please uninstall the Adapter Pack and the ASDK at first. Then reinstall them again.

    Best wishes,

    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 25, 2013 8:17 AM
  • Sorry for the delay in responding.  I got sidetracked.

    I did as suggested: uninstalled the Adapter Pack and the ASDK, deleted the log file, rebuilt the performance counter, and then reinstalled.  I did it twice to make sure.  The same error recurs.

    These packages are installed on two machines (DEV and Prod).  The error appears on both.

    We created a temporary table in SAP DEV and tested the provider.  The same error occurs when the negative number is in a field with SAP format INT (INT32).  When the format is changed to QUANT, the provider works.

    [I have managed to get by this past month by using the old, unsupported, provider.  But obviously we can’t continue this way.]

    Further assistance would be greatly appreciated.  We’ve run out of ideas.

    Sunday, May 5, 2013 9:06 PM
  • for the negative number, do you know what the value of the number is?

    can you write a console application where you use the SAP ADO.NET Provider directly, use a SELECT statement (with the appropriate where clause) and see what data you get back for the rows which seem to be failing in SSMS?

    Monday, June 10, 2013 2:16 PM
  • hi,

    Try the below steps. using Right click on SAP Source(using BIDS) Tranformation  --> select Error out --> and select Error column-->and make the changes on Redirect row For Required columns--> execute 

    Friday, August 30, 2013 8:53 AM