Page number - smartform

Hi,
My requirment is - suppose i have given 1 to 3 invoice in my selection screen , so in smartform layout, In first page 1-invoice will be print, in second page 2-invoice will be print and the 3 page 3-invoice will be print. so i want the page no for all page should be
1 instead of SFSY-page.If suppose any invoice line item print in next page then page no will be 2,3.etc.
but for every new invoice page number should be 1.
please help me on this.

Hi,
I suppose you need to distinguish in some way when new invoice has started. Thus, I would recommend using two extra variables: one to store current page of every invoice, one to store how many pages have already been printed for all previous invoices.
The algorithm will look something like that:
1. if new invoice: all_prev_pages = sysf-page. else: skip step.
2. current_invoice_page = sysf-page - all_prev_pages + 1.
3. print current_invoice_page.
Regards,
MC

Similar Messages

  • Maximum number of pages in Smartforms/Sapscript

    Hi
    I have to print some very large invoices (between 1000 and 3000 pages) and it does not work with Adobe forms.
    So I would like to know approximately the maximum number of pages that it is possible to print in Smartforms and Sapscript. And then if possible migrate my form. 
    Thanks for your answers
    Julien

    Hi Julien,
    There is only a max page number assigned to a user profile, that means
    you can restrict the max page number per user and printer.
    There is a possibility to restrict the maximum number of pages printed
    as described in Section '2.4 Output authorizations' of the following
    SAP Note: 119147.
    Using authorization object S_SPO_PAGE, you can define that users may
    only print a certain page number range on certain devices.
    To activate these checks the parameter: rspo/auth/pagelimit must be
    set to 1 and you have to define an interval with leading 0s as described
    in the Note.
    Regards,
    David

  • Page Number Printing in Smartforms

    Dear All,
    The requirement is to print the total number of pages in the format of
    Page:- 1 of N.
    The below example explains in details.
    The smartforms prints for Vendor and purchase order wise details. The purchase orders is in range. If I give 10 purchase order number in select-options, it displays total 33 pages in smartform o/p.
    If one purchase order has 3 pages, It should display
    1 of 3
    2 of 3
    3 of 3
    for another purchase order, it display will
    1of 2
    2 of 2.
    Like this is the requirement to display in the smartforms.
    So, how I do in smartforms?
    Thanks and waiting for useful reply
    Regards
    Anu

    Hi Anu
    in smartforms write
    Page &PAGE & of &SFSY-JOBPAGES&
    where page is a variable with value SFSY-PAGE.
    you hold the value of document, and compare it with the new one, if is different you clear the variable that restart to 1.
    for SFSY-JOBPAGES so the total number of page you should do a similar logic, where you comparing the document number
    step by step adding 1 at the total value, when the document number change you have the total page value. 
    best regards
    Marco
    Edited by: Menegazzo Marco on May 17, 2010 2:14 PM

  • Displaying Page Number in Smartforms

    Hi,
    I'm doing a page break in smartforms by date. In my output, the page number displays Page 1 of *  (instead of Page 1 of 11) but when it displays 2 digits for the field SFSY-PAGE, it displays the total number of pages. (e.g. Page 10 of 11). I used the system fields (Page sfsy-page of sfsy-formpages). I just want to ask if any of you has an idea or have experienced this kind of error. Your help is highly much appreciated. Thanks!

    Hi
    current page / total number of pages
    &SFSY-PAGE& / &SFSY-JOBPAGES&
    Go through the link given below :
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/0c145cd30111d3b568006094192fe3/frameset.htm
    With Regards
    Nikunj Shah

  • Regarding Page number printing in smartform

    Hi All,
    I have a requirement wher i should print multiple PO in smartform. It is done..a small issue regarding printing of page numbers. Lets say i am printing three PO
    first PO has 20 items
    second has 2 items
    third has 1 item.
    Now the forst Po can have multiple pages it should print as
    Page 1
    page 2
    page 3.
    Now after the end of first PO second PO is printed on new page and numbered as Page 1..and so on.
    So how can i do this.....
    Thanks,
    Regards,
    Narsimha Kulkarni.

    Hi,
    Create a paragraph format with dynamic page numbers.
    Smartstyles>numbering and outline->select numbering type from list dropdown.
    use this paragraph format for displaying the page number with any code.
    and before processing your logic create a COMMAND in your smartform and in the reset paragraph numbering give your paragraph name so that it refreshes page numbers every new PO's. (you have place this according to your code).
    Thanks,
    Sree.

  • Page number in smartforms

    HI guys,
    How can I put the page number of smartforms?
    Thanks!

    Hi
    current page / total number of pages
    &SFSY-PAGE& / &SFSY-JOBPAGES&
    Go through the link given below :
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/0c145cd30111d3b568006094192fe3/frameset.htm
    With Regards
    Nikunj Shah

  • How to modify total pages in smartforms?

    Hi All,
    In smartform Im printing ' page of total pages' as &SFSY-PAGE& of &SFSY-FORMPAGES(3CZ)&. All are working fine. Now at last I have to print one extra page without page no. So, If the total o/p pages are 16 ( including last page) I have to show i.e
    1 of 15, 2 of 15 .... 15 of 15 , and in the last pages nothing. For this Im moving SFSY-FORMPAGES to one variable and substracting one from it, but its not working, its showing as 1 of 0, 2 of 1 ... 15 of 14..
    so how to decrease the total page number. I think it generates in runtime and in my smartform all windows are in one PAGE.
    So how to do this ? any Idea?

    Hi,
    I think we can try this. Issue new page after all pages. If page less than or equal to total pages, display that, else issue new page.
    /: IF &SFSY-PAGE& LE &SFSY-FORMPAGES(3CZ)& .
    ' page of total pages' as &SFSY-PAGE& of &SFSY-FORMPAGES(3CZ)&
    /: ELSE.
    /: NEW-PAGE.
    /: ENDIF.

  • How to Print next Page in smartform ?

    Hello ,
    I want to print next page in smartform.
    The situation is :-
    I am passing an internal table containing list of personal numbers.
    I have to print their details . Every candidate's detail should be printed on a new page .
    I have designed the whole form , but I am not print their details on a New Page.
    Please guide.
    Thanks in Advance.

    Hi, Nikita.
    Please Have a Look the following Link
    [MODERATOR MESSAGE: SapScript/Smartform questions go in FORM PRINTING forum|/thread/1360534 [original link is broken];
    So, Please Post Questions Regarding SapScript and Smartform in FORM PRINTING.
    1. First of all you need to set a Flag at the end of every Personal Number.
    2. Than Right Click on the object Like Main Window
    --> Create --> Flow Logic --> Command
    3. From First Tab of Command General Attributes Check the Check Box Go to New Page and Select Your Page
    4. In the Conditions Tab Give you Flag Condition.
    Hope will help you to solve out your problem,
    Please Reply if any Issue,
    Best Regards,
    Faisal

  • How to Print two pages in smartforms

    Hi All,
    How to create two different pages in smartforms.In my requirement the first page contains Table data in main window and in second page only the hard coded desription should be printed containg instructions,but the second page is mandatory after first
    page is completed,the first page may have n number of pages after printing those pages my second page should trigger.Help me if any one knows.
    Thanks in advance............
    Regards,
    Satya.

    hi ,
    once a main window size is declared , then that space will be placed in each page created.
    eg. if a table with header and footer is created, first of all the space for header and footer are allocated and body page is allocated.
    so we cannot dynamically change the size of the main window , even it is a copied main window.
    Otherwise another option is to continue the main window into the second page.
    for that first page main window -> create table -> add page break command to page 2 -> hard code description in template.
    page attribute for first page --> GOTO assign same page ( for continuing the same page)
    Page attribute for second page --> no need default is enough

  • Getting Runtime error while adding Second page in Smartform.

    I added 2 pages in smartform. When I worked with single page. smartform working properly. Now I added one more page(i.e Second page) I am getting runtime error.  ("The current ABAP/4 program encountered an unexpected
    situation".   A RAISE statement in the program "SAPLSTXBC" raised the exception
    condition "ERROR".)   When I debug this standard program Something width problem getting on line number 110. Both width not matched so program raising exception. Can you please tell me to solve this problem what changes will I do in my smartform?

    Please let me know the details of each page.
    Error can occur in these cases.
    1) You copied the first page to second. and later you change the width of second page
    2) You created the second page and there is template in second page. each column width is not matching with the total width of the template.
    3) windows width is greater than the page width
    Please have a look.
    Regards,
    Nikhil
    Edited by: Nikhil V Kumar on Jul 27, 2010 12:16 PM

  • Continuation of line item data to next page in SmartForm

    Hi,
    Currently i had a requirement in SmartForm. Iam displaying the line items from bseg table in main window and totals of credit and debit in the total window which comes under the main window.
    If the line items are more and it continues to next page i want to display the total window and created by window only after all the line items.
    Please try to send ASAP.

    You can print total by reading page numbers.
    Ex: IF <current page> EQ < next page number>
      Print total.
         ENDIF
    Regards,
    Sairam

  • Looping the complete page in Smartforms

    Hi,
    How can I loop the entire page in smartforms which contain multiple windows?

    Hi Shah Kunal
    A Simple Smartform Tutorial 
    SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output). 
    According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions). 
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    *2. Define looping process for internal table  *
             Pages and windows *
    First Page -> Header Window (Cursor at First Page then click
    Edit -> Node -> Create) *
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)&*   (Total Page)* 
    *Main windows -> TABLE -> DATA  *
    In the Loop section, tick Internal table and fill in 
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
               lobal settings :
               Form interface
               Variable name    Type assignment   Reference type
               ITAB1               TYPE                  Table Structure
               Global definitions
               Variable name    Type assignment   Reference type
               ITAB2               TYPE                  Table Structure 
    4. To display the data in the form 
        Make used of the Table Painter and declare the Line Type in Tabstrips Table
         e.g.  HD_GEN for printing header details,
                 IT_GEN  for printing data details. 
         You have to specify the Line Type in your Text elements in the Tabstrips Output options.
          Tick the New Line and specify the Line Type for outputting the data.
          Declare your output fields in Text elements 
          Tabstrips - Output Options
          For different fonts use this Style : IDWTCERTSTYLE
          For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program 
    REPORT ZSMARTFORM. 
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by :  SAP Hints and Tips on Configuration and ABAP/4 Programming
                        http://sapr3.tripod.com
    TABLES: MKPF. 
    DATA: FM_NAME TYPE RS38L_FNAM. 
    DATA: BEGIN OF INT_MKPF OCCURS 0.
            INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF. 
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001. 
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
       MOVE-CORRESPONDING MKPF TO INT_MKPF.
       APPEND INT_MKPF. 
    ENDSELECT. 
    At the end of your program.
    Passing data to SMARTFORMS 
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
      IMPORTING
        FM_NAME                  = FM_NAME
      EXCEPTIONS
        NO_FORM                  = 1
        NO_FUNCTION_MODULE       = 2
        OTHERS                   = 3. 
    if sy-subrc <> 0.
       WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif. 
    call function FM_NAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        GS_MKPF                    = INT_MKPF
      EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5. 
    if sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Reward if helpful
    Regards
    Lakshman

  • Leading zero's while printing total pages in Smartforms

    Hi All,
    I have a requirement where i need to print leading zero's when printing the total number of pages in a smartform.
    I have used  Page &sfsy-page& of &sfsy-formpages(Z3.0)&
    But for the above we get the output as Page 1 of 2, Page 2 of 2. and so on...
    But my requirement is it shoud come as Page 1 of 002, Page 2 of 002.
    The total number of pages will always be less than 999. and we need total of 3 numbers displayed.
    Ex: Page 1 of 002 or Page 1 of 010 or Page 1 of 100...
    Thanks,
    Hari Prasad.

    Hi Sudha,
    We have tried that too and we get the output as Page 1 of 001. Page 2 of 002.
    inside the node sfsy-formpages gives the current page number.
    Thanks,
    Hari Prasad.

  • Extra pages in smartforms

    I am having some problem with a smartform i have created to display the customer numbers and their cities.
    I have created a table in the main window and under the main area i have created a line type with 2 cells to call customer no and city. My problem is that I am getting only one page of datas even though there are more datas. I have defined the same page number in the attributes for next page. In the footer where I have declared  system variable SFSY-FORMPAGES I'm getting a star instead of a number. What might be the problem?? Kindly help. Thanks in advance.

    Hi sathar,
    if u've defined same page as the nextpage in general attributes tab of the page node, there should not be any problem. the same page gets repeated.
    coming to SFSY-FORMPAGES problem, query this variable in a separate window of type 'final window'. total no. of pages is calculated at the last. so you should create another window of type 'final wimdow' and query SFSY-FORMPAGES in that.final widows are processed after all the remaing windows are processed.
    regards,
    Ravi

  • Page protection Smartforms

    Hi,
    I need to set a page protection for the delivery adress.
    The adress text node is inside the main window and inside a table. How can I now activate the page protection?
    The checkbox for page protection on the top of the text node is disabled, so I can´t check it.
    Any ideas?
    Thank you!

    Hey Vidya, I understood completely what You have ment, but the problem is... it´s not working!
    I have tried to force the next page command, but when I´m testing the form, I´m getting the error message, that Page protection is not allowed inside a table!
    So I´m sure there must be a difference between older and newer smartforms versions....
    But now, I have translated the whole table to paragraph tabulators. It´s now working with page protection. I can set it in the folders etc.
    But now I need my previous header lines of the table on each page on the top.
    I tried to do it with a variable, which has as content the old page number. If the page is changing, it´s going to print the line.
    But the page break is often during the lines of one position, so I get the header lines after the next position line on the next page....
    For example, the system detects, that the next position is not fitting on the current page. Then it´s forcing a page break. But the next position lines are printed before my header lines on the next page...
    How can I get the header lines on the top of every page during the loop about the content of a table?
    An I also need a footer line on every page to show the sum of the amount of one field for all positions shown on the current page.
    I hope You understand my problem!
    Thank You very much for Your help!
    Arne

Maybe you are looking for

  • Optical Drive is not recognised in Windows 8.1 (x64), or in UEFI System Diagnostics.

    Description of Issue: Optical Drive is not recognised in Windows 8.1 (x64), or in UEFI System Diagnostics. Steps to Recreate: UEFI: Boot PC into UEFI System Diagnositcs (F2 at POST) Component Checks Optical Drive Sequential Check Error: Not Optical D

  • Configure between tomacat 5.1 to weblogic 8.1

    Hi All Please help on this topic how to call EJB from my servlet program suppose in my servlet program , i want to validate the username and password in database ,, through i am calling the EJB Client , how to configure to call the EJB Application,,

  • Editing albums in Itunes

    Hi With Windows Media you can currently edit double CD's ( like live albums ) so that you can have both CD's listed as 1 by changing the track numbers to be consecretive and then album title to just 1 name (does not include disc 1 and disc 2 in the t

  • Aggregated delta request

    Hi Experts, In my cube one delta request is aggregated (Rollup). Is it possible to delete that request. Thanks Ajay

  • Create Integration Scenario - Step by Step

    Hi All, Can anyone guide me the step by step procedure for creating integration scenario in IR. Thanks Deno