Number of displayed lines in a table

Hello colleagues,
We are using a table with a master column (tree). Additional we are using an input field where a user can enter a number so that the displayed lines can be change at runtime.
Problem:
I would like to know the displayed number of lines as it is displayed in the button line of the table in the view (where a user can jump direct to a line) - but I do not know how I get it.
Question:
How do I get the content of the max number of available lines in the button of the displayed table?
Thanks+greetings,
Achim

Hey Maheswaran.B,
  thanks for the reply - the problem is not solved with the suggestion (because I do not get the maximum number of line displayed).
I did the following:
On the very first time if "modifyView" will be executed I do a loop over the table. If the maximum number is reached within the loop I set this number - if not I set the number of loops.
Here is a code example:
   DO 10 TIMES.
      ADD 1 TO l_counter.
      CLEAR elem_tabletree.
      elem_tabletree = node_tabletree->get_element( index = l_counter ).
      IF elem_tabletree IS  INITIAL.
        SUBTRACT 1 FROM l_counter.
        EXIT.
      ENDIF.
    ENDDO.
*--- set the value to the bound variable
    elem_owner_node->set_attribute(
      EXPORTING
        name =  `NUMBER_OF_LINES`
        value = item_number_of_lines ).

Similar Messages

  • How to restrict number of row/lines in a table in RTF

    Hi,
    Im working on PO report. It has header information in the header part of RTF. But coming to the lines , I put that under a different group in the table in the body part of the RTF. I did a FOR loop for printing PO Lines because it does have multiple line information. But now i have to restrict the number of rows in that table per page irrespective of number of PO Lines. After printing 20 rows in the table, it should go to the next page. Im going through the other threads for the solution.
    Thanks,
    venkat

    There are so many thread regarding this ,
    pls go thru them patiently...
    logic is something like....
    use if condition and position() and say page-break..
    use [email protected] instead of for-each..so that the headed info is maintained with regards to PO lines
    happy searching...
    if you cant get still, last option send me mail with details

  • How can I get the row number of display automatically on a table?

    I have a table of measurements, and I would like the row number to be displayed on each row. The challenge is that each time I run the program, the total number of rows will be different, so I would like the numbers to update every time I run the program based on the current number of rows.
    I have attached a picture to illustrate what I am trying to do.
    Solved!
    Go to Solution.
    Attachments:
    picture of table.JPG ‏70 KB

    Find the attached example (saved in version 2009), and you can extract what you need for your code...!!
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Example (Enter Row Header).vi ‏12 KB

  • 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

  • Display X line of a table

    hi,
    I have a table of 100 lines. How can I display with a select request only the 10 first lines or display lines 10 by 10 until 100. Like in the web site.
    Thanks you.

    The following example demonstrates how to select 10 rows at a time using a .sql script:
    SQL> EDIT test
    Type or copy the following, substituting the name of your table for table_name:
    ACCEPT starting_number PROMPT 'Enter starting row number: '
    SELECT row_num, a.*
    FROM (SELECT ROWNUM row_num, b.*
    FROM (SELECT *
    FROM table_name
    ORDER BY ROWID) b) a
    WHERE row_num < &starting_number + 10
    AND row_num >= &starting_number
    Save the file.
    SQL> START test
    It will then prompt you to enter the starting row number and display the next 10 rows starting with that number.
    The next example demonstrates how to select 10 rows at a time using a pl/sql stored procedure within a package and returning the results in a ref cursor:
    SQL> EDIT getemployees_pkg
    Type or copy the following, substituting your table name for emp and your column names for empno, ename, and sal:
    CREATE OR REPLACE PACKAGE getemployees_pkg
    AS
    TYPE emp_curtype IS REF CURSOR;
    PROCEDURE getemployees
    (p_start_no IN NUMBER,
    emp_cur OUT emp_curtype);
    END getemployees_pkg;
    CREATE OR REPLACE PACKAGE BODY getemployees_pkg
    IS
    PROCEDURE getemployees
    (p_start_no IN NUMBER,
    emp_cur OUT emp_curtype)
    IS
    BEGIN
    OPEN emp_cur FOR
    SELECT empno, ename, sal
    FROM (SELECT empno, ename, sal, rn
    FROM (SELECT empno, ename, sal, ROWNUM rn
    FROM (SELECT empno, ename, sal
    FROM emp
    ORDER BY empno))
    WHERE rn >= p_start_no
    AND rn < p_start_no + 10);
    END getemployees;
    END getemployees_pkg;
    Save the file.
    SQL> START getemployees_pkg
    Package created.
    Package body created.
    The procedure can then be executed from the SQL prompt:
    SQL> VARIABLE g_out REFCURSOR
    SQL> EXEC getemployees_pkg.getemployees(1, :g_out)
    SQL> PRINT g_out
    or the procedure can be called from within another procedure or from another calling environment.
    null

  • Count number of records in a internal table

    hi
    i want to count number of records in internal table
    pls let me know how to count the number of records in a internal table.
    regards
    Arora

    hi
    one way is
    data field type i.
    Decribe table itab lines field.
    write: / field.
    displays the no of records in tha internal table
    or if u want to write logic.
    data:
      w_count type i.
    loop at itab.
    w_count = w_count + 1.
    endloop.
    write: / w_count.
    displays the no of records.
    reward points if useful.

  • Dynamically picking the line item of table control

    Hi all,
    Can u suggest me a way to dynamically picking the no of line item in the table control displayed.
    Regards,
    Ashutosh Kumar

    Hi Ashutosh,
    In BDC case, what you can do is use the "position button" instead of finding the number of lines on the table control.
    Or else you can use call transaction with 'Options addition'
    eg:
    Call transaction parameters
          clear gs_options.
    <b>      gs_options-defsize = 'X'. "Default size</b>
          gs_options-dismode = 'N'.
          gs_options-updmode = 'S'.
               call transaction 'VI02' using t_bdcdata
                                       "mode 'N'
                                     "update 'S'
                                     options from gs_options
                                   messages into t_messages.
    Please let us know why do you want to know the number of lines on the Table control.If the above answer doesn't satisfy you.
    Regards,
    Ravi

  • Program Logic for showin number of red lines on the o/p screen?

    Hi
    I have an output list wherein I am settin clours on the output screen based on certain conditions like if say 2 values in my final internal table doesn't match then I am settin the colour to red also green is set.
    My requirement is that I want to show the total number of red lines on the o/p screen .
    How can I do that?
    Thanks

    what type of report ? is it ALV or Normal report ?
    if it is normal report ,then use one variable ,when ever you have red color condition ,use this variable
    data : v_data type i.
    if redcondition.
    v_data = v_data + 1.
    endif.
    display v_data ( This is total number lines )
    Thanks
    Seshu

  • Displaying record from custom table

    I have a custom table ztable (kunnr, vbeln, erdat, erzet, flag). Using these values I would like to display the following
    Client Number (4) = '1234'
    Filler (6) = space.
    Record Type (1) = 'A'
    Client Number (15) = vrkpa-kunnr
    Customer Name (30) = adrc-name1
    This information should be displayed in the following way:
    1234  A0012345        Walmart
    Can someone help me with this code.
    Thank you!

    Okay, I see.  Is your client number always going to be '1234'?  If not, then do not assign a value to it.  Otherwise, you'll want to assign the value during your selection statement because the field will be emptied each time you clear the itab line.The same thing goes for your record type 'A'.  You need an address number, a date, and a nation as the key for table ADRC (so you need to put the necessary values into w_nation and w_begda).  I'm not sure if your customer number corresponds to the address number.  Try this:
    DATA wa_ztable TYPE ztable.
    DATA wa_adrc TYPE adrc.
    DATA w_nation type adrc-nation.
    DATA w_begda type sy-datum.
    DATA: begin of itab occurs 0,
    clientnumber(4) type c,
    filler(2) type c,
    recordtype(1) type c,
    customernumber(15) type c,
    customername(30) type c,
    customeraddress1(30) type c,
    customeraddress2(30) type c,
    customercity(17) type c,
    customerstate(2) type c,
    customerzip(9) type c,
    customercountry(17) type c,
    customercountrycode(3) type c,
    customerphnum(10) type c,
    end of itab.
    w_begda = (put your date here).
    w_nation = (put your nation code here).
    SELECT * FROM ztable INTO wa_ztable WHERE flag = space.
    itab-clientnumber = '1234'.
    itab-filler = space.
    itab-rectype = 'A'.
    itab-customernumber+0(10) = wa_ztable-kunnr.
    itab-customernumber+10(5) = space.
    SELECT SINGLE * FROM TABLE adrc INTO wa_adrc WHERE
    ADDRNUMBER = wa_ztable-kunnr AND NATION = w_nation AND DATE_FROM = w_begda.
    itab-customername = wa_adrc-name1.
    itab-customeraddress1 = wa_adrc-
    itab-customeraddress2 = wa_adrc-
    itab-customercity = wa_adrc-city1.
    itab-customerstate = wa_adrc-regiogroup.
    itab-customerzip = wa_adrc-post_code1.
    itab-customercountry = wa_adrc-
    itab-customercountrycode = wa_adrc-country.
    itab-customerphnum = wa_adrc-tel_number.
    append itab.
    clear itab.
    ENDSELECT.
    LOOP AT itab.
    *Insert your code to display line here (can just list each itab field, or use column numbers if you want to create spaces between the fields)
    ENDLOOP.
    Note on the * lines:  I don't see a field for the country text.  For the address lines, you will probably have to concatenate values from ADRC-HOUSE_NUM1 and ADRC-STREET, and possibly also use ADRC-PO_BOX as well.
    - April
    Message was edited by:
            April King

  • Line height of table in smartforms

    Hi,
    I have created a table in smartform. I want to set row height in the table as it is available in template. Is there any option available to set height for the table row???
    Thanks in advance.
    -SA

    In table node it is not possible to define the height of a table line. Please find the bold paragraphs in the following text(SAP library)...
    Table tab properties minimum height is set the total table height.
    The line height depends on the font height used in Paragraph format for your text element.
    Line Types for Tables
    The height of a table depends of the amount of data to be displayed or printed in a table. Therefore, you cannot use the line types in the Table Painter alone to describe the table layout, as you do it with line types for templates:
    With templates the view in the Table Painter directly maps the output on the form. This is possible because the structure of a template does not change at runtime.
    With tables the view in the Table Painter is an overview of all existing line types. However, it does not indicate which line types are used when for table output.
    Dynamic Cell Height
    The height of a table depends on the number of table lines and on the height of all table lines included in the output. The height of each table line depends on the highest cell, which again depends on the contents to be displayed in this cell. When filling table cells with contents, nothing is truncated, instead, the cell height is increased.
    In the Table Painter, the height of the line types is displayed as a constant because it has no meaning for the output.
    Unlike with line types for tables, for templates you specify a fixed line height for the line type. Any output that does not fit into a cell is truncated.

  • How to find the number of fetched lines from select statement

    Hi Experts,
    Can you tell me how to find the number of fetched lines from select statements..
    and one more thing is can you tell me how to check the written select statement or written statement is correct or not????
    Thanks in advance
    santosh

    Hi,
    Look for the system field SY_TABIX. That will contain the number of records which have been put into an internal table through a select statement.
    For ex:
    data: itab type mara occurs 0 with header line.
    Select * from mara into table itab.
    Write: Sy-tabix.
    This will give you the number of entries that has been selected.
    I am not sure what you mean by the second question. If you can let me know what you need then we might have a solution.
    Hope this helps,
    Sudhi
    Message was edited by:
            Sudhindra Chandrashekar

  • Report invoice document number againt PO line item

    Hi Forums,
    Can any body so kind to tell me is there any standard report in SAP 4.7 C where we can get the list of invoice document number against each line item of PO.
    I have tried the ME2N & ME2L report. If I double click the POH then only it give me the invoice document report. But i want a report where I get invoice document no against each line item wise in PO.
    Thanks in advance.
    Regards,
    sp sahu

    Hi sp sahu,
    I am sorry, but I am not aware of any report which might suit your requirements, this is the reason why I addressed you to the table EKBE. You might build your own report out of this table.
    Sorry!
    Esther.

  • Schedule line number determination - Schedule line category CP(MRP)

    Hello All,
    I want to know on what basis schedule line numbers getting determined.
    Schedule line category: CP-MRP
    Sales order line items getting confirmed based on the Planned order--> production order created through MRP run.
    I have created sales order line item 1 with 100 quantities. for example I created today. RDD also today.
    3 production order created.
    Those production orders confirmation date as below.
    Production order 1 - 60 quantities - 14.04.2014
    Production order 2 - 30 quantities - 16.04.2014
    Production order 3: 10 quantities - 18.02.2014.
    There are four schedule lines for the line item 1.
    All the 4 lines showed as per the confirmation date order.
    But the schedule line numbers are not as per the above order.
    For example,
    Schedule line number   ----- delivery date ----- Confirmed qty
    1.                                         09.04.2014            0
    3.                                         14.04.2014            60
    2                                          16.04.2014           30
    4                                          18.04.2014            10
    On what basis this schedule numbers getting determined? Is there any standard procedure ?
    Why schedule line numbers not inline with the confirmed date?
    Let me know if you need more information.
    Thank you.
    Regards,
    Rakkimuthu C

    Hi,
    Schedule line number is the number that uniquely identifies the schedule line .
    Use When an item has more than one schedule line, the system automatically assigns a unique number to each line. The number is displayed in the details screens for schedule lines.
    Note The schedule line number serves internal purposes and does not, for example, determine the sequence of schedule lines in the overview screen. The schedule lines on the overview screen are sorted by date.
    The schedule line number will get created automatically by the system. I hope this will clarify your doubt. Thanking you.

  • Excise Invoice number not display in case auto generate

    Dear Experts,
    we have use auto excise invoice generation functionality, it is working properly, but only Excise Invoice number not display after saving billing document. what to do for display the same after saving billing document.
    Regards
    BK GAIKWAD

    Thank you Lakshmipathiji,
    My question is when we have create excise invoice through J1IIN excise invoice number has been display in bottom line after saving billing document.
    But in case we have creating  auto generate Excise invoice, Excise Invoice number not display in same screen. How to do to display excise invoice after saving billing document.(Excise invoice generating in background but number not display in same screen)
    We have changeover manual to auto generate excise invoice system.
    Regards
    BK GAIKWAD

  • FBL5N_Excise Invoice Number not display

    Hallo Experts,
    I am SD Consultant, when  after create the Excise invoice, number will be display in FBL5N_Customer ledger (Ref. key 3 field)  but only 10% cases it will not display with same customer / Excise group / series group
    I am unable to address it. please help
    Regards
    BK GAIKWAD

    Thank you Lakshmipathiji,
    My question is when we have create excise invoice through J1IIN excise invoice number has been display in bottom line after saving billing document.
    But in case we have creating  auto generate Excise invoice, Excise Invoice number not display in same screen. How to do to display excise invoice after saving billing document.(Excise invoice generating in background but number not display in same screen)
    We have changeover manual to auto generate excise invoice system.
    Regards
    BK GAIKWAD

Maybe you are looking for


HashFlare