10-12-2006 11:26 AM
10-12-2006 11:28 AM
HI Johnn,
Please specify what approach are you using for ALV
a) OOPs
b) Function Module.
Anyway I think in the previous post, this solution was given. please check
Manish
Message was edited by: Manish Kumar
10-12-2006 11:31 AM
I am trying to do it in OOps.
Please tell me the method & class name clearly.
10-12-2006 11:34 AM
If u want to make a cell/row values in bold, check the below step.
In the final internal table declare a field celltab TYPE lvc_t_styl,
In the layout give it as wa_layout-stylefname = 'CELLTAB'.
Read the final internal table with the field name and row/cell u want to make it as bold. Do the below coding.
READ TABLE i_final_data INTO wa_final_data INDEX 1.
ls_celltab-fieldname = 'LNG_TYPES'.
ls_celltab-style = '00000060'.
INSERT ls_celltab INTO TABLE lt_celltab.
CLEAR ls_celltab.
Here <b>ls_celltab-style = '00000060'.</b> will make that cell in bold.
Regards,
Prakash.
10-12-2006 11:34 AM
Hi
Check out the sample code:
*-- ALV Grid data declaration
----
CLASS v_lcl_event_receiver DEFINITION
----
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_print_top_of_page FOR EVENT print_top_of_page OF
cl_gui_alv_grid,
handle_top_of_page FOR EVENT top_of_page OF
cl_gui_alv_grid,
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
ENDCLASS. "o_lcl_event_receiver DEFINITION
data: o_html TYPE REF TO cl_dd_document.
*
DATA: lws_text TYPE sdydo_text_element.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
*-- Object for HTML top container
CREATE OBJECT o_html
EXPORTING style = 'ALV_GRID'
background_color = 35.
*-- Top of Page
CALL METHOD o_alvgrid->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_html.
*
*-- Total Record Text
CALL METHOD o_html->add_text
EXPORTING
text = 'Header 1'
sap_emphasis = 'STRONG'. " for bold
*
CALL METHOD o_html->add_gap
EXPORTING
width = 8.
lws_text = 'Header 2'.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = 'STRONG'. " for bold
CLEAR lws_text.
CALL METHOD o_html->new_line
EXPORTING
repeat = 1.
Reward points if this helps.
Manish
10-12-2006 1:12 PM
Hai manish,
I cannot call this method ..........
what is the class name & method name for this.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = 'STRONG'. " for bold
Message was edited by: Johnn Abraham
10-12-2006 2:48 PM
data: o_html TYPE REF TO cl_dd_document,
CREATE OBJECT o_html
EXPORTING style = 'ALV_GRID'
background_color = 35.
CALL METHOD o_alvgrid->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_header.
CALL METHOD o_html->new_line
EXPORTING
repeat = 0.
-- No of Installation
CALL METHOD o_header->add_text
EXPORTING
text = text-022 "No of Installations
sap_emphasis = text-023. " STRONG
sap_emphasis = Strong will make the text in bold.
Regards,
Prakash.
10-12-2006 11:35 AM