Create TOP-OF-PAGE display for REUSE_ALV_GRID_DISPLAY

Hi,
I need to create a TOP-OF-PAGE display to show the MATNR, description and EA per CSE for my report.
The report is output using "REUSE_ALV_GRID_DISPLAY."
See following code:
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
  I_CALLBACK_TOP_OF_PAGE            =
     I_STRUCTURE_NAME                  = 'ZSTATE_PROD_INQ'
    TABLES
      T_OUTTAB                          = I_ALV_MATNR.
How do I add a TOP-OF-PAGE display to the report, while using the above alv?
Points will be rewarded and all responses will be greatly appreciated.
Thanks,
John

See the example Program :
Use FM - 
   CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
            I_LOGO             = 'FDLOGO'
            IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
REPORT ZMM_INV_DAYS_SUPPLY no standard page heading
                            message-id zwave.
======================================================================
Program Name : ZMM_INV_DAYS_SUPPLY                                   *
Description  : this report  identify Obsolete and Excessive inventory*
               it show show days of supply by date. Need to define   *
               Average daily sales for a sku. Possibly look back to  *
               the last 3 weeks or look at the same period a year ago*
               puls a growth factor to help with seasonal items      *
Author       : Seshu                                                 *
Date         : 03/14/2007                                            *
MODIFICATION HISTORY                                                 *
DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
--|||--
03/14/07| Seshu    | DEVK922128 | Initial                            *
03/22/07| Seshu    | DEVK922148 | Removed Duplicates                 *
03/26/07| Seshu    | DEVK922152 | Added new selection-screen         *
03/27/07| Seshu    | DEVK922154 | Material status as range option now*
03/27/07| Seshu    | DEVK922158 | Corrected storage type in where con*
======================================================================
type-pools
type-pools : slis.
Data Declaration
tables : mara,
         marc,
         lagp,
         mvke,
         makt.
Constants
constants : c_werks(4) type c value '1000'," Plant
            c_lgort(4) type c value '1000'," Storage Location
            c_periv like MARC-PERIV value 'XX',
            c_perkz like MVER-PERKZ value 'T'.
Internal Tables
Internal Table for MARA and MAKT and MARD
data : begin of I_material occurs 0,
       matnr like mara-matnr, " Material
       lgpla like mlgt-lgpla," Storage Type
       zzdept like marc-zzdept," Pick Dept
       ZZPRODDEPT like marc-ZZPRODDEPT," Prod Dept
       vmsta like mvke-vmsta, " Material Status
       end of i_material.
Structure
data : begin of i_final occurs 0 ,
       matnr like mara-matnr," Material #
       maktx like makt-maktx," Description
       lgpla like mlgt-lgpla, " Storage Bin
       days  like P0347-SCRDD, " No of Days
       menge like mseg-menge, " Avg Daily Sales
       kbetr like konp-kbetr, " Avg
       labst like mard-labst," Inventory Stock
       stprs like mbew-stprs, " Mvg avg Price
       dos   like mseg-menge, " DOS Units
       dosm  like konp-kbetr, " DOS $$
       end of i_final.
data : int_ges_verb_tab like sverbtaba
                            occurs 0 with header line.
Internal table for A004
data : i_a004 like a004 occurs 0 with header line.
Data Variables
data : v_stprs like konp-kbetr,
       v_repid like sy-repid,
       v_labst like mard-labst,
       v_maktx like makt-maktx.
  ALV Function Module Variables
DATA: g_repid like sy-repid,
      gs_layout type slis_layout_alv,
      g_exit_caused_by_caller,
      gs_exit_caused_by_user type slis_exit_by_user.
DATA: gt_fieldcat    type slis_t_fieldcat_alv,
      gs_print       type slis_print_alv,
      gt_events      type slis_t_event,
      gt_list_top_of_page type slis_t_listheader,
      g_status_set   type slis_formname value 'PF_STATUS_SET',
      g_user_command type slis_formname value 'USER_COMMAND',
      g_top_of_page  type slis_formname value 'TOP_OF_PAGE',
      g_top_of_list  type slis_formname value 'TOP_OF_LIST',
      g_end_of_list  type slis_formname value 'END_OF_LIST',
      g_variant LIKE disvariant,
      g_save(1) TYPE c,
      g_tabname_header TYPE slis_tabname,
      g_tabname_item   TYPE slis_tabname,
      g_exit(1) TYPE c,
      gx_variant LIKE disvariant.
Selection-screen
selection-screen : begin of block blk with frame title text-001.
parameters : p_werks like marc-werks obligatory default '1000'.
select-options : s_matnr for mara-matnr,
                 s_MATKL for mara-MATKL,
                 s_mtart for mara-mtart,
                 s_LGTYP for LAGP-LGTYP,
                 p_vmsta for MVKE-VMSTA,
                 s_dept  for marc-zzdept,
                 s_pdept for MARC-ZZPRODDEPT.
