03-30-2009 9:26 PM
Hi Experts,
I have written few lines of code in "HTML_TOP_OF_PAGE" sub routine. This subroutine I am using in ALV. like below...
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = IT_FIELDS
IT_SORT = IT_SORT
I_SAVE = 'A'
IS_VARIANT = G_VARIANT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
I would like to reserve some lines for the top of page. i mean After displaying the data in top of page, ITAB data should be displayed.Now we can only visible three lines data only. still there are six lines are there. After displaying another six lines the Itab data should be displayed in ALV table.
Of course, we can drag down my data table. But user doesn't want to see without any efforts.
Pls help me.
Thanks in advance
Raghu
03-30-2009 9:50 PM
CALL METHOD document->add_gap
EXPORTING
width = 50. should help you..
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
DATA: text TYPE sdydo_text_element.
CALL METHOD document->add_gap
EXPORTING
width = 100.
text = 'Jay custom ALV'.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'HEADING'.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
text = 'User Name : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uname.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Date : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
DATA: zword TYPE string, zdd TYPE string, zmmm TYPE string,
zyyyy TYPE string, zfin TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
input = sy-datum
IMPORTING
output = zword.
zdd = zword+3(2).
zmmm = zword+0(3).
zyyyy = zword+7(2).
CONCATENATE zdd '-' zmmm '-' zyyyy INTO zfin.
text = zfin.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Time : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uzeit.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->new_line.
text = lv_count.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->new_line.
ENDFORM. "HTML_TOP_OF_PAGE
03-30-2009 9:50 PM
CALL METHOD document->add_gap
EXPORTING
width = 50. should help you..
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
DATA: text TYPE sdydo_text_element.
CALL METHOD document->add_gap
EXPORTING
width = 100.
text = 'Jay custom ALV'.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'HEADING'.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
CALL METHOD document->new_line.
text = 'User Name : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uname.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Date : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
DATA: zword TYPE string, zdd TYPE string, zmmm TYPE string,
zyyyy TYPE string, zfin TYPE string.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
input = sy-datum
IMPORTING
output = zword.
zdd = zword+3(2).
zmmm = zword+0(3).
zyyyy = zword+7(2).
CONCATENATE zdd '-' zmmm '-' zyyyy INTO zfin.
text = zfin.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->add_gap
EXPORTING
width = 50.
text = 'Time : '.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 6.
text = sy-uzeit.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->new_line.
text = lv_count.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = 'Key'.
CALL METHOD document->new_line.
ENDFORM. "HTML_TOP_OF_PAGE
03-30-2009 10:09 PM
It seems ...
CALL METHOD document->add_gap
EXPORTING
width = 50.
is creating gap between two fields/ texts. not in between top of page and itab body.
04-09-2009 3:31 PM
Any one got idea about this..
I need to display gap between ALV top of page and ALV grid.
Thanks
Raghu