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?

THX!!

IF s_type is not initial.

APPEND 'lgtyp IN s_type' to where_tab.

ENDIF.

IF s_emplac is not initial.

APPEND 'lgpla IN s_emplac' to where_tab.

ENDIF.

if s_emplty is not initial.

APPEND 'lptyp = s_emplty' to where_tab.

ENDIF.

SELECT lgnum FROM lagp

into i_item-lgnum

where lgnum = s_mag

AND (where_tab).

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