Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to delete the page through the smartforms

Former Member
0 Kudos

Hello,

In the smartform i had created like this:- page->Window->loop->template and Command.

In the command i had just check the checkbox GO To New Page and i had not enter any page name.

Then in the driver program i am passing 2 record from driver program to the smartform then when i execute the driver program only two page should be displayed but in the output 3 pages had displayed. In the first page, first record get display, in the second page-second record get display but the third page is display and it is empty.

Can anyone Please Help me to what to do so that this third page will not display on the output.

13 REPLIES 13

Former Member
0 Kudos

go to conditions tab in the all windows of the third page and put the following condition in it..

'X' = 'Y'

this condition is always false so the third page will not be displayed...

reward points please....

0 Kudos

Hi Naresh,

Actually i had created the template and this template is inside the LOOP. When i am passing the records from driver program to smartform, but all the record are display on the same page but i want to display each record in each page like one record on first page, second record on second page and so on. So i had used command which are present in the Flow Logic inside the loop. But the problem is suppose i am passing 3 record from driver program to the smartform then 4 page get display. The first three page contains the three record and last page is printed blank.

Please help me to how to avoid the last page which is printed blank.

0 Kudos

Find out the number of lines in the internal table in the driver program and pass it to the smart form in a variable. In the smart form for the Command node, in the Conditions tab, put a condition SY-TABIX NE <Number of Lines>.

<Number of Lines> is the variable passed from the driver program.

Please mark points if the solution was useful.

Regards,

Manoj

0 Kudos

Hi Manoj,

I did the same, but still the last page is coming which is blank.

ie. i am passing total record of internal table to the smartform and in the smartform, in the conditions tab i had written

SY-TABIX ne VAR.

But still the page is coming blank.

Please help me for not showing the blank page.

0 Kudos

Enter the condition as SY-TABIX lt VAR. Even if that doesnt work, declare a counter in the form and increment that in every loop. In the command node, enter the condition as COUNTER lt VAR.

Please mark points if the solution was useful.

Regards,

Manoj

messier31
Active Contributor
0 Kudos

Hi,

1. Create a flag say COUNTER.

2. Now set COUNTER to total no of records you r passing from driver.

4. On command put condition Counter greater than 1.

5. And inside the loop decrement counter before command.

Hope this solve the issue.

Enjoy SAP.

Pankaj Singh.

Former Member
0 Kudos

Hi Pankaj,

i am passing total number of record of internal table to the smartform and in the smartform, in the conditions tab i had written

SY-TABIX ne VAR.

But still the page is coming blank.

Please help me for not showing the blank page

messier31
Active Contributor
0 Kudos

Hello Darshan,

Can just try the step I mentioned above...

Enjoy SAP.

Pankaj Singh.

Former Member
0 Kudos

Hi Pankaj,

I did the same ie. i am passing from driver program to the smartform the total number of record the internal table contains and in the smartform in the condition tab of command i check for VAR > 1.

But still the last page is getting displayed with blank.

Please Help me for not displaying this last blank page.

messier31
Active Contributor
0 Kudos

And are you decrementing the VAR before command.. inside the loop ??

Former Member
0 Kudos

Hi Pankaj,

yes inside the loop i had created the program line where i had decrement it by one

messier31
Active Contributor
0 Kudos

Aand that program line should be before the command, is it ??

and VAR should be in the output paramter of program line ..

Former Member
0 Kudos

Hi,

In the node LOOP, under CONDISTIONS tab , u need to check whether variable/work area ( u r looping into ) should not be space.

loop ITAB into w_itab -->say ur statment in LOOP node.

Loop--> CONDITIONS tab --> w_itab <> SPACE.

so wen u mention this a blank page willl not be displayed.

Revert back if any issues,

Reward with poinst if helpful..

Regards,

Naveen