SELECT: Unterschied zwischen den Versionen

Aus SAP Wiki ツ
(Die Seite wurde neu angelegt: „Kategorie:Schlüsselbegriffe === Dynamisches SELECT Abfrage === ==== WHERE ==== DATA(lv_comp_srch) = |%{ me->_gv_mcomp }%|. lv_where_clausel = 'addrnumber…“)
 
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
[[Kategorie:Schlüsselbegriffe]]
[[Kategorie:Schlüsselbegriffe]]
=== Dynamisches SELECT Abfrage ===
=== Dynamische SELECT Abfrage ===
==== WHERE ====
==== WHERE ====
<syntaxhighlight lang="abap" line start="1">
DATA(lv_comp_srch) = |%{ me->_gv_mcomp }%|.
DATA(lv_comp_srch) = |%{ me->_gv_mcomp }%|.
lv_where_clausel = 'addrnumber = @lt_userdata-addrnumber AND ( name1 LIKE @lv_comp_srch OR mc_name1 LIKE @lv_comp_srch )'.
lv_where_clausel = 'addrnumber = @lt_userdata-addrnumber AND ( name1 LIKE @lv_comp_srch OR mc_name1 LIKE @lv_comp_srch )'.
SELECT * FROM adrc INTO TABLE @DATA(lt_companynames) FOR ALL ENTRIES IN @lt_userdata
SELECT * FROM adrc INTO TABLE @DATA(lt_companynames) FOR ALL ENTRIES IN @lt_userdata
                                                        WHERE (lv_where_clausel).
                                                      WHERE (lv_where_clausel).
</syntaxhighlight>

Aktuelle Version vom 9. März 2022, 12:02 Uhr

Dynamische SELECT Abfrage

WHERE

DATA(lv_comp_srch) = |%{ me->_gv_mcomp }%|.
lv_where_clausel = 'addrnumber = @lt_userdata-addrnumber AND ( name1 LIKE @lv_comp_srch OR mc_name1 LIKE @lv_comp_srch )'.
SELECT * FROM adrc INTO TABLE @DATA(lt_companynames) FOR ALL ENTRIES IN @lt_userdata
                                                      WHERE (lv_where_clausel).