Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

building a dynamic where clause

Hi, I'm building a dynamic where clause, but I keep getting error messages.

This is what the code looks like, but apparently the condition is incorrectly parenthesized. Can someone tell me how it should be?


IF s_type is not initial.

APPEND 'lgtyp IN s_type' to where_tab.


IF s_emplac is not initial.

APPEND 'lgpla IN s_emplac' to where_tab.


if s_emplty is not initial.

APPEND 'lptyp = s_emplty' to where_tab.


SELECT lgnum FROM lagp

into i_item-lgnum

where lgnum = s_mag

AND (where_tab).

Not what you were looking for? View more on this topic or Ask a question