cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic window size in smartforms

Former Member
0 Kudos

Hi All,

I am creating one form and I need to display a table in Main window. My issue is :

I have given my window a fix size . Now suppose I have 20 records in my table during run time then few records are coming in one page and rest in other but if I have only 1 record in table then it is printing that record keeping the remaining window blank.

I want to remove the blank space from the main window i.e if it has one record its size should automatically adjust to accommodate one record and there should be no blank .

Kindly help.

Thnaks

Sumit K.

Accepted Solutions (0)

Answers (4)

Answers (4)

adam_piwowarski7722
Discoverer
0 Kudos
Former Member
0 Kudos

Hi,

When the data(values) exist then only they are displayed otherwise the table stops at that moment. You might have put the borders to the Main window. You put the borders to the table instead of  Main window.

It should solve your problem

Regards

Haritha

Former Member
0 Kudos

Hi Sumit,

I think, dynamic resizing is not possible here, U might want to try below workaround for your requirement,

-> create a table in the MAIN window and pass the data in the Table Footer.

Thanks

Vivek

naimesh_patel
Active Contributor
0 Kudos

Dynamic Window size is not possible in Smartforms, unless you do some kind of back door as pointed out in Dynamic Background Colors in Smartforms . Ofcourse, you would need to find a table where you can play with the window size and move other windows to that position.

Instead of that, what you can do is, move all the stuff which is below your MAIN window into the Main window itself. That will ensure that the content below the main window would be printed right after the end of your data. Like If you have this type of structure

MAIN

. TABLE

.. HEADER

.. MAIN

.. FOOTER

FOOTER

. TEXT1

FOOTER2

. TEXT2

Make it like this:

MAIN

. TABLE

.. HEADER

.. MAIN

.. FOOTER

. TEMPLATE

.. TEXT1

. TEMPLATE2

.. TEXT2

Regards,
Naimesh Patel

Former Member
0 Kudos

Hi,

I  have gone through your code for "Dynamic Background Colors in Smartforms". I have copied the same in my smartforms -> Initialization . and code is given below

   DATA: l_tabdef  TYPE ssftabdef,     " Work Area for the Table
     t_ltypes  TYPE tsfltype,      " Table - Line types
     l_ltypes  TYPE ssfltype,      " Work Area for the table
     t_colinfo TYPE tsfcolinfo,    " Table - Columns
     l_colinfo TYPE ssfcolinfo,    " Work area for the table
     t_border  TYPE tsfctaba,      " Tables - Borders
     l_border  TYPE ssfctaba.      " Work Area for the borde








ASSIGN ('(SAPLSTXBC)TABDEFS') TO <f_tab>.
BREAK-POINT .
LOOP AT <f_tab> INTO l_tabdef where name = 'HEADER'.  " only for one template
*
* Table line Types
*  Line type TYPE1 from the table MAIN_TABLE
  LOOP AT l_tabdef-tltype INTO l_ltypes where linetype = 'C2'.  " only for one line type is required


*
* Coloum information
*   Column1 (cell) of the TYPE1
    LOOP AT l_ltypes-tcolinfo INTO l_colinfo .
*
* Borders
*   Background color and borders for that cell
      LOOP AT l_colinfo-borders INTO l_border.
*
* Clearing the color parameters for the cell
*        CLEAR: l_border-intensity,              " Intensity
*        l_border-fillcolor-red,          " Red
*        l_border-fillcolor-used,         " Color Used
*        l_border-cfillcolor-color,       " Red color in Hexa
*        l_border-cfillcolor-xred.        " Color used in Hexa
*
        l_border-fillcolor-red = '195'.
        l_border-fillcolor-used = 'Y'.
        l_border-cfillcolor-color  = 'Y'.
        l_border-cfillcolor-xred = 'C3'.
        MODIFY l_colinfo-borders FROM l_border.
      ENDLOOP.
*
      MODIFY l_ltypes-tcolinfo FROM l_colinfo.
    ENDLOOP.
*
    MODIFY l_tabdef-tltype FROM l_ltypes.
  ENDLOOP.
*
  MODIFY <f_tab> FROM l_tabdef.
ENDLOOP.

, but i am not getting desured result. Can you help me in this regard ? can send mail to shiva1979in@yahoo.com