HOW MANY WAYS TO DEFINE INTERNAL TABLES.
Answers were Sorted based on User's Feedback
Answer / girish m
there r so many ways to define internal table
1. data: begin of itab occurs 100,
matnr like mara-matnr,
mtart like mara-mtart,
end of itab.
2.data: begin of itab.
include mara.
data: end of itab.
3. data: begin of itab.
matnr like mara-matnr,
mtart like mara-mtart,
end of itab.
data: jtab type standard table itab,
gtab type itab.
4. data: itab like standard table of mara.
data: jtab like table itab.
5. data: itab like table of mara with header line.
Is This Answer Correct ? | 24 Yes | 10 No |
Basically there are 3 methods of creating the internal table which are used frequently, are as following:
1) for ex.
data: it_mara type table of mara.
note: after type table of, always a structure is used.
hence, here we call it structure mara not table mara.
and one thing more, here we can use like table of . but
it is not recommend. it is mostly used method.
2) for ex.
data: it_mara type mara occurs 0.
it means it_mara is a internal table of type mara.if we
write:
data: it_mara type mara occurs o with headerline.
it means there will be a internal table and a workarea
with the same name i.e. it_mara. hence it will little
confusing.
3) tables mara.
data: it_mara like mara occurs 0.
here, with the help of first statement, a workarea will be created with the name of mara and second statement will crate internal table with the name of it_mara. This is also little confusing because we mara is also of database table name and here it is also name of work area.
for exe.
select *
from mara
into mara.
hence, first method is most suitable and it should be used.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / krishna
data:itab type standard table of strcture name with header line.
data: itab1 type strcture name.
Is This Answer Correct ? | 2 Yes | 1 No |
What are the events used for page headers and footers?
How will you insert record in a sorted table
what is the use of start-of-selection event? what is the difference betn end-of-page and end-of-selection?
Explain what are the events used for logical database?
which is not a table?
i want to add 2 records to a table but the last field in the table is 1000 char long.Is it possible?if yes how?
WHAT IS THE DIFFERENCE BETWEEN FILE PORT AND TRFC PORT ?
what is the use of lock object??
Explain what are the different functions used in sap script? What are the parameters used in each function?
What are the transaction codes to create the Infotypes
In alv Reports,how the Output is displayed ad editable and how i can edit the same and how it will reflect the DB?Please help...........
How do you read the data from clusters