09-06-2008 7:51 AM
HI ALL,,
I want to put some space between to words in header part of alv report . my code is following.
CONCATENATE 'Vendor : ' LIFNR1 ' '
INTO
L_LIST .
I want to put some extra space after " Vendor " word.
plz help me...
09-06-2008 8:09 AM
Hi,
Use the addition Respecting Blanks with Concatenate.
Try like this;
Data : lv_vendor(20) type c value 'Vendor :'.
CONCATENATE lv_vendor lifnr1 INTO l_list RESPECTING BLANKS.
The output would like;
Vendor : 10000000
For more information see F1 help for Concatenate.
Regards
Karthik D
09-06-2008 8:00 AM
09-06-2008 8:01 AM
Hi Ankita,
try this code-
CONCATENATE 'Vendor : ' LIFNR1
INTO
L_LIST separated by space.
09-06-2008 8:05 AM
Hi Ankita,
try it this way:
Data:
w_string type string,
w_char(5) value ' '.
CONCATENATE 'Vendor:' LIFNR1 ' '
INTO
w_string separated by w_char.
Write:
w_string.
With luck,
Pritam.
09-06-2008 8:09 AM
Hi,
Use the addition Respecting Blanks with Concatenate.
Try like this;
Data : lv_vendor(20) type c value 'Vendor :'.
CONCATENATE lv_vendor lifnr1 INTO l_list RESPECTING BLANKS.
The output would like;
Vendor : 10000000
For more information see F1 help for Concatenate.
Regards
Karthik D
09-06-2008 9:21 AM
Karthik,
"RESPECTING BLANKS " IS NOT WORKING...
But i want same output as u put here.
09-06-2008 9:32 AM
Hi,
What is the length of l_list field?
Try like this it is working fine.
DATA : l_list(30) TYPE c.
DATA : lv_vendor(20) TYPE c VALUE 'Vendor :'.
CONCATENATE lv_vendor lifnr INTO l_list RESPECTING BLANKS.
Regards
Bala Krishna
09-06-2008 9:33 AM
one such option.
Data : text(50) .
text+0(6) = 'Hello'.
text+20(10) = 'world' .
write text.
09-06-2008 9:35 AM
Hi,
check this code-
Data : w_vendor(20) type c value 'Vendor :'.
Parameters:p_lifnr type lifnr.
Data:l_list type string.
CONCATENATE w_vendor p_lifnr INTO l_list respecting blanks.
write:l_list.
09-06-2008 9:35 AM
another option with concatenate.
Data : text(50) .
concatenate 'hello' ` ` 'world' into text.
write text.
09-06-2008 9:35 AM
Bala...
when i m using "RESPECTING BLANKS" it gives error.
I am able to use only separated by space.
Plz help me..
09-06-2008 9:38 AM
Hi ,
try this code-
Data : w_vendor(20) type c value 'Vendor :',
w_space(8) type c.
Parameters:p_lifnr type lifnr.
Data:l_list type string.
CONCATENATE w_vendor p_lifnr INTO l_list separated by w_space.
write:l_list.
09-06-2008 9:47 AM
hi ankita,
As i said its working fine for me. You need to declare all variables considering the length, so declare variables with appropriate length and try again.
Regards
Karthik D
<removed_by_moderator>
Edited by: Julius Bussche on Sep 6, 2008 10:52 AM
09-06-2008 10:57 AM
>
> hi ankita,
>
> As i said its working fine for me. You need to declare all variables considering the length, so declare variables with appropriate length and try again.
>
>
> Regards
> Karthik D
>
> <removed_by_moderator> -
> Before asking [others|; to follow the rules, you might want to straighten up your own mess
pk
Edited by: Julius Bussche on Sep 6, 2008 10:53 AM
09-06-2008 11:12 AM
09-06-2008 11:22 AM
I m using alv grid control...
and for top of page code is like follow ....
FORM SUB_COMMENT_BUILD USING I_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
DATA : W1(30) TYPE C.
DATA : LV_VENDOR(20) TYPE C VALUE 'Vendor :',
CLEAR LS_LINE.
CONCATENATE LV_VENDOR ' ' LIFNR1 INTO L_LIST.
LS_LINE-TYP = 'S'.
LS_LINE-INFO = L_LIST.
APPEND LS_LINE TO I_TOP_OF_PAGE.
endform.
09-06-2008 11:26 AM
if you don't give the complete details , you will never get the solution..
check this Program.. in this example you can give the gap using the ADD_GAP method.
report ztest_page.
tables: sflight.
data : it_flight type table of sflight with header line.
data begin of it_sel_opt occurs 0.
include structure rsparams.
data end of it_sel_opt.
select-options: s_carrid for sflight-carrid.
start-of-selection.
select * from sflight into table it_flight
where carrid in s_carrid.
end-of-selection.
call function 'RS_REFRESH_FROM_SELECTOPTIONS'
exporting
curr_report = sy-repid
tables
selection_table = it_sel_opt
exceptions
not_found = 01
no_report = 02.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_html_top_of_page = 'TOP_OF_PAGE'
i_structure_name = 'SFLIGHT'
tables
t_outtab = it_flight
exceptions
program_error = 1
others = 2.
*&---------------------------------------------------------------------*
*& Form top_of_page
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->DOCUMENT text
*----------------------------------------------------------------------*
form top_of_page using document type ref to cl_dd_document.
data : dl_text(255) type c. "Text
* Add new-line
call method document->new_line.
call method document->new_line.
clear : dl_text.
* program ID
dl_text = 'Program Name :'.
call method document->add_gap.
call method document->add_text
exporting
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_heading_int.
clear dl_text.
dl_text = sy-repid.
call method document->add_text
exporting
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
call method document->new_line.
clear : dl_text.
dl_text = 'Selection Criteria'.
call method document->add_gap
exporting
width = 34.
call method document->add_text
exporting
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
call method document->new_line.
clear : dl_text.
concatenate 'SELECT Option' 'SIGN' 'OPTION' 'LOW' 'HIGH'
into dl_text separated by cl_abap_char_utilities=>horizontal_tab.
call method document->add_gap
exporting
width = 34.
call method document->add_text
exporting
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
call method document->new_line.
loop at it_sel_opt.
clear : dl_text.
concatenate it_sel_opt-selname it_sel_opt-sign
it_sel_opt-option it_sel_opt-low it_sel_opt-high
into dl_text separated by cl_abap_char_utilities=>horizontal_tab.
call method document->add_gap
exporting
width = 34.
call method document->add_text
exporting
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
call method document->new_line.
endloop.
endform. "top_of_page
09-06-2008 11:31 AM
Hi...
I had already given full detail... and i m not using OOP concept...
Plz help me.
09-06-2008 11:45 AM
the above is not OOALV, it is normal alv. and this is using class cl_dd_document. with then you can align the TOP OF PAGE text what ever the way you want..
using the methods ADD_GAP of class CL_DD_DOCUMENT.
09-06-2008 11:48 AM
>
> P.S.: Award Points for useful replies... -
> Before asking [others|; to follow the rules, you might want to straighten up your own mess
Hi prashanth,
I know very well about the rules of the forum and here also iam not requesting her to give points to me...
I know that requesting points is a offense by the rules of engagement, i would like to remind you that Assigning Points to useful replies is the responsibility of the thread starter.
I have just reminded her about that. I dont think there is a offense in that.
>
Step 4: Thank Others by Giving Points
>SDN/BPX has a Contributor Recognition Program. Which in short text means that for each question you have 10 points, which can be given to the person that answers your question. 6 & 2 points should also be given for helpful answers. For every question you later award points for, you in turn receive 1 point for. Please note that you do not need to explain that "points will be awarded". We should all know how the forum works.
Just thought to let you know this...Also keep in mind that no one is getting points credited to their bank accounts, all points are contributed towards [UN World Food Program|https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/007928c5-c4ef-2a10-d9a3-8109ae621a82]...
Thanks for your advice....
Regards
Karthik D
09-06-2008 11:57 AM
> I have just reminded her about that. I dont think there is a offense in that.
Hi there,
This reminder is already included in the rules and in the email watches sent together with posts, so there is no reason to add it in the post.
So please stop this here and continue with the question.
Cheers,
Julius
09-06-2008 11:57 AM
No post should consists of Points that is the Main Motivation behind the rule. No point begging here.
It is left to the poster, You should not even suppose to mention the word points according to Rules of Engagement .
Edited by: Vijay Babu Dudla on Sep 6, 2008 6:58 AM
09-06-2008 12:11 PM
>
>
> You should not even suppose to mention the word points according to Rules of Engagement .
>
> Edited by: Vijay Babu Dudla on Sep 6, 2008 6:58 AM
Cool..
but you have mentioned that word ???
Hey, leave it vijay,.....we are not here to exchange words, we are here to exchange knowledge...
Regards
Karthik D
09-06-2008 12:15 PM
Hey..
What all r u doing?? I am asking for help and u all are worried about points??
09-06-2008 12:20 PM
> but you have mentioned that word ???
I just mentioned to explain. Moderators are working every day to remove all these junk. it is an extra work which is causing the trouble for many of the Mods. They will remove this also. So we should keep the forum quality and control thats why we have rules. My aim to tell the importance of the rules. not to exchange of any words. Sorry my words are hurting you. as a community member i just gave the information. it is up to you to follow or not.
Ignore my message if you don't like.
09-06-2008 12:49 PM
Hi,
Even in Debugger it is showing the value of w1 with spaces, may be the code of Function Module some where it is suppressing the values of space.
Just check in debugger the value of ur L_LIST value.
FORM build_comment USING p_heading TYPE slis_t_listheader.
DATA: hline TYPE slis_listheader.
DATA : w1(45) TYPE c.
DATA : lv_vendor(20) TYPE c VALUE 'Vendor :'.
DATA : lifnr1 TYPE lifnr VALUE '10001'.
CLEAR: hline.
w1+0(6) = lv_vendor.
w1+8(1) = ':'.
w1+35(10) = lifnr1.
hline-typ = 'S'.
hline-info = w1.
APPEND hline TO p_heading.
BREAK-POINT.
ENDFORM. " BUILD_COMMENT
Regards,
Bala Krishna
09-08-2008 5:25 AM
>
> hi ankita,
>
> As i said its working fine for me. You need to declare all variables considering the length, so declare variables with appropriate length and try again.
>
>
> Regards
> Karthik D
>
> <removed_by_moderator>
>The only justification i ever need to make.>
> Edited by: Julius Bussche on Sep 6, 2008 10:52 AM
09-06-2008 11:10 AM
hi,
CONCATENATE lv_dokar lv_doknr '...
no.of spaces u required..
' lv_doktl lv_dokvr INTO lv_objkt.
by
parthi
09-06-2008 11:19 AM
09-08-2008 5:35 AM
hi,
Please use the following , it will surely work.
concatenate 'vendor : ' 'Alt key+pressNumpadkey255' 'Lifnr1' into l_list.
Pressing alt 255 will give you a single space. if you want to leave two spaces then press two time alt 255 key.
I have used this to leave space. Try this. it will work..
09-19-2008 11:18 AM
Hi,
Is it your SAP version is lower that ECC 6.0?
I had tested the Respecting Blanks in ECC 5.0, and it is not working. But it is working in another ECC 6 system.
Perhaps it only working in ECC 6.0 system.
thanks:)
10-22-2008 6:20 PM
I think it's too late but you can do that:
concatenate data1 ' ' data2
into data3 separated by space.
And the result (in abap program) look like what you want.
tata______toto ( __ is some blank)
Edited by: Pierron Fred on Oct 22, 2008 7:20 PM
12-29-2008 5:41 AM