cancel
Showing results for 
Search instead for 
Did you mean: 

How to supress a blank page in smart forms

Former Member
0 Kudos

Hi,

I am using a command in Smartforms to trigger a new page whenever a new BELNR(Accounting document). My problem is in the output i am getting a first page is blank and remaining pages are ok.

What i did Is In conditions tab i written as temp NE belnr. So first time temp is nothing so blank page is coming. and in the following text elements i am passing a belnr value to the temp.

Temp = belnr and in general attributes go to new page check box has been activated. Then how to supress a blnk page.

Regards

Ramakrishna .P

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Ramakrishna,

In conditions tab write logic like:

temp NE space.
 temp NE belnr.

BR

Dep

Former Member
0 Kudos

Hi,

I have solved problem my self.

Thanks

Ramakrishna

0 Kudos

Hi

use Counter > 1 in the command when counter is declared as type I it will have its default value as 0.

After that when you are comparing increment the Counter.

Hope this helps..

regards,

Vishwanath

Former Member
0 Kudos

Hi Ramakrishna,

could you tell values in condtion :

temp NE belnr.

And how it is filled in flow i.e., via table or loop.

You might have to change the condition to supress blank page.

BR

Dep

Former Member
0 Kudos

Hi,

First time temp field stores nothing , after first record moving the belnr value to the temp field

regards

Ramakrishna .P

Former Member
0 Kudos

Hi,

you have to fill the temp value as 1st value of belnr in the internal table. in the initialization you have write the code like


sort itab by belnr.
read table index 1.
if sy-subrc = 0.
temp = ."pass the 1st belnr value here
endif.

why because your not passing the temp valuel. so the condition temp NE belnr is satisfied so your getting blank page as a first page.

Regards,

Dhina..

Former Member
0 Kudos

Hi,

You can try adding the condition TEMP NE ' ' .in addition to TEMP NE belnr.

Provided you are sure that just the first record has belnr as blank.

Or you can put a condition to execute this only when index is greater then 1.

Former Member
0 Kudos

read the first item using read table index 1. and provide this belnr to your temp.

So he should NOT recogniize first belnr as new and all should be fine.

hope you can follow me, but well this is kinda standard group change processing so i guess you CAN follow me.

Former Member
0 Kudos

Hi

I think when code gets triggered, the first page is already created, so set a flag for first page. Once the first page is over, then clear the flag.

Try using AT NEW command or AT END command also.

If possible comment the command line and check whether you get first page or not when execute the code, then do as above said

Shiva

Former Member
0 Kudos

Hi,

If you are using the command line in a loop, then put the command line only before the end of the loop.Then the blank first page will not come.

Thanks and Regards.

Saptarshi Sarkar.

Former Member
0 Kudos

Hi,

I am not using loop.

In main window i have the contents as

Header---- Headers for table

Main Area---- text elements ( i have fileds slno, belnr,glaccount,cost center,gtext,description,dmbtr,wrbtr)

In belnr field i have created the command there i am comparing the condition temp ne Belnr and go to new page on conditions tab

wrbtr text element i am passing the g_temp =belnr

My requirement is whenever new belnr comes new page has to trigger and corresponding gl accounts need to be displayed and end of the belnr i want to display the footer.

For your information passing the belnr values from the print program (select options) to smart form

Footer---footer