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 

Tab strip Control using Wizard

...Previous

Step24: Go to Screen 600 à Flow LogicàCode is auto generated by Wizard  

Step25: Go to Screen 601 à Flow LogicàUncomment the MODULE STATUS_0110 to implement the logic

Step26: Double Click the MODULE STATUSà PBO status will be created

Step27: Create the PBO MODULE STATUS à Main Program

 

Step28: Go to Sub screen 602à Flow Logic à Uncomment the PBOà MODULE STATUS

Step29: Insert the following Logic in the MODULE STATUS.

Step30: Through the code wizard empty PBO and PAI has been generated. Need to implement the logic to call screens( Normal screen 600, Subscreen 601 and Subscreen 602). And  in PBO MODULE STATUS  

REPORT  ZTABSTRIP_CONTROL NO STANDARD PAGE HEADING.  

Declaration for Tables
TABLES : vbak, vbap.  

*&SPWIZARD: FUNCTION CODES FOR TABSTRIP 'TABSTRIP'
CONSTANTSBEGIN OF C_TABSTRIP,
             TAB1 
LIKE SY-UCOMM VALUE 'TABSTRIP_FC1',
             TAB2 
LIKE SY-UCOMM VALUE 'TABSTRIP_FC2',
           
END OF C_TABSTRIP.
*&SPWIZARD: DATA FOR TABSTRIP 'TABSTRIP'
CONTROLS:  TABSTRIP TYPE TABSTRIP.
DATA:      BEGIN OF G_TABSTRIP,
             SUBSCREEN   
LIKE SY-DYNNR,
             PROG        
LIKE SY-REPID VALUE 'ZTABSTRIP_CONTROL',
             PRESSED_TAB 
LIKE SY-UCOMM VALUE C_TABSTRIP-TAB1,
           
END OF G_TABSTRIP.
DATA:      OK_CODE LIKE SY-UCOMM.  

Calling Screens
call screen 600.
call screen 601.
call screen 602.  

*&SPWIZARD: OUTPUT MODULE FOR TS 'TABSTRIP'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: SETS ACTIVE TAB
MODULE TABSTRIP_ACTIVE_TAB_SET OUTPUT.
  TABSTRIP-ACTIVETAB = G_TABSTRIP-PRESSED_TAB.
  
CASE G_TABSTRIP-PRESSED_TAB.
    
WHEN C_TABSTRIP-TAB1.
      G_TABSTRIP-SUBSCREEN = 
'0601'.
    
WHEN C_TABSTRIP-TAB2.
      G_TABSTRIP-SUBSCREEN = 
'0602'.
    
WHEN OTHERS.
*&SPWIZARD:      DO NOTHING
  
ENDCASE.
ENDMODULE.

*&SPWIZARD: INPUT MODULE FOR TS 'TABSTRIP'. DO NOT CHANGE THIS LINE!
*&SPWIZARD: GETS ACTIVE TAB
MODULE TABSTRIP_ACTIVE_TAB_GET INPUT.
  OK_CODE = SY-UCOMM.
  
CASE OK_CODE.
    
WHEN C_TABSTRIP-TAB1.
      G_TABSTRIP-PRESSED_TAB = C_TABSTRIP-TAB1.
    
WHEN C_TABSTRIP-TAB2.
      G_TABSTRIP-PRESSED_TAB = C_TABSTRIP-TAB2.
    
WHEN OTHERS.
*&SPWIZARD:      DO NOTHING
  
ENDCASE.
ENDMODULE.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0110  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module STATUS_0110 output.
  
SELECT SINGLE vbeln erdat erzet ernam
     
FROM vbak
     
INTO (vbak-vbeln, vbak-erdat, vbak-erzet, vbak-ernam).

  
SELECT SINGLE vbeln posnr matnr matwa
    
FROM vbap
    
INTO (vbap-vbeln, vbap-posnr, vbap-matnr, vbap-matwa).

endmodule.                 " STATUS_0110  OUTPUT  

Step31: Activate the program à Right click on program à Execute à In a New Window

Step32: The Output is displayed. Tab strip with 2 tabs 1) Sales Header Details and 2) Sales Item Details

When tabà Sales Header Details is Clickedà VBAK details are displayed

When tabà Sales Header Details is Clickedà VBAP details are 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