04-17-2012 6:59 AM
hi ,
Name Capital
Andhra Pradesh
Hyderabad
Visakhapatnam
Warangal
Nellore
This is the output I am getting now but I should get like the below data
Name Capital
Andhra Pradesh
Hyderabad
Visakhapatnam
Warangal
Nellore
for state name extreme left and for distric they need some space as i shown in.
This is ALV Report
Please help meee
04-17-2012 7:25 AM
Hi,
Use ' HTML_TOP_OF_PAGE' for your requirment.
***********************************************
FORM html_top_of_page USING lcl_document
TYPE REF TO cl_dd_document.
DATA: lv_text(255) TYPE c.
lv_text = 'Name'(100).
CALL METHOD lcl_document->add_text
EXPORTING
text = lv_text
sap_emphasis = cl_dd_area=>strong " For bold
sap_style = cl_dd_area=>heading
sap_fontsize = cl_dd_area=>large
sap_color = cl_dd_area=>list_heading_int.
CLEAR : lv_text.
* Adding GAP
CALL METHOD lcl_document->add_gap
EXPORTING
width = 130.
lv_text = 'Capital(101).
CALL METHOD lcl_document->add_text
EXPORTING
text = lv_text
sap_emphasis = cl_dd_area=>strong " For bold
sap_style = cl_dd_area=>heading
sap_fontsize = cl_dd_area=>large
sap_color = cl_dd_area=>list_heading_int.
CLEAR : lv_text.
* Add new-line
CALL METHOD lcl_document->new_line.
ENDFORM. "html_top_of_page
*********************************
Thanks & Regards
Bala Krishna
04-17-2012 7:25 AM
Hi,
Use ' HTML_TOP_OF_PAGE' for your requirment.
***********************************************
FORM html_top_of_page USING lcl_document
TYPE REF TO cl_dd_document.
DATA: lv_text(255) TYPE c.
lv_text = 'Name'(100).
CALL METHOD lcl_document->add_text
EXPORTING
text = lv_text
sap_emphasis = cl_dd_area=>strong " For bold
sap_style = cl_dd_area=>heading
sap_fontsize = cl_dd_area=>large
sap_color = cl_dd_area=>list_heading_int.
CLEAR : lv_text.
* Adding GAP
CALL METHOD lcl_document->add_gap
EXPORTING
width = 130.
lv_text = 'Capital(101).
CALL METHOD lcl_document->add_text
EXPORTING
text = lv_text
sap_emphasis = cl_dd_area=>strong " For bold
sap_style = cl_dd_area=>heading
sap_fontsize = cl_dd_area=>large
sap_color = cl_dd_area=>list_heading_int.
CLEAR : lv_text.
* Add new-line
CALL METHOD lcl_document->new_line.
ENDFORM. "html_top_of_page
*********************************
Thanks & Regards
Bala Krishna
04-17-2012 8:07 AM
hi,
this one is not header gap I am asking
I need gap in the records which i am getting from data base i.e, for row
04-17-2012 8:23 AM
Hi,
The while filling up the final output internal table, when ever a District name is there concatenate few spaces( ALT key + 255 ) ASCII number for space or cl_abap_char_utilities=>cr_lf to give space.
Statename
wa_output-name = wa_temp-name.
District name
CONSTANTS :
c_con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
CONCATENATE c_con_cret c_con_cret c_con_cret wa_temp-name INTO
wa_output-name.
Thanks & Regards
Bala Krishna
04-17-2012 8:35 AM
hi ,
in the debug mode in the internal table i am getting space for those rows but while display i am not getting what i required
04-17-2012 9:07 AM
Hi,
Try the other method, create a constant with 10 spaces using ALT key + 255. Then use that to concatenate.
CONSTANTS : c_10space TYPE c LENGTH 10 VALUE ' '. " The space should be by pressing (ALT+255).
CONCATENATE c_10space wa_temp-name INTO
wa_output-name.
Thanks & Regards
Bala Krishna
04-17-2012 9:24 AM
04-18-2012 4:50 AM
Hi,
If it is resolved, please close the thread.
Thanks & Regards
Bala Krishna
04-18-2012 5:04 AM
Hi Shek Syed,
you can declare the space constant as following :
CONSTANTS : c_tab TYPE abap_char1 VALUE
cl_abap_char_utilities=>horizontal_tab.
Then you can follow the procedure suggested by Mr. Balakrishna. Thank you.
Regards,
kartik