2010 Jan 13 7:34 AM
Hi,
I want to display page no in list header through ALV OOPS. I'm using splitter class for separating top and grid.
CREATE OBJECT w_DYNDOC_ID
EXPORTING STYLE = 'ALV_GRID'.
*create custom container object and pass your contaoner name here
CREATE OBJECT go_custom_container
EXPORTING
container_name = 'CONTOL_ALV'. "CONTOL_ALV
* Create Splitter for custom_container
CREATE OBJECT w_splitter
EXPORTING
parent = go_custom_container
rows = 1
columns = 1.
CALL METHOD w_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = w_parent_top.
CALL METHOD w_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = w_parent_grid.
* Set height for g_parent_html
CALL METHOD w_splitter->set_row_height
EXPORTING
id = 1
height = 1.
But I'm unable to print any text in Header
Code Formatted by: Alvaro Tejada Galindo on Jan 13, 2010 4:27 PM
Hi,
I want to display page no in list header through ALV OOPS. I'm using splitter class for separating top and grid.
CREATE OBJECT w_DYNDOC_ID
EXPORTING STYLE = 'ALV_GRID'.
*create custom container object and pass your contaoner name here
CREATE OBJECT go_custom_container
EXPORTING
container_name = 'CONTOL_ALV'. "CONTOL_ALV
* Create Splitter for custom_container
CREATE OBJECT w_splitter
EXPORTING
parent = go_custom_container
rows = 1
columns = 1.
CALL METHOD w_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = w_parent_top.
CALL METHOD w_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = w_parent_grid.
* Set height for g_parent_html
CALL METHOD w_splitter->set_row_height
EXPORTING
id = 1
height = 1.
But I'm unable to print any text in Header
Code Formatted by: Alvaro Tejada Galindo on Jan 13, 2010 4:27 PM
2010 Jan 13 8:30 AM
Hi,
The following pattern might help you to display any text or logo in the header, but dynamically displaying page numbers is not possible yet, i believe.
DATA: go_document TYPE REF TO cl_dd_document.
...
...
CALL METHOD go_document->add_text
EXPORTING
text = lv_text
sap_emphasis = gc_strong.
...
...
CALL METHOD go_document->merge_document.
CALL METHOD go_document->display_document
EXPORTING
parent = *bold* w_parent_top *bold* .
2010 Jan 13 9:33 AM
Hi Ranjan,
I have already written out those statement. see below code
call method p_dyndoc_id->add_text
EXPORTING
text = 'Demo Top'
sap_style = cl_dd_area=>heading
sap_fontsize = cl_dd_area=>large
sap_color = cl_dd_area=>list_heading_int.
* p_dyndoc_id = w_dyndoc_id.
CALL METHOD p_dyndoc_id->merge_document.
CALL METHOD p_dyndoc_id->display_document
EXPORTING
reuse_control = 'X'
parent = w_parent_top
EXCEPTIONS
html_display_error = 1.
IF sy-subrc NE 0.
MESSAGE i398(00) WITH 'Error in displaying top-of-page'(036).
ENDIF.
ENDFORM. " EVENT_TOP_OF_PAGE
Still text is not comming in header.
Code Formatted by: Alvaro Tejada Galindo on Jan 13, 2010 4:27 PM
2010 Jan 13 9:13 AM
Please check [Alv with page number|http://www.henrikfrank.dk/abaptips/abap%20language/other%20stuff/alv%20grid%20-%20page%20numbering%20problem.html]