<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FORM e04_comment_build in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203777#M131605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi liat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since it is ALV , and what is this FM you are using .&lt;/P&gt;&lt;P&gt;if it is ALV list display FM you can use normal write statements but if it is Grid FM then it will display the Top of page and are you  using fm &amp;lt;b&amp;gt;REUSE_ALV_COMMENTARY_WRITE&amp;lt;/b&amp;gt; in your top_of_page event.&lt;/P&gt;&lt;P&gt;check it once.&lt;/P&gt;&lt;P&gt;show your code,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Mar 2006 10:27:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-03-29T10:27:05Z</dc:date>
    <item>
      <title>FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203775#M131603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I MADE THIS FORM AND I DONT GET DATA AT THE TOP OF THE PAGE&lt;/P&gt;&lt;P&gt;WHY?&lt;/P&gt;&lt;P&gt;AND IN THE PRINT I GET THE DATA BUT SMALL&lt;/P&gt;&lt;P&gt;FORM e04_comment_build USING e04_lt_top_of_page TYPE&lt;/P&gt;&lt;P&gt;slis_t_listheader.&lt;/P&gt;&lt;P&gt;  DATA: ls_line TYPE slis_listheader.&lt;/P&gt;&lt;P&gt;  DATA  zline type i.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CLEAR e04_lt_top_of_page .&lt;/P&gt;&lt;P&gt;  REFRESH e04_lt_top_of_page .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CLEAR ls_line.&lt;/P&gt;&lt;P&gt;  ls_line-typ  = 'H'.&lt;/P&gt;&lt;P&gt;   ls_line-key  = ''.  &lt;/P&gt;&lt;P&gt;  ls_line-info = 'PO report'(001).&lt;/P&gt;&lt;P&gt;  APPEND ls_line TO e04_lt_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR ls_line.&lt;/P&gt;&lt;P&gt;  ls_line-typ = 'S'.&lt;/P&gt;&lt;P&gt;  ls_line-key = text-011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONCATENATE sy-datum&lt;EM&gt;6(2) '/' sy-datum&lt;/EM&gt;4(2) '/' sy-datum(4)&lt;/P&gt;&lt;P&gt;    '&amp;amp;&amp;amp;' sy-uzeit(2) ':' sy-uzeit+2(2)&lt;/P&gt;&lt;P&gt;    INTO ls_line-info.&lt;/P&gt;&lt;P&gt;    REPLACE '&amp;amp;&amp;amp;' WITH '  ' INTO ls_line-info.&lt;/P&gt;&lt;P&gt;  APPEND ls_line TO e04_lt_top_of_page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 10:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203775#M131603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T10:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203776#M131604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; TOP OF PAGE will be triggered when there is any data to display, do u have any data to be displayed below top of page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as by the definition of top of page it will be triggered after it sees first write statement in the program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 10:22:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203776#M131604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T10:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203777#M131605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi liat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since it is ALV , and what is this FM you are using .&lt;/P&gt;&lt;P&gt;if it is ALV list display FM you can use normal write statements but if it is Grid FM then it will display the Top of page and are you  using fm &amp;lt;b&amp;gt;REUSE_ALV_COMMENTARY_WRITE&amp;lt;/b&amp;gt; in your top_of_page event.&lt;/P&gt;&lt;P&gt;check it once.&lt;/P&gt;&lt;P&gt;show your code,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 10:27:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203777#M131605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T10:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203778#M131606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you are using REUSE_ALV_LIST_DISPLAY,&lt;/P&gt;&lt;P&gt;Follow the below procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Register the event TOP-OF-PAGE&lt;/P&gt;&lt;P&gt;  DATA: ls_event TYPE slis_alv_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_list_type = 0&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_events   = rt_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE rt_events WITH KEY name = slis_ev_top_of_page&lt;/P&gt;&lt;P&gt;                           INTO ls_event.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    MOVE alv_top_of_page TO ls_event-form.&lt;/P&gt;&lt;P&gt;    APPEND ls_event TO rt_events.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_logo             = space&lt;/P&gt;&lt;P&gt;      it_list_commentary = alv_list_top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Build your comments using this alv_list_top_of_page.&lt;/P&gt;&lt;P&gt;   As you have written this part of the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Finally display the ALV list.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_callback_program = sy-repid&lt;/P&gt;&lt;P&gt;      is_layout          = alv_layout&lt;/P&gt;&lt;P&gt;      it_fieldcat        = alv_fcat[]&lt;/P&gt;&lt;P&gt;      i_save             = 'X'&lt;/P&gt;&lt;P&gt;      it_events          = alv_events[]&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      t_outtab           = t_rep&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      program_error      = 0&lt;/P&gt;&lt;P&gt;      OTHERS             = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shashank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 10:35:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203778#M131606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T10:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203779#M131607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this SAP program &amp;lt;b&amp;gt;BALVST02_GRID&amp;lt;/b&amp;gt;, for the usage of FM &amp;lt;b&amp;gt;REUSE_ALV_COMMENTARY_WRITE&amp;lt;/b&amp;gt;, and top of page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 10:41:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203779#M131607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T10:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203780#M131608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I USE THIS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt; HOW I CAN DO IT.&lt;/P&gt;&lt;P&gt;I REMEMBER THAT I USE IT AND I GET IT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 11:03:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203780#M131608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T11:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203781#M131609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;chk this,if u could not get still , then there is some prblem with GUI

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Y_TOP_PAGE                                                  *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  y_top_page                              .