selection-screen: end of block blk.
selection-screen begin of block periods with frame title text-002.
selection-screen begin of line.
selection-screen comment (15) text-c01.
selection-screen position 18.
Period 1
parameters: p_stdat1 like mkpf-budat obligatory.
selection-screen position 35.
selection-screen comment (10) text-c02.
parameters: p_endat1 like mkpf-budat obligatory.
selection-screen end of line.
selection-screen end of block periods.
Fill the default values
initialization.
  v_repid = sy-repid.
  PERFORM LAYOUT_INIT USING GS_LAYOUT.
  PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
Validation for Dates
at selection-screen.
  if p_stdat1 > p_endat1.
    message e206(zwave) with
       ' End date should be greater than or equal to Start Date'.
  endif.
Make one of the Selection should be mandatory
  if s_matnr-low is initial.
    if s_matkl-low is initial and s_mtart-low is initial and
       s_dept-low is initial  and s_pdept-low is initial.
      message e208(zwave) with
                   'Enter atleast one selection Criteria'.
    endif.
  endif.
Start-of-selection.
start-of-selection.
Get the data from MARA,MARD,MAKT Table
  perform get_data_tables.
Read the data into FInal Table.
  perform read_data.
END-OF-SELECTION.
end-of-selection.
  if not i_final[] is initial.
ALV Function Module
    perform print_alv.
  endif.
*&      Form  get_data_tables
Get the data from Tables MARA,MARD,MAKT
FORM get_data_tables.
  select a~matnr
         b~lgpla
         czzdept cZZPRODDEPT d~vmsta into table i_material
         from mara as a inner join mlgt as b on amatnr = bmatnr
         inner join marc as c on cmatnr = amatnr
         inner join mvke as d on dmatnr = amatnr
         where a~matnr in s_matnr
               and   c~werks = p_werks
               and   a~mtart in s_mtart
               and   c~ZZPRODDEPT in s_pdept
               and   a~MATKL in s_MATKL
               and   c~zzdept in s_dept
               and   b~lgnum = '100'
               and   b~LGTYP in s_lgtyp
               and   b~lgpla ne space
               and   d~vkorg = '0001'
               and   d~vtweg = '01'
               and   d~matnr in s_matnr
               and   d~vmsta in p_vmsta.
  if sy-subrc ne 0.
  message e207(zwave) with 'No data found for Given Selection Criteria'.
  endif.
  sort i_material by matnr .
  DELETE ADJACENT DUPLICATES FROM i_material COMPARING matnr.
ENDFORM.                    " get_data_tables
*&      Form  read_data
      Read the data
FORM read_data.
  loop at i_material.
  Storage Bin
    i_final-lgpla = i_material-lgpla.
Days of Sales ( End date - Start date )
    CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
         EXPORTING
              DATE1         = p_endat1
              DATE2         = p_stdat1
              OUTPUT_FORMAT = '02'
         IMPORTING
              DAYS          = i_final-days.
Get the Average Daily Sales (Units) from MVER Table
    perform get_average_sales.
Get the Average Daily Sales ($$) from VK13 Transaction
    perform get_avgsales_price.
    clear : v_labst.
Get the Inventory from MARD Table
    select single labst from mard into v_labst
                             where matnr = i_material-matnr
                             and   werks = p_werks
                             and   lgort = c_lgort.
    if sy-subrc eq 0.
Inventory Stock - MARD-LABST
      i_final-labst = v_labst.
    endif.
Material #
    i_final-matnr = i_material-matnr.
Get the Material Description
    clear v_maktx.
    select single maktx from makt into v_maktx
                        where matnr = i_material-matnr
                        and   spras = 'EN'.
    if sy-subrc eq 0.
Description
      i_final-maktx = v_maktx.
    endif.
Get the Mvg Average Price
    perform get_moving_avgpr.
Days of Supply Units.
    if i_final-kbetr ne 0.
      i_final-dos = i_final-labst / i_final-menge.
    endif.
Days of Supply $$
    i_final-dosm =  i_final-dos * v_stprs.
    append  i_final.
    clear : i_final,
            i_material.
  endloop.
  refresh i_material.
ENDFORM.                    " read_data
*&      Form  get_average_sales
      Get the data from MVER Table
FORM get_average_sales.
  data : lv_menge like mseg-menge.
  refresh int_ges_verb_tab.
  clear : int_ges_verb_tab,
          lv_menge.
  CALL FUNCTION 'CONSUMPTION_READ_FOR_MM'
    EXPORTING
  KZRFB              = ' '
      MATNR              = i_material-matnr
      WERKS              = c_werks
      PERKZ              = c_perkz
      PERIV              = c_periv
   TABLES
     GES_VERB_TAB       = int_ges_verb_tab
  UNG_VERB_TAB       =
   EXCEPTIONS
     WRONG_CALL         = 1
     NOT_FOUND          = 2
     OTHERS             = 3
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  loop at int_ges_verb_tab.
    if int_ges_verb_tab-ertag   >= p_stdat1  and
       int_ges_verb_tab-ertag  <= p_endat1.
      add int_ges_verb_tab-vbwrt to lv_menge.
    endif.
  endloop.
  i_final-menge = lv_menge / i_final-days.
