2008 May 09 3:51 AM
hi all,
I am concatenating 3 fields date,time, order number as
below
DATA: W_TOP TYPE SLIS_LISTHEADER,
T_TOP LIKE STANDARD TABLE OF W_TOP.
W_TOP-TYP = 'S'.
CONCATENATE 'DATE:' SY-DATUM
'TIME:' SY-UZEIT
'ORDER NUMBER:' P_VBELN INTO
W_TOP-INFO.
APPEND W_TOP TO T_TOP.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_TOP
I_LOGO = 'GE_LOGO'
i am getting the output as
DATE:20080508TIME:224326ORDERNO:12
i.e i am not getting the spaces between the fields
But i must get the output as i.e i must get the output with spaces
DATE:2008050 TIME:224326 ORDERNO:12
reply ASAP.
hi all,
I am concatenating 3 fields date,time, order number as
below
DATA: W_TOP TYPE SLIS_LISTHEADER,
T_TOP LIKE STANDARD TABLE OF W_TOP.
W_TOP-TYP = 'S'.
CONCATENATE 'DATE:' SY-DATUM
'TIME:' SY-UZEIT
'ORDER NUMBER:' P_VBELN INTO
W_TOP-INFO.
APPEND W_TOP TO T_TOP.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_TOP
I_LOGO = 'GE_LOGO'
i am getting the output as
DATE:20080508TIME:224326ORDERNO:12
i.e i am not getting the spaces between the fields
But i must get the output as i.e i must get the output with spaces
DATE:2008050 TIME:224326 ORDERNO:12
reply ASAP.
2008 May 09 4:04 AM
2008 May 09 4:40 AM
Hi,
Use the extension seperated by Space in Concatenate. i.e.
CONCATENATE 'DATE:' SY-DATUM
'TIME:' SY-UZEIT
'ORDER NUMBER:' P_VBELN INTO
W_TOP-INFO separated by space.
Regards
Raju Chitale
2008 May 09 4:46 AM
CONCATENATE 'DATE:' SY-DATUM into vl_1.
condense vl_1 no gaps.
CONCATENATE 'TIME:' SY-UZEIT into vl_2.
condense vl_2 no gaps.
CONCATENATE 'ORDER NUMBER:' P_VBELN INTO vl_3.
condense vl_3 no gaps.
CONCATENATE vl_1 vl_2 vl_3 into W_TOP-INFO seperated by space.
2008 May 09 5:34 AM
hi jacjandjay,
how shud v declare V1_1 V1_2 v1_3 .I shud get more space in between the fieldsreply ASAP.
2008 May 09 4:47 AM
Hi ,
As said by Eric try to do this way
CONCATENATE 'DATE:' SY-DATUM
' TIME:' SY-UZEIT
' ORDER NUMBER:' P_VBELN INTO
W_TOP-INFO.
APPEND W_TOP TO T_TOP.try to give Space before TIME and ORDER NUMBER in ' ' (cotetions).
or u can write seperated by space.
Best regards,
raam
2008 May 09 5:31 AM
hi raam,
i tried this but it is giving only single space.i want more space between each field.Please reply ASAP
2008 May 09 4:59 AM
Hi try this,
CONCATENATE 'DATE:' SY-DATUM ` `
'TIME:' SY-UZEIT ` `
'ORDER NUMBER:' P_VBELN ` ` INTO
W_TOP-INFO.
regards,
kk.
2008 May 09 5:27 AM
hi raju,
i tried this but it is giving only single space.i want more space between each field.Please reply ASAP
2008 May 09 5:30 AM
hi,
i tried this but it is giving only single space.i want more space between each field.Please reply ASAP
2008 May 09 5:31 AM
CONCATENATE 'DATE:' SY-DATUM
'TIME:' SY-UZEIT
'ORDER NUMBER:' P_VBELN INTO
W_TOP-INFO
SEPARATED BY ' '.
in the ' ' give space that you want to have in the fields...
OTHERWISE
CONCATENATE 'DATE : ' SY-DATUM ' '
'TIME : ' SY-UZEIT ' '
'ORDER NUMBER : ' P_VBELN INTO ' '
W_TOP-INFO.
Edited by: Sharayu Kumatkar on May 9, 2008 10:01 AM
2008 May 09 5:38 AM
Hi,
In that case you I don not think you can do it using concatenatation. However it could be achieved as follows:
DATA w_c(100).
w_date(13),
w_time(13),
w_i type I, w_no_of_spaces_required(1) value '5'.
w_orderno(23).
CONCATENATE 'DATE:' SY-DATUM
Into w_date.
w_c = w_date.
Concatenate
'TIME:' SY-UZEIT into w_time.
w_i = 13 + w_no_of_spaces_required.
w_c+w_i = w_time.
Concatenate
'ORDER NUMBER:' P_VBELN INTO
w_orderno.
w_i = 13 + w_no_of_spaces_required.
w_c+w_i = w_orderno.
W_TOP-INFO = w_c.
In the above logic it is assumedthat you require 5 spaces in between. You change the value of the variable w_no_of_spaces_required from '5' to whatever you want.
I hope this helps,
Regards
Raju Chitale
2008 May 09 6:55 AM
hi raju,
i tried this but i am getting only single space ,i want more no : of spaces.reply ASAP .i got the output as
DATE:20080509 ORDER NUMBER:0000000012
2008 May 09 7:40 AM
Hi,
I have tried this & its working fine. Just copy:
DATA:w_c(100),
p_vbeln(10) value '1234567890',
w_date(13),
w_time(13),
w_i type I, w_no_of_spaces_required(1) value '5',
w_orderno(23).
CONCATENATE 'DATE:' SY-DATUM
Into w_date.
w_c = w_date.
Concatenate
'TIME:' SY-UZEIT into w_time.
w_i = 13 + w_no_of_spaces_required.
w_c+w_i = w_time.
Concatenate
'ORDER NUMBER:' P_VBELN INTO
w_orderno.
w_i = 29 + w_no_of_spaces_required.
w_c+w_i = w_orderno.
Regards
Raju Chitale
2008 May 09 12:35 PM
hi raju,
the code u have given is working for REUSE_ALV_LIST_DISPLAY when i am using TOP_OF_LIST event.
But it is not working for REUSE_ALV_GRID_DISPLAY when i am using TOP_OF_PAGE.I have to display using grid.Reply ASAP.
Can we use loop for REUSE_ALV_LIST_DISPLAY?reply ASAP.
2008 May 09 1:05 PM
Hi,
Just before calling the ALV_GRID_DISPLAY,
DATA: t_list_top_of_page TYPE slis_t_listheader.
PERFORM comment_build USING t_list_top_of_page[].
*
FORM comment_build USING e04_lt_top_of_page TYPE slis_t_listheader.
*
REFRESH : e04_lt_top_of_page.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = 'REPORT HEADING'.
APPEND ls_line TO e04_lt_top_of_page.
CLEAR ls_line.
ls_line-typ = 'S'.
Use your Concatenation logic here & put your final string i.e. w_c into ls_line-info.
i.e. ls_line-info = w_c.
APPEND ls_line TO e04_lt_top_of_page.
CLEAR ls_line.
Your TOP OF PAGE should be as follows:
TOP-OF-PAGE.
PERFORM top_of_page.
*
FORM top_of_page. *
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_list_top_of_page
ENDFORM.
I hope this helps,
Regards
Raju Chitale
Edited by: Raju Chitale on May 9, 2008 2:05 PM
2008 May 09 1:53 PM
2008 May 09 5:35 AM
W_TOP-TYP = 'S'.
CONCATENATE 'DATE:' SY-DATUM
' TIME:' SY-UZEIT
' ORDER NUMBER:' P_VBELN INTO
W_TOP-INFO.
APPEND W_TOP TO T_TOP.
try this you will get the output.
Regards,
Madan.
2008 May 09 5:55 AM
Hi,
Change your code like this.
1.CONCATENATE 'DATE:' SY-DATUM into Date.(this is taken as variable)
2.CONCATENATE 'TIME:' SY-UZEIT into time.
3.CONCATENATE 'ORDER NUMBER:' P_VBELN into order.
4.CONCATENATE date time order into W_TOP-INFO seperated by SPACE.
5.Append
Note: take date,time and order as chanracter type variables.
Reward,if useful.
thanks,
Chandu
2008 May 09 6:08 AM
hi chandu,
i tried this but i am getting only single space.I want more space.reply ASAP
2008 May 09 7:59 AM
Hi,
Have a look on the following example and change your code.
data: sep2(5) type c.
concatenate 'a' ' e' into sep2.
or
concatenate 'a ' 'e' into sep2.
write: sep2.
Give the spaces before/after the variables.
Reward,if useful.
thanks,
Chandu
2008 May 09 7:23 AM
Hi,
define a variable as
Data: SEP(3) value ' '. " This will create a space of 3 char
and then write this:
CONCATENATE 'DATE:' SY-DATUM
'TIME:' SY-UZEIT
'ORDER NUMBER:' P_VBELN INTO
W_TOP-INFO separated by sep.
Cheers,
Saurabh
2008 May 09 8:37 AM
DATA: W_TOP TYPE SLIS_LISTHEADER,
T_TOP LIKE STANDARD TABLE OF W_TOP.
DATA:
W_DATE(15),
W_TIME(15),
W_NUM(20).
W_TOP-TYP = 'S'.
CONCATENATE 'DATE:' SY-DATUM INTO W_DATE.
CONCATENATE 'TIME:' SY-UZEIT INTO W_TIME .
CONCATENATE 'ORDER NUMBER:' P_VBELN INTO W_NUM .
CONCATENATE W_DATE W_TIME W_NUM INTO W_TOP-INFO SEPARATED BY SPACE.
APPEND W_TOP TO T_TOP.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_TOP
I_LOGO = 'GE_LOGO'
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |