0 pts.
 How do you dynamically display tabs in a report program?
I have a need to display tabs on a selection screen, but depending on what report user is requesting (by selecting one of three push buttons on same selection screen), I need to display specific tabs. When user selects report 1, I need tabs ORG and POS to display. When user selects report 2, I need tabs COST CENTER and POS to display. When user selects report 3, I need tab POS only to display. I can get the tabs to display okay but when I click on tab POS in report 2, tab COST CENTER disappears and SCREEN table is filled with COST CENTER values. Suggestions? Current logic: SELECTION-SCREEN BEGIN OF TABBED BLOCK sub_om_selec FOR 16 LINES. SELECTION-SCREEN TAB (79) gvtorgtx USER-COMMAND omsb DEFAULT SCREEN 1010. SELECTION-SCREEN TAB (79) gvtccotx USER-COMMAND ccsb DEFAULT SCREEN 1020. SELECTION-SCREEN TAB (79) gvtpostx USER-COMMAND sbom DEFAULT SCREEN 1030. SELECTION-SCREEN END OF BLOCK sub_om_selec. ***** TABS ************* * Organization (or SEO) SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN. SELECTION-SCREEN BEGIN OF BLOCK b1010-1 WITH FRAME TITLE text-org. SELECTION-SCREEN SKIP 1. SELECT-OPTIONS: gso_seo FOR p9011-lob NO INTERVALS MODIF ID org. SELECTION-SCREEN COMMENT /1(25) text-tor. SELECT-OPTIONS: orgid FOR p0001-orgeh NO INTERVALS MODIF ID org. SELECTION-SCREEN SKIP 1. SELECTION-SCREEN BEGIN OF BLOCK b1010-2 WITH FRAME TITLE text-osr. SELECTION-SCREEN BEGIN OF LINE. PARAMETERS: p_xploff TYPE zh_org_str_xplod_off RADIOBUTTON GROUP osrc DEFAULT 'X' MODIF ID org. SELECTION-SCREEN COMMENT 4(40) FOR FIELD p_xploff. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN BEGIN OF LINE. PARAMETERS p_xplon TYPE zh_org_str_xplod_on RADIOBUTTON GROUP osrc MODIF ID org. SELECTION-SCREEN COMMENT 4(40) FOR FIELD p_xplon. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN END OF BLOCK b1010-2. SELECTION-SCREEN END OF BLOCK b1010-1. SELECTION-SCREEN END OF SCREEN 1010. *Cost Center SELECTION-SCREEN BEGIN OF SCREEN 1020 AS SUBSCREEN. SELECTION-SCREEN BEGIN OF BLOCK frm7 WITH FRAME TITLE text-s13. SELECT-OPTIONS: gso_cco FOR p0001-kostl NO INTERVALS MODIF ID cco. SELECTION-SCREEN END OF BLOCK frm7. SELECTION-SCREEN END OF SCREEN 1020. *Position (or Employee) SELECTION-SCREEN BEGIN OF SCREEN 1030 AS SUBSCREEN. SELECTION-SCREEN BEGIN OF BLOCK frm5 WITH FRAME TITLE text-s05. SELECT-OPTIONS: gso_pos FOR p0001-plans NO INTERVALS MODIF ID pos. SELECTION-SCREEN COMMENT /1(25) text-tor. SELECT-OPTIONS: gso_emp FOR p0001-pernr NO INTERVALS MODIF ID pos. SELECTION-SCREEN END OF BLOCK frm5. *Substitute Responsibility Report Options SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-s14. PARAMETERS: gso_mor RADIOBUTTON GROUP radi DEFAULT 'X' "Mgr Org Rpt MODIF ID ccr. PARAMETERS: gso_ccr RADIOBUTTON GROUP radi MODIF ID ccr. "CC Owner Rpt SELECTION-SCREEN END OF BLOCK frame1. SELECTION-SCREEN END OF SCREEN 1030. AT SELECTION-SCREEN. IF sscrfields-ucomm = 'OMSB' OR sscrfields-ucomm = 'CCSB' OR sscrfields-ucomm = 'SBOM'. p_prctyp = sscrfields-ucomm. ENDIF. AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN. *DISPLAY CERTAIN TABS DEPENDING ON WHICH REPORT WAS SELECTED ********** * Only display TAB: ORGANIZATION for Org Manager Sub Report IF screen-name = 'GVTORGTX'. IF p_prctyp = 'OMSB' OR p_prctyp IS INITIAL. screen-active = '1'. "Display ORG tab ELSE. * screen-invisible = '1'. screen-active = '0'. "Don't display ORG tab ENDIF. MODIFY SCREEN. ENDIF. * Only display TAB: COST CENTER for Cost Center Owner Rpt IF screen-name = 'GVTCCOTX'. IF p_prctyp = 'CCSB' OR p_prctyp IS INITIAL. screen-active = '1'. "Display COST CENTER tab ELSE. screen-active = '0'. "Don't display COST CENTER tab ENDIF. MODIFY SCREEN. ENDIF. * Display TAB: POSITION for all reports IF screen-name = 'GVTPOSTX'. screen-active = '1'. "Display POSITION tab ELSE. MODIFY SCREEN. ENDIF. *Not Working ***** *DISPLAY CERTAIN FIELDS DEPENDING ON WHICH REPORT WAS SELECTED ********* * Only display ORGs or SEO's for Org Management Sub Report IF screen-group1 = 'ORG'. IF p_prctyp = 'OMSB' OR p_prctyp IS INITIAL. screen-active = '1'. "Display organization fields ELSE. screen-active = '0'. "Don't display organization fields ENDIF. MODIFY SCREEN. ENDIF. * Only display Cost Center for Cost Center Owner Sub Report IF screen-group1 = 'CCO'. IF p_prctyp = 'CCSB' OR p_prctyp IS INITIAL. screen-active = '1'. "Display cost center field ELSE. screen-active = '0'. "Don't display cost center field ENDIF. MODIFY SCREEN. ENDIF. * Only display Sub Resp Report Options for Sub Resposibility Rpts IF screen-group1 = 'POS'. screen-active = '1'. "Display position fields MODIFY SCREEN. ENDIF. * Only display Position Rpt Options for Substitute Responsibility Rpts IF screen-group1 = 'CCR'. IF p_prctyp = 'SBOM' OR p_prctyp = 'SBCC'OR p_prctyp IS INITIAL. screen-active = '1'. "Display position rpt options ELSE. screen-active = '0'. "Don't display position rpt options ENDIF. MODIFY SCREEN. ENDIF. ENDLOOP. rhx-radios-pbo. INCLUDE rhoini00.

Software/Hardware used:
ASKED: September 26, 2007  2:59 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _