Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Select for all entries VS Select up to n rows

Former Member
0 Kudos

Hi Guys,

Can any one explain in details :

1.Signifiance of Select for all entries

2.Select up to n rows

3.select single.

yh i have seen couple of discussions regarding this in the forum..But i want the detail information like in which scenarios we have use the above statements.

Thanks in advance.

Moderator message: please do even more research before posting.


Message was edited by: Thomas Zloch

4 REPLIES 4

Former Member
0 Kudos

Hi Vandana,

Please refer these links , you will get a clear idea

.Signifiance of Select for all entries :

http://help.sap.com/abapdocu_70/en/ABENWHERE_LOGEXP_ITAB.htm

and the select single and upto 1 row

http://wiki.sdn.sap.com/wiki/display/HOME/Difference+between+select+single+and+select+upto.

regards,

Ramya R

0 Kudos

Hi Ramya,

Thanks for your quick reply.

I got the select single and select single.

can you elaborate more on select for all entries.

Thanks.

0 Kudos

Hi vandana,

This is a demo program which is given in the link.

PARAMETERS p_city TYPE spfli-cityfrom.

TYPES: BEGIN OF entry_tab_type,
         carrid TYPE spfli-carrid,
         connid TYPE spfli-connid,
       END OF entry_tab_type.

DATA: entry_tab   TYPE TABLE OF entry_tab_type,
      sflight_tab TYPE SORTED TABLE OF sflight
                       WITH UNIQUE KEY carrid connid fldate.

SELECT carrid connid
       FROM spfli
       INTO CORRESPONDING FIELDS OF TABLE entry_tab
       WHERE cityfrom = p_city.

SELECT carrid connid fldate
       FROM sflight
       INTO CORRESPONDING FIELDS OF TABLE sflight_tab
       FOR ALL ENTRIES IN entry_tab
       WHERE carrid = entry_tab-carrid AND
             connid = entry_tab-connid.

First they are fetching connid and carrid from spfli table. now we need flight date for those carrid and connid. but flight date i need to fetch from the table sflight.

we need not fetch all the flight dates from sflight . we need the flight dates only for the connid and carrids which is there in the internal table entry_tab.

so by using for all entries we are fetching the flight dates for the entry_tab internal table datas (for the carrid and connid ).

regards,

Ramya R

0 Kudos

Hi Vandana,

If you u'stand please mark this thread as answered and close the discussion.

regards,

Ramya R