Selecting a Constant

Index

 

ABAP HANA 7.51: Selecting a Constant

Selecting a constant is possible now in a SELECT query. There may be different reasons for selecting a constant, however, in reality, it doesn’t fetch anything from the database. e.g. This can be readily used for existence check.

Sample Source Code: Variant 1

SQL_Select_Constant_Var1_source

 

Explanation:

Here we are selecting a constant ABAP_TRUE which is defined in TYPE-POOL ABAP with type BOOLEAN and value X. If Material number 112 is found in MARA table, nothing is fetched from Database but since the query is successful, LV_EXISTS is set to ‘X’ which is the value of ABAP_TRUE.  Hence, we didn’t fetch any field from Database and selecting a constant helped to do an existence check.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s