2007 Jul 12 7:05 AM
Hi,
In this program what is meant by line type, table type and field string and what its effects when we execute.
Bcoz when iam executing this its not giving any result.
LINE TYPE:
TYPES:
BEGIN OF TY_EMP,
EMPID(4) TYPE N,
ENAME(20) TYPE C,
SALARY TYPE I,
END OF TY_EMP.
DATA:
FS_EMP TYPE TY_EMP,
IT_EMP TYPE TY_EMP OCCURS 0.
*TABLE TYPE:
TYPES:
TAB_EMP TYPE TABLE OF TY_EMP.
FS_EMP-EMPID = 1000.
FS_EMP-ENAME = 'ANIL'.
FS_EMP-SALARY = 10000.*APPEND FS_EMP TO IT_EMP.
2007 Jul 12 7:08 AM
hi
LINE TYPE: " this is a structure type which is being declared.... this is the structure which the user wants...or in otherwords his line type
TYPES: "definition of the structure
BEGIN OF TY_EMP,
EMPID(4) TYPE N,
ENAME(20) TYPE C,
SALARY TYPE I,
END OF TY_EMP.
DATA:
FS_EMP TYPE TY_EMP, "declaring a work area of ur stucture type
IT_EMP TYPE TY_EMP OCCURS 0. "declaring an internal table of your structure type with an header work area(occurs 0) but syntax is wrong... its type table of... bcz only an internal table can have an header wrk area
*TABLE TYPE:
TYPES:
TAB_EMP TYPE TABLE OF TY_EMP. "defining a table and appending values to it
FS_EMP-EMPID = 1000.
FS_EMP-ENAME = 'ANIL'.
FS_EMP-SALARY = 10000.*APPEND FS_EMP TO IT_EMP.
The meaning of the code is typed next to the code line
<b>please reward points if useful</b>
hi
LINE TYPE: " this is a structure type which is being declared.... this is the structure which the user wants...or in otherwords his line type
TYPES: "definition of the structure
BEGIN OF TY_EMP,
EMPID(4) TYPE N,
ENAME(20) TYPE C,
SALARY TYPE I,
END OF TY_EMP.
DATA:
FS_EMP TYPE TY_EMP, "declaring a work area of ur stucture type
IT_EMP TYPE TY_EMP OCCURS 0. "declaring an internal table of your structure type with an header work area(occurs 0) but syntax is wrong... its type table of... bcz only an internal table can have an header wrk area
*TABLE TYPE:
TYPES:
TAB_EMP TYPE TABLE OF TY_EMP. "defining a table and appending values to it
FS_EMP-EMPID = 1000.
FS_EMP-ENAME = 'ANIL'.
FS_EMP-SALARY = 10000.*APPEND FS_EMP TO IT_EMP.
The meaning of the code is typed next to the code line
<b>please reward points if useful</b>
2007 Jul 12 7:08 AM
hi
LINE TYPE: " this is a structure type which is being declared.... this is the structure which the user wants...or in otherwords his line type
TYPES: "definition of the structure
BEGIN OF TY_EMP,
EMPID(4) TYPE N,
ENAME(20) TYPE C,
SALARY TYPE I,
END OF TY_EMP.
DATA:
FS_EMP TYPE TY_EMP, "declaring a work area of ur stucture type
IT_EMP TYPE TY_EMP OCCURS 0. "declaring an internal table of your structure type with an header work area(occurs 0) but syntax is wrong... its type table of... bcz only an internal table can have an header wrk area
*TABLE TYPE:
TYPES:
TAB_EMP TYPE TABLE OF TY_EMP. "defining a table and appending values to it
FS_EMP-EMPID = 1000.
FS_EMP-ENAME = 'ANIL'.
FS_EMP-SALARY = 10000.*APPEND FS_EMP TO IT_EMP.
The meaning of the code is typed next to the code line
<b>please reward points if useful</b>
2007 Jul 12 7:13 AM
Hi,
Line type --> This will create a Line with same as the header line for a table, This will be used as a header for a table
Table Type --> This will create a Structure, here the table type and Line type both will be come a table with the header line, i mean the Line type is the header then the table type is the body
Field String --> It is a notmal declaration of a String.
Regards
Sudheer
2007 Jul 12 7:14 AM
hi,
line type creates a workarea for any internal table
table type means creates a internal table similar to standard table . this is similar to occurs n keyword.
if helpful reward some points.
with regards,
Suresh.A
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |