Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

String Operation

Former Member
0 Likes
736

hi all i have a req i need to concatenate matnr,vkorg and vtweg into a variable it should be as below.

matnr= 1234

vkorg=0400

vtweg=01

concatenated value should be 1234 0400 01.

leaving the field length as it is.

but now i am getting as 1234040001.whish is not desirable

please let me how to get the type .

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 3, 2008 1:22 PM

6 REPLIES 6
Read only

Former Member
0 Likes
697

use concatenate a1 a2 a3 into a4 seperated by space.

Read only

Former Member
0 Likes
697
data v_str type string.
concatenate matnr vkorg vtweg into v_str separated by CL_ABAP_CHAR_UTILITIES=>SPACE_STR.

G@urav.

Read only

Former Member
0 Likes
697

Hi,

this coding should work:


data result type string.
concatenate matnr vkorg vtweg into result separated by space.

Regards,

Thomas Langen

Read only

Former Member
0 Likes
697

Use Concatenate ..separated by space..

CONCATENATE MATNR VKORG VTWEG INTO .....SEPARATED BY SPACE.

Read only

Former Member
0 Likes
697

Hi,

You can do as below :


data : string(30) type c.

matnr= 1234
vkorg=0400
vtweg=01

concatenate matnr vkorg vtweg into string separated by space.
write : string.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
697

hi check this ...here u can give the values from the db table...

tables: mara,marc,mard,vbak.

parameters: p_matnr like mara-matnr,

p_vkorg like vbak-vkorg,

p_vtweg like vbak-vtweg .

data: v_matnr like mara-matnr,

v_vkorg like vbak-vkorg,

v_vtweg like vbak-vtweg ,

v_test(50) type c.

v_matnr = p_matnr.

v_vkorg = p_vkorg .

v_vtweg = p_vtweg .

concatenate v_matnr v_vkorg v_vtweg into v_test .

write:/ v_test no-zero.

regards,

venkat.