Application Development and Automation 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: 

Printing logo on alternate pages in smartforms

Former Member
0 Kudos
668

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
348

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.


5 REPLIES 5

Former Member
0 Kudos
348

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.

0 Kudos
348

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

Former Member
0 Kudos
348

Hello Siraj,

Please use smartform parameters "Pageno and nextpage = 0 conditions) to solve u r problem..call your logo accordingly..

Regards,

Sankarbabu

0 Kudos
348

Hi Sankarbabu,

Thanks for your reply.

Could you please be more specific about the solution.

Thanks and Regards,

Siraj

Former Member
0 Kudos
349

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.