🏆
SAP ABAP 100 Days Challenge
Day 13 — SELECT SINGLE vs SELECT UP TO 1 ROWS
1Views
0Downloads
0Likes
0Comments
0Shares
Interview Question
1. What is the difference between SELECT SINGLE and SELECT UP TO 1 ROWS?
2. When do we use each statement?
Answer
1. SELECT SINGLE retrieves one record using the primary key.
2. It is used when only one unique record is required.
3. SELECT UP TO 1 ROWS retrieves the first matching record based on the WHERE condition.
4. It is useful when multiple records exist but only one record is needed.
5. SELECT SINGLE is generally faster for primary key searches.
Real-Time Example
1. A user enters Sales Order Number 50000123.
2. The program fetches the Sales Order using SELECT SINGLE from VBAK.
3. The business wants the latest Sales Order for Customer 100001.
4. The program uses SELECT UP TO 1 ROWS with ORDER BY to fetch one matching record.
5. The required record is displayed to the user.
Practice Questions
1. What is SELECT SINGLE?
2. What is SELECT UP TO 1 ROWS?
3. When do you use SELECT SINGLE?
4. Which statement is faster for primary key searches?
5. Give one real-time example.
Related Jobs — ABAP
I
SAP ABAP Junior Consultant
Incresol Software Services
HYDERABADOnsiteSAP ABAP Programming
S
SAP Jr. ABAP Developer
STAR INTELLISOFT SERVICES PRIVATE LIMITED
Hyderabad, Telangana, IndiaOnsiteSAP ABAP
N
SAP ABAP consultant
NTT DATA Services
Hyderabad, TG, INOnsiteSAP ABAP development
L
Senior Specialist - Package Implementation
LTM
Bengaluru OnsiteFiori (UI5), HANA ABAP (CDS-AMDP-RAP)
W
SAP ABAP HR
Wipro
Bengaluru OnsiteSAP ABAP Development
Discussion
to join the discussion.
Be the first to comment.