Application Development 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: 

concatenating spaces

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Try using conversion exit.

Thanks & Regards,

Navneeth K.

Former Member
0 Kudos

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

Former Member
0 Kudos

hii

use

concatenate material salesorder into wa_string RESPECTING BLANKS.

regards

twinkal

0 Kudos

hi,

above statement works in 6.0 only not in 4.6c

peter_ruiz2
Active Contributor
0 Kudos

hi Siva,

use SHIFT like this.

SHIFT <string> RIGHT BY <space count>.

regards,

Peter

Sandeep_Kumar
Advisor
Advisor
0 Kudos

Hi,

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

Rgds,

Sandeep

Former Member
0 Kudos

Try this

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

Former Member
0 Kudos

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

Former Member
0 Kudos

resolved my self

Subhankar
Active Contributor
0 Kudos

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