2010 Oct 12 8:05 PM
Hi Friends,
I am trying to construct a string with some variables in it.
I am not getting the values of the variables
instead only the string. How must the below string look
if pa_lief and pa_bukr are variables where contain values.
ls_options-TEXT = 'LIFNR = pa_lief AND BUKRS = pa_bukr '.
APPEND ls_options TO lt_options.Kindly regards
Marco
2010 Oct 12 8:23 PM
CONCATENATE 'LIFNR =' pa_lief 'AND BUKRS =' pa_bukr into ls_options-TEXT separated by ' '.
Regds,
Senthil
Hi Friends,
I am trying to construct a string with some variables in it.
I am not getting the values of the variables
instead only the string. How must the below string look
if pa_lief and pa_bukr are variables where contain values.
ls_options-TEXT = 'LIFNR = pa_lief AND BUKRS = pa_bukr '.
APPEND ls_options TO lt_options.Kindly regards
Marco
2010 Oct 12 8:23 PM
CONCATENATE 'LIFNR =' pa_lief 'AND BUKRS =' pa_bukr into ls_options-TEXT separated by ' '.
Regds,
Senthil
2010 Oct 12 8:35 PM
Kumar thx since this is a criteria of select statement I need both the values and the quotes.
like
ls_options-TEXT = 'WHERE LIFNR = ''0000241332'' AND BUKRS = ''0120'''.
Regards
Marco
2010 Oct 12 9:16 PM
This seems very basic. You just include the quotes when doing the concatenation, being careful of spaces.
Rob
2010 Oct 12 9:18 PM
Why do you need double quotes ".. double quotes doesnot mean anything but comment.
Concatenate should suffice your where condition.
CONCATENATE 'WHERE' 'LIFNR =' pa_lief 'AND BUKRS =' pa_bukr into ls_options-TEXT separated by ' '.
WRITE : 'WHERE', 'LIFNR =', pa_lief, 'AND BUKRS =', pa_bukr to ls_options-TEXT.
2010 Oct 13 3:16 AM
why do you want the variable values rather than the names? The sql select can cope with the variable names.
I think Senthil's original solution is fine,
CONCATENATE 'LIFNR =' pa_lief 'AND BUKRS =' pa_bukr into ls_options-TEXT separated by ' '.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |