2008 Aug 11 3:22 PM
Hi
Please let me know what is the difference between the below mentioned two declarations:
Types:Begin of A,
no TYPE i,
name TYPE i,
wage TYPE i,
END OF A.
*I want to know the difference between these three statements:
B TYPE A.
B TYPE TABLE OF A
CLASS_DATA: B TYPE TABLE OF A.
2008 Aug 11 3:52 PM
hi,
For the first one:
B type A: it will create a work area which will hold only one record at a time similar to the structure defined with TYPES.
B type Table of A : This statement defines an internal table which is similar to the structure that has defined with TYPES.
CLASS-DATA: The statement CLASS-DATA can only be used in the declaration part part of a class or an interface.The statement declares a static attribute which validity is not associated with instances of a class but with the class itself. All instances of the class and its subclasses access the same static attribute.
Thanks,
Sneha
TYPES used to declare structures.
DATA is actually where memory allocates
2008 Aug 11 3:26 PM
B type A ====creates a Work Area of A structure,
B type table of A === creates an internal table without header line of A structure
3rd one its OOps concept off declaring a STATIC ATTRIBUTES.
Edited by: Bala Krishna on Aug 11, 2008 7:56 PM
2008 Aug 11 3:28 PM
TYPES used to declare structures.
DATA is actually where memory allocates
2008 Aug 11 3:34 PM
Hello,
Data: B TYPE A.
Creates a work area with the structure of type A.
Data: B TYPE TABLE OF A.
Creates an internal table w/o header line with the structure of type A.
CLASS_DATA: B TYPE TABLE OF A.
Can be included in a class definition and will create a static attribute valid not only for the instances but for the class. The value can be accessed with class=>b.
Regards
2008 Aug 11 3:52 PM
hi,
For the first one:
B type A: it will create a work area which will hold only one record at a time similar to the structure defined with TYPES.
B type Table of A : This statement defines an internal table which is similar to the structure that has defined with TYPES.
CLASS-DATA: The statement CLASS-DATA can only be used in the declaration part part of a class or an interface.The statement declares a static attribute which validity is not associated with instances of a class but with the class itself. All instances of the class and its subclasses access the same static attribute.
Thanks,
Sneha
2008 Aug 11 4:11 PM
Hi,
B TYPE A : work area declaration here we are providing single value only.
B TYPE TABLE OF A : internal table declaration here we r providing multipul values.
CLASS_DATA: B TYPE TABLE OF A.: i dont no Exactly.
Thanks®ards,
Naresh.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |