Académique Documents
Professionnel Documents
Culture Documents
com
You are here → / Sapnuts.com / Courses / SAP ABAP / Select Statements types / Select Single and Select up to 1 rows
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%
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 .
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.
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
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.
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
Enhancements in SAP
Was this lesson helpful to you? Yes No 136 People out of 142 think this lesson helpful BADI in SAP
Name *
Name
Email *
Mobile *
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
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