‎2007 Oct 23 12:13 PM
How to assign quotation to an character datatype variable? Give me an example statement..
‎2007 Oct 23 12:18 PM
just add ' ' with variable if it is char type
______________________________________________________________________
IF you need to insert in the string veriable the special character '.
variable = '''.
Try as
data: L_COM VALUE ''''.
__________________________________________________________________
DATA A.
A = ''''.
WRITE:/ A.
___________________________________________________
1)Declare a variable and assign the special character to that variable.
2)Then use the CONCATENATE option to get the value in the string variable.
Just copy and execute this code.
REPORT zztest.
<b>DATA : temp(1) VALUE ''''.</b> Decalare your special character
DATA : variable TYPE string.
START-OF-SELECTION.
variable = 'SDNSAP'.
CONCATENATE temp variable temp INTO variable.
WRITE : / variable.
The output is
'SDNSAP'
Rewards if useful........
Minal Nampalliwar
null
null
‎2007 Oct 23 12:20 PM
Hi
You can use concatenate statement and add quotations to your variable
CONCATENATE '"' v_kslnn'"'
INTO v_kslnn .
Reward if useful.
Regards
Shibin
‎2007 Oct 23 12:32 PM
This might be helpful:
REPORT ztest_prg5.
DATA: w_data TYPE char50.
DATA: word1(15) TYPE c,
c_comma type c value ''''.
word1 = 'firstword'.
CONCATENATE c_comma word1 c_comma INTO w_data.
WRITE:/ w_data.Hope That Helps
Anirban M.