Creating GAF applications

In this recipe, we will see how we can develop and configure Guided Activity Floorplan (GAF) applications. By default, one single step is automatically added to the component configuration. We will create one main step (step 2) that will comprise of one substep. We will write coding that will display the substep after the Next button of the step 2 is clicked. There is no ticket area for a GAF application.

In this recipe, we will focus on the steps relevant to GAF applications.

Getting ready

We create a component by the name ZST8_GAF that comprised of views and windows shown in the following screenshot for the steps and substep:

Getting ready

The defined application is based upon the component FPM_GAF_COMPONENT and interface view is FPM_WINDOW.

Getting ready

How to do it...

Follow these steps:

  1. Within the configuration editor, one main step already exists. In addition, two toolbar buttons, Previous and Next buttons also exist.
    How to do it...
  2. Select the main step and in the Attributes UIBB: WINSTEP1 panel, assign the component and view as shown in following screenshot:
    How to do it...
  3. Then add one more main step using the Add Main Step button on the right-hand side of the screen. Assign the component and view appropriate values (WINSTEP2).
  4. Then, select the Main Step 2, and add a substep using the Add Substep button. For the substep, enter the component and view name created earlier.
  5. Also on the attributes of the Next button of Main Step 2, enter STEP2_NEXT in the Event ID field.
    How to do it...
  6. Next, we will create a new toolbar button on the Substep2 1. We will press the button Add Toolbar Element. The dialog appears as shown in the following screenshot:
    How to do it...
  7. Next, we need to know the substep variant parameter. Select the Substep variant node from the left-hand pane and then choose the menu Change and then click Substep Variant Parameters.
    How to do it...
  8. Note the value from the pop up that appears and then press OK.
    How to do it...
  9. Save and activate your configurations.
  10. Next, we will write the code for activating the substep. This code is written in the PROCESS_EVENT method of the component controller.
  11. We use a CASE statement to make sure our added code runs for the Next button click of the MAINSTEP_2.
  12. We call the CREATE_BY_ID method of the CL_FPM_EVENT class in order to create an event object.
  13. Next, the SET_VALUE method is called in order to specify the event parameters. The method is called three times, for specifying the main step, the next active substep, and the substep variant having the values MAINSTEP_2, SUBSTEP_2_1 and SUBSTEPVARIANT_1 respectively.
  14. Finally, we raise the event that we have created using the RAISE_EVENT method. The MY_EVENT object is passed for the parameter IO_EVENT.
    How to do it...

How it works...

We created the GAF application configuration and component configuration. We created two main steps and one substep. By default, the substep is not active. We wrote the code for activating the substep at runtime. We also added a toolbar button Return to Main Step for returning from the substep to the main step.

Running the application configuration will display the GAF application. You may use the Next button to go to the next step.

How it works...
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.55.18