Problem with &SFSY-FORMPAGES&

Hi All,
    When i was using the &SFSY-FORMPAGES& in smartforms, it was showing '*' till it reaches 10th page, from 11th page onwards it was showing total number of pages in the smartform. Can any one tell me the reason.
Thanks in advance
Jaya

try this jaya....
&SFSY-PAGE& of &SFSY-FORMPAGES(2z)&    or
&SFSY-PAGE& / &SFSY-FORMPAGES(2z)&
If you find it useful mark the points
~~Guduri

Similar Messages

  • Error with SFSY-FORMPAGES and  SFSY-PAGE

    hi,
    i m having a problem in smartforms using SFSY-PAGE and SFSY-FORMPAGES . This two system feilds always returs with one value added. for an example if total # of pages 10 , SFSY-FORMPAGES  returns 11 ,for the first page SFSY-PAGE returns 2.
    Looking for a quick response...
    [email protected]
    Thanks ...
    Dilum-Sri lanka

    Hi Dilum,
    Use these two variables in a text in a smart form:
    &SFSY-FORMPAGES &
    &SFSY-PAGE&
    You will see that in the print preview itself ; the values which are getting displayed for the two variables are absolutely correct.
    So there is no problem as such while using these two variables.
    And no error is there even if you just have one page. In your case the value for the two variables is 1 each whihc is getting displayed in the print preview .
    Regards,
    Kunal.
    Message was edited by: Kunal Kumar

  • Problem with sfsy-formapges in smartforms

    Hello smartform experts,
    I am developing quite a complicated smartform right now.
    The design of the page looks like this.
    Page 1.
    Loop at header table.
       display delivery order and sales order.
       Loop at materials where delivery_order=header_delivery_order and sales_order = header-sales order.
       Display materials.
      Endloop.
      if sales order changes, go to new page.
      if delivery order changes, start new page 1.
    endloop.
    what i did was i created on page 1, I had the mode = 'initialize counter',
    and i copied page 1 and created a page 2, and had the mode = 'increase counter'.
    so when the sales order changes, i created a command to go to page 2, and when the delivery order changes, i created a command to go to page1. and it does work...
    the problem i now have is, for example, i have 3 diff sales order for the same delivery order, the page numbering is '1 of 1', '2 of 1' and '3 of 1'. It means that my sfsy-formpages is always 1.
    Can anyone please explain how this is happening? is there a way to work around this?
    Rewards points is always available. thanks a lot!

    Instead of using the system field, you can store the value in your local variable..and get it displayed it will solve your problem

  • Problem with SF

    Hi all,
    I have a problem with SmartForms i.e i have developed a SF that
    contains 3 form pages these 3 pages contain Terms and Conditions in back side
    if i give &SFSY-FORMPAGES& it is giving 1/6,2/6 ....6/6   but my requirement is
    it should display only 3 pages like 1/3,2/3 and 3/3  how to do this?
    very urgent plz,
    regards ,
      sudha.

    guide me if iam wrong
    find the total no. of pages and remove 3 from it and place in one variable.
    regards.
    santhosh

  • Error in Page SFSY-PAGE of SFSY-FORMPAGES

    Hi;
    When i enumerate the smartform pages with this in a textbox Page &SFSY-PAGE& of &SFSY-FORMPAGES&, and the number of pages is more than 10 it displays:
    Page 1 of  *, Page 2 of  *.....Page 1 of 10.. Page 1 of 11.....
    the first 9 pages the SFSY-FORMPAGES displays '*' but if the number of pages is less than 10 it doit well:
    Page 1 of 8... Page 2 of 8 ....
    What could be the problem...?
    Thanks on advance.
    David Fúnez
    Tegucigalpa, Honduras
    Corp. Mandofer

    Hi David,
    Look at OSS Note 588352. Use format like &SFSY-FORMPAGES(3Z)&.
    The length of the field will be longer and zero suppress.
    I hope you will get it
    Thanks
    Seshu

  • Problem with total page numbers in Scripts

    Hi,
    I have a problem with total number of pages in the Script.
    I have a script of 15 pages.
    On every page, I am using &PAGE& of &SAPSCRIPT-FORMPAGES(C)&.
    Problem is : I am getting only single digit for SAPSCRIPT-FORMPAGES as long as the page number remains in single digit - like -
    1 of 1
    2 of 1
    3 of 1... till 9 of 1.
    But from 10th page, it is printing :
    10 of 15
    11 of 15
    12 of 15... till 15 of 15.
    So, i think the symbol SAPSCRIPT-FORMPAGES(C) is filled with value 15 , but it is prinitng only the first digit '1' for pages 1 to 9 and then printing both the digits '15' for pages from 10 onwards.
    So, please help me out in this problem.
    Thank you.

    Hi Ven,
    The CONDENSE option cannot be used on the program icon SAPSCRIPT-FORMPAGES
    (C) without an explicit length specification: This symbol is
    only replaced with a value after the form has been completely edited, as the
    total number of pages of a form is first known in the program function
    END_FORM or CLOSE_FORM. However, the size of the symbol (number of
    characters) is reserved correctly when the symbol first occurs, with the
    current page number. Therefore, only one character is reserved for option C
    (CONDENSE) on pages 1-9, two characters on pages 10-99, and so on.
    If you are sure that the total number of pages doesn't cross 99(i.e 2-digit number), then use the FORM pages as SAPSCRIPT-FORMPAGES(2CZ).
    Here Z will suppress the leading zeros, for the total number of pages.
    Hope this information would be useful for you.
    Reward points if this is useful.
    Pavan.

  • Problem with output in smart forms

    Hi All,
    I am getting some problem with the field list in smartforms. When i tried to drag and drop some fields its not allowing me drop in text editor. So i hard code some of the fields and some systems fields. But in ouput i am getting every thing like in the top its showing "Print Preview of page 001 of 007. Its showing all the Filed descriptions and every thing. But its displaying all the field values and system values as &wtab-vebln&  &wtab-erdat&  &wtab-ernam&
                   &wtab-vebln&  &wtab-erdat&  &wtab-ernam&
                   &wtab-vebln&  &wtab-erdat&  &wtab-ernam&
    Untill end of loop for all pages. In the same way for each end of the page i am trying to print out &sy-pagno& but for evry page i am getting only the &sy-pagno& but not the page number.
    When i debug the internal table itab is populated with the data.I dont know why the field list is not allowing me to drag and drop fields and when i hard code why i am getting output like that.
    Some where i read that the we have to change in cofiguration of smartform in order to drag and drop is it right?
    Suggest me how to correct this error.

    Hi Ben..
    You cannot drag&Drop the Fields into Text Editor ..
    You have to do this in Graphical PC Editor (This will be the default editor Generally)
    Otherwise you have to use the Icons INSERT FIELD(+) DELETE FIELD ( - )
    On the Toolbar above the PC Editor.
    Remember your field should be displayed with Gray shade. then only the Value of the Symbol is displayed. Otherwise it will be displaying the Symbol name as it is.
    For page no You have to use the System field of Smartforms &SFSY-PAGE&
    not &sy-pagno&.
    <b>Reward if Helpful</b>

  • Problem with printing the sub totals

    Hi,
    I am having a problem with smart forms in printing the line items of invoice.
    I need to print the sub total of each page and need to display the sub total in the footer, with the caption 'Balance C f/w'. It works fine in some cases.
    In some cases, the sub total is getting printed wrongly, because its adding the amount of the next page's first line item also. I checked the form page by printing SFSY-PAGE along with the line item's text. It's observed that, the vlaue of SFSY-PAGE for the first line item's  displayed in the second page is '1'. Due to this, the amount for this line item also is getting calculated with the sub total of the previous page.
    Could you please suggest a solution for this problem?
    Thanks & Regards,
    John

    Hi,
    In smartforms, in the general attributes of the FIRST page the Mode for the page counter should be 'Initialize counter' and for the NEXT page it should be 'Increase counter'.
    Please check this in your smartform.
    Regards,
    Ram

  • Problem with Page number priting

    Hi All,
        Thanks in advance for all, who are going to help me in this below issue.
        I am using the code '&SYSF-PAGE&/&SYSF-FORMPAGES&' in smartforms to print the page number on each page as 1/10..2/10...10/10.
       But it was printing 1/...2/ till 9/* and after that it was priting correctly like 10/20..11/20...
       Can any one please let me know whats wrong with that, and why it was showing * till 10th page.
    Thanks
    Jaya

    jaya
    try this...
    &SFSY-PAGE& of &SFSY-FORMPAGES(3Z)&
    or  &SFSY-PAGE& / &SFSY-FORMPAGES(3Z)&
    ~~Guduri

  • Smartforms: SFSY-FORMPAGES = star very strange

    Hi,
    I have a very strange problem:
    In a smartform i use as usually &SFSY-PAGE&/&SFSY-FORMPAGES& for numer of pages/total pages.
    If the spool has less than ten pages all is right, if it has greater than ten pages (in the example 14) i get that:
    1/*
    2/*
    3/*
    4/*
    5/*
    6/*
    7/*
    8/*
    9/*
    10/14
    11/14
    12/14
    13/14
    14/14
    I don't understand why.
    I tried to increase the space for window but nothing changes.
    Please, help me.
    Matteo Vernile.

    Use &SFSY-PAGE& of &SFSY-FORMPAGES(4ZC)&  instead of the &SFSY-PAGE&/&SFSY-FORMPAGES&.
    This will not print astrik upto 9999 pages.
    REgards,
    Naimesh Patel

  • Issue happened for SFSY-FORMPAGES sometimes

    I took SFSY-FORMPAGES to display the total pages, most of time, it works very well, but some time, the total pages are displayed as '*'.
    After deleting some spool on own spool list, it works again.
    Please give some advice.

    Try to use like this it will solve your problem for ever
    &SFSY-formpages(3CZ)&
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • Page Numbering SFSY-FORMPAGES = *

    Hi,
    I have a Smartform where i'm using SFSY-FORMPAGES to get the total no of pages.
    The thing is that sometimes it prints ok like "11 of N", but sometimes it prints "23 of" or "9 of *".
    Any ideas why sometimes the total no of pages is not displayed or is displayed like *??.
    thanks!.

    You can correct it by following one of these two options:
    1. Write Page numbering with formatting option (4ZC). It would not get you * untill 9999 pages.
    Page &SFSY-PAGE& of &SFSY-FORMPAGES(4ZC)&
    2. Change the window type of the window which has the Page number text element to "Final Window"
    Regards,
    Naimesh Patel

  • SFSY-FORMPAGES showing as * when it exceeds 9

    Hi All,
    I have a field in my smartform which shows the total no. of pages generated.
    I have put SFSY-FORMPAGES for this purpose. It displays correctly till the no. of pages are 9.
    When the total no. of pages become 10, its showing me *
    The space for this field is 7cm so I think the space should not be a problem.
    Please let me know how I can resolve this.

    Hello,
    You can use &SFSY-FORMPAGES(3ZC)& instead of &SFSY-FORMPAGES&,
    as described in the SAP note: 588352.
    Regards,
    David

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

Maybe you are looking for

  • Assigning Multiple Desktops

    Hello, I want a user to logon with Desktop X but then if he navigates to Location Y in the portal, I want a new desktop to be displayed. Is this possible? Thanks Mr.T

  • Error while refreshing  WEBi Report : Supplied XML Invalid

    Hi, I have a universe buit on BI query in production environment. I changed the query in BI directly in PRD. The only chnage i did was ,unhide the keyfigure which was hidden originally as i wanted to see the data it brings in BEx analyzer. Then i agi

  • File getting Delayed

    Hi, My scenario is that daily I am getting one file at a specified time but sometime that file gets delayed by 3 hour or 4 hours. when I check log in moni  I get following. Where I can see that the message took time in DB_ENTRY_QUEUING. <SAP:Name typ

  • Same problem again! No camera recognition!  Last time's "fix" won't work.

    Oh, help me anyone if you can. I'm at wit's end. My Problem Last time I got iPhoto to somehow magically open and recognize my camera when I reinstalled the Kodak EasyShare software. I tried doing that again, but to no avail. My computer just refuses

  • Question about ejecting 'things'

    Is there any connection between the ejection of CDs and the ejection of iPods? I seem to be having issues with both. For example: I'll have to mash on the eject button at least 20 times before the computer recognizes that i want it to spit out the CD