2010 Oct 01 8:09 PM
Hi,
I am just starting at the tip of the ABAP / SAP iceberg. Any particular reason why the one-bit-length boolean data type not featuring in ABAP?
Thanks.
2010 Oct 01 8:23 PM
Apparently no reason, if you don't want to create your own variable to use as boolean you can use type-pools abap and check abap_true and abap_false variable.
Regards,
Felipe
Apparently no reason, if you don't want to create your own variable to use as boolean you can use type-pools abap and check abap_true and abap_false variable.
Regards,
Felipe
2010 Oct 01 8:16 PM
declare:
type-pools: abap.
data: my_flag type boolean. "default false.
......
my_flag = abap_true.
if my_flag eq abap_true "(or abap_false).
2010 Oct 01 8:23 PM
>
>
type-pools: abap. > > data: my_flag type boolean. "default false. > >
Any idea, why SAP has different "Definition" of Boolean (X=True, -=False, Space=Unknown) rather than industry standards True and False.
Regards,
Naimesh Patel
2010 Oct 01 9:38 PM
Any idea, why SAP has different "Definition" of Boolean (X=True, -=False, Space=Unknown) rather than industry standards True and False.
Have you ever known SAP to follow a logical development standard used by others? Maybe '-' is the German abbreviation for 'false'.
Personally, I just always use XFELD...
2010 Oct 02 5:08 AM
Any idea, why SAP has different "Definition" of Boolean (X=True, -=False, Space=Unknown) rather than industry standards True and False.
Are 7 bits not any more costly?
Or migth be, for the SAP application, we use the boolean rarely?
Please correct me if I am wrong.
2010 Oct 04 3:20 PM
Have you ever known SAP to follow a logical development standard used by others? Maybe '-' is the German abbreviation for 'false'.
Not always
Personally, I just always use XFELD...
I use XFELD too, because it behaves like a boolean but not a "correct" boolean as per SAP definition....
Regards,
Naimesh Patel
2010 Oct 01 8:23 PM
Apparently no reason, if you don't want to create your own variable to use as boolean you can use type-pools abap and check abap_true and abap_false variable.
Regards,
Felipe
2010 Oct 02 1:37 AM
Hi
Actually ABAP does not support the boolean type, You can use some pre-defined types like Character length 1 to use as boolean.
ABAP_BOOL importing the ABAP TYPE-POOLS.
And to define the true and false ABAP_TRUE and ABAP_FALSE.
Kind regards
2010 Oct 04 3:36 PM
That's because we're not really programmers; we just pretend to be one.
2010 Nov 05 5:02 PM
Maybe it's just that performance at byte level are not the main target of the programming language.
Still, I don't get it why the '-' char...it's just confusing for those who use to consider space a 'FALSE' boolean.
2015 Aug 31 6:23 PM
In a database table, status flags are traditionally represented as character "X" which resembles a checkmark. I guess that is the origin of ABAP bools.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |