SAP PM & ABAP Code Niraj Visnoi

Subscreen in SAP ABAP

Home
What is SAP ?
SAP LSMW Explained with example
SAP PM T-Codes
PM BRD/COR Maintenance
Add Your URL
User Exits & Enhancements
Best Of SAP Links
BDC Code
My Resume
SAP SmartForms Step by Step
SAP ABAP ALV Grid Explained with Example
Useful Tips
Contact Information Guest Book and Consultants List
ABAP Code
ABAP System Fields
SAPScript
SAPScript Graphics
SAPScript Print Program
ABAP ListViewer
Dialog Programming
SAP Tables
SAP ALE and IDOC
Recommended SAP ABAP Coding guidelines
SAP General ABAP
Submit Your Code
SAP Books For consultants
Free Website Submission and ROR Sitemap generator
Free Domain Search
Free HoroScope

SubScreen explained in detail .

Subscreens are screens which can be embeded into another screen. These can be used and created with both selection screen as well as screen painter.
  They differ from normal screens in the way that that they don't have OK_CODE field of ther own and there PBO and PAI transfer data to the ABAP program in which these screens were created and the cannot have module calls which change status or leave screen and module call AT EXIT-COMMAND AND E type function codes.

In screen painter(SE51) choose the subscreen tool button and draw a subscreen area on the screen,this subscreen area will be used to hold the subscreen at run time.To make a subscreen select the attribute screen type as subscreen and specify the size of the subscreen according to the size of the subscreen area in which it will be placed.
We use ABAP statement to embed and start the flow logic of the subscreen area in the PBO of a screen. A subscreen can contain another subscreen.
CALL SUBSCREEN subscreen_area INCLUDING program screen_number.
A similar call should also exist in PAI of screen.It will also call the PAI modules of the subscreen and will transfer data from subscreen to ABAP program.
CALL SUBSCREEN subscreen_area.

Subscreen can be created in selection screen using ABAP ststement and can be used with tabstrip defined on the selection screen or with the screen defined in the screen painter.
SELECTION-SCREEN BEGIN OF SCREEN screen_number AS SUBSCREEN NO-INTERVALS.
....
...
SELECTION-SCREEN END OF SCREEN screen_number .
 
to use such a subscreen with tabstrip defined on the selection screen we should
use the DYNNR compnent of the structure which is created when the tabstrip is created and specifying the number of the screen .We can also define the subscreen statically for such a tabstrip by using
DEFAULT PROGRAM program SCREEN subscreen_number when declaring a tabstrip in selection screen.
 
SELECTION-SCREEN BEGIN OF TABBED BLOCK tab_area FOR height LINES.
SELECTION-SCREN TAB (width)tab_name USER_COMMAND funct_code DEFAULT program SCREEN subscreen_no .
...
END OF BLOCK  tab_area .
 
 For each tabbed apge TAB addition is used with SELECTION-SCREEN statement. At the initialization event we can fill the tabstrip structure to dsiplay the default screen or specify it with DEFAULT addition.
tab_area-PROGRAM = SY-REPID.
tab_area-DYNNR  =  subscreen_nummber.
tab_area-ACTIVETAB = tabname.
 

Enter supporting content here

http://sap.niraj.tripod.com

Search http://sap.niraj.tripod.com Search www

 http://sap.niraj.tripod.com      Niraj Visnoi *INDIA * niraj_visnoi@consultant.com      
 CELL No. 91 9911413767       Copyright © 2006 all rights reserved