Skip to Content
-2

Does table typein ABAP has some database attached to it?

Aug 05, 2017 at 08:05 AM

182

avatar image
Former Member

I read somewhere in the web that "a table type has some database attached to it, whereas the structure is only a definition with NO DATABASE attached to it." Is that true?

Please share your views.

Thanks & Regards

10 |10000 characters needed characters left characters exceeded
Former Member

Let me rephrase that table type definition is for modelling an internal table and the type can itself be modelled on a database table.

ZTY_MARA could be a table type that can be modelled on MARA.

but MARA is a db table, ZTY_MARA is a table type to be used in ABAP for itab declaration.

DATA: lt_mara TYPE ZTY_MARA.

0

Yes, you might say that, but I'm pretty sure that the OP wanted to know about the difference between the definition of mere structures and the definition of database tables in the ABAP Dictionary and that he mixed up table types with database tables. That's why he should read the documentation where "not be confused with" appears two times and exactly for these terms.

1
Former Member
Horst Keller

Right Sir :)

0
Former Member
Horst Keller

No Sir I don't want to "know about the difference between the definition of mere structures and the definition of database tables in the ABAP Dictionary and that he mixed up table types with database tables".

Here is the link Sandra was asking for -

https://www.allinterview.com/showanswers/59487/what-is-the-difference-table-type-and-structure.html

and have a look at the 1st answer.

Regards

0

Well, looks like a lot of nonsense there. Better forget about that quickly and try to read and understand reliable sources.

The answer remains: "No, it is not true"

0

I just had a look on few answers and, in my opinion, you should run away from this site...

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Sandra Rossi Aug 05, 2017 at 09:24 AM
2

It's well known that taking a sentence out of its context may completely change its meaning. So please give the link where you found the context. Please also explain what you know, what you think, why does it disturb you?

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Aug 06, 2017 at 10:20 AM
1

No, it is not true. See the following documentation to get a clear concept regarding the meaning of the terms table type, structure and database table (short table) in the ABAP Dictionary.

https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenddic_classical_objects.htm

Share
10 |10000 characters needed characters left characters exceeded
Bertrand DELVALLEE Aug 16, 2017 at 12:54 PM
0

Hello,

It may be a confusion with statement TABLES.

In "classic" programs, using "TABLES TableName." is the same as "DATA tableName type table of tableName with header-line."

But in NODES context (still a lot used in HR/HCM with PNP and PNP_CE) it's still mandatory to use TABLES as it create an interface between selection-screens, dynpros and, virtually, database. It's hard to explain it because ABAP evolved a lot since and this feature is still used (because we have no choice) without knowing exactly how it works.

That's how "table type attached to database" can be understood by non english native speaker like me.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Oooops, bringing TABLES and NODES in on that one? I don't know.

And in fact those are connected to flat dictionary structures and not necessarily to tables.

(And because of SOC it is always better to declare TABLES for specialiced structures and not for database tables directly).

0

I was just trying to understand how a false assessment about a so fundamental subject can be hyped 40 times by users of allinterview.com. My first idea was a vocabulary problem.

But after some reading other there I give up to search for excuses... this site is hell.

1

Hehehe, you think it's better here ;-)

1
Horst Keller
Aug 16, 2017 at 12:21 PM
0

What is a structure type? In ABAP programs, you define it as:

TYPES:
  BEGIN OF structure,
    col1 TYPE i,
    col2 TYPE i,
  END OF structure.

What is a table type? In ABAP programs, you define it as:

TYPES itab TYPE TABLE OF structure.

In the ABAP Dictionary the meaning of structured type (aka structure) and table type are exactly the same. The difference to programs is that dictionary types are visible in all programs. That has nothing, absolutely nothing to do with database tables.

Share
10 |10000 characters needed characters left characters exceeded