cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Last Page Blank

Former Member
0 Kudos

hi all,

I designed one smartform for Multiple Range.

I need Output for each number in new page. For this i given command window at the end of loop.

I am getting output but last page is coming blank. I need to remove that blank page.

How can i do that one.

Please suggest.

Regards

Rami

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ramireddy,

This is a logical error more than a SmartForm error. The idea is that when you get to the last line in the loop, there is a new page created at the end. But there is nothing to be printed there.

What I suggest is the following:

- remember the total lines of the table with DESCRIBE TABLE <table> LINES <total_lines> .

- move the sy-tabix value at the beginning of the loop in a new variable(maybe it gets changed along the way with READ TABLE statements or something) .

- make an IF <total_lines> NE <current_line> before executing the command

Regards,

George

Answers (2)

Answers (2)

Former Member
0 Kudos

Hii,

The condition which you are maintaining in the condition tab of "at command" is not triggering whn you required.Just check the logic for that condition.Debug the code and you will be able to solve the query.

Regards,

Nicklas

Former Member
0 Kudos

Hi,

there might be 2 possibilites for this:

1. Check ur internal table, if any blank record appended at last.

2. May be u called the COMMAND 'Go to New Page' at end of printing the MAIN WINDOW.

if 2nd is the case, try to call the COMMAND 'Go to New Page' before the MAIN WINDOW, and give condition for COMMAND in CONDITIONS tab 'sy-tabix NE 1'.

Hope its clear, let me know if its not clear!!

Rgds,

Pavan