Dynamic New-Page Command in Smartform

Dear Experts,
I have a particular requirement of triggering New-Page after the end of Main window for displaying Terms & Conditions on the last page.
For this purpose I have designed 3 pages :
PAGE1 - Contains Main window, few Secondary windows and some Graphic windows.
               (In PAGE1 -> General Attributes -> Next Page = PAGE2)
PAGE2 - Is in continuation with PAGE1 except a few changes w.r.t. some Secondary windows.
               (In PAGE2 -> General Attributes -> Next Page = PAGE2)
PAGE3 - Contains a new Main window for displaying Terms & Conditions, few Secondary windows and
               some Graphic windows.
               (In PAGE3 -> General Attributes -> Next Page = PAGE3)
After the end of Main window in PAGE1 or PAGE2 depending on the amount of data, I have used a Command logic for triggering New-Page (PAGE3). But it always triggers PAGE2 as new page and not PAGE3.

Thanks Muthukumar.
But in case if I set a next page of page 3 to the second page, then if my Page2 contains data spreading over more than one pages, it will display Page2 once and immediately display Page3 as next page.
I will explain my requirement once again:
1. If my PO details fits on Page1 itself than my next page should be Page3(Terms & Condition page).
2. If my PO details is of more than one page, for that I have designed Page1 as first page and Page2
    for remaining pages. Once the PO details is over the next page should be Page3.

