Ways to flip a Boolean

Whenever working with booleans while writing code there is almost always a scenario where one has to flip the boolean state i.e. true to false or vice-versa based on some condition.

In this post, I wanted to showcase different ways to do so.

Using Control statements:

Using ABAP logical functions such as boolc and xsdbool :

Hope you like it and use it in your day-to-day development. 

Popular posts from this blog

ABAP read excel(.XLSX) file to internal table in ABAP using CL_FDT_XL_SPREADSHEET

ABAP convert internal table to excel (.xlsx) format and Send email or download

Use CL_BCS library to send email with ABAP