cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting/Updating NULL using Typed Parameter

Former Member
0 Kudos

Hello ,

I am having issues updating NULL in to the SQL when I use the query with Typed Parameters . It gives me below error when I try to use nullnumber function for a parameter of type Double .

INSERT INTO [API_LOOKUP_TEMP] 

           ([API_NUMBER],

            [API_NUMBER_10]

    )

     VALUES

           ([Param.1],

            [Param.2])

Use Typed Parameter - Checked

Param.1 - Parameter Type - String

Param.2     ParameterType  - Double

Mapping Param.1- "abc"

             Param.2 - nullnumber

  • [ERROR] [insexp1_0]com.sap.xmii.Illuminator.logging.LHException: java.sql.SQLException: Unable to convert value for property Param.2 at index 2

When I use the query without typed parameters I am able to insert or update NULL by simply using NULL function

NSERT INTO [API_LOOKUP_TEMP] 

           ([API_NUMBER],

            [API_NUMBER_10]

    )

     VALUES

           ('[Param.1]',

            [Param.2])

Use Typed Parameter  - Unchecked

Param.1 - "ABC"

Param.2 - "NULL"

I cannot use untyped paramter as Add Batch Mode introduced in MII 14.0 SP 7 doesnt support untyped parameter

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Naresh,

I don't think this problem looks solvable.

Problem looks like the SAP MII internal code uses a Prepared Statement and that is why it is not able to set NULL or "" as a double value in the setDouble method.

You can use some value like -1 instead of NULL for workaround.

Or you can raise a ticket on SAP.

Lets see if someone can answer this or find some workaround.

I am also curious for the solution.

Regards,

Rohit Negi.