Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Hi Kalyani, REPORT. TYPE-POOLS: slis. *--tables declaration TABLES: SFLIGHT,SPFLI. *--types declaration DATA: BEGIN OF i_SFLIGHT OCCURS 0, CARRID LIKE SFLIGHT-CARRID, CONNID LIKE SFLIGHT-CONNID, FLDATE LIKE SFLIGHT-FLDATE, END OF i_SFLIGHT. DATA: BEGIN OF i_SPFLI OCCURS 0, CARRID LIKE SPFLI-CARRID, CONNID LIKE SPFLI-CONNID, * AIRPFROM LIKE SPFLI-AIRPFROM, * AIRPTO LIKE SPFLI-AIRPTO, DISTANCE LIKE SPFLI-DISTANCE, END OF i_SPFLI. *--variables DATA: i_repid LIKE sy-repid. DATA gd_prntparams type slis_print_alv. DATA: gt_events type slis_t_event. i_repid = sy-repid. DATA: i_field TYPE slis_t_fieldcat_alv. DATA: i_field2 TYPE slis_t_fieldcat_alv. DATA: G_TABNAME_HEADER TYPE SLIS_TABNAME. DATA: G_TABNAME_ITEM TYPE SLIS_TABNAME. DATA: G_KEYINFO TYPE SLIS_KEYINFO_ALV. *--select options SELECT-OPTIONS : S_CARRID FOR SFLIGHT-CARRID . *--initialosation INITIALIZATION. *--selection screen on AT SELECTION-SCREEN . *--start of selection START-OF-SELECTION. SELECT CARRID CONNID FLDATE FROM SFLIGHT INTO TABLE i_SFLIGHT WHERE CARRID IN S_CARRID. IF i_SFLIGHT[] IS NOT INITIAL. SELECT CARRID CONNID DISTANCE INTO TABLE i_SPFLI FROM SPFLI FOR ALL ENTRIES IN I_SFLIGHT WHERE CARRID = i_SFLIGHT-CARRID. IF sy-subrc NE 0. MESSAGE e001(z538msg). ENDIF. ENDIF. PERFORM fill_fieldcatalog1. PERFORM fill_fieldcatalog2. PERFORM HIERARCHY_ALV. * PERFORM alv_events. G_KEYINFO-header01 = 'Madhu'. G_KEYINFO-item01 = 'CONNID'. G_TABNAME_HEADER = 'I_SFLIGHT'. G_TABNAME_ITEM = 'I_SPFLI'. *&
| | | ---------------Original Message--------------- From: Kalyani Udare Sent: Saturday, February 12, 2011 10:12 AM Subject: TOP_OF_PAGE not working in REUSE_ALV_HIERSEQ_LIST_DISPLAY 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 _.____.__ |