2009 Jun 27 1:24 AM
Hi,
Is the Fm reuse_alv_commentary_write only option to display the header in alv grid reports.
Actual in an grid based report I have to disply the header exactly wwith uname,date etc being displayed at various positions(diferent rows with required gaps).
could anyone let me know how to trace out this positions. Also, could anyone let me know how to paste a small piece of screen shot while posting the issues. So that I can show it clearly.
Thanks
Natasha SS
2009 Jun 27 4:01 AM
Hi Natasha,
<li><font color='red'>could anyone let me know how to paste a small piece of screen shot while posting the issues. So that I can show it clearly.</font>
1. First upload your screen shot to any forum or blog and paste the link here.
<li>Regarding header as you requested, we should not use REUSE_ALV_COMMENTORY_WRITE function module. You have to follow the code to get as u requested. Instead using TOP_OF_PAGE event, you have to use HTML_TOP_OF_PAGE event.
<li>Then pass this subroutine through function module.
*&---------------------------------------------------------------------*
*& Form top_of_page
*&---------------------------------------------------------------------*
FORM top_of_page USING document TYPE REF TO cl_dd_document.
DATA:
l_text TYPE sdydo_text_element.
l_text = 'xyz'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_emphasis = cl_dd_document=>strong
sap_style = cl_dd_document=>key.
CALL METHOD document->new_line.
l_text = 'lmn'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_document=>medium
sap_color = cl_dd_document=>list_positive
sap_style = cl_dd_document=>key.
CALL METHOD document->underline.
CALL METHOD document->add_gap
EXPORTING
width = '25'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_document=>medium
sap_color = cl_dd_document=>list_positive
sap_style = cl_dd_document=>key.
ENDFORM. "top_of_page
I hope that it helps you.
Thanks
Venkat.O
DATA :l_program TYPE sy-repid.
l_program = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_program
i_callback_html_top_of_page = 'TOP_OF_PAGE'
is_layout = w_layout
it_events = i_events
it_fieldcat = i_fieldcat
TABLES
t_outtab = i_pa0001.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Hi Natasha,
<li><font color='red'>could anyone let me know how to paste a small piece of screen shot while posting the issues. So that I can show it clearly.</font>
1. First upload your screen shot to any forum or blog and paste the link here.
<li>Regarding header as you requested, we should not use REUSE_ALV_COMMENTORY_WRITE function module. You have to follow the code to get as u requested. Instead using TOP_OF_PAGE event, you have to use HTML_TOP_OF_PAGE event.
<li>Then pass this subroutine through function module.
*&---------------------------------------------------------------------*
*& Form top_of_page
*&---------------------------------------------------------------------*
FORM top_of_page USING document TYPE REF TO cl_dd_document.
DATA:
l_text TYPE sdydo_text_element.
l_text = 'xyz'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_emphasis = cl_dd_document=>strong
sap_style = cl_dd_document=>key.
CALL METHOD document->new_line.
l_text = 'lmn'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_document=>medium
sap_color = cl_dd_document=>list_positive
sap_style = cl_dd_document=>key.
CALL METHOD document->underline.
CALL METHOD document->add_gap
EXPORTING
width = '25'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_document=>medium
sap_color = cl_dd_document=>list_positive
sap_style = cl_dd_document=>key.
ENDFORM. "top_of_page
I hope that it helps you.
Thanks
Venkat.O
DATA :l_program TYPE sy-repid.
l_program = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_program
i_callback_html_top_of_page = 'TOP_OF_PAGE'
is_layout = w_layout
it_events = i_events
it_fieldcat = i_fieldcat
TABLES
t_outtab = i_pa0001.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2009 Jun 27 4:01 AM
Hi Natasha,
<li><font color='red'>could anyone let me know how to paste a small piece of screen shot while posting the issues. So that I can show it clearly.</font>
1. First upload your screen shot to any forum or blog and paste the link here.
<li>Regarding header as you requested, we should not use REUSE_ALV_COMMENTORY_WRITE function module. You have to follow the code to get as u requested. Instead using TOP_OF_PAGE event, you have to use HTML_TOP_OF_PAGE event.
<li>Then pass this subroutine through function module.
*&---------------------------------------------------------------------*
*& Form top_of_page
*&---------------------------------------------------------------------*
FORM top_of_page USING document TYPE REF TO cl_dd_document.
DATA:
l_text TYPE sdydo_text_element.
l_text = 'xyz'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_emphasis = cl_dd_document=>strong
sap_style = cl_dd_document=>key.
CALL METHOD document->new_line.
l_text = 'lmn'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_document=>medium
sap_color = cl_dd_document=>list_positive
sap_style = cl_dd_document=>key.
CALL METHOD document->underline.
CALL METHOD document->add_gap
EXPORTING
width = '25'.
CALL METHOD document->add_text
EXPORTING
text = l_text
sap_fontsize = cl_dd_document=>medium
sap_color = cl_dd_document=>list_positive
sap_style = cl_dd_document=>key.
ENDFORM. "top_of_page
I hope that it helps you.
Thanks
Venkat.O
DATA :l_program TYPE sy-repid.
l_program = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_program
i_callback_html_top_of_page = 'TOP_OF_PAGE'
is_layout = w_layout
it_events = i_events
it_fieldcat = i_fieldcat
TABLES
t_outtab = i_pa0001.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2009 Jun 27 10:57 AM
Hi,
You can use the Write statement in the TOP_OF_PAGE to write the contents in the Top of Page instead of using FM reuse_alv_commentary_write .
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |