Number of rows in details

i have a master-detail form.
before i save the master detail form i need to know how many details (total number of detail records) does the master has and accordingly call a function.
is there any way thru' which i can know the count of the number of details records in the detail block.
any help would be greatly appreciated.
thanx a bunch.
null

Is the reason why u need to know the total no. of detail records for a master is because the detail section asks for the no. of detail rows to display. Well, that is just the number of detail rows that would be displayed in a page at a time, say 5. If your query operation, for a master record, retrieves more than 5 records, then you would get a NEXT button that would take you to the nest set of records for the same master.
The field "Number of Detail Rows to Display" in the detail section is just for controlling the number of detail records per page. Values entered in this field would not result in any loss of data during retrival.

Similar Messages

  • Number of Rows on Master - Detail Form

    I want to dynamically display the number of detail rows.
    I can get the number of rows to be displayed by entering this PL/SQL code before displaying the page:
    declare
    cnt number;
    begin
    SELECT count(*) into cnt FROM table WHERE client = "Ford";
    end;
    How do I tell the 'Number of Detail Rows to Display' field on the 'Options for Detail Row' page to use this value?

    Let me answer my own question.
    Set the number of rows to 500 and it will dynamically set to the number of rows.

  • How To Restrict Number Of Rows For Multiple Group In Report Output

    Hi ,
    I have a requirement to restrict number of rows in report output.I have three different group , if i use same no of rows to restrict then output is as expected but if i want Deduction group should have 7 rows , earning should have 5 rows and Tax group have 3 rows in report output then XML tag is not working.
    Below is the XML tag i am using -
    First i have declare the variable to restrict the rows -
    <xsl:variable name="lpp" select="number(7)"/>
    <xsl:variable name="lpp1" select="number(5)"/>
    <xsl:variable name="lpp2" select="number(3)"/>
    For Each -
    <?for-each:PAYSLIP?>
    <xsl:variable xdofo:ctx="incontext" name="DedLines" select=".//AC_DEDUCTIONS"/>
    <xsl:variable xdofo:ctx="incontext" name="EarLines" select=".//AC_EARNINGS[ELEMENT_CLASSIFICATION!='Taxable Benefits']"/>
    <xsl:variable xdofo:ctx="incontext" name="EarTaxLines" select=".//AC_EARNINGS[ELEMENT_CLASSIFICATION='Taxable Benefits']>
    <?for-each:$DedLines?><?if:(position()-1) mod $lpp=0?> <xsl:variable name="start" xdofo:ctx="incontext" select="position()"/>
    <?if:(position()-1) mod $lpp1=0?><xsl:variable name="start1" xdofo:ctx="incontext" select="position()"/
    <?if:(position()-1) mod $lpp2=0?><xsl:variable name="start2" xdofo:ctx="incontext" select="position()"/>
    Report output is tabular form (one page has two column - Earning and Deduction ) . Tax group comes below earning group.
    Deduction Group -
    <?for-each-group:$DedLines;./REPORTING_NAME?><?if:position()>=$start and position()<$start+$lpp?>
    <?REPORTING_NAME?>
    <?end if?><?end for-each-group?>
    Earning Group -
    <?for-each-group:$EarLines;./REPORTING_NAME?><?if:position()>=$start1 and position()<$start1+$lpp1?>
    <?REPORTING_NAME?>
    <?end if?><?end for-each-group?>
    Tax Group -
    <?for-each-group:$EarTaxLines;./REPORTING_NAME?><?if:position()>=$start2 and position()<$start2+$lpp2?>
    <?REPORTING_NAME?>
    <?end if?><?end for-each-group?>
    Please let me know in case additional detail is require.
    Thanks in Advance.
    Thanks,
    Harsh
    Edited by: Harsh.rkg on Jan 14, 2013 9:43 PM

    variable lpp2 is declare to restrict EarTaxLines -
    <xsl:variable name="lpp2" select="number(2)"/>
    This will help to restrict the no of rows on one page , if we have more then two tax benefits line then layout will roll over to continuation page.
    As part of report output my expectation is if i restrict Earning , Deduction and Tax benefits to same no of line for example - variable lpp ,lpp1 and lpp2 have same value "number(2)" , we can see the layout is continue on next page (restrict every group can have max two lines) .This is the reason we have 4 header grid , deduction and Tax Benefit lines are rolled over to continuation page .But if we restrict different value for each variable then continuation page layout is missing .
    When we tried for <xsl:variable name="lpp2" select="number(3)"/> value continuation page layout is not getting generate for both employee number .

  • How to restrict number of rows display using ig:gridView

    Hi
    All
    How to restrict number of rows display using <ig:gridView datasource="{mybean.mylist}">
    i am getting 10 rows using data_row . i wanna show only first 5 rows .
    pageSize ="5" will be ok . but it displays remaining rows in next page. but i want to display only first 5 rows . is there any attribute to restrict number of rows.
    thanks
    rambhapuri

    I have no idea which component you're talking about. If want to discuss here about a non-Sun JSF component, then please mention about the name, version and build in detail. You can also consider posting this question at the website/forum/mailinglist of the component manfacturer rather than here. At least I can tell you that the Sun JSF h:dataTable has the 'rows' attribute for that. I can also suggest you to just take a look in the TLD documentation of the component in question. There should be all possible attributes listed with a detailed explanation about the behaviour.

  • How to add the Row count(number of rows in table)  in  the table header?

    Hi,
    I'm having a table. This table is viewed when i click on a search button.
    <b>On the table header it should dynamically display the number of rows in the table, i.e., the row count.</b>
    How to do this? could any one explain me with the detailed procedure to achieve this.
    Thanks & Regards,
    Suresh

    If you want to show a localized text in the table header, you should use the <b>Message Pool</b> to create a (parameterized) message "tableHeaderText" like "There are table entries".
    Next, create a context attribute "tableHeaderText" of type "string" and bind the "text" property of the table header Caption UI element to this attribute.
    Whenever the table data has changed (e.g. at the end of the supply function for the table's data source node), update the header text:
    int numRows = wdContext.node<TableDataSourceNode>().size();
    String text = wdComponentAPI.getTextAccessor().getText
      IMessage<ComponentName>.TABLE_HEADER_TEXT,
      new Object[] { String.valueOf(numRows) }
    wdContext.currentContextElement().setTableHeaderText(text);
    Maybe you want to provide a separate message for the case that there are no entries.
    Alternatively, you can make the attribute calculated and return the header text in the attribute getter.
    Armin

  • Need help to count number of rows and display in file

    Hello,
    my scenario is IDOC to File......i am using XSLT mapping and using FCC parameters to convert the flat file.
    now new requirement is i need to count number of rows and add count value last of the file.
    Please let me know how to do it,
    thanks in advance for your help.
    Regards,
    Chinna

    thanks again, one more Q.
    in XSLT mapping i have written for loop for complete structure.
    example : <Details>
                         <node1>
                         <node2>
                   </details>
    in XSLT mapping
                         <xsl:for-each select="ZMATMAS_01/IDOC/E1MARAM">
         <Details>
         </Details>
         </xsl:for-each>
    if i add the field at target side....then i will come under details node and it will be repeated.
    how to declare in XSLT mapping.

  • Find number of rows in  a cursor

    How can i find how many rows are in a cursor. I have a situation if my cursor only retruns one row i return the data if it returns more then one row i will need to do additional select.

    If you have logic like this
    SELECT COUNT(*)
      INTO l_cnt
      FROM emp
    WHERE deptno = p_deptno;
    IF( l_cnt > 1 )
    THEN
      FOR x IN (SELECT * FROM emp WHERE deptno = p_deptno)
      LOOP
        ..where you are counting the rows and then later fetching them, getting the count and then getting the rows will force Oracle to do the work of the query twice. It will also potentially cause logic errors because the number of rows returned by the COUNT(*) won't necessarily match the number of rows fetched from the cursor because some other session may have committed changes between your session executing those two statements.
    Can you describe the logic you are trying to implement in a bit more detail? There are potentially a number of different approaches depending on exactly what you are trying to do. Sometimes it may make sense to do a COUNT(*), sometimes it may make sense to fetch the data into a collection, count the collection elements, and then operate on the collection, sometimes it may make sense to do a SELECT INTO and handle the exception if the wrong number of rows are returned, etc.
    Justin

  • Number of rows in Record Working Time.

    Hello Guru's,
    IN ESS- Record Working Time - the number of rows visible are set to 8 in the Web Dynpro Java Code.
    I had a look at the Note:
    Note 957741 - Few lines in the data entry grid of the timesheet webdynpro
    The question I had is to have more than 8 rows visible, is it Java Code modification or any other alternative to change the number of Visible Row....
    Please reply back asap.
    Thanks in advance for your time.
    Best Regards,
    Pramod

    Hi Siddharth,
    Thanks for the reply.
    Looks like if need to change the no of rows need to do the WDJ code modifications.
    Interesting to know the other details in the message.
    But in the reply the interface you mentioned what for that is used,
    Since when checked the where used list of the attribute it calls ADD_INITIAL_LINES_TO_TIMESHEET even in the debug it is not allowing to do the changes to value which is 6 by default.
    Since the value is constant it cannot be changed.
    what was your intention when you gave that reply, curious to know how would it solve the issue.
    And one other questions In the Java Code
    ListViewerSlim listViewer =
                        new ListViewerSlim(
                             view,
                             wdThis.getRFC_FieldList_Timesheet(),
                             "TimesheetData",
                   //               listViewer.destroyAllColumnHeaders();   //XZQ110505
                   theTable = listViewer.getTableControl();
                   theTable.setVisibleRowCount(8); //Note SOW_957741
                   //               theTable.setHeader(null);      //XZQ110505
    it is set to 8 why is it different in both the cases.
    Since, when we login to the Portal it shows no of rows visible as 8 not 6 as it is in the interface?
    any thoughts on this.
    Kind Regards,
    Pramod

  • Getting the number of rows returned from ResultSet

    Hi,
    Does anyone know a method to get the number of rows returned with a query using the Resultset class?
    Thanks.

    Hi 281080,
    If your database and JDBC driver support it, in order to use the solution that da-alexj has suggested, you need to create a 'scrollable' "ResultSet" -- the javadoc for method "createStatement()" (in class "java.sql.Connection") has more details.
    However, I have found with Oracle 8.1.7.4 database and Oracle (thin) JDBC driver, that part of their implementation of the "last()" method (in class "java.sql.ResultSet") is to actually iterate through the entire "ResultSet" in order to reach the last row. If your "ResultSet" is very large (I tested it with a 100,000 row "ResultSet"), this will take a long time.
    Just wanted to make you aware of that.
    Of-course, this may be irrelevant to you since I didn't see any mention in your post of what database and JDBC driver you are using.
    Hope this has helped you, anyway.
    Good Luck,
    Avi.

  • Limit Number for Rows in BW Query Result

    Hello Experts,
        I am creating a query to be consumed by a web service. Therefore, I want to restrict the number of rows the query can display. Does anyone know a way to limit the result set to display only say FIRST 100 rows of data?
        I have looked at 'safety belt' solution, i.e. limiting number of cells to for example, 5000 cells. However, when the limit is exceeded the query just shows an error message not the first 5000 cells.
    thanks,
    Kartik

    Hi,
    You can do some things like..........
    Do not display the data in a detailed level.
    Use Always Suppress option in the result set.
    Also it depends on your Query definition. If your rows contains Branch wise or Region Wise, then your report will be fit in your first level of output. You need not to drilldown further.
    Why do you want to consider only first 1000 rows if you are planning to use it by Web service?
    I don't know whether it is feasible or not. I have one more alternative for you. You can try to achieve by APD by the Query. Insert a ABAP routine which should consider first 1000 result rows for your Web service. Just throw a light on this idea..............
    Regards,
    Suman

  • Want to know the table names as well as number of rows

    hi...every one.....i want to explain more in detail to previous thread i have posted.
    actually i need to display all the table names and number of rows for each, in a schema(like AP,HR,....)
    it's must that i should do it by using a stored procedure.
    so the best way for this would be by using cursor and loop.
    so please help me in solving this question.

    i need to display all the table names and number of rows for each, in a schema(like AP,HR,....)
    it's must that i should do it by using a stored procedure.Homework ?
    Anyway, try this
    SQL> create or replace procedure count_rows
      2  is
      3     nrows   number;
      4     str     varchar2(100);
      5  begin
      6     for T in (select table_name from user_tables
      7                     order by table_name)
      8     loop
      9             str := 'select count(*) from '||T.table_name;
    10             execute immediate str into nrows;
    11             dbms_output.put_line(T.table_name||'  '||nrows);
    12     end loop;
    13* end;
    SQL> /Don't forget to "set serveroutput on" when you execute it.

  • Row Text Details

    Hi,
       I am working on SAP 8.8 patch11. I have an requirement to enter the Row Text Details through Code in Document Forms.
       I  need to do this  using a user defined column in the matirx. I have done the following things.
      1. Loop  through  the Matrix.
      2. When my user defined field in the row is having some value , Then I will change the Row Type to "T".
      3. When I set a Row Type to "T" , Application will open a form to enter the details (Form Id : 65088).
      4. I entered the value in the form on Form load event before action false.
      5. After that I want to close the form (65088) and loop through next row.
      6. I closed the Form on got focus of the Document Form. But the data was not set in the Row.
    How to do this ?
    Thanks in Advance !
    Madhu

    You can do it easy from DI API instead of GUI.
    You can use the
    Document.SpecialLines object to handle this
    here is an example from help,
    Sub AddSpecialLine()
            'Adding special line
            'Assume Qut is an existing Quotation Document Object
            'Setting the type of special line to be sub total
            Qut.SpecialLines.LineType = SAPbobsCOM.BoDocSpecialLineType.dslt_Subtotal
            'Setting the after line number
            'A number that says after which line the special line will appear
            Qut.SpecialLines.AfterLineNumber = 2
            'Check for errors
            lRetCode = Qut.Update()
            If lRetCode <> 0 Then
                oCompany.GetLastError(lErrCode, sErrMsg)
                MsgBox(lErrCode & " " & sErrMsg) ' Display error message
            Else
                MsgBox("Special Lines Added")
            End If
    End Sub
    Regards
    János

  • ERROR: update_indexterms failed compute the number of rows

    While crawling I got the following error:
    19:11:18:825 8     cache_0          EQG-30056: SQL execution exception
    19:11:18:825 8     cache_0          java.sql.SQLException: ORA-20000: Oracle Secure Enterprise Search-Fehler
    EQG-60503: Task-Ausführungsfehler (ID = 1)
    EQG-50000: Interner Fehler, Argumente : update_indexterms failed compute the number of rows
    User-Defined Exception
    ORA-00933: SQL-Befehl wurde nicht korrekt beendet
    ORA-06512: in "EQSYS.EQ_ERR", Zeile 186
    ORA-06512: in Zeile 1

    There is a metalink note 363272.1 that tracks the issue. The workaround is:
    Workaround: Set the machine locale to English.
    For example, on Windows:
    1. Start - Control Panel - Regional and Language Options
    2. Choose English (United States) in dropdown list in Standards and formats
    3. Click OK
    4. Stop Oracle SES service by All Programs - Oracle SES location - Stop Oracle SES
    5. Start Oracle SES service by All Programs - Oracle SES location - Start Oracle SES
    where Oracle SES location is the location where Oracle SES is installed
    For example, on Linux:
    setenv LANG en_US
    setenv LC_ALL en_US
    searchctl stopall
    searchctl startall
    Please check the orginal document for more details. Also, I think the SES readme has this issue well documented.

  • How to make a table to display perticular number of rows per page??

    Hi,
    Can anybody tell how to ristrict the number of rows per page in SSRS?
    I have a table in my report.I know we have to use" =Int(RowNumber(Nothing)/25)" in group expression.But I already have 3 group expression in my table.Where to write??
    Thanks.

    Hi Tony ,
    Just wanted to know will this solution work ;
    I am having a report and its using a grouping expression on “Group on 
    (=Field!Salelocation)” when it add another group on the details and have the page calculation such as (=Ceiling(RowNumber(Nothing)/20)) 
    and assign the page break at to the point of saving its ok , when trying to upload the report then it throws the following error .
    I have tried your solution trying to give the page calculation the upper group but still the following error comes back
    “A group expression for the grouping ‘table2_Group1’ uses the RowNumber function with a scope parameter that is not valid. When used in a group expression, the
    value of the scope parameter of RowNumber must equal the name of the group directly containing the current group. (rsInvalidGroupExpressionScope)
    Get Online Help
    A group expression for the grouping ‘table2_Group2’ uses the RowNumber   function with a scope parameter that is not valid. When
    used in a group   expression, the value of the scope parameter of RowNumber must equal the name   of the group directly containing the current group.   (rsInvalidGroupExpressionScope)
    Get Online Help
    Will you able to assist me on this.

  • Set page break after a number of rows

    I am trying to set the page break of a table to occur every 200 rows. By default it generates a page break once the report size grows larger than the page length. When I set the property KeepTogether = true, it no longer generates the page breaks but then I have the issue of over 2000 lines on a single page.
    I created a group based on the following function:
    =CInt(Ceiling(RowNumber(Nothing)/200))
    I added a page break between each group instance. The first page now shows 200 lines but all remaining pages continue to page break once the length of the page has been hit  (around 22 rows).

    Check out the following links. Let us know if helpful.
    BOL 2008:
    Page Breaks
    In some reports, you may want to place a page break at the end of a specified number of rows instead of, or in addition to, on groups or report items. To do this, create a group in a data region (typically a group immediately outside the detail), add a page break to the group, and then add a group expression to group by a specified number of rows.
    The following expression, when placed in the group expression, assigns a number to each set of 25 rows. When a page break is defined for the group, this expression results in a page break every 25 rows.
    =Int((RowNumber(Nothing)-1)/25)
    http://www.spacefold.com/lisa/post/2009/03/08/Dynamic-Page-Breaks-in-SSRS-Going-to-Eleven.aspx
    Kalman Toth SQL SERVER 2012 & BI TRAINING
    New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012

Maybe you are looking for