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 |
How do we create the Field exits?
Which method of BDC’s would u apply ? Session or call transaction ? why ? Which is more good ? Its advantages ?
What is the difference between getting and get late?
what does SE stands for in T-CODE se38?
For which transaction you used BDC?
Table ztest has a secondary index on the following fields: tnum, tcode. Select * from ztest where tnum ne '123' and tcode = '456'. Why is the index not used in the above case? Choices: a) Indexes are not allowed on Z tables b) Variables must be used, NOT literals c) Select individual fields, not select * d) Client is not in the where clause e) NE invalidates the use of an index Info: Can someone explain in detail why this happened? It will be really helpful to handle to case in Secondary index:
what is the format of the text used in sapscript
Select query optimisation
What is SAP script and Purpose?
how does data gets transported/transfered between a screen & ABAP praogram in a dialog?
Would WS_UPLOAD function module work if the BDC is run in Background? If yes explain, If no explain?
what next in SAP-ABAP/4 is it going to be change?