TABLES : mara.
TYPE-POOLS: slis.

DATA : w_repid LIKE sy-repid.
  w_repid = sy-repid.

DATA : BEGIN OF it_mara OCCURS 0,
       matnr LIKE mara-matnr,
       END OF it_mara.

*layout
DATA: wa_layout           TYPE SLIS_LAYOUT_ALV.
*field catalog
DATA: it_fieldcat_wrt_off TYPE slis_t_fieldcat_alv,
      wa_fieldcat_wrt_off TYPE slis_fieldcat_alv.

START-OF-SELECTION.

  SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE it_mara.

END-OF-SELECTION.


  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
   EXPORTING
     i_program_name               = w_repid
   I_INTERNAL_TABNAME           = 'IT_MARA'
*     i_structure_name             = 'IT_MARA'
*   I_CLIENT_NEVER_DISPLAY       = 'X'
   I_INCLNAME                   = w_repid
*   I_BYPASSING_BUFFER           =
*   I_BUFFER_ACTIVE              =
    CHANGING
      ct_fieldcat                  = it_fieldcat_wrt_off[]
   EXCEPTIONS
     inconsistent_interface       = 1
     program_error                = 2
     OTHERS                       = 3
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program     = w_repid
      i_callback_top_of_page = 'TOP-OF-PAGE'
      is_layout              = wa_layout
      it_fieldcat            = it_fieldcat_wrt_off
    TABLES
      t_outtab               = it_mara
    EXCEPTIONS
      program_error          = 1
      OTHERS                 = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.



*-------------------------------------------------------------------*
* Form  TOP-OF-PAGE                                                 *
*-------------------------------------------------------------------*
* ALV Report Header                                                 *
*-------------------------------------------------------------------*
FORM top-of-page.
*ALV Header declarations
  DATA: t_header TYPE slis_t_listheader,
        wa_header TYPE slis_listheader,
        t_line LIKE wa_header-info,
        ld_lines TYPE i,
        ld_linesc(10) TYPE c.

* Title
  wa_header-typ  = 'H'.
  wa_header-info = 'CHANDU REPORT'.
  APPEND wa_header TO t_header.
  CLEAR wa_header.

* Date
  wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  CONCATENATE  sy-datum+6(2) '.'
               sy-datum+4(2) '.'
               sy-datum(4) INTO wa_header-info.   "todays date
  APPEND wa_header TO t_header.
  CLEAR: wa_header.

* Total No. of Records Selected
*  describe table it_ekko lines ld_lines.
*  ld_linesc = ld_lines.
*  concatenate 'Total No. of Records Selected: ' ld_linesc
*                    into t_line separated by space.
*  wa_header-typ  = 'A'.
*  wa_header-info = t_line.
*  append wa_header to t_header.
*  clear: wa_header, t_line.

  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      it_list_commentary = t_header.
*            i_logo             = 'Z_LOGO'.
ENDFORM.                    "top-of-page&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 11:06:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203781#M131609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T11:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: FORM e04_comment_build</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203782#M131610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you use I_CALLBACK_TOP_OF_PAGE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FU REUSE_ALV_GRID_DISPLAY        I_CALLBACK_TOP_OF_PAGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Text&lt;/P&gt;&lt;P&gt;EXIT routine for handling TOP-OF-PAGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Description&lt;/P&gt;&lt;P&gt;If the caller specifies an EXIT routine, this routine must have the following form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        FORM top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Module REUSE_ALV_COMMENTARY_WRITE can then be called within the EXIT routine. This module is responsible for formatting the header information and also ensures online HTML formatting. In the print preview or in batch mode, the text passed is then output in the normal format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If module REUSE_ALV_COMMENTARY_WRITE cannot be used, you must use two parameters instead. In I_CALLBACK_TOP_OF_PAGE you pass the form routine that is responsible for normal formatting in batch mode or in the print preview mode. The form routine that is responsible for online formatting, is passed in parameter I_CALLBACK_HTML_TOP_OF_PAGE. If one of these parameters is not filled, top-of-page is not output in the respective mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shashank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Mar 2006 11:11:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-e04-comment-build/m-p/1203782#M131610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-03-29T11:11:43Z</dc:date>
    </item>
  </channel>
</rss>

