10-20-2008 7:50 AM
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-20-2008 7:52 AM
10-20-2008 7:53 AM
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
10-20-2008 7:54 AM
hii
use
concatenate material salesorder into wa_string RESPECTING BLANKS.
regards
twinkal
10-20-2008 7:55 AM
10-20-2008 7:54 AM
hi Siva,
use SHIFT like this.
SHIFT <string> RIGHT BY <space count>.
regards,
Peter
10-20-2008 7:58 AM
10-20-2008 8:34 AM
Try this
SHIFT Iternal table -Material Number RIGHT DELETING TRAILING ' '.
10-20-2008 8:42 AM
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
08-18-2010 5:19 PM
08-18-2010 10:00 PM
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