How to print items in the MAIN window of the NEXT page (smartform)?

Dear forumers,
There are two pages (FIRST and NEXT) in my smartform with the same MAIN windows in each of the pages. Whatever that are changed in FIRST-MAIN window will also be seen in NEXT-MAIN window.
I will need to control the printing of table TABLE3 contents (already contained in the MAIN window) such that if a variable V_MAT_PRINT is 'X', the TABLE3 contents will only be printed in NEXT page and not printed in FIRST page at all.
How may I achieve this? Please help.
Thank you.

>
Mohammed Ahasanullah Mulla wrote:
> Hi Deborah,
>
> I had also faced a similar situation,in my case it was three pages..However i will try to tell you for 2 pages..After the second table .Add a program lines and force a page break only if V_MAT_PRINT is 'X'. After the program lines add a command and make the go to new page as second page.This will solve your problem.I have done the same and its working fine .If you have any questions do ask.
>
> Thanks,
> Ahsan
Hi Ahsan,
Here's my case.
If V_MAT_PRINT is 'X', print the following:-
FIRST page, MAIN window
- TABLE1
- TABLE2
- TABLE4
- TABLE5
NEXT page, MAIN window
- TABLE3
If V_MAT_PRINT is not 'X', print the following (no additional controls / changes are needed, everything remains unchanged):-
MAIN window
- TABLE1
- TABLE2
- TABLE3
- TABLE4
- TABLE5
In this case, is a page break suitable? I doubt it as TABLE4 and TABLE5 will still need to be printed back on the FIRST page regardless of the V_MAT_PRINT value.
Please advise further. Thanks.

