Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Select Statements,Internal Tables

Hi All,

1. How to u use select statements in programming code.

2. What are main Select Statements in SAP-ABAP.

2. What is main difference between

1. Select Single

2. Select *

3. Select single *

4. Select Single * .......up to 10 rows.

3.Performance issue which statements we can use?

4.What is main difference between Inner Join and Outer join ?

INTERNAL TABLES :

5.What is Internal Table? How many types in internal table?.What is main feature in creating internal table?

6.How to create internal table in programs.

7.How to pass the values one internal table to another internal table.

Bye.

Srinivas.

Former Member
replied

1. How to u use select statements in programming code.

ans.

select statemetn is used to fetch data from tables.

2. What are main Select Statements in SAP-ABAP.

ans.

nothing is main in sap-abap,according to u r requirement u have to write it.

2. What is main difference between

1. Select Single

2. Select *

3. Select single *

4. Select Single * .......up to 10 rows.

3.Performance issue which statements we can use?

ans to above.

select single is used to fetch first single record in table.

select * used to retrieve all fields in the table.

select single * is used to fetch all fields from table but it will fetch only one record.

select single *...... upto 10 rows is used to retrieve all fields from table upto 10 rows(mean first 10 rows in table).

performence point of u u have to use select specific fields from table upto 1 row.

after that select single is better.

4.What is main difference between Inner Join and Outer join ?

if we need few records from few tables like mara,marc mard. we use joins.

inner joins:

if we use inner joins on two table it will check in the table and pick if it had and then next record like that it willretrieve the data.

outer joins:.

if we use outer joins from one table if will pick up all the records and match with the nother table and pick the matching records .

we generally use INNER JOINS.

we use joins if we have key fields common.

5..What is Internal Table? How many types in internal table?.What is main feature in creating internal table?

internal table is like the strcture which u want. like if u need some fields from table vbak u create and internal table.

internal table does not occupy any memory space.

they occupy dynamic memory and it will refresh.

they will hold bunch of records in memory.

-->

we can declare internal table in 5 ways.

1. DATA ITAB LIKE ZTEST-DEMO OCCURS 0 WITH HEADER LINE.

2.DATA:BEGIN OF ITABOCCURS 0,

F1 TYPE I,

F2(10) TYPE C,

END OF ITAB.

3.

DATA: BEGIN OF ITAB OCCURS 0,

F1 LIKE ZSDEMO-FLD1,

F2 LIKE ZSDEMO-FLD2,

F3 TYPE I,

END OF ITAB.

4.

TYPES: BEGIN OF T-STRUC,

F1 LIKE ZSDEMO-FLD1,

F2 LIKE ZSDEMO-FLD2,

F3 TYPE I,

END OF T-STRUC.

DATA STRUC TYPE T-STRUC.

DATA ITAB TYPE TABLE OF T-STRUC.

5.

DATA: BEGIN OF ITAB OCCURS 0.

INCLUDE STRUCTE VBAK.

IN THIS WAY WE HAVE TO USE INTERNAL TABLE.

MOSTLY BETTER USE IS 4TH. ONE.

u can values from one table to another useing

MOVE internaltable1 to internaltable2.

but here structure of both the internal tables should be same.

other wise uhaveto use

MOVE-CORRESPONDING.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question