Skip to Content
author's profile photo Former Member
Former Member

Printing logo on alternate pages in smartforms

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

Smartforms.png (36.3 kB)
Smartforms2.png (42.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 11, 2015 at 12: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.



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2015 at 07: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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2015 at 07:18 AM

    Hello Siraj,

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

    Regards,

    Sankarbabu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.