SAP Virtual/Onsite Trainings

Document Categories:

What's New?

Contribute?

Sample Specs

What's Hot?

Web Dynpro for ABAP Tutorials 


Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe  Unsubscribe 

Working with Sub screens

...Previous

Step11: Go to Sub Screen (0110)à Layout

Drag- Drop the Screen elements

1) Text element attributesàName: Bank AC no

Input field attributes àName: KNBK-BANKN

2) BOX AttributesàName: SUB (This name should be same as the

     Sub area name of the screen (0100))

     Sub screen 0110 layout is shown below.  

 

Step12: Go to Sub screen (0120)à Layout

       Drag- Drop the Screen elements

1) Text element attributesàName: NAME

     Input field attributes àName: KNA1-NAME1

2) Text element attributesàName: Country

    Input field attributes àName: KNA1-LAND1

3) BOX attributesàName: SUB (This name should be same as the Sub area name of the screen (0100))

Sub screen 0120 layout is shown below.

  

Step13: In the Screen (0100) à Element list tab à Give the name as OK_CODE

Step14: In the Screen (0100) à Flow logic tab.

Call sub screens using the syntax as shown below.

Step15: For the Screen (0100). Set the GUI status à ZMENU set the standard tool bar with EXIT, CANCEL and BACK

Step16: Write the following code and Execute.

REPORT  zdemo_multiple_screens NO STANDARD PAGE HEADING.
TABLES:kna1,knbk.
DATA :
   kunnr 
TYPE kna1-kunnr,
   bankn 
TYPE knbk-bankn,
   name1 
TYPE kna1-name1,
   regio 
TYPE kna1-regio.
DATA:
  
screen  TYPE n LENGTH 4 VALUE 0110,
  ok_code 
LIKE sy-ucomm.
CALL SCREEN 100.
CALL SCREEN 110.
CALL SCREEN 120.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  
SET PF-STATUS 'ZMENU'.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
  
CASE sy-ucomm.
    
WHEN 'DISPLAY'.
      
screen = 0110.
    
WHEN 'EXIT' OR 'BACK' OR 'CANCEL'.
      
LEAVE PROGRAM.
  
ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*&      Module  STATUS_0110  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0110 OUTPUT.
  
SELECT SINGLE bankn
  
FROM knbk
  
INTO knbk-bankn
  
WHERE kunnr = kna1-kunnr.
ENDMODULE.                 " STATUS_0110  OUTPUT
*----------------------------------------------------------------------*
*  MODULE USER_COMMAND_0110 INPUT
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
MODULE user_command_0110 INPUT.
  
CASE sy-ucomm.
    
WHEN 'DISPLAY'.
      
screen = 0120.
    
WHEN 'EXIT'.
      
LEAVE PROGRAM.
  
ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*&      Module  STATUS_0110  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0120 OUTPUT.
  
SELECT SINGLE name1
         land1
  
FROM kna1
  
INTO (kna1-name1,kna1-land1)
  
WHERE kunnr = kna1-kunnr.
ENDMODULE.                 " STATUS_0110  OUTPUT

Step17: Right click on to the program à Execute à In a new Window

Step18: Screen is displayed

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image