2015 May 11 6:16 AM
Hi all,
I have created a simple smartform and it is working fine. But, when I'm trying to print the logo on the every alternate page eg: 1,3,5,7,... (instead of on all the pages) it is not working properly i.e., till the penultimate page what ever the logic I've put for the logo printing is working fine but when it comes to the last page it is considering the penultimate page condition and displaying accordingly i.e., if the penultimate page is not displaying the logo then the logo is not getting diplayed on the last page too and if the penultimate page displays the logo, last page also displays the logo.
Below are the related screen shots.
Please help me in completing this.
Regards,
Siraj
2015 May 11 1:35 PM
hi siraj,
You have move this programline
%CODE1 New Program Lines 1
under the window
Graphics New Window 3
and then try.
Also Instead of sy-tabix you have use SFSY-PAGE.
2015 May 11 8:06 AM
Hi Siraj,
My suggestion for this Problem is after this code add another condition to find the Last page of the form and then set condition for GV_FLAG.
To find last page , use the below
Check these Two System Variables SFSY-PAGE and SFSY-FORMPAGES.
SFSY-PAGE - Current Page Number
SFSY-FORMPAGES - Total No. of Pages
Comparing These Two Variables You can Find Last Page of a Smartform.
Let me know whether this logic solves ur issue.
2015 May 11 10:37 AM
Hi Bhuwaneswari,
First of all, thank you for your reply.
As you suggested, I tried the below logic. But, unfortunately it is not working.
IF sfsy-page = gv_count.
CLEAR gv_flag.
IF gv_set = 'X'.
gv_flag = ' '.
ELSEIF gv_set = ' '.
gv_flag = 'X'.
ENDIF.
ENDIF.
Thanks & Regards,
Siraj
2015 May 11 8:18 AM
Hello Siraj,
Please use smartform parameters "Pageno and nextpage = 0 conditions) to solve u r problem..call your logo accordingly..
Regards,
Sankarbabu
2015 May 11 12:04 PM
Hi Sankarbabu,
Thanks for your reply.
Could you please be more specific about the solution.
Thanks and Regards,
Siraj
2015 May 11 1:35 PM
hi siraj,
You have move this programline
%CODE1 New Program Lines 1
under the window
Graphics New Window 3
and then try.
Also Instead of sy-tabix you have use SFSY-PAGE.