ELSEIF (ABAP Keyword)

ELSEIF (ABAP Keyword) introduction & syntax details

ELSEIF


Basic form
ELSEIF logexp.

Effect
Within a processing block enclosed by " IF ... ENDIF ", this statement indicates the processing to be executed if the logical expressions specified by IF and the preceding ELSEIF s are false, but the logical expression in this ELSEIF processing block is true.
Between the IF and ENDIF statements, there may be any number of ELSEIF s. These may be followed, optionally, by an ELSE statement, but this is executed only if none of the logical expressions under IF or ELSEIF is true.

Example

DATA RESULT TYPE I.
...
IF RESULT < 0.
WRITE / 'Result less than zero'.
ELSEIF RESULT = 0.
WRITE / 'Result equal zero'.
ELSE.
WRITE / 'Result greater than zero'.
ENDIF.


Depending on the value of RESULT , the three different texts are output.
Related IF ,
ELSE ,
CASE

Most readed SAP Tutorials

Latest Added SAP documents

Custom Search
ABAP Tutorials ABAP Syntax BAPI SAP Jobs SAP Glossary SAP Netweaver SAP XI SAP Download SAP Interview questions

Complete SAP Study materials | SAP JOBS | PDF Tutorials   List of SAP Companies India

Google-Translate-Chinese (Simplified) BETA Google-Translate-English to French Google-Translate-English to German Google-Translate-English to Italian Google-Translate-English to Japanese BETA Google-Translate-English to Korean BETA Google-Translate-English to Russian BETA Google-Translate-English to Spanish

All of the product names here are trademarks of their respective companies. The site sapbrainsonline.com no way affiliated with SAP AG. Use information on this site at your own risk. Information furnished in the site is collected from various sites and posts from users. This site does not host any files on its server. If any compliants about the posts please contact us at sapbrain.support@gmail.com

Sitemap
web counter