ENDFORM.                    " get_average_sales
*&      Form  get_avgsales_price
      Avg Daily Sales Price
FORM get_avgsales_price.
Get the data from A004 table to get KNUMH
Added new field Sales Unit - Seshu 01/09/2006
  refresh : i_a004.
  clear :   i_a004.
  data : lv_kbetr like konp-kbetr," Condition value
         lv_KPEIN like konp-kpein , "per
         lv_KMEIN like konp-KMEIN. " Sales Unit
  select * from a004 into table i_a004
                          where matnr = i_material-matnr
                          and   vkorg = '0001'
                          and   vtweg = '01'.
  if sy-subrc eq 0.
    sort i_a004 by DATAB descending.
Get the Latetest Date
    read table i_a004 with key matnr = i_material-matnr
                               vkorg = '0001'
                               vtweg = '01'
                               binary search.
Get the Sales Value
    select single kbetr KPEIN KMEIN from konp
             into (lv_kbetr,lv_KPEIN, lv_KMEIN)
                             where knumh = i_a004-knumh
                             and   kappl = i_a004-kappl
                             and   kschl = i_a004-kschl.
    if sy-subrc eq 0.
      i_final-kbetr = lv_kbetr / lv_KPEIN.
      i_final-kbetr = i_final-kbetr * i_final-menge.
    endif.
  endif.
  clear : lv_kbetr,
          lv_kpein,
          lv_KMEIN.
ENDFORM.                    " get_avgsales_price
*&      Form  get_moving_avgpr
      Get the data from MVEW Table
FORM get_moving_avgpr.
Local Variables
  data : lv_stprs like mbew-stprs, " Standard Price
         lv_verpr like mbew-verpr, " Moving avg Price
         lv_vprsv like mbew-vprsv. " Price Indicator
  clear : lv_stprs,
          lv_verpr,
          lv_vprsv,
          v_stprs.
  select single stprs verpr vprsv from mbew
                into (lv_stprs,lv_verpr,lv_vprsv)
                where matnr = i_material-matnr.
  if sy-subrc eq 0.
    if lv_vprsv = 'S'.
      i_final-stprs = lv_stprs * i_final-labst.
      v_stprs = lv_stprs.
    elseif lv_vprsv = 'V'.
      i_final-stprs = lv_verpr * i_final-labst.
      v_stprs = lv_verpr.
    endif.
  endif.
ENDFORM.                    " get_moving_avgpr
*&      Form  print_alv
      REUSE_ALV_GRID_DISPLAY Function Module
FORM print_alv.
  PERFORM COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
Populate field catalog
  PERFORM fieldcat_init  using gt_fieldcat[].
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
   I_INTERFACE_CHECK                 = ' '
   I_BYPASSING_BUFFER                =
   I_BUFFER_ACTIVE                   = ' '
     I_CALLBACK_PROGRAM                = v_repid
   I_CALLBACK_PF_STATUS_SET          = ' '
    I_CALLBACK_USER_COMMAND           = g_user_command
    I_CALLBACK_TOP_OF_PAGE            =  g_top_of_page
   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
   I_CALLBACK_HTML_END_OF_LIST       = ' '
   I_STRUCTURE_NAME                  =
   I_BACKGROUND_ID                   = ' '
   I_GRID_TITLE                      =
   I_GRID_SETTINGS                   =
     IS_LAYOUT                         = gs_layout
      IT_FIELDCAT                       = gt_fieldcat[]
   IT_EXCLUDING                      =
   IT_SPECIAL_GROUPS                 =
   IT_SORT                           =
   IT_FILTER                         =
   IS_SEL_HIDE                       =
   I_DEFAULT                         = 'X'
     I_SAVE                            = 'A'
    IS_VARIANT                        =
     IT_EVENTS                         = GT_EVENTS[]
   IT_EVENT_EXIT                     =
   IS_PRINT                          =
   IS_REPREP_ID                      =
   I_SCREEN_START_COLUMN             = 0
   I_SCREEN_START_LINE               = 0
   I_SCREEN_END_COLUMN               = 0
   I_SCREEN_END_LINE                 = 0
   IT_ALV_GRAPHICS                   =
   IT_ADD_FIELDCAT                   =
   IT_HYPERLINK                      =
   I_HTML_HEIGHT_TOP                 =
   I_HTML_HEIGHT_END                 =
   IT_EXCEPT_QINFO                   =
IMPORTING
   E_EXIT_CAUSED_BY_CALLER           =
   ES_EXIT_CAUSED_BY_USER            =
    TABLES
      T_OUTTAB                          = i_final
   EXCEPTIONS
     PROGRAM_ERROR                     = 1
     OTHERS                            = 2
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " print_alv
*&      Form  get_fieldcatlog
      Fieldcatlog
*&      Form  fieldcat_init
      Fieldcat
FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
  DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Material #
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'MATNR'.
  LS_FIELDCAT-ref_fieldname = 'MATNR'.
  LS_FIELDCAT-ref_tabname = 'MARA'.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Material'.
  ls_fieldcat-seltext_M = 'Material'.
  ls_fieldcat-seltext_S = 'Material'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material Description
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'MAKTX'.
  LS_FIELDCAT-OUTPUTLEN    = 30.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Description'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Storage Bin
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'LGPLA'.
  LS_FIELDCAT-OUTPUTLEN    = 10.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Storage Bin'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Start Date
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME    = 'SDATE'.
LS_FIELDCAT-OUTPUTLEN    = 10.
LS_FIELDCAT-TABNAME    = 'I_FINAL'.
ls_fieldcat-seltext_L = 'Start Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
End Date.
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME    = 'EDATE'.
LS_FIELDCAT-OUTPUTLEN    = 10.
LS_FIELDCAT-TABNAME    = 'I_FINAL'.
ls_fieldcat-seltext_L = 'End Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Days of Sales
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'DAYS'.
  LS_FIELDCAT-OUTPUTLEN    = 12.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Days of Sales'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales(Units).
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'MENGE'.
  LS_FIELDCAT-OUTPUTLEN    = 18.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Average Daily Sales(Units)'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Average Daily Sales($$)
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'KBETR'.
  LS_FIELDCAT-OUTPUTLEN    = 18.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Average Daily Sales($$)'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory(Units)
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'LABST'.
  LS_FIELDCAT-OUTPUTLEN    = 18.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Inventory(Units)'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Inventory($$)
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'STPRS'.
  LS_FIELDCAT-OUTPUTLEN    = 18.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'Inventory($$)'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS($$)
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'DOSM'.
  LS_FIELDCAT-OUTPUTLEN    = 13.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'DOS($$)'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
DOS(Days)
  CLEAR LS_FIELDCAT.
  LS_FIELDCAT-FIELDNAME    = 'DOS'.
  LS_FIELDCAT-OUTPUTLEN    = 13.
  LS_FIELDCAT-TABNAME    = 'I_FINAL'.
  ls_fieldcat-seltext_L = 'DOS(Days)'.
  APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM.                    " get_fieldcatlog
      FORM COMMENT_BUILD                                            *
-->  LT_TOP_OF_PAGE                                                *
FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE
                                        SLIS_T_LISTHEADER.
  DATA: LS_LINE TYPE SLIS_LISTHEADER.
Variables for Date
  data : lv_year(4) type c,
         lv_mon(2) type c,
         lv_day(2) type c,
         lv_date1(10) type c,
         lv_date2(10) type c.
LIST HEADING LINE: TYPE H
  CLEAR LS_LINE.
  LS_LINE-TYP  = 'H'.
  LS_LINE-INFO = sy-title.
  APPEND LS_LINE TO LT_TOP_OF_PAGE.
  clear : lv_year,
          lv_day,
          lv_mon,
          lv_date1.
  lv_year = p_stdat1+0(4).
  lv_mon = p_stdat1+4(2).
  lv_day = p_stdat1+6(2).
  concatenate lv_mon '/' lv_day '/' lv_year into lv_date1.
STATUS LINE: TYPE S
  CLEAR LS_LINE.
  LS_LINE-TYP  = 'S'.
  LS_LINE-KEY  = TEXT-c01.
  LS_LINE-INFO = lv_date1.
  APPEND LS_LINE TO LT_TOP_OF_PAGE.
  clear : lv_year,
            lv_day,
            lv_mon,
            lv_date2.
  lv_year = P_ENDAT1+0(4).
  lv_mon = P_ENDAT1+4(2).
  lv_day = P_ENDAT1+6(2).
  concatenate lv_mon '/' lv_day '/' lv_year into lv_date2.
  LS_LINE-KEY  = text-c02.
  LS_LINE-INFO = lv_date2.
  APPEND LS_LINE TO LT_TOP_OF_PAGE.
  CLEAR LS_LINE.
ENDFORM.
      FORM TOP_OF_PAGE                                              *
FORM TOP_OF_PAGE.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
            I_LOGO             = 'FDLOGO'
            IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM.
      FORM EVENTTAB_BUILD                                           *
-->  RT_EVENTS                                                     *
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
*"Registration of events to happen during list display
  DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
            I_LIST_TYPE = 0
       IMPORTING
            ET_EVENTS   = RT_EVENTS.
  READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                           INTO LS_EVENT.
  IF SY-SUBRC = 0.
    MOVE G_TOP_OF_PAGE TO LS_EVENT-FORM.
    APPEND LS_EVENT TO RT_EVENTS.
  ENDIF.
ENDFORM.
      FORM LAYOUT_INIT                                              *
-->  RS_LAYOUT                                                     *
FORM LAYOUT_INIT USING RS_LAYOUT TYPE SLIS_LAYOUT_ALV.
**"Build layout for list display
  RS_LAYOUT-DETAIL_POPUP      = 'X'.
lslayout-f2code            = p_f2code.
rs_layout-zebra             = 'X'.
rs_layout-colwidth_optimize = 'X'.
ENDFORM.

