How to display the number of line items in sap-script report?

Hi friends,
I need a help regarding the SAP Script. In my script (report) I create two pages and created three windows (MAIN, HEADER, FOOTER) for each pages. Now the problem is while displaying the fewer line item which can come under the main window of the 1st page these line items are comming perfectly but for the remaining line items that comes on the second page the table headings and the boexs are not comming.
Also it is displaying the total and the amount in text in every pages that should be display in last page.
Here if I eleminate or comments the total and the amount in text for the first page the same is reflected in second page. Also I need to display the page-nor for each pages to displayed.
I am requesting all the people out there kindly help me to solve this issues.
Thanks and Regards

There is no pre built solution for this. But we can show total pages in the report body.
one way is Create a other column in the report with code sum(count(1))/25. that gives you total number of pages. 25 here is no of rows in each page. The code you can write in narrative "Total pages in the report are @5" and out put may be "Total Pages in the report are 30".
If you are using pivot tables, you can try this.
http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
- Madan

Similar Messages

  • Increasing the number of line items in PO

    hello fellow abapers,
    i have a query. i dont know if its the headache of the function ppl or the technicial person - which happens to be me - but i have to get this solved at the earliest.
    now ive made a PO for materials from the scratch and everythin is workin fine. except that out of the blue comes a PO with over 10000 line items. yes, thats right - 10,000 line items.
    so obviously an error was thrown by SAP. unfortunately the end-user did not think it necessary to take a printout or record the error message.
    anyways the error said something to the effect that it did not allow so many line items or somthing like that.
    now can anybody pls help me out with this. firstly is dhere any restrictions on the number of line items, and secondly, if thats the case how do i find a work-around.
    thanx a bunch
    pk

    Hi,
    The basis sets the maximum number of pages that can be printed by the user in authorization object S_SPO_PAGE.
    Please discuss with your basis guy.
    Tyken

  • How to count the number of lines dynamically,

    In the below code am trying to read the lines which are selected using a check box, also am categorizing the contents depending on the follow up material.
    after displaying one category contents am displaying a line
    which also counts to a line in the internal table.
    My question is how to count the number of lines(ULINE) displayed dynamically.
    FORM GET_LINES .
      DATA: LV_LINES TYPE I,
            LV_TIMES TYPE I,
            LV_TABIX TYPE SY-TABIX.
      DESCRIBE TABLE IT_REC LINES LV_LINES.
      DO LV_LINES TIMES.
        LV_TIMES = SY-INDEX .
        READ LINE LV_TIMES FIELD VALUE IT_REC-CHECK INTO GV_CHECK.
        IF SY-SUBRC EQ 0 AND GV_CHECK IS NOT INITIAL.
          LV_TABIX =  LV_TIMES.
          READ TABLE IT_REC INDEX LV_TABIX INTO GWA_UPDATE.
          IF SY-SUBRC EQ 0.
            APPEND GWA_UPDATE TO GT_UPDATE.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.                    " GET_LINES

    In the below code am trying to read the lines which are selected using a check box, also am categorizing the contents depending on the follow up material.
    after displaying one category contents am displaying a line
    which also counts to a line in the internal table.
    My question is how to count the number of lines(ULINE) displayed dynamically.
    FORM GET_LINES .
      DATA: LV_LINES TYPE I,
            LV_TIMES TYPE I,
            LV_TABIX TYPE SY-TABIX.
      DESCRIBE TABLE IT_REC LINES LV_LINES.
      DO LV_LINES TIMES.
        LV_TIMES = SY-INDEX .
        READ LINE LV_TIMES FIELD VALUE IT_REC-CHECK INTO GV_CHECK.
        IF SY-SUBRC EQ 0 AND GV_CHECK IS NOT INITIAL.
          LV_TABIX =  LV_TIMES.
          READ TABLE IT_REC INDEX LV_TABIX INTO GWA_UPDATE.
          IF SY-SUBRC EQ 0.
            APPEND GWA_UPDATE TO GT_UPDATE.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.                    " GET_LINES
    The display function is:
    FORM DISPLAY_DATA .
      ULINE.
      WRITE :  /1 SY-VLINE, 'check',
                10 SY-VLINE, 'Plant',
               20 SY-VLINE, 'Material number',
               50 SY-VLINE, 'Follow up material',
               70 SY-VLINE, 'Safety stock',
              100 SY-VLINE, 'Partc'.
      ULINE.
      LOOP AT IT_MARC.
        MOVE: IT_MARC-WERKS TO IT_REC-WERKS,
              IT_MARC-MATNR TO IT_REC-MATNR,
              IT_MARC-NFMAT TO IT_REC-NFMAT,
              IT_MARC-EISBE TO IT_REC-EISBE,
              IT_MARC-PARTC TO IT_REC-PARTC .
        APPEND IT_REC.
        CLEAR IT_MARC.
      ENDLOOP.
      DATA: GV_TABIX TYPE SY-TABIX.
      LOOP AT IT_REC.
        GV_TABIX = SY-TABIX.
        READ TABLE GT_TOTAL WITH KEY WERKS = IT_REC-WERKS
                                     NFMAT = IT_REC-NFMAT.
        IF SY-SUBRC EQ 0.
          IT_REC-PARTC = GT_TOTAL-PARTC.
          MODIFY IT_REC INDEX GV_TABIX TRANSPORTING PARTC.
        ENDIF.
      ENDLOOP.
      LOOP AT IT_REC.
        WRITE : /1 SY-VLINE, IT_REC-CHECK AS CHECKBOX,
                10 SY-VLINE, IT_REC-WERKS,
                20 SY-VLINE, IT_REC-MATNR,
                50 SY-VLINE, IT_REC-NFMAT,
                70 SY-VLINE, IT_REC-EISBE,
               100 SY-VLINE, IT_REC-PARTC.
        AT END OF NFMAT.
          ULINE.
        ENDAT.
      ENDLOOP.
      ULINE.
    ENDFORM.                    " DISPLAY_DATA
    Solved

  • How to create the no of line items in a PO

    Hi Sir,
    Please tell me how can i restrict the no of line items to be created in a PO say 20. where i have to do that.
    Regards,
    Krishan

    Hi Krishan
    I think u can not restrict the no of line items to be created in a PO in std SAP .U take a help of the ABAP ppl . They can write a program in such a way that in the ME21N, program checks
    the number of line items copied from purchase requisition,If it is more than 10, it should issue an error message.
    Regards
    Anjali

  • How to delete the Cost center line item data

    How to delete the cost center line item data of particular cost center and only one cost center is exisiting for that company code.
    Is there any way to delete the line items in that cost center.
    Can data archiving & deleting can help us..........
    does it have any effect over other cost center data....
    any input needed.........
    regards
    rajesh

    Hi,
    i found 2 reports for you:
    1) CO_TOTAL_WRI - Archiving CO Totals Records   
    2) RKCOITW1     - Archiving CO Line Items: Write Program        
    from 2) is a linlk to customize archiv-parameters
    -> start it with transaction se38 / sa38
    A.

  • Subroutine program its display the text at line item as it's service order

    Hi All,
    Am looking for subroutine program its display the text at line item as it's service order, I want to view the text in sapscript in the tcode ME9F of the order text.
    Ex:- in tcode ME23N, select PO & item details in Account Assignment tab, ORDER field is not displaying for some of the orders, but while debugging I can see the ORDER values.
    Can'nt see the ORDER field in print preview, Pls let me know.
    Edited by: Nagendra DS on Feb 19, 2008 3:18 AM

    Hi,
    If you are retrieving the values in the print program, the values will definetly get populated to the sap script. In case of subroutines in the form, the values you pass it to the structure ITCSY should be characters only.
    Hope this helps.
    Sudha

  • How to display the header data on different position in alv report

    hi all,
    how to display the header data on different position in alv report.
    for example ,
    customer                                                   name
      xxxx                                                         xxxx
                     vendor        name     street 
                      xxxx         xxxx      xxxxx
    pls   help me .

    hi
    as per my understanding you need to trnasfer header internal table data  to pdf..
    please check the following links for internal table to pdf..
    Convertion of Internal table data to PDF
    This link is related to ur issue
    Re: how to insert the calling of the FM: OTF to PDF
    Thanks

  • How to print the text in points wise in sap script

    hi friends,
    how to print the text in points wise in sap script.
    ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
    1. hai how ru.
    2. what r  u doing.
    3.where r u.
    like this i want numbering.. waiting for ur replys.
    thanks,
    kiran

    declare a counter
    data : cnt type char 4.
    print :
    cnt = cnt + 1.
    &cnt& &text&
    cnt = cnt + 1. and so on.
    or.
    if the data is in an internal table
    loop at internal_table.
    cnt = cnt + 1.
    write form.
    in script -&cnt& &text&
    endloop.
    Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM

  • Displaying Page number in all pages of sap script output

    Hi All,
    I have a issues in displaying page number in all pages of sap script output.
    I have created a seperate window just above main window to display page number.
    I have given &PAGE& in the layout editor.
    Now in the sap script output i am getting page number as 1 in all the pages page number is not changing for pages-2,3, etc..
    Can anybody tell me the reason for the same!
    In some other objects same syntax is working fine. For this object it is not working!
    Is there any setting changes!
    Thanks i
    Thanks,
    Deep.

    Hi,
    Just check the Page Counter of the Next or Second Page which you defined.
    First page
    Mode                     START
    Numbering Type           ARABIC
    Second Page
    Mode                     INC
    Numbering Type           ARABIC
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Oct 17, 2008 11:23 AM

  • How to find the number of data items in a file written with ArryToFile function?

    I have written an array of number in 2 column groups to a file using the LabWindows/CVI function ArrayToFile...Now if I want to read the file with FileToArray Function then how do I know the number of items in the file. during the write time I know how many array items to write. but suppose I want the file to read at some later time then How to find the number of items in the file,So that I can read the exact number and present it. Thanks to all
    If you are young work to Learn, not to earn.
    Solved!
    Go to Solution.

    What about:
    OpenFile ( your file );
    cnt = 0;
    while ((br = ReadLine ( ... )) != -2) {
    if (br == -1) {
    // I/O error: handle it!
    break;
    cnt++;
    CloseFile ( ... );
    There are some ways to improve performance of this code, but if you are not reading thousands of lines it's quite fast.
    After this part you can dimension the array to pass to FileToArray... unless you want to read it yourself since you already have it open!
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Reg: Maximize the Number of Line Items in Invoice Verification

    Hi Gurus,
                 For a Client who is dealing in Retail business,there is a necessity to maintain a huge number of line items at Invoice Verification level.Standard SAP has some maxium line items for each document type.Where are the control for maximum line items and how to increase that?
    Regards,
    Sarosh

    Hi,
    At Billing-Country specific settings you will be able to maintain maximum 3 digit billing item no i.e 999.
    Any other suggestion.
    Regards,
    Sarosh

  • How to get the number of lines of a FileReader

    I need to calculate the number of lines of a FileReader object. How can I do that ?

    I wrote the following some while ago. It assumes that a line is terminated by '\n' but it should be easy to adapt.
    import java.io.*;
    public class LineCounter
        public static int countLines(File file, String encoding) throws IOException
            int lineCount = 0;
            Reader reader = new InputStreamReader(new FileInputStream(file), encoding);
            char[] buffer = new char[4096];
            for (int charsRead = 0; (charsRead = reader.read(buffer)) >= 0;)
                for (int charIndex = 0; charIndex < charsRead ; charIndex++)
                    if (buffer[charIndex] == '\n')
                        lineCount++;
            reader.close();
            return lineCount;
        public static void main(String[] args)
            try
                File file = new File("/home/sabre/work/dev/maps/EUROPE.RIV");
                long startTime = System.currentTimeMillis();
                int lineCount = countLines(file, "UTF-8");
                double time =  (System.currentTimeMillis() - startTime) / 1000.0;
                System.out.println("File size = " + file.length() + " contains " + lineCount + " lines taking " + time);
            catch (Exception e)
                e.printStackTrace();
    }

  • How to find the open po line item by using EKKO &EKPO tables

    Hi Gurus,
        what i am doing is finding out the OPEN PO line item from EKPO table. I know it has to check the ELIKZ field from the EKPO table.Can you please clarify me on the same in more detail.I has to use the ELIKZ  EREKZ fields from EKPO table.

    Use the field ELIKZ in EKPO. If the field is Blank its an OPEN PO Line Item
    refer this link.
    How to open PO line item

  • How to get the number of lines of a file?

    Folks:
    Is there a way to get the number of lines of a text file? I don't know if there is an existing method to do that.
    Thanks a lot.

    HI
    I found some solution
    other than increment loop and all
    here is the code it might helpful to u
    //returns the number of lines in a file
    //author : Ravindra S
    //Symphony software Hyderabad
    try
    RandomAccessFile randFile = new RandomAccessFile(csvFile,"r");
    long lastRec=randFile.length();
    randFile.close();
    FileReader fileRead = new FileReader(csvFile);
    LineNumberReader lineRead = new LineNumberReader(fileRead);
    lineRead.skip(lastRec);
    countRec=lineRead.getLineNumber()-1;
    fileRead.close();
    lineRead.close();
    catch(IOException e)

  • Problem in dynamically handling the number of line Items in Main Window

    Hi Gurus,
    I want to know is there any way by which we can handle the Line items that is being Printed in the Main Window.i.e can we split a Line item to the next/subsequent page if it is not fitting in the First/subsequent page.
    Please throw some light .
    Regards,
    Asish Dash

    Hi Haritha,
    No,  suppose there are 10 line items.suppose the 10th value is not fitting in the first page and some part gets printed in the first page and the rest is splitted to the second page.What I want is the whole 10th line item value should come in the second page i.e if the line item value doesnot fit in the First page then the whole value should get printed in the second page.
    Regards .
    Asish Dash

Maybe you are looking for

  • Can I use my Powerbook 12" without the internal HD?

    Hi everybody! I have a Hard Drive (160GB, Samsung) in my Powerbook12", that's about to fail. I bought it less than a year ago, so I can get a new one for free, except that I have to pay for, or do, the extraction from the computer. As some time may e

  • HOW TO HIDE FIELDS IN A CUSTOM TABLE - URGENT

    Hi all, I've a requirement where I need to hide 2 fields of a custom created table(Z table with 4 fields). When I create a new record and when I Click on save it should display only 2 fields instead of all the 4 fields. A table maintainence generator

  • HOW DO I GET A SERIAL NUMBER FOR LOGIC PRO IF LOST MINE ?

    How do i get a serial number for logic pro ?  i purchased it so long ago and i just cleaned off my computer and re-installed mountain lion . When i did an erase and archive i forgot to look to see the serial number . Now when i go to launch it it ask

  • File Explorer problem

    Hi, when pressing the "File Explorer" button in cfolders, I get message "Cannot open start file! Abort". Title of the message box is SAP_WFE_START. I have done the installation of the integration as administrator and that went through without problem

  • ABAP in MM: Create PO output program.

    Hi, I have been given a project to create an Output program for PO. Can somebody give me the steps or documentation to create ABAP output program. Tcode ME9F will be used to print the form. Below path will be used to update PROGRAM, FORM ROUTINE & FO