‎2009 Oct 22 12:22 PM
Hi Folks,
i need to Split a String at ' obviously Split String at ''' doenst work. so how can i manage to split the string wherever a ' show up?
‎2009 Oct 22 12:26 PM
Hi,
Try like this,
constant: c_quote value `'`.
split ... AT c_quote INTO....
Vikranth
‎2009 Oct 22 12:26 PM
Hi,
Try like this,
constant: c_quote value `'`.
split ... AT c_quote INTO....
Vikranth
‎2009 Oct 22 12:37 PM
‎2009 Oct 22 12:26 PM
hai,
try this code
CONSTANTS: C_COMMA(1) TYPE C VALUE ' ' ',
SPLIT V_ZTMAT_MASTER_IB AT C_COMMA INTO
V_PRDNO.
‎2009 Oct 22 12:31 PM
You can split single (') quote as well.
data: v_str1 type string.
data: v_str2 type string.
data: v_str3 type string.
data: v_str4 type string.
v_str1 = 'Mahesh''sap''abap'.
SPLIT v_str1 at '''' INTO v_str2 v_str3 v_str4.
write:/ v_str1, / v_str2, / v_str3, / v_str4.
‎2009 Oct 22 12:35 PM
use 4 single quotes.
data s1 type string value 'asdasdas''asd''asdasd'. " i am giving 2 single quote to pass one quote
data : s2 type string.
data : s3 type string.
data : s4 type string.
split s1 at '''' into s2 s3 s4.
write / : s1, s2,s3,s4.and output as
asdasdas'asd'asdasd =====> this is S1
asdasdas
asd
asdasd
Edited by: Soumyaprakash Mishra on Oct 22, 2009 5:06 PM