Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms table and page brake

sergio_atzori
Explorer
0 Kudos

Hi experts,

Iu2019ve got some plain questions about smartsforms,

I need to print data from a table containing some header data and linked detailed items on each row (so header and related item on the same line).

My layout ought to work this way:

A header section has to appear on the upper side of each page, theese header data have to be related, so must belong, to all items that happen to be shown just beneath it, within the so call main (window) section,

On change of someones of header fields, just two of thems, I must have a page brake, and contents of table with new header data and related items got to be started and follow on a new page,

What happen to be the proper and best practice to gain this simple aim?

u2018couse I tried different ways,

Iu2019ve created a window for header data and a main windows for items and a new page break event on changing of tableu2019s fields too.

But when new page happen it seems impossible to get the proper header data in the upper section according properly with following items lines in the main section of the same page, as the smartform would seem composing and matching them in complete different times, so matches are all wrong,

Beside I also tried to use only the main window including my simple table and adopting header part of the table smartform node as my header for each page, but I couldu2019t reach the goal either again, ( the printing is failing matching header and items in the first page of each page brake, is printing an unesefull page without data at the end, and so on,)

Problem is I can make up the layout at least but I canu2019t manage running out pages with proper break and filling,

Could anyoune help?

Many thanks in advance,

Sergio,

1 REPLY 1

former_member156446
Active Contributor
0 Kudos

I would create a header text box, and put a condition in the header tab based on some flag which I would set to X on change of header line.

or

loop at the itab into wa_itab.

header text condition lv_h1 = wa_itab-h1.

lv_h1 = wa_itab-h1.