Code: Alles auswählen.
SELECT QID VARDATA FROM APQD INTO TABLE LT_APQD
WHERE VARDATA LIKE '%FELDNAME%'.
und ist ohnehin schon extrem inperformant (wie man sich vorstellen kann).In an SAP Open SQL statement, a "long field" was used in a way that is
not supported by all database systems. This use is therefore not
permitted.
Long fields can only appear on the left side of an assignment in a SET
clause or in a SELECT list without DISTINCT.
"Long fields" are all fields created in the ABAP Data Dictionary with
one of the data types STRING, RAWSTRING, LCHR, or LRAW.
Code: Alles auswählen.
SELECT QID VARDATA FROM APQD
WHERE VARDATA LIKE '%SB%'.
Code: Alles auswählen.
TABLES: apqd.
SELECT * FROM apqd.
IF apqd-vardata CS 'SB'.
WRITE: apqd-qid, apqd-trans, apqd-block, apqd-segmt.
NEW-LINE.
ENDIF.
ENDSELECT.
Code: Alles auswählen.
DATA l_apqd type apqd.
data l_such type c length 20 value '%BANK%'.
START-OF-SELECTION.
EXEC SQL PERFORMING ERGEBNIS.
SELECT DISTINCT QID
INTO :L_APQD-QID
FROM APQD
WHERE VARDATA LIKE :SUCH
ENDEXEC.
FORM ergebnis.
WRITE: / l_apqd-qid.
ENDFORM. "ergebnis