Mentor SAP

The Switch Framework

 

The switch framework ensures that customers receive all industry solutions as a complete package and that they can activate the packages they want to use.

 

You can use the Switch framework for the following reasons:

  1. You can use the switch framework to create switches and to assign packages, screen elements, and menu entries to the switches. You can use a business function to group these switches.
  2. You can use the switch framework to activate and deactivate enhancement implementations.

Switch Framework for Enhancement implementations

The customer defines a switch, to which he or she assigns the package with the implementations to be activated. The customer also defines a business function to which they assign the switch. This task can be done using transaction SFW1 and SFW2.

 

The customers can activate and deactivate business functions using transaction SFW5.

 

When the customer deactivates a business function, all package objects that can be activated become ineffective, although they are still available in the system. A perquisite of deactivation is that the business function is defined as reversible and it does not contain any ABAP Dictionary objects.

 

It does not make sense to deactivate industry solution components after you activate them, because activation generates all related programs and creates the related ABAP Dictionary objects. That is why industry solutions and enhancement packages are not reversible.

 

Switches and business functions

 

To Create a switch, performs the following steps:

  1. Run transaction SFW1.
  2. On the Switch: init. Screen, enter the name of the Switch in the Switch field and Choose the Create pushbutton
  3. Enter a short description of the switch in the short Text field.
  4. On the change Switch screen, enter the name of the switch in the package field
  5. Choose the activate pushbutton.

Assignment of Switches to Business functions

 

If the new business function does not contain any components belonging to an industry solution, use business function type G.

 

When you assign a switch to a business function, you must specify the assignment type.

 

The assignment types are as follows:

The activation assignment type assigns all switch or package objects to the business function. Choose the activation assignment type for your business function if you are going to use it for enhancement implementations

 

  • Enabling
  • The enabling assignment type assigns only the ABAP Dictionary objects to the business function.

     

    Reversible Business function

     

    To enable the business function to be deactivated, select the reversible checkbox on the Properties tab page. All business functions can be switched on; however, one reversible business functions can be switched off later.

     

    Activation and Deactivation of Business functions

     

    To activate or deactivate business function, make sure that you have switched to change mode.

     

    All enhancement implementations assigned to the enhancement framework are switchable. All other SAP enhancement, such as customer exit, classical BADI , user-exits, and business transaction events are not affected.

     

    To use implicit enhancement to make BADIs switchable, perform the following steps:

    1. Use transaction SE19 to implement the BADI s in the usual manner
    2. Create the intended customer class as usual. In the class builder, switch from editing to display the interface method
    3. Use implicit enhancement to enhance the interface method implementation at the beginning or end of the method.

    Switch-off Enhancement