Skip to Content
-1
Jan 25, 2019 at 02:32 PM

How to Concatenate to make a dynamic variable

770 Views

Hello Guru's/Experts,

I would want to make the where clause of the loop to be dynamic. Hence i am using the below logic to concatenate my workarea with a string. However this is not working since after concatenating i am getting maktl = xxxx while i need to get a result like maktl = 'XXX' . The preceding and the succeeding literal (') is missing.

Currently it goes to dump :While parsing the logical expression, the system could not interpret token "Z10-11523" in row 0, column 10.

CONCATENATE 'matkl = ' '' lw_mara-matkl'' INTO matkl RESPECTING BLANKS.

LOOP AT <it_dyn> ASSIGNING <lw_dyn> WHERE (matkl).

Endloop.

Could you please help me to get this resolved will be rewarded with points.

Regards,

Bhargav.