Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

data type logical

Former Member
0 Likes
814

number is numc

character is char

and logical?

5 REPLIES 5
Read only

andreas_mann3
Active Contributor
0 Likes
637

Hi

take data element <b>BOOLEAN</b>

(X=true, -=false, space=unknown)

Read only

0 Likes
637

If logical means boolean, then it is just a 1 character field.



report zrich_0001.

type-pools: abap.

data: true type abap_bool value 'X',
      false type abap_bool value ' '.


Regards,

Rich Heilman

Read only

0 Likes
637

i mean in se11 when i want to craete

i look for it and i didnt find

Read only

0 Likes
637

Create what, a field? Use data element CHAR01.

Regards,

Rich HEilman

Read only

Former Member
0 Likes
637

hi rani,

1. for logical do u mean true/false.

2. then we use char 1 only.

if 'X' then it has to be understood as true.

else

false.

3***********

why sap uses this concept ?

bcos.

<b>So that SAP can operate in different databases.</b>

MS Sql server has got boolean type for tables,

but ORACLE does not have.

So SAP decided to have one COMMON CONCEPT

of using CHAR 1 as

type boolean.

This is similar to DATE Field.

DATE field is also stored as CHAR (8)

WHY?

bcos different database store

DATE field in different formats.

OrACle saves date field (along with time also)

(its saving format is different than

that of mssql server)

Hence, SAP uses

MOST OF THE TIME,

CHAR fields for all types of purpose.

(whether boolean, logical, date, time etc etc)

regards,

amit m.

Message was edited by: Amit Mittal