Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Syntax to declare a variable in native sql

VivekG
Participant
0 Likes
932

Hi Experts,

Please let me know the syntax to declare a variable in Native SQL.

Vivek Gupta

1 ACCEPTED SOLUTION
4 REPLIES 4
Read only

Former Member
0 Likes
596

Well, you don't declare variables in native SQL, you declare it in the ABAB, but the usage depends on the database you are using.

Press F1 on EXEC SQL.

Rob

Read only

0 Likes
596

Hi Rob,

Thanks for the answer but my requirement is to insert a NULL value in corp database and it can't be done by declaring variable in ABAP side as when we pass '' to corp, its getting defaulted as 01-01-1900 but we need NULL to be inserted in other table.

Please help

Vivek

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
596

Hello Vivek,

I guess this is so because you cannot insert NULL to a date field.

BR,

Suhas