Problem in printing multiple main window in smartforms

Hi Experts,
I have requirement form client to print PO which consists of 4 page.
First page is cosists of header and some text.
In second page different header and line item.
Thirs page different header and line item.
4th page different header and line item.
I have printed tex in main window of first page and called command to trigger
second page main window, but i am getting dump.
How to print the line item in the multiple page of smartforms.
Regards,
Udupi

Hello ,
To print the text below are following steps which you can follow for your requirement :
1. Create the Four pages having the Main Window, but take care that Logic should be in First Page Main window only , other pages main window will be blank.
2. Create the Secondary Window in second, third & fourth page  which will be same size as the main window having the text which need to be print in respective pages.
3. Logic Part - in the main window of first page fill all the data which you need to print in 1st to 4th page in different internal table. Now for example you need to print text in first page then in Main window create table having the data of 1st page.
          To print data in Second page create one more table having data of secondpage and put the Command there (follow the same for next pages,)
I hope this will  help you
Thanks
Romit Raina

Similar Messages

  • Printing In Main Window in Smartform After All Line Items

    Hi All.
    I have this requirement wherein I have to Print Export Charges in main window , below all the line items.
    There is a loop on line item tables and I am printing all line items in the main window.
    How to print this export charges after all the line items?
    Points are assured !!!!

    Hi,
    Create two row line in the main area of the table. First one for line items and the next for the export charges.
    Hope this ll help u.
    (Sorry, this ll print export charges after every line items, try to print the export charges in the footer of the table.)
    Regards,
    Prabhu
    Edited by: Prabhuraj Krishnan on Apr 15, 2008 11:05 AM

  • Print Invoice Header Text In Main Window of Smartforms

    Helo Gurus !!!
    I want to print Invoice header text in main window of smartform.
    There are total 5 columns.
    Item    Quantity          Description          UnitPrice       Amount
    Now what I want is to print header text below Description column, there is a loop on the table in main window.
    This header text will be printed only once. This is a standard header text
    How to get this?
    Points are assured !!!

    Hi Anay Kulkarni,
           I understood that u need to print this header text
    Item Quantity Description UnitPrice Amount
    So please use TABLE instead of LOOP  in the table we can prin header, main area, footer.
    place the header text in header area in table...  i am sure this can resolve it.....
    feel free to contact me if issue is not resolved/.....
    dont forget to reward points....
    all the best...
    Regards,
    Sreeniasa Sarma K.

  • Dynamic Height of Main Window in Smartform

    Good day experts...
    Actually this problem puzzled me since yesterday when I am developing a customized printout for PO.
    Right now, we have an existing form for our PO.. The management asked me to do another PO form for the second company. Thus, there will be two layouts of PO... Since the content are just the same, I just copied the program of our existing PO and make the necessary adjustment for the new layout for our new PO. My problem now is the Main Window for the second PO...
    As far as I know, only One main window is allowed in every Page. So what I did was, I created two tables (let say Table 1 and Table 2.) inside the main window. I just placed condtions on the condition tab of both tables that when user selected company A, Table 1 will be displayed. Otherwise Table 2 will be displayed  if company B is selected.
    Now, I have produced correct output. My only problem now is, the height of the second window which must be shorter than the first PO. I am aware that the main window's height is fixed and cant be changed dynamically.
    Before I write this post, I google(search) the net to view some possible solutions. One option that it was suggested is to create another page, say Page2... On that second page, create another main window which is smaller in height.. This would be the second PO. On the main window of the first Page, insert a command line. Then, pinpoint to the second page when the condtion is true.
    This technique was not successful when I tried. Since  when i try to see the prinout of the PO, the first page is blank and the detail of the PO is on the second page which should NOT be.
    Another possible way to solve this problem that I think is , create a separate smartform for the second company. In this case, no worry about the height of the main window. However, my problem that I forsee is, how can I implement on ME23N, to pinpoint two separate smartforms?
    Thanks in advance experts... I hope to hear your wonderful ideas...

    Hi,
    As you are already using smartforms for PO printout(instead of standard form MEDRUCK) , you should have already changed the standard driver program (SAPFM06P) in a zprogram or have done your own driver program which is calling the smartform. So its so simple that you branch your different smartform call in that zprogram. Check which driver program is currently in use in tcode NACE - > Application EF ->Output Type NEU and click processing routine.
    Another way is to have a  copy of the secondary window and adjust size and give conditions.
    Regards
    Karthik D

  • Printing in only last line item printing in main window

    Hi All,
    My requiremnet is to print same data in two blocks for F110 payment cheque
    Iam using 2 main windows to print same data if block exceeds it will go to next page
    iam calling the windows as shown below
    CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            window   = 'MAIN00'
            element  = hlp_ep_element
            function = 'APPEND'
          EXCEPTIONS
            window   = 1
            element  = 2.
        IF sy-subrc EQ 2.
          err_element-fname = t042e-zforn.
          err_element-fenst = 'MAIN00'.
          err_element-elemt = hlp_ep_element.
          err_element-text  = text_525.
          COLLECT err_element.
        ENDIF.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            window   = 'MAIN01'
            element  = hlp_ep_element
            function = 'APPEND'
          EXCEPTIONS
            window   = 1
            element  = 2.
        IF sy-subrc EQ 2.
          err_element-fname = t042e-zforn.
          err_element-fenst = 'MAIN01'.
          err_element-elemt = hlp_ep_element.
          err_element-text  = text_525.
          COLLECT err_element.
        ENDIF.
    Iam getting only last line item printing in main window
    Please provide the inputs.
    Thanks,
    Kamalakar.
    Please use code tags.
    Edited by: Rob Burbank on Nov 25, 2011 11:51 AM

    Hi,
    My requirement was to print same block twice in cheque printing of F110.
    I have used the function module  'WRITE_FORM_LINES' to print more than one line item in secondary window in the script .
    fill the Lines internal table as shown below.
    Example :
        lines-tdformat = 'TM'.
        CONCATENATE regup-xblnr ',,' w_date ',,'  w_bsak-sgtxt ',,' w_gross ',,' w_dis ',,'
        w_net INTO lines-tdline.
    APPEND lines.
    CALL FUNCTION 'WRITE_FORM_LINES'
          EXPORTING
           function                       = 'APPEND'
           header                         =  header_t
           type                           = 'BODY'
           window                         = 'MAIN01'
        IMPORTING
          FROMPAGE                       =
          PENDING_LINES                  =
          TABLES
            lines                          = lines
         EXCEPTIONS
           function                       = 1
           type                           = 2
           unopened                       = 3
           unstarted                      = 4
           window                         = 5
           bad_pageformat_for_print       = 6
           spool_error                    = 7
           codepage                       = 8
           OTHERS                         = 9
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.

  • Problem with Main window in smartforms

    Hi All,
    I am creating a smartform, in that i need to restrict the no. of line item is to 15 and i need to draw a box for it. My problem is if i am displaying 15 line items the box will be drawn correctly and if i use only 3 line item then the box is drawing only for 3 line item. But i need to draw a box for 15 line items constantly at any given point of time irrespective of no. of line items. I am displaying this info using mail window, plz do help me.
    Thanks & Regards,
    pavan.M

    Hi,
    First describe your internal table and based on that you deifne another internal table in which you will have some 2 dummy fileds
    suppose if you internal table has 10 lines then you need to have 5 more lined to print right?
    say describe lines is v_lines
    v_rem = v_lines mod 15. (you will get remainder here)
    then v_count = 15 - v_rem.
    before main window do code as following .
    do  v_count times.
    v_dummy1 =  text (maintgain soem text in this field)
    v_dummy2  will not have any value.
    append these values to it_dummy table.
    enddo.
    And when you loop main table count one more variable  say v_cnt.
    Now you can loop your dummy internal table based on condition.
    the condition would be   v_cnt  eq  v_lines .
    and print empty text . dont print the field that have some text.
    loop dummy table only after printing main table data in the main window.
    Hope you got the logic
    Dont forget to reward points
    Regards,
    Nageswar

  • Page break for Smartform with multiple main window on pages

    Hi Experts,
    I have a requirement for printing 3 pages. The difference among the 3 pages is the main window part.
    The main window contains not only internal table, also complicated texts like payment instructions etc.
    The requirement is in each page, the data in internal table should be changed, also payment instruction should be changed accordingly.
    e.g:
    Main Window of Page 1
    Part 1 for Internal table
    VAT on ITEM ------- 4O-------60,00------0.00%-------EUR
    Part 2 for Payment Instructions
    Texts for Page 1
    Main Window of Page 2
    Part 1 for Internal table
    VAT on ITEM ------- 5O-------60,00------0.00%-------EUR
    Part 2 for Payment Instructions
    Texts for Page 2
    Main Window of Page 3
    Part 1 for Internal table
    VAT on ITEM ------- 6O-------60,00------0.00%-------EUR
    Part 2 for Payment Instructions
    Texts for Page 3
    At first, I was using only one page 'Page1' with a variable page_no = 1 as default value, and use program line page_no = page_no + 1 as counter. when page_no = 2, use command for force page break to 'Page1', then under the command, change the internal table and payment instruction texts. when page_no = 3, ...
    But I encountered an error saying:
    Runtime Errors         GEN_BRANCHOFFSET_LIMIT_REACHED
    Short text
         Jump distance is too large and cannot be generated.
    So I created 3 pages, with different main window M_window1, M_window2, M_window3 for each page. In page1, after printing the M_window1, page_no = 2, use command to go to page2, but page2 is never printed. I think this is because only one main window can exist in a smartform? but why smartform allows creating individual main window for different pages? what's the use of such main window?
    By the way, what's the use of command for force page break? only work for one main window in a smartform?
    Getting back to my requirement, I think I should still use one page and command for page break. I am trying to solve this.
    Thanks.
    Li Jun Da.

    Now I am using 3 pages: Page 1, Page 2, Page 3.
    Page 2, Page 3 are copies of Page 1 with main window renamed as second window: mw 2, mw 3.
    I also created 2 command nodes in main window of page 1: cmd 2, cmd 3.
    cmd 2 is for page break to Page 2, cmd 3 is for page break to Page 3.
    The second window mw 2, mw 3 in Page 2, Page 3 can be displayed.
    Even though, I still can't understand how main window of pages (not 1st page) can work.

  • Problem with 4250dtn printing multiple copies Windows 7 64 bit

    We can't print multiple copies from within some, but not all, applications to a Laserjet 4250dtn from Windows 7 64-bit workstaitons.  Windows 7 32-bit ones work fine.  The printer is served from a Server 2003 printer queue, but even when we print direclty to the port we only get one copy. Setting copy count from the printer dialog works fine, but we need to have the applications invoke multiple copies. We are using the UPD 64-bit driver;  could not find a legacy driver for this printer for Win 7 64 bit. I've tried various tricks found elsewhere on this forum, including turning off mopier mode, printing directly to the printer, disabling advanced features, etc. to no avail. Help, anyone! Thanks. Jerry TurnbowUSBO

    Thanks very much for the feedback. I was getting worried!
    The command window opens when I double-click on the Developer Day VM and I get a few lines that scroll off the window about loading Linux .... These lines never come back and I can't scroll in the command window.
    As soon as the above messages come into the command window the whole process stops. The window stays open but I get no response from it. I get no login prompt or anything.
    Do you think it could be a VirtualBox setup issue? I downloaded and installed the product along with the extension pack with no apparent problems and when I start VirtualBox I see the Developer Day VM listed in the left panel. All I do at that point is double-click it like the download web site said but I don't get the same results, i.e. no chance to login. It seems all I can do at that point is close the window by clicking the 'X' and it asks me 3 things about what to do with the VM and I usually say to shut it down. None of the other options look any better either.
    Any other suggestions are most welcome!!
    Thanks again!
    -gary

  • Problem with 2 tables nodes in MAIN window in smartforms...

    Hello Experts,
    I have created 2 table nodes in my MAIN window to display data coming from different internal tables.
    Now, the problem is that whenever the 1st table node page breaks, the 2nd table node gets affected
    and it also page breaks. What I want is that the 2nd table must finish displaying certain number of records
    before the page break of the 1st table node takes effect.
    For example, I want to display 10 records for both table nodes 1 and 2. So I created an event in
    table node 1 that if it is 10 records or more, then it will go to the next page. So in effect, my table
    2 node did not print any records at all in the 1st page and it only started printing its first record in page 2.
    How do I print 10 records also in table node 2 before it page breaks?

    Hi,
    It's simple,
    Pre- U should had declared a second page for the same window with header, main & footer.
    now
    First when u r looping the internal table provide no of rows eg Row 1 TO 10. in the Loop ( Data Tab)
    or
    when defing TEXT Go to PC Editor and mention all the fields Under  PROTECT -  ENDPROTECT.
    This would solve the issue.
    Thanks
    Ravi

  • Problem in main window of smartform

    Hi experts,
    I have a secondary window in my page of smartform. and then a main window in which i have used a table to display line item from internal table.
    Now my problem is that when the data exceeds first page the remaining part of dat in mainwindow goes to second page but the secondary window data also repeats in second page.
    Can anyone help plz?
    Thanks in advance.1.13

    click on the secondary
    window you will find
    tabs general attributes,
    output options & conditions
    in the conditions tab
    in add additional events
    check the check box
    Only on First Page.
    Thanks,
    Phani.

  • Problem in Printing Multiple Invoice data

    Hi,
    My re quirement goes like this...
    My SMARTFORM receives 2 internal tables :
    1. Header data for all Invoices
    2.Item data for all invoices.
    Now I need to print each invoice in a new Page.
    I have done like this.
    First I am reading the header table with Index. After that I am incrementing the Index number.
    v_index = v_index + 1.
    READ TABLE HEADER index v_index.
    So, first time the fist invoice will be processed and Its item data will be printed in the main window.
    In the MAIN WINDOW after Item Table, i kept one COMMAND as Go TO NEW PAGE.
    So, that its starts processing the page again. and Next invoice will be read.
    Its working fine and Printing all the header data and footer data respective to that Invoice.
    But, its not displaying that data which is there in MAIN window. Its displaying MAIN window as EMPTY.
    I have seen in the debugging, when the NEW PAGE command is triggered, its processing all the secondory windows and PROGRAM LINES under that. But, it is not going into MAIN window Program Lines.
    Please let me know, how can I solve My problem.
    Thanks,
    Sandeep

    HI,
    You can give a page break after every new header invoice. using a command window just assign the first value of the table to a local variable when it is passing into the loop and whenever the value changes, GOTO newpage.
    Check the wiki,
    [Pagebreak in smartforms|https://wiki.sdn.sap.com/wiki/display/ABAP/PageBreakin+SMARTFORMS]
    Regards
    Sarves

  • Problem with printing footer of table in Smartforms

    Hi Gurus!
    I have created a table in a window in Smartforms. I need to put in the totals at the footer of the table, displaying these values only at the end of the page. The problem I have encountered is that the footer prints immediately after the line of the main area. The form i'm printing right now is pre-printed, so I need to write the footer at a specified area.
    Let's say my table accommodates 20 lines. The footer must be written immediately after the 20th line. If, on the last page, there are only 10 lines, the footer must still print on the area after the 20th line.
    Really need your help guys, i'm hoping for a quick response. Thanks!

    I need to put both the main area and the footer in the same loop because there is a field where, when changed, it must page-break. The fields/values in the main area and the footer are all part of a sub-table that depends on a field of a bigger table.
    my smartform looks like this:
    Loop at header table.
       if order number changes, start new page.
       loop at table x.
           main area - print items of the table where order_number = header_table-order_number.
           footer - print totals of the table where order_number = header_table-order_number.
    Endloop
    So you see, i need to place the footer inside the loop also. It's the only way I know to work around this.
    Thanks.

  • Two main windows in smartform or two loops in one main window?

    Hello All,
    I have requirement in smartform where i want to print two diffrent data header and item data in the same page.
    and in between these two data i want one template to be printed for item data .
    Smartform is giving me error if i use two main windows
    if i use two loop nodes in the main window thn how to restrict the data getting over flowed to template(item data)
    scenario is
    header data****
    **item header**
    item data****
    Pls comment....
    Regards,
    Sunny

    As main window can only be one, so try it this way:
    Under main window create a TEXT1 for header text( first header) than a LOOP1 for looping the header table, under that first create a TEXT2 for header data, than below it create another TEXT3 for header text ( Second header), than below it add a LOOP2 for looping item table and in that add a where condition than under it a TEXT4 for item data .
    MAIN_WINDOW
        TEXT1                                     " first header
        LOOP1                                    " header table
            TEXT2                                 " header data
            TEXT3                                  " Second header
            LOOP2                                " item table with where condition
                TEXT4                             " item data
    With luck,
    Pritam.

  • Printing of MAIN window details on different pages

    Hello,
    I have creates a smart form with 2 pages (invoice & packing details) containing MAIN window in each page. Also created secondary windows for respective pages with changed data. There is one interface table. When I print this form all the details are getting printed correctly on both the pages except MAIN window details on 2nd page (i.e. packing details). On 1st page MAIN window is getting printed correctly but on 2nd page it doesn't. I try to put break point on MAIN window in 2nd page both it doesn't get triggered. Can some one help me to know the reason.
    Rgds
    Rajeev

    Hi,
    A small writing mistake in my earlier reply.
    Hi,
    I believe you have two pages ( FIRST page layout is for Invoice details ).
    If the first page is spilled over to second page then you have problems with the packing details which is to be in the second page.
    In that case design another page as NEXT page same as that of the FIRST page and for the FIRST page you mention the subsequent page as NEXT.
    Then use a command in the NEXT page and mention Goto--> SECOND page for the layout of packing details with proper condition.
    And display the packing details under the command.
    regards,
    Ram

  • Problem in printing multiple line items

    Hi,
       i designed a SAPSCRIPT FORM.When i execute the t-code MB01 by giving PO which has multiple line items ,  output type is invisible.
    But when i iexecute the t-code MB01 by giving PO which has single item , output type is visible and form is printing.
    Do i need to copy the print program and make changes in there or if i change elements in the form will that helps in printing multiple line items.
    thanks.

    HI,
    wat i understand is u r trying to loop at a variable window .but tht is not suggestable.
    write a loop in program lines. read the values in to different variables and the try printing them as text elements that will solve the problem.
    or else in other way use a template and that can also solve the problem.

Maybe you are looking for

  • How do i transfer itunes purchaed on one apple ID to a new apple id?

    How do I transfer music I've purchased under one Apple ID, to a new Apple ID I've established?

  • Need code for the problem

    have to create a instance of class if that is the first instance ... successive call to create the instance should return the first instance of the class....i need the code for this pls help me .... even if the code is in C++ its ok

  • Changing ESS and MSS Pictogram

    I am trying to changing the standard icons that came with ESS and MSS business package with custom icons. I have places my custom icons - using SE80 and going to MIME repository and saved it there. But when I go to SPRO and go for the Homepage Framew

  • Overclocking & Vertical sync'ing issue's

    O.K. This post is strictly for braging rights.  I have reached 295mhz FSB with 1.7 voltage at a 5:4 ratio.  I must have had issue's before with vertical sync being disabled.  With memory running further than 220 mhz I would get serious fragmentation

  • Oracle apex 4.0.2 preview images

    Is it possible ti preview the image before upload it into the blob field in my table? How? My application works fine y browse the image put the neame save it and now it is upload into my table but id like to show a preview of that image before upload