Similar Messages

  • New Page COmmand in Smartforms

    Hi,
    My requirement is as follows,
    Whenever the item number changes it has to generate a new page with the header
    Whenever an item overflows it should come in a new page without the header details.
    So for this I have two pages in my smartform.
    Page1 - Header with item details
    Page2 - Only item details without the header
    I have given Page1's next page as Page2. And I have given a command whenever the item no changes it should go to Page1.
    But whats happening now is whenever a new page is generated only Page 2 is coming and not the Page 1.
    Any ideas??

    Hi ,
    u want like this right ...
    assume  that  table  data
    item                            item desc                              qty
    10                              10item descripotion                 23
                                        for material      
    20                               20item descripotion                 33
                                         for material      
    O/P Like  This u want
    *page1
    item                                    item desc                            qty
    10                                       10item descripotion            23
    page2  (dont want  want headers only remainning data of the line item)
                                              for material      
    For this simply u can put your header  in the main area of the table  (leave header as blank)
    Let me know if any concerns........
    Regards,
    Lokesh.

  • New Page command not working in SMARTFORM

    I have a text file in an internal table of type TSFTEXT.  I'm passing this internal table to my smartform.  The smart form has 1 page, 1 main windo and 1 text element.  The text has a text type of "Dynamic Text" and a fieldname = <<internal table of type TSFTEXT>>.  The start property = "New Paragraph".
    In the internal table (TSFTEXT), i have a few NEW-PAGE commands.  These seem to be ignored.  How can I force the smartform to create a new page.  Here is what the internal table looks like.
    / here is some text 1
    / here is some text 2
    / here is some text 3
    / here is some text 4
    / here is some text 5
    /:NEW-PAGE
    / here is some text 6
    / here is some text 7
    / here is some text 8
    / here is some text 9
    / here is some text 10
    Thank you,

    As far as I know, NEW_PAGE is not applicable in smartforms. That only applies to Sapscripts. As you stated in your requirement, to have a new-page in smartform, try to adjust the height of the main window. Once the records on the internal table reaches the total height, then it will automatically create a new page...

  • How to use a formula for dynamic New Page After?

    There is a formula for dynamic New Page After.
    How do I get value of formula?
    I am using RAS and the ReportClientDocument.

    There is a section object.  Off that there is a format property that is of type sectionformat.  From there there is a ConditionFormulas property which I believe is a collection of all the formulas you can set for a section.

  • New page command

    Hi experts,
    i have a requirement.
    after execute the report,it will display multiple personal number in abap hr as blocked list
    like
    in first block employee earning details
    in second block employee deduction block
    in third block employee tax details.
    but my requirement is
    when we down load the program,page break should come for every personal no.
    another employee should not start in middle of the page .
    i have used NEW PAGE command after loop statement to pront another employee in another page.
    but anorthe employee is not priting another page.he is priting on the same page.
    any one could solve this problem.
    Regards.
    Sudheer

    try within the loop
    AT NEW PERNR.
    new page
    END AT.

  • New Page triggering in SMARTFORMS

    hi all
    According to my requirement if the subarea of the person changes it should trigger the new-page. I have written the new-page command in Event on sort begin. It is triggering when the subarea changes but the last record of previous subarea is repeating into the next page when there is only one record in the pervious page, with more records of the same personnel subarea in the pervious page.
    If the subarea is having only one record it is printing in a new page and the next subarea is also printing in the new page correctly.
    If the last page of a particular subarea is having more than 1 record, the next subarea is printing correctly in the next page.
    The problem is coming only when one record is printing in a page and there are some more records of the same subarea in the pervious page. The record is getting printed in the last page is repeating again in the next page with the changed subarea. 
    pls give me the solution.

    hydfyt

  • New Page Format in Smartforms

    Hi All,
    I am working on smartforms.
    I have created a new page format of width 25 cm and width 30cm according to client's requirement.
    Smartform is  for customer invoice which is a pre-printed and i have to get data into that.
    In sform i have given the my own page format name.
    Now problem is am getting print preview correctly but while giving print its givivng the error
    ' OUTPUT COULD NOT BE ISSUED' and print is not coming.
    Please help me regarding this issue.
      Thanks in advance.
    Regards,
    Murthy.

    Hi,
    I have checked it but its ok.
    I have created page format through SPAD only.
    Regards,
    Murthy.

  • Dynamic news page linked from XML

    Basically I'm able to bring HTML into my flash dynamic text
    fields, that's fine.
    But what I WANT to do is have an XML file load all the
    seperate elements into differently formatted video clips.
    I want it displayed HEADER, then DATE then CONTENT, with a
    limit on articles (say 15 a page) in a scrolling content area. I've
    not really played with this side of ActionSCript too much.
    At the moment I have the skeleton of the idea set up, but I'm
    starting to become concerned that I'm on the wrong path... I'm
    kinda stuck about what to do to seperate the elements so that they
    display under each other (obviously each news article will have a
    variable length). An example of this idea can be seen on the NEWS
    page at
    http://www.wolfmother.com.
    This is where I'm at atm, anyone wanna nudge me in the right
    direction?

    Yes actually you can dynamically type variables in Flash /
    Flex using something similar to this.
    var myDynamicObject:* = whatEverObjectIFeelLikePuttingHere;
    Perhaps what might help to accomplish your goal is to use
    reflection inside of Flex. It is possible to use (although somewhat
    irritating) reflection in Flex using a form similar to this.
    var content:Class = getClassFromPath(objectClassPath);
    newComponent = new content();
    addChild(newComponent);
    The only problem is that the compiler will scrub any
    variables/classes that are not currently being referenced, at least
    once, somewhere in the application. So somewhere in your
    application you must have a reference for the class, even if it set
    to null, so that the class will not be removed from the project.
    It's also possible that the describeType function might be of
    some use.
    Here are two references that describe each.
    http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=580
    http://weblogs.thekeunster.com/?p=10
    Utilizing these features it's possible to do quite a bit to
    reshape your application based on data stored outside your
    application or on parameters only known at runtime.

  • Smartforms - new page command at loop

    Hi @ll,
    I`ve created a loop over an internal table in which I have insert a command to go to next page. The command is being called correctly but I don`t get data on the next page. I would expext that the loop goes on with the next record. Currently have just one page - could that be the problem?
    What I`m doing wrong?
    Ragards,
    Flo

    Hi,
       In the internal table add one more field called flag and in the driver program populate the value of     flag = 'X'  at the end of every PERNR using Control break statements.
       In the loop and the command give the condition as  Flag = 'X'.
       So the Page break will be triggered when ever the PERNR value will be changed.
    Hope this will help you.
    Regards,
    Venkat.

  • Smartform dynamically add pages

    Hi everybody,
    I have a smartform regarding a company.For each company i have several locations and for each location i have a table with some informations that need to be displayed.
    My problem is that i will never know how many locations a company will have,only until runtime when i read some tables.My problem is that i have to display  the informations for a location on a different page,so that i have to dynamically add pages in the smartform depending on the number of locations,which will be always different.
    Does anybody know how i can do this?
    thanx

    Hi,
    you have to add an extra page in which the data is printed you want.
    You have to print this in the MAIN window.
    In the MAIN window build in a loop (by loop or TABLE).
    Do this at the end of MAIN window.
    Inside this loop is the first thing a COMMAND (flow logic)
    In this COMMAND your call your next page.
    After that print and fill your variables.
    succes.
    Gr., Frank

  • Regarding event & command in smartforms

    i have an assignment like this,i need to develop an smartforms in which
    employees details will come page wise means for first employee the details will come
    in the first page for second employee the details will come in the second page
    like this i need the outptut ,here i need to use templates plz let me know how will
    i proceed in smartforms as well as in the driver programs....
    if possible plz send ur codes as i m new to smartforms.
    FOR THIS i already post the maater and got this answer,
    write the driver program in se38 ......with taking an internal table with the details of all
    employees for your selection.......
    in the driver program itself call ssf_function_module ........and pass the internl atable to
    this FM .......sort the table by employee number
    now create a smartform ......with one page...desgin the page as per your requirement.....
    in the mail window create a loop (assgin the tAable ....to it which has been passed from driver program....)
    inside the loop create at new (down you will see ) and put the employee number field.....
    next inside the loop create a command ...and put a new page(call) ...
    new page will trigger automatically for each employeee.
    and i did as per the answer but i m not getting here in my smartforms i m using
    table under this i have sorted pernr in the data tab and under this event i m
    putting command in this command i m using go to new page,as per this scenario
    i m getting my output but one blank page is also coming in the output ,
    how to remove this page plz help me i also tried in the condition not on first page but it is not coming.
    plz help me

    Hi,
    Uncheck the goto new page command and put the condition pernr not equal to prevevious pernr in the conditions tab of the new command.
    This can be done as follows.
    with in loop and endloop at the end of the loop create text node(cretae a var called W_prev_pernr and then w_prev_pernr = itab-pernr.) which stores the current pernr.at in the conditions tab of the new command(Create>Flow Logic>Command) put the condition like : pernr NE w_prev_pernr.
    Hope this helps you.
    Regards,
    Rama.P.

  • Regarding new-page

    Dear all,
    I have used new-page command in my report
    Every new material it will go to next-page..In my report foreground is working fine.
    If i execute in background new-page is not working.. it will come all material in the same page from spool request.
    ANY SOLUTION FOR SOLVE THE PROBLEM IN BACKGROUND
    Example CODING
    select-options : so_matnr for mara-matnr.
    select  matnr from mara into table it_mara where matnr in so_matnr.
    sort it_mara by matnr.
    loop at it_mara.
    new-page.
      write : /1 it_mara-matnr.
    endloop.
    Thaks.

    Hello Friend,
    To print a different pages in spool request you have to use NEW PAGE PRINT ON...
    Pleaes modify the code like below:
    DATA PARAMS LIKE PRI_PARAMS.
    DATA: DAYS(1)  TYPE N VALUE 2,
          COUNT(3) TYPE N VALUE 1,
          VALID    TYPE C.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING DESTINATION           = 'LT50'
                COPIES                = COUNT
                LIST_NAME             = 'TEST'
                LIST_TEXT             = 'Test NEW-PAGE PRINT ON'
                IMMEDIATELY           = 'X'
                RELEASE               = 'X'
                NEW_LIST_ID           = 'X'
                EXPIRATION            = DAYS
                LINE_SIZE             = 79
                LINE_COUNT            = 23
                LAYOUT                = 'X_PAPER'
                SAP_COVER_PAGE        = 'X'
                RECEIVER              = 'SAP*'
                DEPARTMENT            = 'System'
                NO_DIALOG             = ' '
      IMPORTING OUT_PARAMETERS        = PARAMS
                VALID                 = VALID.
    IF VALID <> SPACE.
      NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.
      WRITE / 'First line'.
    ENDIF.

  • New Page Format implentation in Sap Scripts and Reports

    Hi,
       I want to print Report details and also some of the SAP Script details on the paper size of 350MM width and 310MM Height in the PORTRAIT format.
       So i created new page format with these dimensions.
       How i can use this for reports. So i can set these parameters while taking output from Report.
       Pls specify if any configuration required for this.
    Thanks in Advance,
    Regards,
    Pavan.

    In SAPscript, you set the Page Format for the document in the "Page Format" field of the "Basic Settings" page of the documents "Header" information. The popup list of this field will show all available formats in your system, so this is a ggod way to make sure your new format is set up properly.
    For reports, page format is set either with the LINE-SIZE addition to the REPORT and NEW-PAGE commands, or through the PARAMETERS addition to the NEW-PAGE command. When you use LINE-SIZE the print system picks the format for you, based on the available formats in the systems.
    I don't remember if there is an activation step for Page Formats, or if saving is all you have to do.

  • RE: new-page

    HI,
       Iam facing two problem in scripts. 
    1. Iam using new-page command in the main window editor.
       If i use one notification number then it has to show 1 page. But it is giving two pages. So how to rectify this.
    example: if i run for 200 pages
              it is giving 201 pages
    2. When ever i run the script it automatically should go to the sap mail box. How can i achieve this.
    rgds
    p.kp

    MOVE-CORRESPONDING NAST TO LVS_SNAST.
        MOVE SY-REPID           TO LVF_PROGRAM.
        CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
            EXPORTING
                 PI_COMM_TYPE              = LVS_COMM_TYPE
                 PI_COMM_VALUES            = LVS_COMM_VALUES
                 PI_SCREEN                 = US_SCREEN
    *           PI_NEWID                  =
                 PI_COUNTRY                = US_COUNTRY
                 PI_REPID                  = LVF_PROGRAM
                 PI_SNAST                  = LVS_SNAST
            IMPORTING
                 PE_ITCPO                  = LVS_ITCPO
                 PE_DEVICE                 = LVF_DEVICE
                 PE_MAIL_RECIPIENT         = LVS_RECIPIENT
                 PE_MAIL_SENDER            = LVS_SENDER
            EXCEPTIONS
                 COMM_TYPE_NOT_SUPPORTED   = 1
                 RECIPIENT_CREATION_FAILED = 2
                 SENDER_CREATION_FAILED    = 3
                 OTHERS                    = 4.
        IF SY-SUBRC <> 0.
          retcode = sy-subrc.
          exit.
        endif.
    * fill structure itcpo
        ITCPO = LVS_ITCPO.
        if v_nast = 'X'.
          lvs_itcpo-tdgetotf = 'X'.
          lvs_itcpo-tdnewid = ' '.
         <b> TNAPR-FONAM       = 'ZTESTFORM'.</b>
    *    LVF_DEVICE = 'OTF_MEM'.
        endif.
    * open form
        CALL FUNCTION 'OPEN_FORM'
             EXPORTING
    *           APPLICATION        = 'TX'
                  ARCHIVE_INDEX      = TOA_DARA
                  ARCHIVE_PARAMS     = ARC_PARAMS
    *            DEVICE             = LVF_DEVICE
                  DIALOG             = ' '
                  FORM               = TNAPR-FONAM
                  LANGUAGE           = NAST-SPRAS
                  OPTIONS            = LVS_ITCPO
                  MAIL_SENDER        = LVS_SENDER
                  MAIL_RECIPIENT     = LVS_RECIPIENT
    *           MAIL_APPL_OBJECT   = ' '
    *           RAW_DATA_INTERFACE = '*'
    *      IMPORTING
    *           LANGUAGE           =
    *           NEW_ARCHIVE_PARAMS =
    *           RESULT             =
             EXCEPTIONS
                  CANCELED           = 1
                  DEVICE             = 2
                  FORM               = 3
                  OPTIONS            = 4
                  UNCLOSED           = 5
                  MAIL_OPTIONS       = 6
                  ARCHIVE_ERROR      = 7
                  OTHERS             = 8.
        IF SY-SUBRC NE 0.
          retcode = sy-subrc .
        endif.
    try this we have used like this...
    Message was edited by: Vijay Babu Dudla

  • Triggerring new page in the script

    Hi
    can anybody tell me how to trigger a new page in the script on condition.
    my problem is i want to print material & its discription based on the MRP controller using scripts.
    if the MRP controller changes then it has to trigger a new page in the script.
    page 1.
    MRP controller 102
    material1  material1-discription.
    material2 material2-discritpion.
    new page shoud trigger here
    page 2
    MRP Controller 103
    material1  material1-discription.
    material2 material2-discritpion.
    Thanks in advance

    Hi,
    First Call That text Element Were U Used New-page Coomand.
    SAPscript automatically inserts a page break when the main window of a page (MAIN) is full. You can use the NEW-PAGE command to force a page break in the text at any point you want one. The text following this command then appears on a new page. The page break is always performed (it is an unconditional page break).
    The NEW-PAGE command completes the current page. This means that all the windows that are still on the page are printed immediately. If you use the NEW-PAGE command without parameters, the page defined in the current form as the next page will be taken next. If, however, your form contains a number of different pages, then you can specify any one of these as the next page to be used.
    Syntax:
    /: NEW-PAGE page_name
    /: NEW-PAGE
    The current page will be completed and the text in the following lines will be written to the page specified in the form.
    /: NEW-PAGE S1
    As above, except that the page S1 will be taken as the next page.
    If, in a NEW-PAGE command, you specify a page not contained in the form, the specification is ignored.
    Take care that there are no blank lines immediately before a NEW-PAGE command. If an implicit page break occurs within the blank lines, an unexpected blank page may be printed.
    2.it can be set in two way
    1 using SE71 ur Script transaction
    u can create new page by clicking page tab in Se71 and goto edit->create Element.. that will create a new page..
    2 Using ur SE38 itself by setting a flag variable = X u can create a new page..
    if page = ' X '.
    new-page.
    endif.
    reward if helpful
    Shiva Kumar

Maybe you are looking for

  • Not able to tag with holding tax code in customer master

    Hi while posting avance payments form customer i need to put tds amount in tds column. for that iam trying to tag the withholding tax code in customer master. but the Tax code field is greyed (blocked) and not able to edit. Pls suggest what will be t

  • Audit Issue in QA after system restore and client copy

    Hi Experts, We have an audit issue and need your advise on that. Our QA system was audited and auditors were looking for the approval tickets on which a user was created. I found that several users that were not created in QA and do not even exist in

  • Google Map doesn't appear automatically when a prompt changes value

    Hi everybody, I'm using OBIEE 11.1.1.6.0 updated to 11.1.1.6.1 and I'm facing a curious problem. I created a dashboard with three sections. In the first section there is a prompt which shows the Top number of providers. In the second section there is

  • Forgot my password/it changed

    hi, i just formated my hard drive of my mac mini, cause it was acting REALLY weird. so, when i'm installing os x 10.3.8, i put a password ****************** that long. but then when i go to system prefs i have a password **** that long. so, i made a

  • TNS:could not resovle the service name

    Please tell me how to change tranname file for this problem. my computer name is ufone-3w2dwilbu my globle database name is orcl.world my sid name is orcl database is on single computer. Thanks in Advance.