on ‎2006 Apr 18 12:15 AM
Hi Gurus,
I am unclear about the meaning or usage of the syntax 'select single ... into...'
Could you please help to clarify?
Thanks,
Alfonso
Request clarification before answering.
Hello Alfanso,
Following is the text from SAP help.
To read a single entry from the database, use the following:
SELECT SINGLE <cols> ... WHERE ...
To ensure that the line can be uniquely identified, you must specify values for all of the fields of the primary key of the table in the WHERE clause. If the WHERE clause does not contain all of the key fields, the syntax check produces a warning, and the SELECT statement reads the first entry that it finds that matches the key fields that you have specified.
The result of the selection is either an elementary field or a flat structure, depending on the number of columns you specified in <cols>. The target area in the INTO clause must be appropriately convertible.
If the system finds a line with the corresponding key, SY-SUBRC is set to 0, otherwise to 4.
Hope it helps.
Regards,
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.