Skip to Content
Few days back, Dennis van den Broek wrote a superb blog on Wizard Framework. Well actually he missed out few things there, so here is another one completing the whole know-abouts of Wizards in ABAP.  1. When you start wizard builder with transaction sbpt_wb, there is a button on bottom left side which says “Switch On Wizard Diagnosis mode”. If you switch on this mode, you can do most of the wizard-tweaking on the fly at the runtime itself. So now whenever you run any wizard on that application server, you will get an additional screen to assist you to tweak up the wizards. image This screen also displays the stack of the steps already executed. From this screen, you can change the description of the screen, the screen itself or the local data variables you declared for this screen.  2. There are few other buttons which werent talked about in the previous blog.  image   The two buttons on the left to Back(or Zuruck) are very conducive to the developer. The first one assists the developer to put breakpoints at various places in the wizard. image And the second button helps the developer to change the basic data about the wizard like the title of the wizard, the dialog text elements of various steps, whether Back button should exist or not etc.  image 3. In his blog, Dennis mentioned that there is no way of adding a screen in between in a wizard. And that was the reason he created another function module to accomplish that task. Well, I have kinda figured it out anonther way to doing it.   In the subroutine WZ_DEFINE_WIZARD_STEPS, you can manually add code to define one more step. Let us exemplify this. Suppose you need to add a step between the second and third step. So you will add the following code in between the definitions of the second and third step.  L_WIZARD_STEP-FORM      = ‘CB_PROCESS_STEP_0250’.   L_WIZARD_STEP-TEXT      = TEXT-007.   APPEND L_WIZARD_STEP TO P_WIZARD_STEPS. Then create a subroutine with the name CB_PROCESS_STEP_250 and add following lines of code in it. FORM CB_PROCESS_STEP_0250                “#EC CALLED         TABLES            CONTAINER         USING            COMMAND. * begin of local data definition   DATA:     L_WIZARD    type SWF_WIZARD. * end of local data definition  * initialize wizard step * the wizard has one unique title while it is running   L_WIZARD-TITLE      = TEXT-TTL. L_WIZARD-DESCOBJECT = ‘ZNEW_STEP_ADDED’ . “this is a text in dialog (SE61)   L_WIZARD-SUBSCREEN1 = ‘0250’.   L_WIZARD-SUBSCPOOL1 = ‘SAPLZCSG_CREATE’.  * set subscreen data (transport data out of global wizard data * to global screen data )   PERFORM USR_SET_SUBSCREEN_DATA_0250.  * call wizard screen   CALL FUNCTION ‘SWF_WIZARD_CALL’        EXPORTING             WIZARD_DATA                 = L_WIZARD        EXCEPTIONS             OPERATION_CANCELLED_BY_USER = 01             BACK                        = 02.   SWF_EVALUATE COMMAND.  * set subscreen data from global screen data back to the global * wizard area   PERFORM USR_GET_SUBSCREEN_DATA_0250.    ENDFORM.                    ” CB_PROCESS_STEP_0250     Then create USR_SET_SUBSCREEN_DATA_0250 and USR_GET_SUBSCREEN_DATA_0250 subroutines manually and at the end and most importantly create a subscreen with number 250. Now go to transaction se61 and create a description object of name znew_step_added. Thats it. Your new step is very well there in the wizard 🙂
To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Dennis van den Broek
    Thanks for the compliment.

    Your blog is a welcome addition to my blog on wizards good to see some documentation on how to use the wizard builder.

    Your explanation on how to add additional steps is very similar to what my function module does automatically.

    You can also find some useful information on the SAP design guild website: http://www1.sapdesignguild.org/resources/wizard_html/wizard_styleguide.pdf

    I enjoyed reading your blog it was very good.

    Regards,
    Dennis

    (0) 

Leave a Reply