cancel
Showing results for 
Search instead for 
Did you mean: 

Blank page triggred at the end smartform

Former Member
0 Kudos

Hi all,

I have 2 pages Page1 and Page2

I have a table itab_final on page1 main window.

As soon as department changes page break to Page2

i am able to do this but as soon as all the table records are over, one more extra page is generated at last with all secondary windows printed and without main window printing. This is the problem .This extra page should not be printed.

what I ahve done is i have used the event SORT ON END for department no.

and written a command line on this event.

I think after the last record on table node this command line is triggered and aextra page is triggered.

I dont want this.

How can I stop this page from triggering?

Please provide me the solution.

regards,

Mozila

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all,

thanks for your replies.

it is solved

what i did was got the no of records in the table using describe table in the code placed it in a variable A.

then in the table node i kept a counter which incremented with each record of table and placed it in B.

then i gave condition on command line to trigger next page only when A # B

nabheetscn
Active Contributor
0 Kudos

Hi,

Instead of it declare a variable and set it based on if department changes and trigger new page.

Thanks

Nabheet

Former Member
0 Kudos

Hi

I am using table node and not a loop.

I am using sort on end event where command line is triggered.

Can you please tell as to how it is to be done with table node?

Former Member
0 Kudos

Hi

Perhaps you can use a variable and trigger the new page only if the value of this variable is not equal to the current value of the table, something like this:

LOOP AT ITAB.
    IF ITAB-FIELD <> CHECK_FIELD AND NO_FIRST_REC = 'X'.
      SKIP TO NEXT PAGE
    ENDIF.
    CHECK_FIELD    = ITAB-FIELD.
    NO_FIRST_REC = 'X'.
ENDLOOP.

Max