For Example, If we are having selection screen like:
(Main)Screen I
- Quotation type (for example ZA = CSCOT Quotation)
- Offer number (also as range, Sales Document)
- Customer (sold-to party)
(Sub)Screen II(one tab)
- offer submission date (VBAK- ZOSD)
- validity (from, to)
- expected order date (VBAK- ZEOD)
(Sub)Screen III(second tab)
- Application (VBAK-KVGR3)
- Partner roles i.e. Ship-to party, Channel partner, Consultant and end customer
(Main)Screen I
- Quotation type (for example ZA = CSCOT Quotation)
- Offer number (also as range, Sales Document)
- Customer (sold-to party)
(Sub)Screen II(one tab)
- offer submission date (VBAK- ZOSD)
- validity (from, to)
- expected order date (VBAK- ZEOD)
(Sub)Screen III(second tab)
- Application (VBAK-KVGR3)
- Partner roles i.e. Ship-to party, Channel partner, Consultant and end customer
1. First declare the TABs we require with default screen numbers.
SELECTION-SCREEN BEGIN OF TABBED BLOCK tbbl FOR 27 LINES.
SELECTION-SCREEN TAB (79) tab1 USER-COMMAND tabl1 DEFAULT SCREEN 11.
SELECTION-SCREEN TAB (79) tab2 USER-COMMAND tabl2 DEFAULT SCREEN 12.
SELECTION-SCREEN TAB (79) tab3 USER-COMMAND tabl3 DEFAULT SCREEN 13.
SELECTION-SCREEN END OF BLOCK tbbl.
SELECTION-SCREEN BEGIN OF TABBED BLOCK tbbl FOR 27 LINES.
SELECTION-SCREEN TAB (79) tab1 USER-COMMAND tabl1 DEFAULT SCREEN 11.
SELECTION-SCREEN TAB (79) tab2 USER-COMMAND tabl2 DEFAULT SCREEN 12.
SELECTION-SCREEN TAB (79) tab3 USER-COMMAND tabl3 DEFAULT SCREEN 13.
SELECTION-SCREEN END OF BLOCK tbbl.
2. Now declare each tab-screen.
SELECTION-SCREEN BEGIN OF SCREEN 11 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_auart FOR vbak-auart. "Quotation Type
SELECT-OPTIONS s_vbeln FOR vbak-vbeln. "Offer Number
SELECT-OPTIONS s_kunnr FOR kna1-kunnr. "Customer No
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 11.
SELECTION-SCREEN BEGIN OF SCREEN 12 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE.
SELECT-OPTIONS s_zzosd FOR vbak-zzosd. "Offer Submission Date
SELECT-OPTIONS s_zzeod FOR vbak-zzeod. "Expected Order Date
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 12.
SELECTION-SCREEN BEGIN OF SCREEN 13 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE.
SELECT-OPTIONS s_kvgr3 FOR vbak-kvgr3. "Application
SELECT-OPTIONS s_parvw FOR vbpa-parvw. "Partner Function
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 13.
SELECTION-SCREEN BEGIN OF SCREEN 11 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS s_auart FOR vbak-auart. "Quotation Type
SELECT-OPTIONS s_vbeln FOR vbak-vbeln. "Offer Number
SELECT-OPTIONS s_kunnr FOR kna1-kunnr. "Customer No
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 11.
SELECTION-SCREEN BEGIN OF SCREEN 12 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE
SELECT-OPTIONS s_zzosd FOR vbak-zzosd. "Offer Submission Date
SELECT-OPTIONS s_zzeod FOR vbak-zzeod. "Expected Order Date
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 12.
SELECTION-SCREEN BEGIN OF SCREEN 13 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE
SELECT-OPTIONS s_kvgr3 FOR vbak-kvgr3. "Application
SELECT-OPTIONS s_parvw FOR vbpa-parvw. "Partner Function
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF SCREEN 13.
INITIALIZATION.
tab1 = 'Master Data'.
tab2 = 'Date'.
tab3 = 'Application Data'.
2. Navigation between sub-screens is not possible when:
b) The present displayed sub-screen has fields with failed data validation.
To handle this scenario, the following logic has to be used in AT SELECTION SCREEN event.
CHECK sy-ucomm NE 'TABL1'
AND sy-ucomm NE 'TABL2'
AND sy-ucomm NE 'TABL3'.
ALSO READ:
- Change The Height Of The Screen Layout To Make It Full Screen.
- F4 (Value On Request) For Field Using FM RSISP_DDIC_F4_VALUES.
- F4 (Value On Request) For Organization Unit In HR Report Program.
- F4 (Value On Request) For Organization Unit In HR Report Program.
- Updating Value Of Another Field On The Selection Screen.
- Complex Selection Screen (Using Macros).
- Printing Selection Screen Data On The Report Output.
No comments:
Post a Comment