Similar Messages

  • ALV - Top of Page Trigger for Each New Page

    Hi Abapers,
    I am using the sortinfo_alv to get page break for each customer.Now my client is asking to display the cutomer name in the top of page insted in the main table. how will i do this .
    I am using alv_commentary_write to display the top of page data.
    Awaiting for reply.
    Regards,
    Rahul

    Hi
    Follow the below steps.
    Include the two forms in your program
    Pass event internal table parameter to FM ALV display.
    Declare the ALV parameter in Declaration part.
    DATA: i_events TYPE slis_t_event.            "(IT) for populating events
               g_header TYPE slis_t_listheader,  "Header for alv
           g_events TYPE slis_alv_event,     "Struc for populating events
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         it_events                         = i_events
    *&      Form  EVENTTAB_BUILD
    *    Building Events table For ALV
    *      -->P_T_EVENTS[]  text
    FORM eventtab_build USING p_i_events.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type     = 0
           IMPORTING
                et_events       = i_events
           EXCEPTIONS
                list_type_wrong = 1
                OTHERS          = 2.
      CLEAR: g_events.
      READ TABLE i_events INTO g_events
           WITH KEY name = 'TOP_OF_PAGE'. "slis_ev_top_of_page.
      IF sy-subrc = 0.
        MOVE 'TOP_OF_PAGE' TO g_events-form.
        MODIFY i_events FROM g_events INDEX sy-tabix TRANSPORTING form.
        CLEAR g_events.
      ENDIF.
    ENDFORM.                    " EVENTTAB_BUILD
    *&      Form  top_of_page
    *    Header Data Population
    FORM top_of_page.
      DATA: l_htext TYPE slis_listheader,
            l_text(200) TYPE c,
            ld_lines TYPE i,
            ld_linesc(9) TYPE c.
      REFRESH g_header.
    ****************TOP OF PAGE HEADINGS****************************
    * For Headers, Key is not printed and is irrelevant. Will not cause
    * a syntax error, but is not used.
    * TYP:  Indicator: Header
      l_htext-typ = 'H'.     "H = Header,S = selection,a = action
      CONCATENATE 'Planned Order: -' s_plnum-low 'To' s_plnum-high
      INTO l_text SEPARATED BY space.
    * INFO: Information
      l_htext-info = l_text.
      APPEND l_htext TO g_header.
    * FM for dispalying text at Top of Page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = g_header
                i_logo =
                   'ENJOYSAP_LOGO'. " From transaction "OAOR"
    *     I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE

  • To display posting date in alv top of page area for transaction KOB1

    I want to display posting date given on selection screen of transaction KOB1 to the alv top of page area on final alv output .
    what are the possible solutions ?

    I want to display posting date given on selection screen of transaction KOB1 to the alv top of page area on final alv output .
    what are the possible solutions ?

  • Issue in header display for reuse_alv_grid_display

    Hi All,
    I have a requirement to place the items as  shown below .
    Date:      29.03.2011                                     XXX text                                         System:  xxxx
    new text:   ZRV_XXX                                                                                some text : 
    User:      u15                           Report to display the material stock                               other comment :
    So it can be seen that the various text has to be placed as left aligned , centered and even right aligned in the top_of_page.
    But as im using grid display , im unable to place this data while using :
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
    how can i populate the t_header table so that i can use the alignements a shown.
    I have read that I_CALLBACK_HTML_TOP_OF_PAGE can be used to align.
    Actually i want to make a function module which can be used in any report and FM make such alignements before using 'REUSE_ALV_COMMENTARY_WRITE'  in any object.
    Kindly help.

    Hi,
    Thanks for your replies. The problem is solved by using cl_dd_document class.
    I used tables of  TYPE REF TO cl_dd_table_element and coloumns of TYPE REF TO cl_dd_area.
    Such top of page can be achieved using
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'
    and use the mentioned class in the form routine HTML_TOP_OF_PAGE.
    Edited by: ujjwal_d15 on Apr 12, 2011 11:57 AM

  • How do I create jump to (page) links using DPS in creating a digital page turner for a catalog?

    I know how to use "navto" to jump to pages within the catalog created for our app.
    We want to use the same article files to create a digital page turner using DPS but cannot figure out how to do it. Google searches lead to answers that say it isn't possible, but if i view a page turner I created in 3D Issue via Adobe's Content Viewer, the pages jump (via the links I made in 3D Issue).
    I just can't believe that a huge company like Adobe has no way to do this in DPS.

    On pages you do not want to show-up delselect "include page in navigation menu" in the page inspector:

  • Where si teh Sub Page Display for the Root Page

    In the page property you can change the Sub Page Display and
    change the Available Sub-Pages and Displayed Sub-Pages but I dont see that option for the root page.

    hi suzie,
    i just checked and the option is there. go to the root page - go into edit mode - click on 'page properties' (not page group properties !) and go to the optional tab. you find the option at the bottom of this tab.
    regards,
    christian

  • Acrobat 8 - Page Display for 3 or more pages

    I know one can do 2-up page displays - Is it possible to do a display of three pages that will print together in a spread?

    I think that 3-up is possible. It is a function of the print driver. If your printer does not allow it, then you can print to a new PDF and select multi-up in the Adobe PDF printer properties.

  • PAGE display - For myself & others

    Hello
    In Portal 306 we could edit the portlet (HTML for example) and display it for myself/others.
    However in Portal 309, this option does not exist. But the Portal seems to store 2 versions anyway, Once the page is created I can never see the changes unless I logon as somebody else and view it.
    Bug?
    Tam.
    null

    Customize is for self only. i.e. any HTML portlet changes that are done by cliking on customize is reflected for the logged on person only.
    However, I want to change the look and feel for myself and others. I can change the page contents by clicking on Edit on the HTML portlet. But these contents are not visible (by running it rightaway), unless I open the same page as somebody else.
    This is not very friendly for debugging purposes.
    null

  • How do I create a template/page layout for artwork for a folder?

    Hi can someone please explain how I can create a page layout in Indesign CS5 to design the artwork for a folder.  The folder is an A4 paper wallet type folder with a 3mm spine - I'm just not sure how to build this on the page!  I have a subcription to lynda.com but can't seem to search out a relevant tutorial.
    Thanks in advance for any help!
    Olwen

    Do you mean for a Pocket Folder?
    Here's a quick and dirty way.
    New document > Page Size > A3 > Toggle wide
    Place your curser in the width and after the dimension type +3mm
    Set Columns to 2, Gutter = 3mm
    Margins 0
    Bleed, if needed, to 3mm

  • How to display horizontal line in top-of-page by using object oriented ALV?

    How to display horizontal line in top-of-page by using object oriented ALV.
    I am created top-of-page in object oriented alv.
    But not be successes in showing horizontal line in it.
    Can any one pls give solution for this..
    Thanks and regards..

    Hi
    Try like this
    data: gt_list_top_of_page type slis_t_listheader. " Top of page text. 
    Initialization. 
    perform comment_build using gt_list_top_of_page[]. 
    form top_of_page. 
    * Note to self: the gif must be loaded into transaction OAOR with 
    * classname 'PICTURES' AND TYPE 'OT' to work with ALV GRID Functions. 
    * I Loaded NOVALOGO2 into system. 
    call function 'REUSE_ALV_COMMENTARY_WRITE' 
         exporting 
    * I_LOGO = 'NOVALOGO2' 
    * i_logo = 'ENJOYSAP_LOGO' 
             it_list_commentary = gt_list_top_of_page. 
    endform. " TOP_OF_PAGE 
    form comment_build using e04_lt_top_of_page type slis_t_listheader. 
    data: ls_line type slis_listheader. 
          clear ls_line. 
          ls_line-typ = 'A'. 
          ls_line-info = 'Special'(001). 
          fgrant = xgrant. 
          concatenate ls_line-info fgrant 
          'Stock Option Report to the board'(002) 
                 into ls_line-info separated by space. 
                        condense ls_line-info. 
          append ls_line to e04_lt_top_of_page. 
    endform. " COMMENT_BUILD
    Use following syntex for footer print in alv:
    * For End of Page
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *  For End of Report
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    check this link
    http://abapprogramming.blogspot.com/
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
    Changing width of a custom container dynamically
    Display Page numbers in ALV
    Insert picture in selection screen.
    Logo in OO ALV Grid
    Reward all helpfull answers
    Regards
    Pavan

  • Pause / Resume button combination not working when set to display for "rest of project"

    Good day,
    I have created a set of four objects on slide2 of my project
    1. Smart Object rounded rectangle with text "(playing) - CLICK to Pause" [this is the graphic the user sees]
    2. Smart Object rounded rectangle with text "(paused) - CLICK to Resume" [this is the graphic the user sees]
    3. Smart Object rectangle, transparent, used as button, set to not display in project - btn_Resume
    4. Smart Object rectangle, transparent, used as button - btn_Pause
    A. Script assigned to btn_Pause hides btn_Pause and the "CLICK to Pause" graphic, shows the btn_Resume and "CLICK to Resume" graphic, and pauses the project by setting the system pause variable to 1
    B. Script assigned to btn_Resume hides btn_Resume and the "CLICK to Resume" graphic, shows the btn_Pause and "CLICK to Pause" graphic, and resumes the project by setting the system resume variable to 1
    C. All items are set to display from the beginning of slide2 for the "rest of project"
    On slide 2, the buttons hide/show and pause/resume behaviors work correctly.
    On slide 3, the correct initial button and graphic appears, and the click sound works when clicked, but no behaviors (show/hide/pause) occur until a good amount of time into the slide: you can click all you want for 20-30 seconds, but nothing works except the click sound. Eventually, the behavior will work.
    On slides 4 and following, the correct initial button and graphic appears, and the click sound works when clicked, but no behaviors EVER work.
    If the behaviors NEVER, EVER worked, I would keep looking for what I did not have set correctly, but the correct working on the slide where they are set, delayed behavior on the next, and no behavior on the remainder of slides following has me stumped.
    Captivate version 6.0.1.240
    Windows 7 OS
    I hope I'm missing something obvious here, and I'm more than willing to face-palm if you tell me . Otherwise, I have not been able to find any setting that makes any difference. I would REALLY rather not duplicate the buttons and scripts on every page of the project. Given the blog posts I have seen saying this method should work just fine, I'm hoping there is a side quirk somewhere that I'm missing.
    Thanks for any help you can give.

    Without clouding with too much explanation, this technique arose out of a need to deal with (in a different project) objects that were grouped, and wanting to deal with the groups in as simple a way as possible, allow for easy swapping of group assets, and having a few buttons do multiple things. The idea of being able to have multiple interactive buttons stacked on top of each other while appearing for the rest of the project led to trying this simple construct before trying something more complex.
    You are correct, that there is a simpler solution, which we ended up using because we were not able to get two interactive buttons stacked on top of each other while displayed for the rest of the project to work properly (although that is SUPPOSED to work, as far as I understand).
    Here's what we ended up doing:
    A) Two smartshapes used as messaging graphics
    B) A single (one) interactive smartshape used as a button
    C) A conditional action to pause/resume and show/hide the appropriate messaging graphics
    D) All three objects (A&B) stacked, B on top.
    E) All objects set to always appear on top, and to display for rest of project.
    Our hypothesis, then, is that you are not able to stack interactive objects on top of each other and then display for the rest of the project.
    If anyone has evidence to the contrary, we would, gladly, take a look.
    Thanks for your interest Lilybiri, and for your input.
    Best regards,
    Hank

  • Top of page data is repeated while going back from alv report

    Hi,
       In my alv report , I call ed TOP_OF_PAGE.   Data regatding top_of_page is stored in internal table.
       After executing the report,while going back from report,  a screen containing top_of_page data is appeaing.
       Even though I cleared that table,still that data appeared.
      Please resolve this.

    Hi all,
       I cleared that table previously .
       Still that screen appears.
    This is my following code.
    PERFORM top_of_page.            " Subroutine for Top-of-page
    *Display Report
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
            I_INTERFACE_CHECK                 = ' '
            I_BYPASSING_BUFFER                = ' '
            I_BUFFER_ACTIVE                   = ' '
              i_callback_program                = lv_repid
            I_CALLBACK_PF_STATUS_SET          = ' '
            I_CALLBACK_USER_COMMAND           = ' '
              i_callback_top_of_page            = 'TOP_OF_PAGE'
            I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
            I_CALLBACK_HTML_END_OF_LIST       = ' '
            I_STRUCTURE_NAME                  =
            I_BACKGROUND_ID                   = ' '
            I_GRID_TITLE                      =
            I_GRID_SETTINGS                   =
            IS_LAYOUT                         =
              it_fieldcat                       = lt_fieldcat[]
            IT_EXCLUDING                      =
            IT_SPECIAL_GROUPS                 =
            IT_SORT                           =
            IT_FILTER                         =
            IS_SEL_HIDE                       =
            I_DEFAULT                         = 'X'
            I_SAVE                            = ' '
            IS_VARIANT                        =
            IT_EVENTS                         = it_events
            IT_EVENT_EXIT                     =
            IS_PRINT                          =
            IS_REPREP_ID                      =
            I_SCREEN_START_COLUMN             = 0
            I_SCREEN_START_LINE               = 0
            I_SCREEN_END_COLUMN               = 0
            I_SCREEN_END_LINE                 = 0
            I_HTML_HEIGHT_TOP                 = 0
            I_HTML_HEIGHT_END                 = 0
            IT_ALV_GRAPHICS                   =
            IT_HYPERLINK                      =
            IT_ADD_FIELDCAT                   =
            IT_EXCEPT_QINFO                   =
            IR_SALV_FULLSCREEN_ADAPTER        =
          IMPORTING
            E_EXIT_CAUSED_BY_CALLER           =
            ES_EXIT_CAUSED_BY_USER            =
       TABLES
              t_outtab                          = lt_meter
       EXCEPTIONS
              program_error                     = 1
              OTHERS                            = 2
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    perform clear_data.
    endif.
    FORM top_of_page .
    Declaration of local variables, structures and internal tables
      Data : lv_count      TYPE i,
             lv_count_c(9) TYPE c,
             lt_header     TYPE slis_t_listheader,
             wa_header     TYPE slis_listheader,
             lt_line       LIKE wa_header-info.
    Title
      clear lt_header[].
      wa_header-typ  = 'H'.
      wa_header-info = 'Meter Readings Report'.
      APPEND wa_header TO lt_header.
      CLEAR wa_header.
    Total No. of Records Selected
      DESCRIBE TABLE lt_meter LINES lv_count.
      lv_count_c      = lv_count.
      CONCATENATE 'Total Number of meters readed for given cycle: ' lv_count_c
         INTO lt_line SEPARATED BY space.
      wa_header-typ    =    'A'.
      wa_header-info   =    lt_line.
      APPEND wa_header TO lt_header.
      CLEAR: wa_header, lt_line.
    *Display Top-of-page
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = lt_header.
    ENDFORM.                    " TOP_OF_PAGE
    *&      Form  CLEAR_DATA
          text
    -->  p1        text
    <--  p2        text
    form CLEAR_DATA .
    data : lt_header     TYPE slis_t_listheader.
    clear lt_header[].
    endform.

  • Alv top of page date chopped

    Hi Experts,
                 In my Alv report top-of-page, i have a date . with name "Open Items As key Date" but i cant see
    full text and if the date is 11.07.2008. its showing 11.07.20. so how to do this.
    Correct answers will be fully rewarded.
    Regards
    Sunita.

    Hi,
    data : lv_bldat(10) type c.
    write p_bldat to lv_bldat.
    pass  lv_bldat inside of p_bldat.
    What about this thread
    ALV Top-Of -Page Display  No respose for this.
    If u got the solution close the THREAD.
    Thanks,
    Durai.V
    Edited by: Durai V on Jul 11, 2008 12:04 PM

  • How to paste an image from the database by creating a new page?

    Hai,
    i'm trying to paste more than 6 images in two pages...
    The condition is that i want to paste only 3 images in a page.
    When the first 3 images were pasted... i want a new page to be automatically created and the next or 4th image will be pasted on the
    next page...
    i have codings for creating a new page and for pasting the image...
    But how shall shall i paste the 4th image in the next page...
    Can any one plzz explain me...

    >
    Hi, I'd like to display a dynamic image from the web inside a JLabel or any other swing component it could work in. I've been looking on the Swing tutorials and others forums, all I can have is that a JLabel can load an Icon object, defined by an image URL, but can this URL be like "http://xxxxx/image.jpg" somehow or can it only be a local image URL?>
    I do not know why you start talking about an image on the web then go on to show concerns about whether it will work for a 'local' URL.
    But perhaps this answer will cover the possibilities.
    So long as you can from an URL to the image, and the bytes are available for download (e.g. some web sites wrap a direct call to an image in HTML that embeds the image), the URL based icon constructors will successfully load it.
    It does not matter if that URL points to
    - a web site,
    - a local server ('localhost'),
    - an URL representation of a File on the local file system, or
    - it is inside a Jar file that is on the application's run-time classpath.
    How you go about forming a valid URL to a 'local resources' (or indeed what you regard as local resources) is another matter, depending on the form of the project, and how the resources are stored (see list above).
    Probably the main reason that examples use images at a hard coded URL on the net is that it makes an 'image example' self contained. As soon as we compile and run it, we can see the result. I have posted a few examples like that on these forums.
    Edit 1:
    BTW - Welcome to the Sun forums
    Edited by: AndrewThompson64 on Apr 21, 2009 12:15 PM

  • Create a new page format

    ... Hi everybody !!!
      I need to create a new page forma for a checkt:  Width  165   / MM,   Height     / Unit       67    / MM    
      i created it in spad transaction, 
      Full Administration -> Extended admin -> Device Types
      But when i execute the program in order to print the format the system send a message
    Device type HPLJ5 does not support page Z165X67, where z165x67 is  a format that i created.
    I  think the problem is  in the the definition format Z165X67 associated to devide type,  in the actions
    ( printer initialization, reset after exit,  cover page, end of page, etc ), here uses a hexadecimal code and i don'r undestand
    this, someone can give me any suggestion.
        Thanks
        Best Regards

    .. Hi !!!
      I can asociate the new format page, i can print a check, but i have a little problem,  when I send to print more than 1 check,
    the jump of page is not equal,  so the output for the other checks is nor rigth.
       Do you have any suggestion ??
      Thanks
    Noemí Huerta

Maybe you are looking for

  • 3TB Fusion & logical volume group

    I'm in the process of fully reinstalling Mavericks - erasing my internal drive and paring my system way down, to resolve some long lingering issues. Disk Utility shows the recovery partition as separate (I've booted from it) - but when I went to eras

  • Can I use my Macbook Pro OS discs to upgrade my desktop?

    Hello list I am wondering whether I can use the software install discs that came with my MacBook Pro to upgrade the OS on my desktop. I have a G4 quicksilver running OS 10.3.9, and the disks that came with my laptop are OS 10.4.6. Can I safely use th

  • Extractor for Re-Order Point from MARD

    Hi There,   Is there a standard extractor for Re-Order point (Field MINBE) from Table MARD ?   I know we can obtain ROP from MDMA, but we would like to use the ROP from MARD   The reason I ask is because if there exist a standard extractor for this,

  • Tween not working on upload to web

    I've just uploaded a swf file that does a series of attachMovies. In these movie clips I have some code that when you rollover a movieclip, it creates a tween using the tween class. The problem is that it was all working fine until I uploaded it to t

  • Hp envy 1105dx screen went all white

     took it to get it repaired at a shop, the guy told me he received 4 screens none  of them worked is it there a specific screen model i need?  (laptop works with external monitor).