Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Hello Gurus, TOP_OF_PAGE is not getting triggered in REUSE_ALV_HIERSEQ_LIST_DISPLAY. Can you please check below code and let me know where I am making mistake. form issue_output. PERFORM get_layout. PERFORM build_field_catalog. Perform Get_events. CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' EXPORTING * I_INTERFACE_CHECK = ' ' I_CALLBACK_PROGRAM = sy-repid * I_CALLBACK_PF_STATUS_SET = 'X' * I_CALLBACK_USER_COMMAND = ' ' IS_LAYOUT = layout IT_FIELDCAT = xfieldcat * IT_EXCLUDING = * IT_SPECIAL_GROUPS = * IT_SORT = * IT_FILTER = * IS_SEL_HIDE = * I_SCREEN_START_COLUMN = 0 * I_SCREEN_START_LINE = 0 * I_SCREEN_END_COLUMN = 0 * I_SCREEN_END_LINE = 0 * I_DEFAULT = 'X' * I_SAVE = ' ' * IS_VARIANT = IT_EVENTS = t_events * IT_EVENT_EXIT = I_TABNAME_HEADER = 't_header' I_TABNAME_ITEM = 't_item' IS_KEYINFO = W_KEYINFO TABLES T_OUTTAB_HEADER = t_header T_OUTTAB_ITEM = t_item 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. "issue_output *&---* *& Form top_of_page *&---* * text *---* FORM f_top_of_page. DATA : lin(10) TYPE c, str(100). DATA : w_text(8) TYPE c. DATA : w_prtext1(60) TYPE c, w_prtext2(60) TYPE c. DATA : new_date(30) TYPE c. DATA : PRO(30) TYPE C. CLEAR : lin,str. * if flag is INITIAL. CLEAR waheader. waheader-typ = 'H'. waheader-info = 'Daily Progress Report'. APPEND waheader TO theader. CLEAR waheader. PERFORM convert_to_external USING s_pspnr-low CHANGING o_pspnr. * CONCATENATE 'WBS Element Number :' o_pspnr INTO w_prtext1. waheader-typ = 'S'. waheader-key = 'WBS Element Number :' . waheader-info = o_pspnr. APPEND waheader TO theader. CLEAR waheader. SELECT single post1 FROM prps INTO main_desc WHERE pspnr in s_pspnr. waheader-typ = 'S'. waheader-key = 'WBS Description :' . * CONCATENATE 'WBS Description :' main_desc INTO w_prtext2. waheader-info = main_desc. APPEND waheader TO theader. CLEAR waheader. waheader-typ = 'S'. CONCATENATE 'Date : ' s_date-low+6(2)'.' s_date-low+4(2)'.' s_date-low+0(4) INTO new_date. waheader-key = 'Date :' . waheader-info = new_date . APPEND waheader TO theader. CLEAR waheader. CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = theader[]. *flag = 'X'. *ENDIF. ENDFORM. "top_of_page *&---* *& Form Build_field_catalog *&---* * text *---* Form Build_field_catalog. DATA : cntr TYPE i . CLEAR : cntr. REFRESH : xfieldcat. W_KEYINFO-header01 = 'MAIN_STRUC_DESC'. W_KEYINFO-item01 = 'MAIN_STRUC_DESC'. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'MAIN_STRUC_DESC'. wa_fieldcat-seltext_l = 'Main Structure'. wa_fieldcat-tabname = 't_header'. wa_fieldcat-key = 'X'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'WBS_DESC'. wa_fieldcat-seltext_l = 'WBS Element'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'ACTIVITY'. wa_fieldcat-seltext_l = 'Activities'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'P_QTY'. wa_fieldcat-seltext_l = 'Planned Qty'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'UOM'. wa_fieldcat-seltext_l = 'UOM'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'T_PLANNED'. wa_fieldcat-seltext_l = 'Today Planned'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'T_ACTUAL'. wa_fieldcat-seltext_l = 'Today Actual'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'W_PLANNED'. wa_fieldcat-seltext_l = 'This Week Planned'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'W_ACTUAL'. wa_fieldcat-seltext_l = 'This Week Actual'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'M_PLANNED'. wa_fieldcat-seltext_l = 'This Month Planned'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'M_ACTUAL'. wa_fieldcat-seltext_l = 'This Month Actual'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'T_DATE'. wa_fieldcat-seltext_l = 'Till Date'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'BALANCE'. wa_fieldcat-seltext_l = 'Balance'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. cntr = cntr + 1. wa_fieldcat-col_pos = cntr. wa_fieldcat-fieldname = 'COMPLETED'. wa_fieldcat-seltext_l = '% Completion'. wa_fieldcat-tabname = 't_item'. APPEND wa_fieldcat TO xfieldcat. CLEAR wa_fieldcat. ENDFORM. "Build_field_catalog *&---* *& Form Get_events *&---* * text *---* Form Get_events. call function 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 1 IMPORTING et_events = t_events[]. read table t_events with key name = SLIS_EV_TOP_OF_PAGE into wa_events. if sy-subrc = 0. wa_events-form = 'f_top_of_page'. MODIFY t_events FROM wa_events INDEX sy-tabix TRANSPORTING form. endif. ENDFORM. "Get_events Form Get_layout. layout-expand_fieldname = 'EXPAND'. layout-expand_all = 'X'. layout-zebra = 'X'. layout-colwidth_optimize = 'X'. ENDFORM. Thanks and regards, Kalyani | __.____._ Copyright © 2011 Toolbox.com and message author. Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251 | | Most Popular White Papers In the Spotlight _.____.__ |