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

concatenating spaces

Former Member
0 Likes
2,116

hi,

i need to extract sales text from mm03. for this i need to concatenate mat no sales org dist channel

suppose if material number is alpha nemeric number i need to add spaces to the right side of material number untill its material length.

mat no : 'hello' its string length is 5.

material numer is of 18 char genrally.so i need to add ( 18-5 ) spaces to the right side of matno

after this i had to concatenate matnr vkorg ang vtweg. how can i get this.

regards

siva

hi,

i need to extract sales text from mm03. for this i need to concatenate mat no sales org dist channel

suppose if material number is alpha nemeric number i need to add spaces to the right side of material number untill its material length.

mat no : 'hello' its string length is 5.

material numer is of 18 char genrally.so i need to add ( 18-5 ) spaces to the right side of matno

after this i had to concatenate matnr vkorg ang vtweg. how can i get this.

regards

siva

10 REPLIES 10
Read only

Former Member
0 Likes
1,546

Hi,

Try using conversion exit.

Thanks & Regards,

Navneeth K.

Read only

Former Member
0 Likes
1,546

Check the domain of MATNR and you will find the conversion routines attached. Use the conversion routine on material number before concatenate statement.

Regards

Eswar

Read only

Former Member
0 Likes
1,546

hii

use

concatenate material salesorder into wa_string RESPECTING BLANKS.

regards

twinkal

Read only

0 Likes
1,546

hi,

above statement works in 6.0 only not in 4.6c

Read only

peter_ruiz2
Active Contributor
0 Likes
1,546

hi Siva,

use SHIFT like this.

SHIFT <string> RIGHT BY <space count>.

regards,

Peter

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,546

Hi,

Try using SHIFT matnr RIGHT BY (18-5) PLACES.

Rgds,

Sandeep

Read only

Former Member
0 Likes
1,546

Try this

SHIFT Iternal table -Material Number RIGHT DELETING TRAILING ' '.

Read only

Former Member
0 Likes
1,546

Use

CONCATENATE var ' ' (Number of spaces you want)

INTO target RESPECTING BLANKS.

Regards,

Mohaiyuddin

Edited by: Mohaiyuddin Soniwala on Oct 20, 2008 1:12 PM

Read only

Former Member
0 Likes
1,546

resolved my self

Read only

Subhankar
Active Contributor
0 Likes
1,546

Just create one work are using this three fields..Then move the work area to string

PARAMETERS : p_matnr TYPE matnr.

TYPES: BEGIN OF x_struc,

matnr TYPE matnr,

vkorg TYPE vkorg,

vtweg TYPE vtweg,

END OF x_struc.

DATA: l_wa TYPE x_struc,

l_string TYPE string.

    • Here you can do the conversionexit for matnr then pass it

l_wa-matnr = p_matnr.

l_wa-vkorg = '1000'.

l_wa-vtweg = '01'.

l_string = l_wa.

WRITE: l_string.

Thanks

Subhankar