08-17-2007 1:18 PM
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.
08-17-2007 1:22 PM
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....
08-17-2007 1:34 PM
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.
08-17-2007 1:40 PM
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
08-17-2007 2:03 PM
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.
08-17-2007 2:10 PM
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
08-17-2007 1:47 PM
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.
08-17-2007 2:04 PM
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
08-17-2007 2:08 PM
Hello Darshan,
Can just try the step I mentioned above...
Enjoy SAP.
Pankaj Singh.
08-17-2007 2:15 PM
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.
08-17-2007 2:18 PM
And are you decrementing the VAR before command.. inside the loop ??
08-17-2007 2:30 PM
Hi Pankaj,
yes inside the loop i had created the program line where i had decrement it by one
08-17-2007 2:35 PM
Aand that program line should be before the command, is it ??
and VAR should be in the output paramter of program line ..
08-17-2007 2:45 PM
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