Using fields for select conditions

a guest Oct 29th, 2019 133 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FORM f_ext_tdata USING fld_slct fld_from fld_whre
  2.                        fld_entr TYPE STANDARD TABLE
  3.                  CHANGING it_into TYPE STANDARD TABLE.
  4.   IF fld_entr[] IS INITIAL.
  5.     SELECT (fld_slct)
  6.       FROM (fld_from)
  7.       INTO TABLE @it_into
  8.       WHERE (fld_whre).
  9.   ELSE.
  10.     SELECT (fld_slct)
  11.       FROM (fld_from)
  12.       INTO TABLE @it_into
  13.       FOR ALL ENTRIES IN @fld_entr
  14.       WHERE (fld_whre).
  15.   ENDIF.
  16. ENDFORM.
  18. PERFORM f_ext_tdata
  19.     USING
  20.       'bukrs, butxt'
  21.       't001'
  22.       'bukrs EQ @lt_bseg-bukrs'
  23.       lt_bseg[]
  24.     CHANGING
  25.       lt_t001[].
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand