rspec/rules/S1494/abap/rule.adoc

40 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
``++JOIN++`` bypasses the SAP table buffer. Buffered tables should be accessed with the simplest ``++SELECT++`` statements possible so as not to risk bypassing the buffer.
If one of the tables in a ``++JOIN++`` is buffered, it would be an advantage to first import the required entries using a ``++SELECT++`` into an internal table ``++itab++``, and then for example, using the statement ``++SELECT ... FOR ALL ENTRIES IN itab++`` to access further tables.
== Noncompliant Code Example
2021-04-28 16:49:39 +02:00
For ``++JOIN++`` clauses:
----
SELECT s~carrid s~carrname p~connid
INTO CORRESPONDING FIELDS OF TABLE itab
FROM scarr AS s
LEFT OUTER JOIN spfli AS p ON s~carrid = p~carrid
AND p~cityfrom = p_cityfr.
2021-04-28 16:49:39 +02:00
----
For subqueries
----
SELECT carrname
INTO TABLE name_tab
FROM scarr
WHERE EXISTS ( select *
FROM spfli
WHERE carrid = scarr~carrid AND
cityfrom = 'NEW YORK' ).
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]