SELECT: Unterschied zwischen den Versionen

Aus SAP Wiki ツ
Zeile 6: Zeile 6:
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>
</syntaxhighlight>

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

Dynamisches 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).