cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform - remove second page

sushant_singh
Participant
0 Kudos

Hi all,

I need to print a smartform having multiple pages based on the data.I am creating two pages in the smartform.the first page containes a main window and several secondary windows and the second page also contains several secondary window and the same main window copied from first page.

now in the print preview , the second page is appearing with blank part where i have placed the main window. I want that the second page should not get displayed if there is no data to be printed in the second page's main window.

how can i achieve this.

Thanks ,

Sushant Singh

Accepted Solutions (0)

Answers (5)

Answers (5)

sushant_singh
Participant
0 Kudos

I am displaying data using loop and Template node. and There is only single record in it.

Former Member
0 Kudos

hi Sushant,

now I have created smartform with two pages, each contains the same main window and some variable windows, for the PAGE1 i have given NAEXT PAGEas PAGE2, and i have inserted 1 record in the table. it is working fine and it is printing only 1 page.

any how may be there is problem in your system i don't know... but once check all the nodes you r printing in MAIN WINDOW, check is there any blank is printing at the end may be thats why is going to page2. all the best

Former Member
0 Kudos

Hi Sushat,

U can create program lines inside LOOP also ..Try the above logic in that

regards

Avi

sushant_singh
Participant
0 Kudos

I am not calling the second page using the command line node,

please tell me what could be the cause of this issue.

Thanks ,

Sushant Singh

Former Member
0 Kudos

hi

if u can tell wht u r printin the MAIN window... will this is overflowing.. unless and until the data is overflowed in the main window the next page will not be triggerd.. please tell more input to invesigate on this..

wht data ur printing in the main window? if u r printing table data then check whether all the records are printing in the first or not, have u given the NEXT PAGE as PAGE2,

Former Member
0 Kudos

Hi Sushant,

Create one code line before command inside the MAIN Area of the Table,count the sy-tabix ( before count how many entries can be thr in FIRST page, say 15 ) assign that sy-tabix to a variable say w_tabix , in the command option set the condition if w_tabix > '15', then go to next page.

Regards

Avi...

Former Member
0 Kudos

Hi Sushant,

Normally in SMARTFORM if we have same table to be looped at in the MAIN WINDOW of both the pages and if the table have only limited entries and all the entries are getting displayed in FIRST PAGE itself , then it wont go to the second page.

regards

Avi..

Former Member
0 Kudos

Hi sushanth,

wht u r printing in u r smartform, and r u calling the second page explicitily using the COMMAND node.. normally the second will not be triggered without data to be printed in main window.

Former Member
0 Kudos

Hi!

This is caused by a bug in your program because normally SMARTFORM is not showing empty pages, where the main window is empty (as well as SAPScript).

You might forced a new-page somewhere in your coding, or some printed spaces/empty lines into the following page.

Regards

Tamá