Comma and Escaping variable

Index

 

ABAP HANA 7.51: Comma and Escaping variable

Comma: With New SQL, fields to be selected are separated by comma operator. Old SQL statement is still valid however the written SQL should be either fully new SQL or old SQL… mixing both syntaxes give a syntax error! e.g. If a field list is separated by a comma, the host variables must be escaped with @ sign.

Escaping Variable: Now any Variable, Work area or  Internal table which are local to logic, must be escaped with @ sign when using New SQL. This clearly distinguishes the table fields from external variables.

Sample Source Code: Variant 1

SQL_Comma_Escaping_Var1_source

 

Explanation:

With new open SQL:

  • Selection list of fields has to be separated by a comma AND
  • At the same time, any host variable used for either for comparison or storing a value must be escaped by @ sign

With new open SQL, either both of above should hold true or new SQL shouldn’t be used at all and old SQL should be used.

Check the video for Illustration and Example:

Coming Soon!

Index

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s