How do you dynamically display tabs in a report program?

pts.
Tags:
ABAP
SAP development
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following