07-08-2005 11:25 AM
friends,
i want to add a space between two string like for example
i have str1 = "SSC" and str2= "00095" and now i want the result to be like "SSC 00095".
following statements are giving me the required results,
try1 : concatenate str1 ' ' str2 into str3
try2 : concatenate str1 space str2 into str3
try3 : concatenate 'SSC ' str2 into str3 etc..
after getting this result basically i have to read a internal table as below,
read table gt_hierstruct with key nodename = str3
hieid = lv_hierid
and i also tried like "SSC*000095" but in read statement instead of key nodename = str3 i need something like key nodename LIKE str3...
could some body help me and this code will be diployed in SAP BW update rules.
Message was edited by: Shashi
07-08-2005 11:27 AM
07-08-2005 11:27 AM
07-08-2005 11:32 AM
could u please give me the syntax, does this addition is for concetinate ?
07-08-2005 11:39 AM
07-08-2005 11:41 AM
CONCATENATE <FLD1> <FLD2> INTO <FLD3> SEPARATED BY SPACE.
You can check the help of CONCATENATE. Press F1 on the text CONCATENATE.
07-08-2005 11:50 AM
07-08-2005 11:53 AM
Hi shashi,
Try this code
data :str1(5) type c,
str2 type string,
str3(15) type c.
data : begin of itab occurs 0,
name(5) type c,
empno type i,
empid(15) type c,
end of itab.
itab-name = 'vijay'.
itab-empno = '009'.
itab-empid = 'vijay 009'.
append itab.
str1 = 'vijay'.
str2 = '009'.
concatenate str1 str2 into str3 separated by space.
loop at itab.
read table itab with key empid = str3.
if sy-subrc = 0.
write 😕 itab-empid.
endif.
endloop.
Regards,
vijay.