Similar Messages

  • Can I to execute two times the MAIN window in the same page?

    Hello, friends:
    How I can to execute 2 times the MAIN window in the same page in SAPscript, this without modify the program link a SAPscript?
    I create in the same page two MAIN windows, but I can to print only one MAIN window, the second window is not appears.
    Thanks for advance,
    David

    You can't - only one MAIN window is allowed per page.

  • How to output particular text in main window only in first page

    Hi experts how to ouput particular text in main window only in first page after that actual transaction data will be continued.....any ideas....Answers will be rewarded.....

    Hi,
    Try this.
    /: IF &PAGE& = '1'
    /: ENDIF
    Thanks,
    Naren

  • To display vline if main window flows to next page in SAPScript.

    Hello,
    We are facing issue that we have to put vertical line at the end of page , if main window flows to next page.
    In our case, we have payment done for different currencies as well, so that means if for first currency USD we have 20 records then after 16 records page gets break then we want sy-vline to print there and next 4 records in next page, similarily for next currency EUR, then if we have 4 records it gets displayed on one page only, so no vline is required then.
    So like this if we have 3 pages to be displayed then on first page it should displayed vline as records gets overflowed.
    May be in Script we can have more than 3 pages as well, so at different currency when we have more records then only it should show vline, otherwise not.
    Also we have signature window inside main window, so on next page it should not display line after signature.
    So please help us for finding the solution to this issue as its really urgent.
    Thanks.

    Hi friend,
    So as of now you know that the line count for a page is 16.
    So after displaying records in main window just check the sy-index or keep a variable incremental for the loop.
    Check whether the variable count is 16 and put a sy-vline. So if we have less number of records or if we have a signature window the vline wont be executed.
    This will only be executed when there are 16 records for a page. So for better handling you can use the number of lines per page dynamically. Ie to know the size of lines in the page dynamically.
    Else use of end of page command to draw lines at the end of page. But the end of page command should be used inside an if else command.
    See the link below for more options in Scripts Link : [Editing Format Actions|http://help.sap.com/saphelp_nw70/helpdata/en/ce/6f0f82ea6311d18e2f0000e83dd9fc/content.htm]
    I think this solves your issue. Please revert back to me if you face any issues. I will help you.
    Thanks,
    Sri Hari
    Edited by: srihari.kumar on Jan 31, 2012 4:27 PM

  • How to Print text in two main windows

    For printing label have created two main windows on a page. calling function write_form In ABAP Program under do loop for two times. 
    but program prints only one window. why is it so? how can i print text on two windows.
    do 2 times.
      COUNT = COUNT + 1.
    loop at itab WHERE DEPTT LT 200.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            ELEMENT  = 'TEST'
            FUNCTION = 'SET'
            TYPE     = 'BODY'
          WINDOW   = 'MAIN'
          EXCEPTIONS
           ELEMENT   = 1
           FUNCTION  = 2
           TYPE      = 3
           UNOPENED  = 4
           UNSTARTED = 5
           WINDOW    = 6
           OTHERS    = 7.
      endloop.
    enddo.
    Please guide.

    Since the information is variable and coming out of the print program, I can assume you want to print many labels but two to a page. Also, any page numbering, etc will need to be updated. This is easily accomplished with SAPScript but a feature people rarely use I believe. Here are the simple steps:
    1) On the Windows Screen: Creat a main window for the size of the label, etc knowing that you will be putting multiple windows on a page. For example, if page size is 8.5 x 11, maybe your window size is 6 X 4 or something similar. You only need one main window defined.
    2) Now go to Page Windows Screen. Add a window MAIN and down at the bottom where it says Window Type put in MAIN. Next to this field is a little field about two characters long. In here put in '01'.
    3) Now Add another window MAIN and down at the bottom put in '02'.
    Hopefully this gives you the idea. I've done this with up to 30 small windows in order to print variable window for labels on label stock such as Avery 8167, etc. 
    Good Luck!
    Tim Stadler
    Menasha Corporation

  • How to summarize a field from main window at the bottom

    I've a requirement in sapscript which is driven by standard program RVADOR01 to print certain quotation details.There is a field called tax code(kbetr) which
    is required to be displayed for each line item .
    Now i've also to summarize these tax code at the bottom of the page in another window.Here is the scenario
    In MAIN window:
    kbetr
      1     for 1st line item
      1     for 2nd line item
      2     for 3rd line item
      1     for 4th line item
      3     for 5th line item
      2     for 6th line item
    It have to summerise above tax code in FOOTER window as:
    kbetr
      1
      2
      3

    Hi anutosh,
    1. First check out if summary variables
       are already available in the standard drive program or not.
    2. Further to this, the TEXT ELEMENTS
      for printing the summary should also be available.
    3. This all logic / sequence of printing
       is absolutely
       contained in the driver program.
    4. If its not there,
       then probably u will have to
       copy the driver program,
       and do some enhancements/modifictiions.
    5. I don't think, by simply manipulating
       the sapscript layout, we can achieve this directly.
    regards,
    amit m.

  • How to handle the main window in the smartforms

    Hi Guys,
    I was declared a maindow height 6 CM, if it is less items it is displaying, if more then 10 items it displaying the output, Could you please suggest me, where i do change the settings.
    Thanks,
    Gourisankar.

    Hi Gourishankar,
    Check out with the Next page of the first page. I think you have not specified the next page for the First page. As a result the output is not coming.
    &************ Reward Point if helpful***************&

  • How to dock the main window to the screen edge?

    Is this feature implemented in Swing or some other frameworks?
    PS: I need only window docking to screen,but not docking panels or other elements to window.

    I guess I don't understand what you mean by docking.
    That method will place the frame at the left edge of
    the screen.I meen that if the frame is located on small distance from the screen egde it tends to be attached to this egde, like taskbar and other panels on the desktop. I hope you will understand my poor english :)

  • How to skip secondary window if main window goes to next page

    hi gurus,
                  i m having a table in main window which lists items and its rate n quantity.
    the total price,discount and discount is calculated in secondary window.
    now if the list of item get more than window size it goes to next page but with calculation in both page in secondary window . i want to skip the calculation on 1st page.the calculation should only apear in scond page.
    thnx in advance.

    Hi..
    ******Case 1******************
    Suppose if you want display the Totals only in Last page :
    In the Secondary window:
    /: IF &NEXTPAGE(C)& = '0'
      <<DISPLAY YOUR TOTALS HERE>>
    /: ENDIF
    ***********case 2**************
    Suppose if you want display the Totals only in Last page :
    In the Secondary window:
    /: IF &PAGE(C)& = '2'
      <<DISPLAY YOUR TOTALS HERE>>
    /: ENDIF
    reward if Helpful.

  • REG: Want to have a dynamic length in the main window of the smartform

    Hi,
    Based on the table contents and the line items, the length and size of the table should either increase and decrease,
    It shall be very helpful in meeting a requirement..
    Regards
    Srikanth.P

    Hi,
    What exactly is it that you want to do?
    The lenght of the table will automatically be dynamic as the table will be build dynamically.
    If you want to place something after the table and for that reason need a dynamic main window you can put it in the footer of the table and it will place it after the table.

  • Windows handle of the Main Window of the SAPGUI

    Hi experts,
    i need to have the window handle value of the window of the Main MDI window of the SAP GUI from ABAP, does anyone know a FunctionModule or something like this to retrieve this information?
    I need to retrieve information about the geometry of the window (Like the coordinates of the window,..).
    (For 46C)
    Can anyone help me?
    Many thanks and regards,
    Gianpietro Dal Zio

    If this is not something you hope to do programatically .. MS's SPY++ utility will be of assist. If you wish to do it programmically .. I'm a newbie and am unaware of an FM to do it, though if it is possible to call a WIN API Function from ABAP, that may be a course you could persue

  • Box in main window extend to next page in sapscript

    Hi all,
    I am trying to put box in main window in sapscript.
    contents of main window extends  to more than 1 page.
    Box  is appearing on first page but is not extending to other pages.
    Pl help,
    Regards
    Senthil

    Hi,
    Please refer this thread.
    Link: [sapscript box nto printed on all pages;
    Hope this will help you.
    Regards,
    Renuka S.

  • My iTunes library is not appearing in the main window, only the iCloud stuff.  How can I get my full library to appear again?

    I just opened up iTunes and my full music and film library was not visible.  Only files that have a cloud icon next to them show up.  How do I get full music and film access back again?
    I never use iCloud and don;'t believe I ever set it up to operate on my system.

    Hello Stormjib,
    After reviewing your post, I have located an article that can help in this situation. It contains a number of troubleshooting steps and helpful advice concerning iTunes Library issues. Your iTunes media folder may have been move or modified, which would explain why you can only see media in the cloud:
    iTunes: Finding lost media and downloads
    http://support.apple.com/kb/TS1408
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • How to put the main windows in the center of the screen

    Hello
    I want that first windows appears in the center of the screen. Anyone can say, look at screen size and calculate it, but I don't know what it be the size of the screen when app will run, it depends of computer.
    Thank in advance !

    var screenBounds:Rectangle = Screen.mainScreen.bounds;
    This will give you information about the screen. You can access the height/width using screenBounds.height and screenBounds.width.

  • Reg: Displaying all the items of main window in the same page itself.

    All,
    I am developing an SAp Script form which is using five windows. Out of which third window is the main window. In the main window i am displaying details of item sold. The form prints perfectly when the number of items is with in the limit of the main window height. When it exceeds the main window height a second page with the same format of the first page is displayed with the remaining items in main window. ie 1,2,4,5 window is repeated in both pages.
    I want to display all the items of the main window in the first page itsel and if it exceeds first page show the remainng items in the next page and then display 4th and 5th window. IS it posiible using SAp script. Am i to do some configuration for this?
    Note: I have assigned Next page to first page itself.

    Thanks Anji.
    I understood about display of first and second windows.
    About main window and Fourth and Fifth window i still have doubt. I have given specific height to main window and after that put the fourth and fifth window with specific height in first page itself. So what happens is that When mainwindow overflows it will print up to specified height in the first page. Then prints the Fourth and Fifth window in first page. Then it goes to second window prints the remaining items in main window then again displays fourth and fifth window. Could you please find a solution for this too.
    Regs
    Rakesh

Maybe you are looking for