Hey There,
I am explaining the concept of calling multiple forms having each different layout from single form.
By creating the different pages (having different layout) in the single form and based on the condition type we can trigger the specific page.
Below is the Step to Step process which shows you how to create the form like that.

Step 1: Creation of Smart form With Multiple Page:
                                        Here I am taking example of 5 forms (Pages) with different Layout which will trigger in a Single form. Below Image will give you more details:

SF_Page1.png

In the above Image you can see 5 Pages are created with different Page Layout (Portrait / Landscape).
Five Main windows are created which will trigger based on the Output type.

Step 2: Create the Text Field inside the Main Window :
                                   Create the Text Field which you want to show in Output, as this is demo I have created single text field which will displayed in the output. You can put the complete logic based on the Business requirement.Below is the snapshot of it:

/wp-content/uploads/2015/03/p1_660234.png    /wp-content/uploads/2015/03/p2_660235.png
/wp-content/uploads/2015/03/p3_660236.png        /wp-content/uploads/2015/03/p4_660238.png
/wp-content/uploads/2015/03/p5_660240.png

Step 3: Logic for triggering the respective page:
                                   In this step I can show you how different pages can be triggered based on the input you have given. Based on the Interface Variable (example – Output Type) we can trigger the respective page. Below is the example for the same.
Example: If requirement is to show the respective Page details based on the output type:


OutType Page
P1 FORM1
P2 FORM2
P3 FORM3
P4 FORM4
P5 FORM5
To get this requirement we need to add Logic in the INITIALIZATION TAB of the Global Definition. Logic is as follows:  

    CASE gv_out.
        WHEN ‘P1’. 
              CONTROL_PARAMETERS-startpage = ‘FORM1‘.
         WHEN ‘P2’.
               CONTROL_PARAMETERS-startpage = ‘FORM2.
         WHEN ‘P3’.
               CONTROL_PARAMETERS-startpage = ‘FORM3‘.
         WHEN ‘P4’.
               CONTROL_PARAMETERS-startpage = FORM4‘.
         WHEN ‘P5’. 
               CONTROL_PARAMETERS-startpage = FORM5‘.
   ENDCASE.
In the above Logic GV_OUT  is the Output type variable which is coming from as an input to the Smartform.

CONTROL_PARAMETERS is the default Interface field in the Smartform.
This output type (GV_OUT)  will be defined in the FORM INTERFACE.



Step 4: Output :

               Based on the input give to the Page (form) will be triggered, below are the outputs;

1. If P1 is the Input to the form, output will be:

               Output1.png

2. If P2 is the Input to the form, output will be:

          Output2.png
3. If P3 is the Input to the form, output will be:
           Output3.png
      
4. If P4 is the Input to the form, output will be:
         Output4.png
5. If P5 is the Input to the form, output will be:
               Output5.png

Conclusion:

          At last we are able to get multiple forms by triggering a Single Smart form. As we also see at a Single point of Time Only 1 form / page is getting triggered so there are Performance issue.
Also if your data are large and it overflowing you can create the NEXT PAGE of each one of the above 5 pages. Need to assign the NEXT page to the respective FORMS (Page).
Note: – Things that need to take care is that Main Window of each Page should be of Same Width.
Keep Learning

Stay Awesome
   Romit Raina

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply