Two loops in a table in main window

Hi all,
I have a main window and under it I have created a table with header main window and footer for 6 fields with 6 cells and 6 texts, each text under each cell.
I want to run a loop for first 3 fields and another loop for the other fields.
I mean the table should be partitioned as 3 and 3 fields.
The first 3 fields say Item, description and Debit in one part and the other part  date, credit and particulars
I want to run two loops to run calculate the debits and credits?
Now my point is how to partition the table into two?
Do I have to create two tables and take 3 in one and the other 3 in the second table?
If I create 2tables then how to calculate the second part fields data ?
I mean how to get the data or show the data in the right side of the table?
Please answer
Thx

Hi
Create two loops in the main window and in first loop display only three fields and in second loop display remaining three fields but border of the cells need to change to white color so that it will not display the black color lines in the main window.
One variable to calculate sum of first loop and display sum at the bottom the main window and another variable to calculate sum of second loop and display sum at the bottom..
Regards
Srilaxmi
Regards
Srilaxmi

Similar Messages

  • Footer of the Table in Main Window in Smartforms

    Hi,
    I have a smartform. In that I have declared a main window. And I want the Footer to appear on each page. So, I have checked both the check boxes in the Footer Event of the Table in Main Window.
    1. At page Break
    2. At end of table.
    But it is comming only on the first and last page.
    If I check only 1, it is printing on the first page only.
    If I check only 2. it is printing on the last page only.
    I want it to be printed on all the pages.
    Help needed.
    Thanks in advance.
    Ishaq.

    Hi
    Instead of using the Main window for footer
    Why can't you declare a separate constant window separately apart from MAIN window and use for the footer to print in all pages.
    create another window and write all your data in that and see
    Since MAIN window overflows as the data grows constantly it is coming only on the first and last pages.
    So to appear that on each page a fresh window is useful
    Reward points for useful Answers
    Regards
    Anji

  • Table in main window with page break in smartforms

    I want to print data with heading and items in tabuler form (grid form) using table with PAGE PROTECTION in main window in smartform.
    if you would say staight way to use Table or Template under FOLDER with page protection, will not work.
    So, it is little bit tricky. So,if any body have a proper solution please help.
    Thanks and regards,
    Vijay Kr. Gupta

    Hello,
    Include the Text ELEMENT U have used to draw the table in the loop of the main window.
    Vasanth

  • TABLE IN MAIN WINDOW APPEARS ONLY IN 1 PAGE NOT OTHER!!

    FRIENDS I HAVE MODIFIED PM_COMMON STANDARD PROGRAM INTO ZPM_COMMON...TCODE IW3D.THE LAYOUT WHICH I HAVE CREATED IS TOTALLY DIFFERENT FROM PM_COMMON..I HAVE COMMENTED ALL THE CODING IN MAIN.EXCEPT FOR OPERATION NO AND DESCRIPTION...WHICH I WANT TO INSERT IN THE TABLE.NOW PROBLEM IS THAT I HAVE CREATED A TABLE.BUT THE TABLE IS ONLY SEEN IN 1 PAGE WHEN I PRESS PAGE DOWN THE TABLE DOESNT APPEAR....WHT DO I DO ...SO AS 2 I CAN VIEW THE TABLE ON ALL THE PAGES....BY PRESSING THE DOWN PAGE...
    PLEASE HELP URGENT.....
    REGARDS ESSAM([email protected])

    Hello,
    Include the Text ELEMENT U have used to draw the table in the loop of the main window.
    Vasanth

  • Problem with sap script table in main window

    hi all,
    i have created a sap script  for which output is in 7 pages.
    except first page all the remaining pages are giving the correct output.
    the problem with the first page is iam not not getting vertical lines in the table which is in the main window of page 1.
    iam getting the vertical lines correctly in the mainwindow table of all the remaining pages.

    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

  • 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

  • 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.

  • Grouping in main window

    Hi experts..
    I am working on SCRIPTS.
    I am looping my internal table in main window to print fields of main window.
    my main window fields are--
    box_id   pack_id  sales order  duty_code   box_wt.
    but one more field is there..ie DEST_CODE, its CHAR type.
    but i want to group my internal table records according to DEST_CODE.
    means..on o/p form fields should b displayed---
    dest_code = '--'
    box_id   pack_id  sales order  duty_code   box_wt.
    my all fields are get printed..
    but can some body tell me "how to group my internal table records, according to one specific field"
    when that DEST_CODE  will change,
    those records group must b different.
    thanks i advance

    Hi,
    1. U declare the first field as 'DEST_CODE' in ur Internal Table.
    2. Now, u SORT the internal table on DEST_CODE.
    3. LOOP ur Internal Table & use control break events for grouping based on DEST_CODE.
    Eg:
    In Driver/Print Program:
       LOOP AT itab.
         at new DEST_CODE.
            call function 'WRITE_FORM'.
                exporting
                   element = 'E1'
                   window = 'MAIN'.
            endfunction.
         endat.
         call function 'WRITE_FORM'.
            exporting
               element = 'E2'
               window = 'MAIN'.  
        endfunction.
      ENDLOOP.
    In Script Form: in Main Window
    /E    E1                                             --> Calling Element E1 to print Dest_CODE
    P1   &itab-DEST_CODE&                   --> Printing DEST_CODE once for every new DEST_CODE
    /E    E2                                             --> Calling Element E1 to print Dest_CODE to print other details
    P1   &itab-box_id&,,&itab-pack_id&,,&itab-sales_order&,,&duty_code&,,&box_wt&.  
    Hope its clear!!
    Rgds,
    Pavan

  • SAP Script need to display main window two times on single page.

    Hello Guru's,
    So here is my requirement, we need to print check. We are using F110_PRENUM_CHCK and linked with driver prog RFFOUS_C. We have Letter size paper with three sections,
    1. Check
    2. Voucher Section (containing table of element 515, 525 and 530) 515: Heading, 525 : Regup-Belnr, Regup-XBLNR, Regud-Wrbtr.
                                                                                    530: Regup-SGTXT
    3. Voucher Section (As a receipt for bank itself) : contains same data as 2nd section.
    I tried several things reading all the previous post over here in SDN.
    1. Created Z form created two instances of main window it results just single display of table (voucher section) in section two and not in third.
    2. I also tried pasting two times same code in single main window which gives only last item line for the table.
    3. Created z driver program made changes in Write_form added control form for element 515 that does results in showing element 515 on both the location.
                CALL FUNCTION 'CONTROL_FORM'
                  EXPORTING
                    command   = 'NEW-WINDOW'
                  EXCEPTIONS
                    unopened  = 1
                    unstarted = 2
                    OTHERS    = 3.
                CALL FUNCTION 'WRITE_FORM'
                  EXPORTING
                    element = '515'
                  EXCEPTIONS
                    window  = 1
                    element = 2.
    3. For Element 525 and element 530 is not acting same. In the prog 525 = hlp_ep_element. And there are many write_form for this. I tried pasting each and every place same kind of code. It doesnt work. what it do it gives me three pages of output repeating every thing twice and weirdly.
    I am need this to be done as I already took so much time solving nothing is working.
    Please give me the exact location where to paste this code so I can have two times data of main window.
    Or is there any other way to do this....Any way will be good for me as long as it shows two times data in the form.
    The data is table.

    Hi Manju,
    I create a new window (no main) but does not run, please can you tell me what should I do to make it work.
    Best regards.
    Robert.

  • How to make the main window's table size fixed?

    Hi all,
       when i have a single line item, the size of table in main window is getting reduced. Its size is varying according to number of line items. Is not is possible to keep the size of table fixed even you have single line item?
    Regards,
    Bipen

    Hi,
    You need to create a dummy template of fixed size and do not use lines for the main window table use the template. this will overlap with the window height.
    If you want tro display something then pass the field based on some condition  on end of the table
    Regards
    Shiva

  • Smartform doesn't show preview when the records exceed the main window size

    Hi
    When i print the smart form having line items exceeding the main window size on the page it does not show the preview. The internal table loop goes into infinite loop. Is there any means whereby if the records don't fit on the main window of the page will be continued to the next page. Right now I have no clue how it is to be resolved. I feel the problem is in layout, as when i remove the main window the internal table code works fine and it does not move in infinite loop. Please help me resolve this issue.
    Thanks in advance

    Hi
    I have deleted the table from main window and instead inserted a loop.
    Also i created the two pages. But the problem still persists.
    But for my requirement my each line item in the main window has 3 lines.
    Also my layout will be the same for all pages so is there a need to create a new page.
    Is there any mechanism whereby if the line items dont fit on the mainwindow of the page will automatically continue on another page without having to define it.. please guide? Right now the smartform goes in infinite loop if it doesn't fit in main window size
    Thanks

  • Extra boxes when Main Window Overflows

    Hi All,
      I created a table in Main Window, after that i have long texts. If the long text overflows, then i am getting two boxes which are not even present in the form anywhere. I am wondering how to get rid of those two extra boxes. Please help me.
    Thanks,
    Kumar

    Hi Kumar,
    Elobrate it a bit more.
    I couldn't visualize what do you mean by extra box, where exactly they are...before the table/ after the table.
    or extra boxes in one coulm of the table.
    cheers,
    Sai

  • How can i put some more fields in header portion of my main window

    I am having one table in main window.Item no,itm desc,net valu,Uom.I need to add required date and unit price these to into my table.I had declared these two in text fields.So that these two fields are coming in the below line of the header portion.How can I maintains all these 6 fields in header portion.

    Hi ,
    click on the table element. Then click on Table Painter. There create two more coloumns . Simplly by drawing two vertical lines. Over there u have the facilty to do that.
    Then create two text nodes in the header window .and give the output options properly .Then u can get the desired result.
    Also try to increase the width of the table, so that it can accomodate all the cells in one line.

  • Smartform Main window problem

    Hi,
    I have a requirement wherein i have to print data for an employee from more than  30 different sections , the data for which is stored in different internal tables.
    As there can multiple records in each internal table for an employee and data has to flow ; i have to include the internal tables in Main Window.
    I wanna know is it possible to include all  the internal tables as table nodes  (>30 ) in Main Window ? If no, what is the best way to handle such scenario in Smartforms.
    Thanks in Advance!
    Regards,
    Aleria

    Hi Jsree,
    in my case it is not poosible to combine fields from 30 different internal tables into one because of dta constraints; so i can't follow this approach.
    However, i tried it is possible to display this much internal tables with float functionality in Main windiw using Folders,
    Thanks for your answers.
    Regards,
    Aleria

  • Page Protection in Main window of smartform using Folder issue

    Hi Experts,
    We can fix the page protection issue of records in main window by checking the No Page Break check box at the line type level in a smartform.
    I tried to solve this issue by using the folder option. I created a folder inside the table of a main window and checked the page protection check box. Save and activated the layout. When i tried to add the table to the folder, the check box for page protection was reset to blank.
    Why does this happen? Cant we use page protection inside main window using folder ??
    Thanks

    Hi friend,
    We can do page protection functionality inside table of main window using Folders option. Follow the below steps,
    1. Assume rows are created inside table in a main window, with corresponding line types.
    2. Create a folder named PROTECT inside table, for example in Main area of table.
    3. Just drag and drop your Row(s) into folder PROTECT and simply click page protection check box of the folder PROTECT.
    4. This will help you to add the required functionality using Folders option in smartform.
    Try this and update me in case of any concerns. Hope this will solve your problem.
    Check the attachment also for your reference.
    Cheers...

Maybe you are looking for

  • Can't no one do it. plz help me

    Hi Friends I wrote a code in Applet for connecting Database.I did it using servlets and JSP successfully, and also the connection is created successfully when codding in main() for DOS Console, but now I try it in Applet but the ClassNotFoundExceptio

  • Post-power surge question. Please help.

    I just had a power surge and my G5 iMac shut off. However, my external hard drive did not. I restarted my computer and the external hard drive is not appearing on the desktop. I don't know what to do. Should I simply shut off the external hard drive

  • Need for Read Consistency

    Dear Members : [1] In later versions of Oracle (10g/11) the error "ora-01555 snapshot-too-old" almost never occurs - is this true ? [2] Why in the first place need for read-consistency, if that's misleading ? This is just to convince myself - althoug

  • My brand new MacBook Pro wont turn on

    If you ever wondered if there's anything worse then buying a new macbook pro, waiting two weeks till you receive it only to find out that after you unbox it, slowly and carefuly, connect it to the MegaSafe Power adapter and hitting the On key it will

  • Connection cords of iPod and iPhone

    I am assuming the connection cords to the PC for iPod as well as the iPhone are interchangble. I don't want to hear from Apple that my iPhone battery died becase I used the wrong cord.