There’s a way, but follow the example: CONCATENATE sy-sysid '%' sy-mandt INTO DATA(logsys_aux). CONCATENATE ' logsys like ''%' logsys_aux '%''' INTO DATA(logsys). SELECT SINGLE logsys FROM tbdls INTO wa_mdfe_header-logsys WHERE (logsys).
Will help you @Glauco? How to use Dynamic SQL in ABAP
– Marconi