‎2008 Apr 06 3:22 PM
‎2008 Apr 06 4:04 PM
Hi Saritha,
There are three types of nodes.
1. Type T.
2. Type S.
3. Type C.
They are explained as below.
*1. *Type T nodes (ABAP Dictionary tables); called type Database tables from 4.5A
This type of node corresponds to the only type of node that existed prior to Release 4.0A (a flat Dictionary structure).
2.Type S nodes (structure from the ABAP Dictionary), called Dictionary Type from 4.5A,
In Releases 4.0A and 4.0B, this node type makes it possible for a flat Dictionary structure to be provided with an alias name that can be chosen at will within the logical database. This is needed if the name of one of these structures is longer than the maximum length of 14 characters allowed for node names. In addition, this node type allows you to include a Dictionary structure in a logical database numerous times under different aliases.
From Release 4.5A you can define complex types, meaning nested structures and table types, in the Dictionary. This node type allows you to use nodes with this kind of complex Dictionary type.
3.Type C nodes (complex data objects); called type Data type from 4.5A
These types of nodes refer to an arbitrary number of complex types that are defined in a type pool. From Release 4.5A, types of this sort can be better represented using complex ABAP Dictionary types. It is therefore no longer recommended that you use them in logical databases, as this leads to certain disadvantages in ABAP Query.
For more details check the below link:
http://help.sap.com/saphelp_46c/helpdata/EN/4e/af88f86fe711d295c40000e82de14a/content.htm
Thanks,
Sravani.
Reward if useful.
‎2008 Apr 06 4:17 PM
‎2008 Apr 07 3:18 AM
Saritha pyla,
I believe that you are asking about NODES statement in the ABAP programming.
Syntax
NODES node TYPE type.
Effect
The sole effect of the NODES statement is to copy data from logical databases to executable programs. It defines an interface work area and is allowed only in the global declaration section of executable programs that are linked to a logical database, and in the database program of logical databases. node must be the name of a node of the logical database. NODES declares a table work area node for the respective node. The data type of the table work area is either predefined in the node of the logical database or can be chosen from a list using addition TYPE.
The nodes of the structure of a logical database are maintained in transaction SE36 and can have the following node types:
Node Type T
The data type of the table work area can be a flat structure of the ABAP Dictionary, especially a database table or a view. The name of the node must be identical to the name of the structure.
In this case, the statements NODES and TABLES are identical. In the executable program, you can use for every node of type T either the NODES or the TABLES statement, where node is the name of the node or of the structure. Addition TYPE is not allowed. The database program contains one TABLES statement for every node of type T.
Node Type S
The data type of the table work area is any data typa of the ABAP Dictionary. The name of the node can differ from the name of the type.
In the executable program, you can specify a NODES statement for every node of type S. Addition TYPE is not allowed. The database program contains one NODES statement for every node of type S.
Node Type C
The data type of the table work area is any data type from a type group. The name of the node can differ from the name of the type.
In the executable program, you can specify a NODES statement for every node of type C. Addition TYPE is not allowed. The database program contains one NODES statement for every node of type C.
Node Type A
To this node, a list of any data types from the ABAP Dictionary is assigned. The actual type is determined in the executable program by the TYPE addition of the NODES statement.
Example: If you take LDB PNP
.
Thanks,
Venkat.O
REPORT demo_nodes.
NODES PERNR.
GET PERNR.
WRITE PERNR.
‎2008 Apr 07 10:59 AM
Hi Saritha,
Release 4.0A, you have the option of defining logical database nodes in various different ways.
Type T nodes (ABAP Dictionary tables); called type Database tables from 4.5A
This type of node corresponds to the only type of node that existed prior to Release 4.0A (a flat Dictionary structure).
Type S nodes (structure from the ABAP Dictionary), called Dictionary Type from 4.5A,
In Releases 4.0A and 4.0B, this node type makes it possible for a flat Dictionary structure to be provided with an alias name that can be chosen at will within the logical database. This is needed if the name of one of these structures is longer than the maximum length of 14 characters allowed for node names. In addition, this node type allows you to include a Dictionary structure in a logical database numerous times under different aliases.
From Release 4.5A you can define complex types, meaning nested structures and table types, in the Dictionary. This node type allows you to use nodes with this kind of complex Dictionary type.
Type C nodes (complex data objects); called type Data type from 4.5A
These types of nodes refer to an arbitrary number of complex types that are defined in a type pool. From Release 4.5A, types of this sort can be better represented using complex ABAP Dictionary types. It is therefore no longer recommended that you use them in logical databases, as this leads to certain disadvantages in ABAP Query.
When defining InfoSets in Releases 4.0A and 4.0B you may only use those logical databases containing type Database table (type T) nodes. From Release 4.5A logical databases containing both other types of nodes can also be used. There are, however, some restrictions to be taken into account.
When using nodes with complex types (Dictionary type or Data type), ABAP Query only allows you to evaluate those fields that can be addressed directly from the highest level of the type. If the complex type in question contains a table, the individual components that the table is made up of cannot be addressed. This is demonstrated in the following example.
Given: The following kind of complex type. ABAP Notation is chosen. This kind of type could also be depicted using a Dictionary type.
TYPES: BEGIN OF person,
name(20),
first_name(20),
birthday(10),
END OF person,
BEGIN OF address,
street(30),
number(6),
zipcode(10),
city(30),
END OF adress,
adress_table TYPE address OCCURS 0.
TYPES: BEGIN OF personal_data,
person TYPE person,
first_adress TYPE address,
other_addresses TYPE address_table,
END OF personal_data.
If the logical database node PDATA is of type PERSONAL_DATA, the following fields of this node can be evaluated using ABAP Query:
PDATA-PERSON-NAME
PDATA-PERSON-FIRST_NAME
PDATA-PERSON-BIRTHDAY
PDATA-FIRST_ADDRESS-STREET
PDATA-FIRST_ADDRESS-NUMBER
PDATA-FIRST_ADDRESS-ZIPCODE
PDATA-FIRST_ADDRESS-CITY
Those fields containing information about additional addresses (OTHER_ADRESSES) cannot be evaluated because a table type is being used here.
Additional restrictions apply to nodes with type Data type (type C). Due to the fact that nodes of this type are not defined as ABAP Dictionary types, no long texts or headers exist for these fields. Therefore, when defining an InfoSet, you can only use the technical names of the fields as name suggestions (for example PERSON-NAME). In order for these fields to appear in the same way that all other database nodes do, you must maintain all texts for them.
Additionally, pay attention to the fact that reference field definition is not possible with nodes of type Data type since this is only allowed with Dictionary types. Because of this, ABAP Query cannot recognize values with units (currency sums or quantities), nor can it evaluate them accordingly within these nodes.
Regards,
Phani,
Points If Helpful.