Skip to Content

The common problem while using the template for address or header information is that when the data is not available for that particular column the line appears blank. This problem can be avoided as seen in SAP SCRIPTS by using SCRIPT CONTROL COMMAND <IF>…<END IF>.Unfortunately the same cannot be done while designing TEMPLATES in SMART FORMS.

One way to avoid this is by using TABLES without data option i.e. by UN-checking the Internal table option as shown below in the screenshot.


                        Image1.JPG

By doing so our table becomes and behaves like a dynamic template.


Steps to Design Dynamic Template.


Step-1.  Create a sample smart form  & add the interface fields as shown below.


                         Image2.JPG


Step-2. Create a secondary window to place your dynamic template as shown below.

                                 Image4.JPG

Step-3.  Create LINE TYPES with required columns to be displayed. Shown below is the dynamic template created for testing.

                              Image3.JPG

Step-4.  Provide conditions in Conditions Tab as shown below.

                              Image5.JPG


Step-5  Wrap the fields and map the corresponding values to line types.


Execute the SMART FORM after mapping. The interface values are passed as shown below.



TEST-1.  Passing all values to the interface parameters and then execute.

           

                              Image6.JPG

                    Image7.JPG


Test-2.   Passing empty values to the interface parameter LINE3_DATA and then execute.


                          Image8.JPG

                                   Image9.JPG



Output :- As you can see in the Dynamic template the LINE3_DATA value was empty. As per the condition provided the Line type has not appeared and the space has been automatically adjusted WHEREAS in Static template the line appears even when no data is passed.


Please find the attached sample program for better understanding.

To report this post you need to login first.

1 Comment

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

Leave a Reply