SmartForm: Number of copy in main window

Hi.
I have got a problem.
I like display the number of copy (Original, Copy One, Copy Two... etc), in main window.
I only can control this in a "copy window", and I change the valor of a variable (l_number = sfsy-copycount).
BUT the valor of this variable in the main window is always the numbers of copys, not the number of the actual copy.
How can control in a MAIN WINDOW the number of the actual copy?
Thanks very much!

Hi
Each copy is a different print because you need to print a different descriptions, so you can't manage it by inserting a number of a copies you want to print in the dialog. This parameter indicates how many time the <u>SAME PRINT</u> has to be printed.
If you need to print several copy and write a different description for each copy I believe you should run your smartform for N times, where N is the number of copies.
DO COPIES TIMES.
   CALL FUNCTION <SMARTFORM>
       EXPORTING
         COPY         = SY-INDEX
ENDDO.
So in your smartform you can check the parameter COPY and print the description in according to its value.
Max

Similar Messages

  • Error in Smartforms a page without a main window

    Dear Friends
    I have suffred one problam in Smartforms, whe we create new page then system gives error
    "A page without a main window cannot point to itself as next page".
    Please provide solution.
    Regards
    Ajit Sharma

    Hello Ajit,
    In Smart Form Main window is optional but check if this satisfies in your case ....
    Main Window
    In a main window you display text and data, which can cover several pages (flow text). As soon
    as a main window is completely filled with text and data, the system continues displaying the text
    in the main window of the next page. It automatically triggers the page break.
    You can define only one window in a form as main window.
    The main window must have the same width on each page, but can differ in height.
    A page without main window must not call itself as next page, since this would trigger
    an endless loop. In such a case, the system automatically terminates after three
    pages.
    It means if you have Next page you need to use a Main window in your smart form.
    Regards,
    Kittu

  • Smartforms - 2 individual tables in main window to show on NEXT PAGE

    Hi Gurus,
    Please forgive me for this basic questions in smartforms. I've just started working with it.
    My questions is:
    " Can we put a table inside a template? 'Coz I've created 2 tables (with individual header, body, footer), and I want to put them in Main Window. So, if one of them is already full, the next entries will be displayed on the next page."
    What is happening is that only the last table's data is being displayed to the next screen if already full in the first page. So I'm thinking if we can put the 2 tables inside the template of 2 lines. Is this possible?
    Any other suggestions would be very much appreciated. Please help me with this. Thanks.

    Hi Ayem
    Inorder to continue data from one page to other there is no need of a second table,it will automaticaly be continued in the second page.
    See these WIKIs ,it will explains smartform with examples and screen shots.
    [https://wiki.sdn.sap.com/wiki/display/ABAP/SMARTFORMguide]
    [https://wiki.sdn.sap.com/wiki/display/HOME]
    [https://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALINSAP+SMARTFORMS]
    Regards
    Hareesh Menon

  • Triggering main window of the second page

    Hi Experts,
    I have two pages. Second Page will only get trigger at certain condition. I am triggering the Second page through Command. My issue is my second Page is triggering but the main window of the second page is not getting triggered. It should be like that the main window should get triggered. Even I have copied the main window and used it in the second page that is also not getting triggered. Please help me to resolve this issue.
    With Regards,
    Anomitro

    Hi,
    You should not create a new main window in the Second page of the smartform
    Instead, you copy the main window of the first page to the second page.
    So even if you add a text window in the first page Main window that will be reflected in the second page, but this should be below the command window.
    Use the command window to trigger the second page.It triggers the second page and all the text windows that are after(under) the command window will be coming in a new page.
    Check this link: https://wiki.sdn.sap.com/wiki/x/bAZqBg
    Hope this helps
    Thanks
    Sarves S V K
    Edited by: Sarves Sombhatla on Feb 21, 2011 6:56 PM

  • Smartform - Main window

    Hello,
    I need to create a smartform with the following behaviour:
    When the page shown is the last one, the main window has to take half page. On the other hand, when the page shown is not the last one, its main window has to take almost the whole page (I need a bigger main window).
    When only exists one page, the first page is also the last one.
    Thanks in advance,
    Ricard.

    Hello Oscar,
    Its Possible, as I feel.
    Just need to design 2 pages.
    PAGE1: Keep the header and item part as you want to.
    PAGE2: copy the MAIN WINDOW of PAGE1 to PAGE2.
                 Increase the size of the MAIN WINDOW in page2 .This is the flexibility that smartform gives and
                 we don't get this main window resizing facility in SAPscript it remain same in first and second
                 page.
    Navigate to : loop->table->footer.
    Create folder and under folder create window to display your footer details.
    And please unckeck the check box "On page break" in the footer condition tab.
    Hope the discussion was helpful. Revert back in case of any further issues.
    Cheers
    Suvendu
    Edited by: Suvendu Swain on Jun 9, 2009 5:06 PM

  • Question about main window in smartform

    Hi, i have three different pages, i know that i can have only one main window.
    But the data in the main window  will be different for each page.
    I copy the main window in the three pages.
    But when i try to write abap code in the main window copy ( page 3 )
    The smartform refresh the abap code in the page 1 and page 2.
    So the 3 pages have the same code.
    I want to have different abap code in each page ( in the main window copie for each page). Because i have three internal tables one table for each page.
    Thanks
    Reward Points

    hi,
    I believe u dont need to copy the main window. just create a next page and provide the 2nd internal table fields in next page. and same as 3rd page.
    or
    create 2nd page and create other windows not a copy of main window and provide the correspoding fields to those windows..
    Regards
    Syed A

  • Frame line not display in next page of main window

    hi Xpert,
    I am creating layout in SAP SCRIpt,it working fine only the main window of next page  frame line is not display.
    i m define next page as a FIRST page and writing main window of first page following coding
    /:           POSITION XORIGIN '0.50' CM YORIGIN '7.75' CM
    /:           SIZE HEIGHT '17' CM WIDTH '19.25' CM
    /:           BOX  FRAME 10 TW
    when i run the program first page are coming properly and only when i go in second page of output then main window lines not displaying.
    please guide me how to solve this problem.
    Regards,
    pravin

    Hi Praveen,
    In that case why you have to make the main window in the first page and secondry window.
    You can use it as manin window itself. Print the total amount in the main window itself in the first page. and copy that main window to the second page.
    In the first page under the main window create a text. and there u print the total value and text.
    Now copy the main window to the second page..only COPY DONT CREATE NEW.
    In the second page now under the main window create the table to print the line items. What every u add in the second page main window it will come in the first age also in the smartforms. But it will nto get printed in the first page.After the text to print the totals call the COMMAND option and call next page in that.
    Hope you got me..
    Regards
    Ansari

  • Multiple tables and templates in a main window

    Hi,
    Is it possible to have multiple tables and templates in a main window of a smartform?
    If so then how they are positioned in the main window? Means which table to come first and which to be the next?
    Thanks in advance.........
    Prinan

    Hi!
    both tables and templates can be printed any number of times ina  main window.
    The tables as in sequence are printed...after ending with the first it gets on to the another.
    If u want to print it under some cdonditions you can do it using the condition tabs.As per it is a main window the dats gets flowing to the next page so as the order goes thae data goes on printed.
    Regards.

  • Not display main window of page

    Hi,
    My requiremnet is ,i want to display each sales order number in each page in layout.when am giving the input two sales orders,
    the first sales order (0001)dispaly its header and item details in main window finely but in second page it disaply the header data of second sales order number(0002) but does not read the main window and not display the item details of second sales order number(not showing the main window).i used the command option still not working.please tell me where i do a mistake.
    Waiting for ur reply..
    Regards,

    Hi ALI,
      When you are using command to trigger new page( In that you have to check the check box 'Go to new page' ) In this case the  the main window name of the first page and the next page shoul be same.If it is different then it will not trigger the main window of the next page. It displays the details of all other windows but main window details will not be displayed. Check this once.
    Regards,
    Rajitha.

  • How to print a window (ex:total)only after end of main window in SAP Script

    How to print a window(ex: total) only after end of main window in SAP Script
    Thank you.

    Create a total window and place it after your main window, get the number of lines in your main window and place counter
    Ex,&SAPSCRIPT-COUNTER_1(+)&,
    IF SAPSCRIPT-COUNTER_1& EQ <number of lines in main window>
    **print total
    ENDIF.
    Regards,
    Sairam

  • Problem With Smartform Main window

    Dear All,
    I have a requirement in which I need to print a PO using Smartforms.
    In this requirement we need to check a flag, and based on the flag we need to call the subsequent pages.
    if the Flag is set then I need to print the first page 2 times and after these two pages Terms and conditions page would come.
    In the main window of first page i have put a contition check for this flag.If the condition is true I am calling the First page as Next page and if the condition is not true the Last page(T&C) is called.
    now, the issue is when the condition is true means when I need to  call the first page twice then the very first page of the output is coming fine but when the same page is printed again the item details are not getting printed also the last page is not coming in this case.
    please help.
    Thanks in advance.
    regards,
    Shweta

    When you are calling first page again (as Second page) based on your flag, it will copy the only the content of all windows except main widow.
    To solve your issue, Put the same loop again in the mainwindow with condition which is used for trigerring second page.(Repeat page).
    Regards
    Afsal

  • Smartform - problem with main window

    Hi all,
    I have following windows in my smartform first page.
    First Page
      -> secondary window 1
      -> secondary window 2
      -> main window
           1 template1
           2 template2
           3 command node
      -> secondary window 3
    I have the same windows in  my next page. I am using the command node in main window for some specific condition to implement page break to next page. I am getting the next page with all the contents from the secondary windows but for some reason the main window in second page is not diplayed.
    Please help me. Waiting....

    Hi Raju,
      One possible solution can be... first fix number of rows in a page. Then in the INITILIZATION use DESCRIBE command on your internal table. Then divide the number of lines by the number of line you have already fixed to be printed on a page. This will give the number of pages.
      Now what you can do is... in your first page take a table node. In that create a  table line with 13 columns and place the first 13 columns in that.
    Then take a ALTERNATIVE node with condition sy-page = the number of pages which you have already calculated.
    For this ALTERNATIVE node in the TRUE node take a COMMAND NODE  with NEXT_PAGE(second page) in GO-TO-NEW-PAGE field.
    And in the FALSE node take another COMMAND NODE with FIRST_PAGE(current page) in the GO-TO-NEW-PAGE field.
    Untill unless you will reach the last page(which we have calculated) this condition will become false and hence the COMMAND NODE in the FALSE node will trigger and the current page will be triggered. This completes the printing of 13 columns for all your internal table rows.
    Now in the NEXT_PAGE(second page) take another TABLE node and again create a new table line with the next 13 columns(14 to 26). And assign NEXT_PAGE in the Next Page field of this page(next page... hope you are not confused ). This will print the remaininig 13 lines.
    But the problem with this solution is that the user has to sort the pages after getting the printouts and also the number of rows that will be printed are fixed on a page.
    Thanks and Regards,
    Bharat Kumar Reddy.V

  • Smartform main window in version 6.0

    hi experts,
    im working on smartforms.
    my doubt is how many main windows we can create in a smartform?
    in 4.7 version it allowed a single main window. then what is the case in version 6.0.
    plz some one help me. give me the complete details abt no.of main windows in a smartform in version 6.0
    thanks in advance.

    hi experts,
    thanks for ur answres.
    but when i created 2 pages, each page with a main window, its not showing any syntactical errors, simply getting activated. but when i executed it, its going in to dump.
    so, i created 2 pages, created main window in page1 n then copied it to page2, then its giving output, but the data is getting displayed only once, i mean either in page1 or in page2.
    plz some one solve this. thanks in advance.

  • Smartform Main Window Box designing

    Hi,
    I have created a smartform with 5 windows. In the main window maximum 12 records will be fitted. In Main window, In the output options tab i have selected Lines with Check box and Always draw Check box.The height of the main window is 4.80 CM. Each Record will occupy 0.40 Cm Height.For this i want dynamic window box creation. For Example if the internal table contains only two records it has to draw box only with 0.80 Cm height only, Suppose if the internal table contains 10 records then it has to draw box with 4 CM height. Here in my Smartform i am always creating 4.80 Cm height box. Is my requirement Possible? If yes, How?
    Thanks in Advance.

    hi ,
    as far as dynamic row wise box you can achieve....
    but if only you want boxes depending on the lines means it's difficult to do because you may not know how may line will come. as you have mention for only 2 and 10 records means i have  an idea but don't know whether it will work or not as these boxes will be drawn depending on the height( and it's constant).
    what we can try is.
    first count the number of lines in your internal table.
    in main if check the condition
    if internal table has 2 lines then define one table with your reqirement,like "if the internal table contains only two records it has to draw box only with 0.80 Cm height only".
    mention the height in table->details as 0.80cm.
    if internal table has 10 lines then define one table with your reqirement,like "if the internal table contains only two records it has to draw box only with 4 CM heightheight only".
    mention the height in table->details as4 CM height.
    in else... your can write as many as depending on your req...
    this is lengthy, hope this will achieve your requirement.

  • SmartForms: Trigger NEXT page in a loop Not in MAIN Window?

    Thanks for all of your responses. I know understand that my list I am creating in my loop does not trigger to NEXT page because it is not in my MAIN Window.
    I am a little leary of moving this non MAIN window logic into my MAIN window, because I finally got everything looking pretty good, except for this issue. So, does anybody know of a way to trigger NEXT page to continue writing in a NON-MAIN window to a NEXT page?
    As I am writing this I am thinking that I may be able to put a command inside the non MAIN window to go to NEXT page?    Any suggestions, it must be possible somehow.
         Thank-You.

    hi
    see this
    [Sap help documentation for smartforms|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf]
    check page number 84 of this.
    its written over there.
    Prerequistites:
    The page to which you want to branch must exist. you can branch to a new page only as long as you are still displaying the contents of a main window.

Maybe you are looking for

  • Can't edit in QT 7 pro and SL

    Ever since I upgraded to SL, I can't edit in QT 7 Pro. I have the correct codecs and it is PRO. However, whenever I open something, there are no in and out sliders at the bottom that were there on 10.5. Any idea where they went or how I can get them

  • Login Screen in Oracle forms builder 6i

    Hello everyone I am trying to create a canvas with a login screen and password in oracle forms builder 6i. So far I have create the following table: CREATE TABLE PASSWORD (USER_ID NUMBER(3) CONSTRAINT PASSWORD_USER_ID_PK PRIMARY KEY, PASSWORD VARCHAR

  • Task Manager: Applications vs Processes

    I'm monitoring a snmp-agent enabled Windows 2000 machine by retrieving the hrSWRunTable from the HOST-RESOURCES-MIB. I have to code some Java that accepts the list of processes from the hrSWRunTable and outputs their respective applications. I'm wond

  • Data sources in IS-U

    Hi, There is a structure called as EWA_VBSD Screen Fields for IS-W Enhancement of Premise in IS-U. Is there any standart datasource that uses this structure, if so, how can i find it? One more question; is there any transaction code, table or documen

  • Why do I keep getting 'Action ScriptError' messages from Adobe Flash Player?

    Whenever I play games on Facebook, mostly from the Zynga stable, a message pops up like this: Each time, the message shows a different error code (I think). Does anyone know why this should happen, and is there any way I can stop them without getting