2008 Nov 03 4:15 AM
Is the following statement possible to re-write using UPTO 1 ROWS instead of using select single?
SELECT * FROM tcurf INTO TABLE i_tcurf
FOR ALL ENTRIES IN i_t005
WHERE kurst = 'M'
AND fcurr = i_t005-waers
AND tcurr = gv_curr
AND gdatu => w_likp-erdat.
Please help.
2008 Nov 03 1:08 PM
If you are having all the Key Fields for the where condition you can use select single Statement.
If you are not having all the key fields it is good to use UP TO 1 rows for better performance.it will not show warning message in the extended check.
Both will retrieve only one record.
For your case you can use select single statement since all the Key fields are used in the where condition.
Regards
Raghu
Edited by: dearvirus on Nov 3, 2008 6:40 PM
Is the following statement possible to re-write using UPTO 1 ROWS instead of using select single?
SELECT * FROM tcurf INTO TABLE i_tcurf
FOR ALL ENTRIES IN i_t005
WHERE kurst = 'M'
AND fcurr = i_t005-waers
AND tcurr = gv_curr
AND gdatu => w_likp-erdat.
Please help.
2008 Nov 03 4:19 AM
Refer this link.
http://sap-img.com/abap/difference-between-select-single-and-select-upto-one-rows.htm
regards,
Siva
2008 Nov 03 4:24 AM
Hi.....
Even though it has many entries...that matches your condition, if you use UP TO 1 ROWS i will select the first row from that matching condition....
Its based on your requirement.....
Regards
Raja
2008 Nov 03 4:38 AM
>
> Is the following statement possible to re-write using UPTO 1 ROWS instead of using select single?
>
> SELECT * FROM tcurf INTO TABLE i_tcurf
> FOR ALL ENTRIES IN i_t005
> WHERE kurst = 'M'
> AND fcurr = i_t005-waers
> AND tcurr = gv_curr
> AND gdatu => w_likp-erdat.
>
> Please help.
Hi sap_kolkata06,
Yes the statement written by you can be rewritten using the addition upto 1 rows. There is not harm in writting so. It will only output a single record in that case.
Regards,
Ravi.
2008 Nov 03 4:40 AM
For performance perspective, i suggest you to go for select single option.
-Siva
2008 Nov 03 1:08 PM
If you are having all the Key Fields for the where condition you can use select single Statement.
If you are not having all the key fields it is good to use UP TO 1 rows for better performance.it will not show warning message in the extended check.
Both will retrieve only one record.
For your case you can use select single statement since all the Key fields are used in the where condition.
Regards
Raghu
Edited by: dearvirus on Nov 3, 2008 6:40 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |