Sei sulla pagina 1di 3

3/8/2019 Select Single and Select up to 1 rows - Select Statements types | Sapnuts.

com

You are here → /  Sapnuts.com /  Courses /  SAP ABAP /  Select Statements types /  Select Single and Select up to 1 rows

Select Single and Select up to 1 rows Search Sapnuts Search

Last Updated: April 1st 2018 by Ashok Kumar Reddy


40% 40%

price drop

Select single and Select up to 1 rows, What is the difference between Select
Single and Select up to 1 rows in SAP ABAP ?
40%

price drop price drop


A+ A-

These statements are the part of reading data from database table.
By using SELECT SINGLE and SELECT UPTO 1 ROWS we can able to read single record from a database
table .

SELECT SINGLE SELECT UP TO 1 ROWS

Used to read exact record from database Used to read appropriate record from database table.
table.

To read exact record from database table We can read appropriate record from database table,
we need to provide all key elds. we may not need to provide all key elds.

Learn SAP Courses online, SAP Certi cation


mock exams and SAP tutorials
This statement should be used only if all This statement should be used only if we have some
the key elds are available. key elds or no key elds. SAP ABAP Tutorials, SAP ABAP Online
Training, SAP Webdynpro for ABAP,
Webdynpro for ABAP tutorials, Webdynpro for
ABAP online training, SAP Work ow training,
Syntax :SELECT SINGLE * FROM Syntax: SELECT * FROM DATABASETABLE INTO
DATABASETABLE INTO WA WHERE ALL WA UP TO 1 ROWS WHERE ALL KEY FIELDS/SOME SAP Online Training, SAP Certi cation, SAP
KEY FIELDS FIELDS. Training, SAP mock exams, SAP Exams, SAP
ENDSELECT. ERP, SAP Interview questions, SAP ABAP
interview Questions

This is very fast when compared to SELECT This is slow. SAP ABAP Course Content
UPTO
SAP Introduction
Example SELECT SINGLE
SAP ABAP Consultant
DATA : WA_MARA TYPE MARA. " Declare work area
System Landscape and Introduction to
SELECT SINGLE * FROM MARA INTO WA_MARA WHERE MATNR = '0001'. " Read exact record ABAP/4
from MARA table

Data Dictionary
write : wa_mara-matnr, wa_mara-mtart, wa_mara-meins. " Print data to screen

Internal Tables and Work Areas


Example SELECT UPTO

Select Statements types

Selection Screen Design using SAP


ABAP

Modularization techniques in SAP


https://www.sapnuts.com/courses/core-abap/select-statements/select-single-select-upto.html 1/3
3/8/2019 Select Single and Select up to 1 rows - Select Statements types | Sapnuts.com

ABAP
DATA : WA_MARA TYPE MARA. " Declare work area

SELECT * FROM MARA INTO WA_MARA UP TO 1 ROWS WHERE MTART = 'FERT'. " Read Classical Reports in SAP ABAP
appropriate record from MARA table here MTART is not a keyfield
Interactive Reporting in SAP ABAP
ENDSELECT.

Menu painter in SAP


We can read multiple records using SELECT UPTO

DATA : IT_MARA TYPE TABLE OF MARA. " Declare internal table ALV Reports
DATA : WA_MARA TYPE MARA. " Declare work area
Sapscripts
SELECT * FROM MARA INTO WA_MARA UP TO 50 ROWS WHERE MTART = 'FERT'. " Read 50
appropriate records from MARA table here MTART is not a keyfield
ENDSELECT.
Smartforms
LOOP AT IT_MARA INTO WA_MARA.
write :/ wa_mara-matnr, wa_mara-mtart, wa_mara-meins. " Print data to screen Batch Data Communication
ENDLOOP.
Open SQL Statements in SAP ABAP

SAP memory and ABAP memory


Learner Questions
Performance Tuning in SAP ABAP
No Questions by learners, be rst one to ask ..!!
Control break statements in sap abap
Please Sign in to ask a question

Enhancements in SAP

Was this lesson helpful to you? Yes No 136 People out of 142 think this lesson helpful BADI in SAP

SD and MM ows in SAP

Dialog Module Pool Programming

String Operations and eld symbols

SAP ABAP real-time scenarios

MM Basics for ABAP Consultants

SD Basics for ABAP Consultants

Register for Premium SAP


Training

Training will be provided through


online platform ex: gotomeetings

Name *

Name

Email *

Email

Mobile *

10 digit mobile number


Your privacy will be protected always

Select Courses *
SAP ABAP

https://www.sapnuts.com/courses/core-abap/select-statements/select-single-select-upto.html 2/3
3/8/2019 Select Single and Select up to 1 rows - Select Statements types | Sapnuts.com

Web Dynpro ABAP

Object Oriented ABAP

SAP Cross Apps (RFC,BAPI,IDOC)

Comments

Comments

Submit

Lesson Navigation
Internal Tables and Work Areas← Previous Lesson Next Chapter → Select with Joins in SAP ABAP
? Support About Feedback Privacy Terms & Conditions Report Abuse © SURAPU TECHNOLOGY SERVICES PVT LTD Google Twitter Facebook Version: V.2.0

https://www.sapnuts.com/courses/core-abap/select-statements/select-single-select-upto.html 3/3

Potrebbero piacerti anche