- 303
- 0
- 约 4页
- 2017-05-29 发布于浙江
- 举报
ABAP语法讲解五(WHERE语句)
WHERE Clause
Variants:
1. ... WHERE cond 2. ... FOR ALL ENTRIES IN itab WHERE cond
Effect
If you specify a WHERE clause in the SELECT, OPEN CURSOR, UPDATE or DELETE statement, the system only selects records from the table or tables in the FROM clause that meet the logical condition cond in it. When you use OPEN SQL statements, the system uses automatic client handling by default. This means that, for a client-specific table, only data from the current client is processed. Specifying a condition for the client field in the WHERE clause does not make sense, and causes an error in the syntax check. If you switch off the automatic client handlign using the ... CLIENT SPECIFIED addition in the FROM clause, the client field is treated like a normal field, and you can then specify conditions for it normally in the WHERE clause.
Notes
If you have transparent tables that you often access without using the full primary key, or where you often sort the data in a sequence that is different to that of the primary key, you should consider creating a corresponding index.
If you do not specify a WHERE condition in a selection, the system processes all table records in the current client.
Variant 1
... WHERE cond
Effect
Only selects the records that meet the WHERE condition cond.
Example
Displaying all Lufthansa flights:
DATA: WA_SPFLI TYPE SPFLI. SELECT * FROM SPFLI INTO WA_SPFLI ?????? WHERE CARRID = LH. ??WRITE: / WA_SPFLI-CITYFROM, WA_SPFLI-CITYTO. ENDSELECT.
Variant 2
... FOR ALL ENTRIES IN itab WHERE cond
Effect
Only selects the records that meet the logical condition cond when each replacement symbol itab-f is replaced with the value of component f of the internal table itab for at least one line of the table. SELECT ... FOR ALL ENTRIES IN itab WHERE cond returns the union of the solution sets of all SELECT statements that would result if you wrote a separate statement for each line of the internal table replacing the symbol itab-f with the corr
您可能关注的文档
- 雅思词汇:运用自然拼读法背单词.pdf
- GRE词汇背诵最快三方法.pdf
- 词缀构词法与单词的科学记忆_牛桂玲.pdf
- GRE词汇背诵越背越上瘾—庖丁解牛法-智课教育旗下智课教育.pdf
- 标记法背诵托福词汇-智课教育旗下智课教育.pdf
- 同等学力英语词汇记忆方法.pdf
- GRE词汇背诵小方法介绍-智课教育旗下智课教育.pdf
- GRE词汇背诵拆分联想法-智课教育旗下智课教育.pdf
- GRE词汇背诵越背越上瘾—子母词联想法-智课教育旗下智课教育.pdf
- GRE词汇背诵拆分联想法示例-智课教育旗下智课教育.pdf
- 广东省广州省实验中学教育集团2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州大学附属中学2025-2026学年八年级上学期奥班期中物理试题(解析版).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(含答案).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第八十六中学2025-2026学年八年级上学期期中物理试题(解析版).docx
- 广东省广州市第八十九中学2025-2026学年八年级上学期期中考试物理试题(含答案).docx
- 广东省广州市第二中学2025-2026学年八年级上学期期中考试物理试题(解析版).docx
- 2026《中国人寿上海分公司营销员培训体系优化研究》18000字.docx
- 《生物探究性实验教学》中小学教师资格模拟试题.docx
原创力文档

文档评论(0)