Display  6 line items and total in main window

Hi,
I want to display only 6 line items in main window( on first page and also total of the main window of first page), and consecutively in all the apges i want to display only 6 line itms and total in each page of main window, how to write logic for this.
Thanks,
Donlad

Hi r u talking about Snmartform if yes
Let us take the page you are using as PAGE1, you can achuve this using the Command Node. call the same page after 6 items as follows
1.create Table.--->Main area , Header and footer.
2.Declare a variable V_count type sy-tabix.
a.Now click on the table tab>Main Area>right Create>Command (insert a command node after the Line type you r using to print the data), in this COMMAND node give the condition V_COUNT = 6. GOTO>PAGE1 (it maens you r  triggering the new page after the 6 lines.
b. after this command noder insert the Program lines heate increase the value of V_COUNT.
Maintain another variable the use that for page totals...
total can be doneautomatically by using the TABle-->CALCULATION TAB.
let me know if you more clear info, iam sure u r problem willbe solved.

Similar Messages

  • How to do SUBTOTAL AND TOTAL in Main Window of SAPSCRIPT.

    Hello Friends,
    I am modifying standard SAPSCRIPT of packing slip. My client wants a subtotal and total in Main Window of Script for Eg. (They want Material Number wise Subtotal and finally Grandtotal at bottom in Main Window)
    Now i got stucked up here how to do it ?
    here is my sample code.
    LOOP AT XVBPLP WHERE VENUM = SHENR.
    IF XVBPLP-POSNR IS INITIAL.
        Versandelement
          PERFORM PACKING_TREE USING XVBPLP-UNVEL.
        ELSE.
        Lieferposition (Anteil)
          VBPLP = XVBPLP.
      CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            ELEMENT = 'DELPOS'.                     "Main Window call
    clear vbplp.
    ENDLOOP.
    Pls guide me for the same.

    HI,
    For the Line items, put a ELEMENT in the Smartform, and you will call this with in the LOOP and ENDLOOP, so here with in the LOOP count the TOTAL value.
    then create new element after the Line item Element, and call this Element after the Line items prints,
    /E  LINE_ITEM
      &1& &2 & &3&     " This will be in the loop and you need to caliculate the totla here
    /E SUB_TOTAL.
    &SUb_TOTAL&  " After all the line items pritns then call this Element
    Regards
    Sudheer

  • Problem with line items print in Script MAIN window.

    Dear Friends,
    I am facing a problem with display the line items in main window.
    Here i have created my form with 2 pages,
    in first page i have created header window(my header information is full length of page), in second page i have created 2 windows, one for MAIN window and second for FOOTER window,
    i am having the Footer information about to off the page.
    and in my main window total 3 line items are coming, if i am having 3 line items then it is displaying properly (first 3 line items then immediately footer information on same page) but if am having more then 3 line items say four, then in my second page first it is printing 3 line items then it is switching into another page. After that footer is coming but. in previous page after printing 3 line items the remaining page is empty..
    my client want me to remove that place also. he wants to display continue..
    i think so u people r understand what is my problem...pls advice me what i want to do to solve this problem.
    Thanks
    Sridhar.

    Hi Sridher,
    If you want to display the footer information only on the last page why dont you use a table to display your details and place the footer details in the table footer instead of a seperate footer window.
    Regards,
    Vidya.

  • Only the last line item is shown in main window...

    Hello Experts,
    I created a custom form for the standard checque program RFFOUS_C. Now, in my MAIN window, I
    called a subroutine in a custom program which loops through the line items but the problem is
    only the last line item is being shown. I tried using CONTROL_FORM to create a new line
    but it does not work. Note that I did not customize RFFOUS_C since it is being used by
    multiple companies. Below is my code:
    SAPSCRIPT:
    510-C
    Begin of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    DEFINE &LTYC_XBLNR& = ''
    DEFINE &LTYC_BLDAT& = ''
    DEFINE &LTYC_SGTXT& = ''
    DEFINE &LTYC_DMBTR& = ''
    PERFORM WRITE_LINE_ITEMS IN PROGRAM Z9999RFI_Z2574FFI_RA
    USING &REGUH-LAUFD&
    USING &REGUH-LAUFI&
    USING &REGUH-XVORL&
    USING &REGUH-ZBUKR&
    USING &REGUH-LIFNR&
    USING &REGUH-VBLNR&
    CHANGING &LTYC_XBLNR&
    CHANGING &LTYC_BLDAT&
    CHANGING &LTYC_SGTXT&
    CHANGING &LTYC_DMBTR&
    ENDPERFORM
    PROTECT
         &LTYC_XBLNR&     &LTYC_BLDAT&     &LTYC_SGTXT&     &LTYC_DMBTR&
    ENDPROTECT
    End of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    PROGRAM:
    IF gt_regup[] IS NOT INITIAL.
        CALL FUNCTION 'OPEN_FORM'
           EXPORTING
    *         APPLICATION                       = 'TX'
    *         ARCHIVE_INDEX                     =
    *         ARCHIVE_PARAMS                    =
    *         DEVICE                            = 'PRINTER'
    *         DIALOG                            = 'X'
             form                              = lcc_z2574ffi_ra
    *         LANGUAGE                          = SY-LANGU
    *         OPTIONS                           =
    *         MAIL_SENDER                       =
    *         MAIL_RECIPIENT                    =
    *         MAIL_APPL_OBJECT                  =
    *         RAW_DATA_INTERFACE                = '*'
    *         SPONUMIV                          =
    *       IMPORTING
    *         LANGUAGE                          =
    *         NEW_ARCHIVE_PARAMS                =
    *         RESULT                            =
           EXCEPTIONS
             canceled                          = 1
             device                            = 2
             form                              = 3
             OPTIONS                           = 4
             unclosed                          = 5
             mail_options                      = 6
             archive_error                     = 7
             invalid_fax_number                = 8
             more_params_needed_in_batch       = 9
             spool_error                       = 10
             codepage                          = 11
             OTHERS                            = 12.
        IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        LOOP AT gt_regup INTO lw_regup.
          m_line_items 'LTYC_XBLNR' lw_regup-xblnr.
          m_line_items 'LTYC_BLDAT' lw_regup-bldat.
          m_line_items 'LTYC_SGTXT' lw_regup-sgtxt.
          m_line_items 'LTYC_DMBTR' lw_regup-dmbtr.
          DELETE ex_output WHERE value IS INITIAL.
          CALL FUNCTION 'WRITE_FORM'
           EXPORTING
             element                        = '510-C'
             function                       = 'APPEND'
    *         TYPE                           = 'BODY'
             window                         = 'MAIN'
    *       IMPORTING
    *         PENDING_LINES                  =
           EXCEPTIONS
             element                        = 1
             function                       = 2
             type                           = 3
             unopened                       = 4
             unstarted                      = 5
             window                         = 6
             bad_pageformat_for_print       = 7
             spool_error                    = 8
             codepage                       = 9
             OTHERS                         = 10.
          IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 2
              OTHERS    = 3.
          IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDLOOP.
        CALL FUNCTION 'CLOSE_FORM'
    *       IMPORTING
    *         RESULT                         =
    *         RDI_RESULT                     =
    *       TABLES
    *         OTFDATA                        =
           EXCEPTIONS
             unopened                       = 1
             bad_pageformat_for_print       = 2
             send_error                     = 3
             spool_error                    = 4
             codepage                       = 5
             OTHERS                         = 6.
        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.

    Hi,
    Write the at last event in the program and check if it works
      At last.
           CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 2
              OTHERS    = 3.
          IF sy-subrc  0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Regards,
    Sravanthi

  • Matching FI Line Items and Total Records for FM

    Dear Friends,
    Currently, we are implementing Public Sector Management using Former Budgeting.
    Some PR and PO has been created, before the FM budget data transferred from Cost Center Planning using FM9C.
    Using FMRP_2FMB4002 report, the u2018Available Amountu2019 still equal to u2018Curr. Budget Amountu2019, even though we can display the detail PR and PO by double-click the column u2018Assignedu2019 and u2018Commts/Act.u2019 in this report.
    After executing RFFMRC04, system shows many line items containing Fund Center, Commitment Items, and its Amount.
    I need your assistance to resolve these issues, so that the FM Report can be analyzed accordingly.
    Thanks for your kind attention.
    Regards,
    (Vincent)

    Hi,
    This thread has been created some time ago and recieved no response. Can you please close if you feel this issue/query has been resolved in the meantime. If it has not then please provide additional information in relation to your query. By providing updates to your thread it moves you thread to the first page of thread and increases visibility and possiblity for the multiptude of experts in SDN Forums to offer their support.
    Therefore please update with more information or close thread.
    Thank you for your assistance.
    Regards,
    Brendan.
    (ERP FI/CO SDN/WIKI Moderator)
    http://wiki.sdn.sap.com/wiki/display/ERPFI/ERP+Financials

  • EBS upload didnot clear line items and post to Main Account

    Hi
    We are on ECC 6.0. Our user as usual uploaded the EBS (she was doing this for last 6 months). Every time all line items from the  Check Issued Clearing account used to get cleared and posted to Main Bank Account and the checks were encashed.
    August EBS was loaded in Sept 3rd. This time all 2000 odd checks are still lying in Check Issued Clearing account itself. Transfer to Main Bank account didnot take place.
    Due to this the Checks are not updated with the Encashed Date and all checks are still shown as Outstanding.
    What could be the reason for this?
    Thanks
    Vijay
    Edited by: vijayakumar aluru on Sep 14, 2009 9:56 PM
    There is no change to the customization and the bank file format (BAI) also remains the same.
    Edited by: vijayakumar aluru on Sep 15, 2009 1:27 AM
    Is there a way I can delete the bank statement upload buffer and reload the EBS?

    i hope your issue would have got resolved, but below is my take on the issue.
    please check the external transaction code given by bank in the bank statement. I believe the bank would have changed the external trannsaction code that is the reason, FF-5 could not clear your check items, as system was looking for the external transaction code and internal postings rules, which probably were not matching.

  • BeX Analyzer Aggregation - display line item and header amounts in same row

    Hi Experts,
    I've a requirement in which I'm looking for help.
    Consider that I've one DSO with line item detail and I wish to display on a report for each line item (in the same row) the value of the header which has to be the sum of all line items for each header.
    Here's an output of what should be displayed:
    PO || Hdr  || PO item Item Amount || PO Amount (Sum All Items/Header)
    1    ||  1    ||  10 u20AC                          || 15 u20AC
    1    ||  2    ||  5 u20AC                            ||15 u20AC
    I've already tried to create a formula/calc key figure, using the KF "Item Amount" aggregated with exception of the "PO Hdr" Char, but it doesn't work.
    I know that i can built this on the data model but I just want to be sure before that there's no way to achieve this requirement through query designer.
    All help will be welcomed!
    Thank you.
    Nuno

    Hi Lakshmipathi Sir,
    Thanks for your reply. Could you please let me know how exactly i need to mention the logic to ABAPer.
    I can see two fields are giving from VBKD table with line item wise it is displaying.
    1. BSTKD
    2. BSTKD_M
    thanks,

  • Missing Line Items and '?' Symbols in some Reports

    I have upgraded the patch level of my production server and patch level
    list is given below
    SAP_BASIS 640 0022 SAPKB64022
    SAP_ABA 640 0022 SAPKA64022
    ST-PI 003C_640 0001 SAPKITLPS1
    PI_BASIS 2006_1_6400006 SAPKIPYL06
    SAP_BW 350 0021 SAPKW35021
    SAP_HR 500 0017 SAPKE50017
    SAP_APPL 500 0019 SAPKH50019
    PI 2004_1_5000004 SAPKIPZI64
    problem is that whenever I run SAP FICO standard reports FL3N, FBL5N,
    KB01, F.08 etc it generates the report correctly but when i am taking
    print out of these reports it misses some line items and total value as
    well screen shots are attached for information.
    my second problem is that there are some garbage entries with
    symbol '?' in SAP Menu and toolbars of some Reports. Screen shot is
    also attached for your information.
    i am facing lots of problem in executing my daily operations due to
    these errors.
    regards,
    Majid Khan

    Dear Subramanian,
    I am facing the same problem in Development and Quality Assurance Server
    Regards,
    Majid Khan

  • Display line items not possible!

    Hello
    I've a very strange situation on the productive system:
    I have a company code that registers and display account line items, while the second cannot display them, even if I've configurated the same aspects in account fields for the two company codes. That means they have the same
    - flag on display line items  AND
    - sort key  001 - POSTING DATE
    why??
    thanks a lot in advance,
    Chiara

    No, the answer was not that one, but thanks anyway.
    Finally I found the answer in
    Forum:  Message MSITEM033 in New GL - Cannot Display GL Line Items
    note OSS:
    -  1323960   Incorrect entry '/' in SKB1-XLGCLR and BSEG-XLGCLR
    -  1149500  Clearing open items by batch input selection
    -  1437341   Note 1437341 - Correction of BSEG/Index tables after note 1323960
    regards,
    Chiara

  • Sum of all line items and display at the bottom of the page

    Hi ABAPers,
    I am displaying line items in the main window based on PO number ....and I've a coloumn Total amount.
    My requirement is after the line items , the  grand total which is the sum of all line items has to be displayed.
    Is this possible. If so, can anybosy help me in that.
    thanks in advance

    Hi ,
    It is possible.
    For that u have to do  following
    take one variable of same type on which you want to calculate total  ... declare in global variable
    double click in the table  goto the calculation tab in that give the variable on which u want to calculate total
    print in the total in the  footer of the table ..
    Hope you resolve your problem
    Let me know any concerns......

  • Smartforms: no page break between last line item and footer in table?

    Hello All,
    my smartform has FIRST and NEXT pages. I would like to avoid a page break between last item line of a table in MAIN window and the footer of the same table.
    Here is how it looks currently.
    Output of FIRST page, MAIN window, table ITEMS:
    1.line item
    2.line item
    3.line item
    4.line item
    page break
    output of NEXT page, MAIN window, table ITEMS:
    1.footer line
    2.footer line
    I would like that if a footer does not fit on FIRST page, it would be displayed on NEXT page with last item line.
    It should be like this:
    output of FIRST page, MAIN window, table ITEMS
    1.line item
    2.line item
    3.line item
    page break
    output of NEXT page, MAIN window, table ITEMS
    4.line item
    1.footer line
    2.footer line
    Any ideas?
    Thanks and best regards,
    Mindaugas

    Do you mean line item text or your want to print footer text?
    If your trying yo display some footer text, then you either place a footer window or you can create a table inside your main window and place text under the footer of the table, then it will display the text without any page break.
    If it is item tem.
    Then you need to build additional logic. As we cannot guess, the total number of item text upfront.
    Example: if page1 can hold 15 line items, check whether your header and item can fit in page one else call a new page by placing a condition FLAG = "X".
    I hope it will help you to solve your problem.
    Regards,
    SaiRam

  • How to display line items corresponding to Header  adobe form

    Hi ,
    As I am new to Adobe Form, So struggling with below problem related with Adobe Form.
    For example, I have data in an internal table :
    Stage      item
    100         A
    100         B
    100         C
    200         D
    200         E
    Here you have for field 'Stage'  value '100' , I have 3 line items, for value '200' , it is 2 line items and so on.
    My requirement is , I have to show Stage field at top and corresponding line items should be displayed in table.
    Stage: 100
    item
    A
    B
    C
    Stage: 200
    D
    E
    I have used Nested table concept to achieve it but didn't get expected output.
    Please help me out.

    Hi,
         If all of your line items are getting displayed in different pages, to my knowledge, there may be two possibilities.
    1) May be the size of the main window can accomodate only one line item. If one item data fills up the window, then there wont' be any space for the next line item data to be accomodated in the same window in the same page, so, the system triggers the next page. Like-wise for each item data. If this is the case, increase the height of the main window to display items in same page.
    2) Check the driver program. Find the Write_form block, which is written inside an item loop. May be there is a Form-control Function module( Control_form with parameter 'NEW-PAGE' ) being called after the write_fom block, within the loop. If this is the case, remove the control_form FM section to make the data display in same page.
    Best Regards,
    Kumaar.S

  • How to display line items twice in a single page in sap script

    HI,
      I am working on check printing. I copied the standard driver program and form to Zprogram and ZForm. Which are RFFOUS_C(print program) and F110_PRENUM_CHECK(Form Name).
    I want to display the line items twice in the same page and sub sequent pages.
    Currently I am able to display line items only once.
    Example:
    PAGE1.
    line item1
    line item2
    line item3
    line item4
    line item5
    line item1
    line item2
    line item3
    line item4
    line item5
    line items 1 to 5 which are in main window.
    How to achive this problem.
    Regards,
    vinod

    Hi
    I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
    If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more. 
    Best regards
    JD

  • Smartforms issue with displaying line items

    Hi All,
    I had a requirement where in which in the main window Five line items and then the corresponding values of line items below in the same main window.
    Example :
      01      item1_description       value1    value2
      02      item2_description       value1    value2
      03      item3_description       value1    value2
      04      item4_description       value1    value2
      05      item4_description       value1    value2
      01      Jass                            value1    value2
      02      Jass                            value1    value2
      03      Jass                            value1    value2
      04      Jass                            value1    value2
      05      Jass                            value1    value2
    if the value increases they go to next page the number of line items displayed will have the corresponding values to
    be printed in the same page and in the main window.
    Please help me how to do this.
    Thanks & Regards,
    Durga Naresh
    Edited by: NareshBD on May 12, 2011 10:58 AM

    I sense this will be either impossible or quite hard to accomplish.
    What i dont understand is: why dont you go for the approach to print all you info regarding one line item into ONE line like:
    01 item1_description value1 value2 01 Jass value1 value2
    02 item2_description value1 value2 02 Jass value1 value2
    03 item3_description value1 value2 03 Jass value1 value2
    04 item4_description value1 value2 04 Jass value1 value2
    05 item4_description value1 value2 05 Jass value1 value2
    that again would make things very easy.

  • Display line items in Cells of a table- Smartform

    Hello All,
    Can any one help me achieving  the below requirement.
    I have a requirement of printing invoice with a smartform. I am displaying line items from a TABLE node by looping VBRP's internal table. There are 12 cells and the 5 th cell contains a number of Dicount rates.
    I am displaying these discount rates from LOOP node by looping KONV's internal table within that CELL. The 7 th Cell has got 2 values which are required to be: one aligned to the TOP right corner of the cell and the other to the bottom right side of the cell.
    Now the issue description is:
    CELL-5:  Contains unknown number of values for display within the cell to be positioned as MIDDLE justified for an item(POSNR) of the main item table.
    CELL-7: Contains two fixed values :KWERT to be at Top right of the CELL-7and NETWR at the bottom right of CELL-7
    I have managed to display the sub items in CELL-5 in the middle  by giving values to SPACE BEFORE/SPACE AFTER sections of PARAGRAPH FORMAT in SMART STYLE.
    Requirement: Irrespective of number of sub items in CELL-5 the 2 values in CELL- 7 to be aligned as one at the top right and the other  to the bottom right cell flexibly . Same applies to other items(POSNR) of MAIN VBRP item table.
    The ROWS of the MAIN Table to be flexible enough to shrink the space when then are less number of subitems in   CELL-5.
    Values in Cell-7  should be adjusted according to contents in CELL-5.
    Thanks in advance for your valuable suggestions.

    Hi,
    Do one thing while filling the 5th cell , count the number of values(counter) in it for each record and fill new internal table (Itab_cell7) as follws.
    DATA : FLAG,
    counter1 type n.
    DO COUNTER TIMES.
    counter1 = counter1 + 1.
      CLEAR FLAG.
    IF counter = 1.
        WA_CELL7-VALUE = KWERT.
        APPEND WA_CELL7 TO ITAB_CELL7.
        FLAG = 'X'.
    ENDIF.
    IF counter1 =  (counter1 - 1).
        WA_CELL7-VALUE = KWERT.
        APPEND WA_CELL7 TO ITAB_CELL7.
        FLAG = 'X'.
    EXIT.
    ENDIF.
      IF FLAG NE 'X'.
      WA_CELL7-VALUE = ''.
      APPEND WA_CELL7 TO ITAB_CELL7.
    ENDIF.
    ENDDO.
    Adjust the code if need as per your data.
    In cell 7 under loop node print ITAB_CELL7 values in a text. and prepare a paragragh for alingment.
    if it does not work for send me the XML file for your smartform.
    Regards,
    Antim

