cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid a blank page at end of the page?

Former Member
0 Kudos

Hi Experts,

I have created a smartform where i need to display the line items based on the customer data.

I have created a command at the end of the loop. For every new customer it has to go to new page. After the completion of the report i'm getting a blank page at the end.

If i take a single customer or multiple customer, I'm getting a blank page at the end. I need to avoid this.

Please let me know the procedure to avoid it.

Thanks and Regards,

Abdur Rafique

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Guys,

If i use the conditions which you people have mentioned, I'm not getting the end page.

But my requirement is to display new customer details in new page. This is effecting if use the commands which you people have mentioned.

Regards,

Abdur Rafique

alex_m
Active Contributor
0 Kudos

It should work, did you use NE in COMMAND condition?.

Former Member
0 Kudos

Hi,

Try this logic

In the "Initialization" tab of global definitions

DESCRIBE TABLE IT_TAB LINES W_COUNT.

Here IT_TAB contains all the customers

While looping IT_TAB count the records into W_COUNT_CURRENT " Current record count

In the COMMAND give the condition

W_COUNT_CURRENT <> W_COUNT (Go to new page as long as current customer is not the last customer)

For the last customer both variable will be equal and there will not be a new page.

Note that the COMMAND must be at the end of the LOOP for this logic to work

Regards

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

Regards,

Sravanthi

Former Member
0 Kudos

Hi Shravanti,

thanks it is done.

Regards,

Abdur Rafique

Former Member
0 Kudos

Hi,

check at the end loop if it is the last one. If it isthe last then no commandline.

Gr., Frank

alex_m
Active Contributor
0 Kudos

I think after printing all the cusotmer the COMMAND window excuted and prints the empty page. Check the customer is not empty.

Edited by: Alexander on Jul 15, 2009 9:46 AM

Former Member
0 Kudos

give if not customer is initial also and check.....

Former Member
0 Kudos

Hi,

I gave that condition at command level, Its not effecting.

Regards,

Abdur Rafique

alex_m
Active Contributor
0 Kudos

May be try like this. You find out the no fo entries in your internal table that prints the details using DESCRIBE statement and put a condition in COMMAND window if the SY-TABIX NE no of entry in iternal table. This will not call the next page for the last customer.