cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger Second and third page in smartform

Former Member
0 Kudos

Hi Gurus,

I am facing a problem , in my smartform I have 3 pages. 1st page consist of main window, second and third page consist of secondary window with different layout. I have 4 condition on basis of which I have to trigger second and third window.

Condition 1 = No printing of both the pages. for this passing indicator to form 'A'

Condition 2 = Printing of Second Page Only. for this passing indicator to form 'B'

Condition 3 = Printing Of Third page Only. for this passing indicator to form 'C'

Condition 4 = Both second & third Pages to be printed. for this passing indicator to form 'D'

In all above cases first page always be printed.

In First page after main window I have put two commands

Command 1 - Go to next page -> Page 2

under output condition

indicator = 'B'

or

indicator = 'D'.

Command 2 - Go to next page -> Page 3

under output condition

indicator = C'

or

indicator = 'D'.

For cases A, B & C its working Fine.

But if I pass D (Both Pages ) its shows error "Page break is allowed only in the main window"

Please help me.

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

"next page" command should be defined "as the last inferior node of the main window" (as explained in sap library).

You defined 2 subsequent "next page" commands, it can't work as only one is taken into account.

You should define for page 1:

"Next page" attribute must be page 1

At the last inferior node of the main window: IF case = 'B' or 'D' then command next page = page 2

IF case = 'C' then command next page = page 3

You should define for page 2:

"Next page" attribute must be empty

Create a dummy MAIN window

(maybe you need to print dummy text like <32>)

At the last inferior node of the main window: IF case = 'D' then command next page = page 3

For more information, see [sap library - smart forms - Dynamic Page Break|http://help.sap.com/saphelp_nw70/helpdata/en/70/e17a37dec511d3b575006094192fe3/frameset.htm]

Former Member
0 Kudos

Hi Sandra,

I modified the smartform according to ur comments, but still Its not working For Case 'D', rest of the cases working fine.

Regards,

Sowmen

Edited by: sowmen das on May 17, 2010 5:23 PM

Sandra_Rossi
Active Contributor
0 Kudos

I've just tried, it works fine. Maybe you misinterpreted what I said above, because it is not obvious. There is just a little error in what I mentioned, in bold below.

The same MAIN window (with same child nodes) should appear in both pages 1 and 2, with following child nodes:

1) what you want to print on page 1

2) IF case = 'B' or 'D' then command next page = page 2

3) IF case = 'C' then command next page = page 3

4) dummy text <32> CONDITION OUTPUT ONLY ON PAGE 2 (we must add this condition, otherwise we would get an error in case 'C' as the main window doesn't exist in page 3)

5) IF case = 'D' then command next page = page 3

If it still doesn't work, you should create a test smart form from scratch with the minimum required, as I did (it took me 5 minutes), make sure it works, and then compare with your original smart form to check what you made wrong.

Former Member
0 Kudos

Hi Sandra,

Thanks a lot for solution. It worked.

Regards,

Sowmen Das

Answers (0)