‎2007 Jul 16 1:04 PM
How do i use the ' sign in a concatenation seeing as it is a special character.
‎2007 Jul 16 1:07 PM
Hello,
try this,
data: wrk_char type c.
Move '''' to wrk_char. "4 single quotes
concatenate wrk_result wrk_char to wrk_reault.
<b>Reward all usefull answers.</b>
Regards,
Rakesh.
‎2007 Jul 16 1:05 PM
Hi,
DATA text type string.
CONCATENATE '''' 'hello' '''' into text.
write: text.Single quote can be concatenated by typeing it twice.
Here '''' are required as you need to put a character between two quotes '' and to display ' you need to escape its special behaviour by typing it twice.
Regards,
Sesh
‎2007 Jul 16 1:38 PM
i desire to pass a date to function /SDF/CMO_DATETIME_DIFFERENCE and i have a date variable in the format 12102006 (t_datatabfinal-capitalisation) and i want to concatenate datatab in2 a format that will be accepted by the function, please assist
this is wat i have:
concatenate t_datatabfinal-capitalisation4(4) t_datatabfinal-capitalisation2(2) t_datatabfinal-capitalisation(2) into capitalisation.
break-point.
data: date_2 type p .
date_2 = capitalisation.
CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'
EXPORTING
DATE1 = '20070630'
TIME1 = '000000'
DATE2 = date_2
TIME2 = '000000'
IMPORTING
DATEDIFF = days
TIMEDIFF =
EARLIEST =
EXCEPTIONS
INVALID_DATETIME = 1.
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2007 Jul 16 1:05 PM
Hi tatenda,
1.<b> We can use tilde tilde ( the left most key, just besides left of 1)</b>
2. sample code (just copy paste)
3.
report abc.
data : a(15) type c.
<b>a = `ab'cd`.</b>
write a.
regards,
amit m.
‎2007 Jul 16 1:07 PM
Hello,
try this,
data: wrk_char type c.
Move '''' to wrk_char. "4 single quotes
concatenate wrk_result wrk_char to wrk_reault.
<b>Reward all usefull answers.</b>
Regards,
Rakesh.
‎2007 Jul 16 1:11 PM
hi,
use TILDE character -> <b>`</b>
(just left to the '1' key)
`'mystring'`
<u>code</u>
data:
l_text1(10) type c value '`',
l_text2(10) type c value 'next',
l_out(20) type c.
concatenate l_text1 l_text2 into l_out.
write:/ l_out.Rgds
Reshma
‎2007 Jul 16 1:15 PM
Well for using a single quote in CONCATENATE statement type it 4 times as shown in example below:
DATA : TEXT1(10) TYPE C.
CONCATENATE '''' 'HELLO' '''' INTO TEXT1.
The output will be : 'HELLO'
NOTE : REWARD POINTS IF USEFUL.
‎2007 Jul 16 1:23 PM
Use like..
data: t_str type string.
concatenate '''' 'prax' into t_str.
write:/ t_str.
It concatenates only single ' to the string
Regards
Prax