‎2008 Aug 29 9:06 AM
Hi,
i have a requirement like
material ( VEPO-MATNR) 18 char
batch (VEPO-CHARG) 10 char
if we get the value of material like W3497 and charg TESTRETURN so to be require output is like
w_string = W3497 TESTRETURN.
means need to be concatenate both field but require is that lenght of material should be filled when material no. is not fully 18 char so we added space till 18 char then concatenate charg.
So please suggest me how to do?
Thanks .
Puneet.
‎2008 Aug 29 9:13 AM
Hi try this,
data : material(18) type c value 'W3497 ',
batch(10) type c.
concatenate material batch into w_string RESPECTING BLANKS.
‎2008 Aug 29 9:09 AM
‎2008 Aug 29 9:13 AM
Hi try this,
data : material(18) type c value 'W3497 ',
batch(10) type c.
concatenate material batch into w_string RESPECTING BLANKS.
‎2008 Aug 29 9:17 AM
try with SHIFT.
see example
IF v_mat CA sy-abcde.
v_str = STRLEN( v_mat ).
v_count = 18 - v_str.
CONCATENATE wa_vbrk-vkorg wa_vbrk-vtweg INTO V_SPACE.
SHIFT V_SPACE RIGHT BY V_COUNT PLACES.
CONCATENATE V_MAT V_SPACE INTO V_MATEXN.
ENDIF.
‎2008 Aug 29 9:21 AM
Well a bit confusing requirement
CONDENSE VEPO-MATNR.
CONDENSE VEPO-CHARG.
Now
CONCATENATE MATNR CHARG INTO w_string SEPARATED BY SPACE.
after this find length of w_string.
pad the rest of the length with SPACE.
Hope this helps!
‎2008 Aug 29 9:21 AM
Hi Puneet,
You can use any of this
CONCATENATE w_mat w_batch INTO w_result SEPARATED BY space.
CONCATENATE w_mat w_batch INTO w_result RESPECTING BLANKS.
Best regards,
raam
‎2008 Aug 29 9:24 AM
hii
do like follows
data:
v_text1(18) type c,
v_text2(10) type c,
v_text(28) type c.
v_text1 = 'W3497'.
v_text2 = 'TESTRETURN'.
CONCATENATE v_text1 v_text2 INTO v_text RESPECTING BLANKS.
write : v_text.regards
twinkal