Maybe you are looking for

  • How to add bar code in report(se38 develop)

    hi all, as a existing abap report which print out the report with a lot of special logic, so i want  Use abap report program to print bar code instead of smartforms . how to process? thanks. james

  • How do i leave a copy of a message in the inbox on the gmail server when I delete it on my iphone?

    I am sure this has been worked out, just cant get it myself. I have a freind who uses gmail and keeps all his history of messages in his inbox.  I have explained to him that its prob not the best thing to do, but that is how he has been doing it.  He

  • My new MBP can't see my Time capsule

    Hi Thanks for any help with this : I use my capsule about once every 2 weeks to back up the MBP. Have a new MBP and wanted to back it up for the first time. The MBP is running 10.7.2. It could see the Time Capsule originally but said it needed a firm

  • Shared Photostream: Photo Order for Public Web site

    I create a Shared Photostream. I add pictures to the Photostream. The people getting the stream who are on iOS devices see the photos in the order they were added to the stream. First In, First Out. However, when I create the Public Website it appear

  • HTML DB Chang column name dynamically

    Can I change the column name dynamically. for instance Today run my apply it will display the title of the columns this Column title: Wed Thu Fri 04/22/05 04/23/05 04/24/05 Data 45 34 34 54 56 23 Next week Column title: Wed Thu Fri 05/03/05 05/04/05