2008 Mar 20 8:23 AM
Hi fellow abapers
I need to concatenate 3 words of type c to a variable type c, with even space between them in all the rows ,when i tried it ,i'm gettin the following output
TOM...........20.03.2008.......... 02 : 37 : 40
HARRY............20.03.2008........... 01 : 37 : 40
DICK........... 20.03.2008......... 00 : 37 : 40
how to bring even space between then in all rows.
like
TOM.............20.03.2008.......... 02 : 37 : 40
HARRY.........20.03.2008.......... 01 : 37 : 40
DICK............ 20.03.2008.......... 00 : 37 : 40
(no dots , its only to represent blanks)
i've tried with SEPARATED BY SPACE, RESPECTING BLANKS, CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
nothing works.
Plz help
Regards
Prabumanoharan
2008 Mar 20 8:33 AM
Hi Prabhu,
DATA: w_txt TYPE char60.
write : w_name to w_txt(30),
w_date TO w_txt+35(10),
w_time TO w_txt+50(10).
regards,
Sachin
Hi fellow abapers
I need to concatenate 3 words of type c to a variable type c, with even space between them in all the rows ,when i tried it ,i'm gettin the following output
TOM...........20.03.2008.......... 02 : 37 : 40
HARRY............20.03.2008........... 01 : 37 : 40
DICK........... 20.03.2008......... 00 : 37 : 40
how to bring even space between then in all rows.
like
TOM.............20.03.2008.......... 02 : 37 : 40
HARRY.........20.03.2008.......... 01 : 37 : 40
DICK............ 20.03.2008.......... 00 : 37 : 40
(no dots , its only to represent blanks)
i've tried with SEPARATED BY SPACE, RESPECTING BLANKS, CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
nothing works.
Plz help
Regards
Prabumanoharan
2008 Mar 20 8:28 AM
You can use OFFSET operations.
Eg:
DATA: l_text TYPE char255.
LOOP AT itab INTO <wa>.
CLEAR l_text.
MOVE: <wa>-name TO l_text(20),
<wa>-date TO l_text+20(10),
<wa>-time TO l_text+30(10).
WRITE:/ l_text.
ENDLOOP.
2008 Mar 20 8:33 AM
Hi Prabhu,
DATA: w_txt TYPE char60.
write : w_name to w_txt(30),
w_date TO w_txt+35(10),
w_time TO w_txt+50(10).
regards,
Sachin
2008 Mar 20 8:53 AM
hey
i had the same issue a few weeks ago
i do a loop with this
LOOP AT ITAB
WRITE:/(20) VARIABLE 1.
WRITE (15) VARIABLE 2.
WRITE (15) VARIABLE 3.
ENDLOOP
regards
2008 Dec 22 6:40 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |