08-13-2009 5:22 AM
Hi Experts,
my material number is stored in the form of Character so i want to add a trailing space to that number
supposr for example my material number is ccf5a so i want add space to make it 18 like 'cf5a ' characters
Please help me on this hoping for the quick replay.
My actual requirment is to print sales text which is maintained in material master so this sales text depents on disribution channel & storage location properties of that text is
Text name is combination of material number storage location & distribution channel
Text Id = 0001
Text object = 'MVKE'
so when i concatinate material storage location & distribution channel in the program because the material starting with text so text name is stored for example
'CF5A 100010' here its taking space between values SO THIS TEXT IN TEXT HEADER IS NOT MATCHING WITH PROGRAM VALE
'CF5A100010'
SO kindly help me on this.
hoping for some valuable input.
Edited by: Bhushan on Aug 13, 2009 9:52 AM
08-13-2009 7:25 AM
Hi,
U can use the below code
LEN = STRLEN( MATNR ).
VAL = 18 - LEN.
CONCATENATE VKORG VTWEG INTO STEXT1.
SHIFT STEXT1 RIGHT BY VAL PLACES.
CONCATENATE MATNR STEXT1 INTO STEXT.
08-13-2009 5:36 AM
Try using this.
Take one more variable and conactenate location and channel into a third variable and use condense statement.
CONCATENATE materialstorage channel into variable.
condense variable no gaps.
Regards,
Lakshman.
08-13-2009 5:42 AM
Hi Lakshman,
i can condense the gap in the program but i want to match this value in textname value in the teader of the text which is stored automatically so i want to add gap in my program to match with the value in name value of the text header.
08-13-2009 5:45 AM
08-13-2009 5:46 AM
Hi Bhushan,
Try separate by space as follows:
concatenate m_text1 m_text2 into m_text3 separated by space.
Regds,
Anil
08-13-2009 5:50 AM
08-13-2009 5:53 AM
Hi,
Check this one, might work like wat u need
CONCATENATE Sales_org Dist_chan INTO STEXT.
CONCATENATE material STEXT INTO STEXT SEPARATED BY ' '.
08-13-2009 5:58 AM
Dear all,
see material number is 18 digit long .supose my material number is 'cfiof' my material number is 5 digits long so
my text name length is 1842 = 24 i.e material number + sales org + distribution channel
so i am not able to make my variable length of 24 by adding space to the material number to match text name in the material master.
08-13-2009 6:41 AM
Hi Bhusan,
Try using this FM 'CONVERSION_EXIT_ALPHA_OUTPUT'
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = MATERIALNUMBER
IMPORTING
OUTPUT = TEXTNAME
Alternatively, if u need to get spaces WRITE INTO command with addition "RIGHT-JUSTIFIED".
write var1 into var2 no-zero right justified.
Here var2 shuld be og length 24
Regards,
lakshman
08-13-2009 7:25 AM
Hi,
U can use the below code
LEN = STRLEN( MATNR ).
VAL = 18 - LEN.
CONCATENATE VKORG VTWEG INTO STEXT1.
SHIFT STEXT1 RIGHT BY VAL PLACES.
CONCATENATE MATNR STEXT1 INTO STEXT.
08-13-2009 9:55 AM
08-14-2009 12:58 AM
Hi,
Concatenation will not work in this case. Use Offset in your case.
Ex: Material (Length = 18), Storage Location(Length is i tink 4) and IDstribution Channel(length is 2, please check in table).
Text+0(18) = Material.
Text+18(4) = Storage Location.
Text+22(2) = Distribution Channel.
Finally you will get combination of three field values in to TEXT field in a fixed format.
Regards,
Balaji Peethani.