Find out number of rows of an ALV table
I would like to implement a generic method that returns the number of lines that are shown in an ALV table. Is this possible? Can I retrieve this information from the ALV model, or do I have to check the context for this?
Hi Daniel,
The iwci_salv_wd_table interface (the interface used which implements the method GET_MODEL), also has the method WD_GET_API, which returns a reference to IF_WD_CONTROLLER. This interface implements methods which will return the context information.
Hope this helps
Regards,
Wenonah
Similar Messages
-
How to find out Number of entries in a Huge Table?
Hi,
I would like to know Number of entries in table DFKKOP. when i try to get it through se16, it takes more than 10 minutes in dialogue process so a time out occurs. is there any way to find out number of entries in the table Apart from creating a program for that?
Please guide me to the solution.
Thanks,
Lijo Joseph
Message was edited by: Lijo Joseph VazhappillyREPORT YCHATEST .
Data : begin of itab occurs 0.
include structure tab512.
data:end of itab.
data : v_count like sy-index,
tabname like X030L-TABNAME value 'DFKKOP'.
CALL FUNCTION 'RFC_GET_TABLE_ENTRIES'
EXPORTING
table_name = tabname
IMPORTING
NUMBER_OF_ENTRIES = v_count
tables
entries = itab.
write : v_count.
Message was edited by: Sekhar -
Wish to find out number of rows returned from query
hi,
is it possible to determine how many rows have been returned after a query has been executed?
thank you.It doesn't seem like there is a method to do it for you, [...]There can't be such a method that's guaranteed to work for all databases. Many databases just hand you a cursor with the query results, and you have to walk the cursor to find the complete set. It's even possible for the DB to continue computing the query in the background and just give you a cursor to walk and consume what it has already generated.
So no, you have to walk the result set (effectively pulling everything over to the client) to count the number of rows.. -
Resukt:Get number of rows from 3 different table...?
Hi All,
I need to find out number of rows from 3 different table for the same conditions. Instead of writing 3 queries, is it possible to get it thru one query?
For example, i need to find out number of rows in tables where name = 'Ameet' from 3 different table, i will end writing 3 queries.
1. select count(1) from table_a where name = 'Ameet';
1. select count(1) from table_b where name = 'Ameet';
1. select count(1) from table_c where name = 'Ameet';
Is it possible to write a single query to get result of all above 3 queries?
result:
table_a table_b table_c
34 44 2One way:
SELECT (SELECT COUNT(*) AS CNT FROM TABLE_A WHERE name='Ameet') AS TABLE_A
, (SELECT COUNT(*) AS CNT FROM TABLE_B WHERE name='Ameet') AS TABLE_B
, (SELECT COUNT(*) AS CNT FROM TABLE_C WHERE name='Ameet') AS TABLE_C
FROM DUALIf you want the total:
SELECT SUM(CNT)
FROM
SELECT COUNT(*) AS CNT FROM TABLE_A WHERE name='Ameet'
UNION ALL
SELECT COUNT(*) FROM TABLE_B WHERE name='Ameet'
UNION ALL
SELECT COUNT(*) FROM TABLE_C WHERE name='Ameet'
) -
Trying to find the number of rows in a ResultSet
I am trying to find the number of rows in a ResultSet, using the following code:
rs = st.executeQuery(query);
rs.last(); // to move the cursor to the last row
System.out.println(rs.getRow());
However, I am getting this error:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unsupported method: ResultSet.last
Whats going wrong??praveen_potru wrote:
You might have not used scrollable result set..
Try like this:
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);rs = stmt.executeQuery(sqlString);
// Point to the last row in resultset.
rs.last();
// Get the row position which is also the number of rows in the ResultSet.
int rowcount = rs.getRow();
System.out.println("Total rows for the query: "+rowcount);
cheersAnd I hope the OP would read it because the thread is a year old. -
XMLIndex: finding indexed XPaths and the number of rows in the path table
Hi,
I am storing non-schema-based binary XMLs in an XMLType column in 11g (11.1.0.6.0) and would like to index the XMLs either partially or fully using XMLIndex. I'm expecting to have a large number (tens of millions) of XML documents and have some concerns about the size of the XMLIndex path table.
In short, I am worried that the path table might grow unmanageable large. In order to avoid this and to plan for table partitioning, I would like to create a report of all indexed XPaths in an XMLIndex and to find out how many times each path is actualized in the path table. I would do this for a representative XML sample.
I have been creating XMLIndexes with different exclude/include paths, gathering stats with DBMS_STATS (estimate_percent = 100) and selecting the number of rows in the path table through USER_TABLES.
If anyone knows a more straightforward way of doing this all advice is very much appreciated.
Best Regards,
Rasko LeinonenThanks Marco,
I managed to get out all indexed paths using the following SQL. It took a while to understand how the join the XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5 and XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5 tables together but got there in the end. This helps to clarify which XPaths are being currently indexed by the XMLIndex.
begin
for v_row in (select PATH from XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5)
loop
declare
v_i BINARY_INTEGER := 1;
v_id raw(8);
v_len BINARY_INTEGER := 2;
v_skip BINARY_INTEGER := 1;
begin
while v_i < utl_raw.length(v_row.path) and
v_i + v_len <= utl_raw.length(v_row.path)
loop
v_i := v_i + v_skip;
v_id := utl_raw.substr(v_row.path, v_i, v_len);
--dbms_output.put_line(v_id);
for v_row2 in (select LOCALNAME, flags from XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5
where ID = v_id )
loop
if rawtohex(v_row2.flags) = '01'
then
dbms_output.put('@');
end if;
dbms_output.put(v_row2.localname);
if v_i + v_len < utl_raw.length(v_row.path)
then
dbms_output.put('/');
end if;
end loop;
v_i := v_i + v_len;
end loop;
dbms_output.put_line('');
end;
end loop;
end;
Example output:
RUN
RUN/@accession
RUN/@alias
RUN/@instrument_model
RUN/@run_date
RUN/@run_center
RUN/@total_data_blocks
RUN/EXPERIMENT_REF
RUN/EXPERIMENT_REF/@accession
RUN/EXPERIMENT_REF/@refname
RUN/DATA_BLOCK
RUN/DATA_BLOCK/@name
RUN/DATA_BLOCK/@total_spots
RUN/DATA_BLOCK/@total_reads
RUN/DATA_BLOCK/@number_channels
RUN/DATA_BLOCK/@format_code
RUN/DATA_BLOCK/@sector
RUN/DATA_BLOCK/FILES
RUN/DATA_BLOCK/FILES/FILE
RUN/DATA_BLOCK/FILES/FILE/@filename
RUN/DATA_BLOCK/FILES/FILE/@filetype
RUN/RUN_ATTRIBUTES
RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE
RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/TAG
RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/VALUE -
Can we find the number of rows in table from the dump file
Hi All,
Can we find the number of rows in table from the dump file with out importing the table in to the database?
Please let me know ,if any option is there.
Thanks,
Kumar.<s>Try to import with option SHOW=Y, that should skip the number of rows which are into a table from a dump file.</s><br>
<br>
Nicolas.<br>
Oops, sorry, that doesn't show the number of lines...<br>
Message was edited by: <br>
N. Gasparotto -
How to find out number of includes for a given program dynamically
Hi all
I have a requirement in which, I have to find out number of includes and their names for a given user defined program dynamically
if u know the answer pls let me know
Thanks in advance
DeviHi rama,
1. use this FM - RS_GET_ALL_INCLUDES_FOR_PRTAB
regards,
amit m . -
To find out the last row that is updated in a View Object
Hi OAF Gurus,
I have requirement like,
I have to find out the last row that is updated on a particular View Object and I have send a mail to the users about the change.
JegSAMassMobVOImpl vo = getJegSAMassMobVO1();
JegSAMassMobVO is the View Object Name and it displays certain rows that has already been added to the VO in the Page.
Now the issue is when a user updates a particular row,I have to find which row gets updated and have to send a email to that particular employee about the change.
Just want to know,how to find out the last updated row in a particular VO.
Any Help would be appreciated as this a immediate requirement.
Regards,
Magesh.M.K.
Edited by: user1393742 on May 4, 2011 1:06 AMHi Magesh
It shoud be a Advanced table ,so when user will update the row ,the specific row will fire the PPR and on that event u can capture the row using row reference ,this is the sample code below
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean); OAApplicationModule am =
(OAApplicationModule)pageContext.getApplicationModule(webBean);
String event = pageContext.getParameter("event");
if ("<ItemPPREventName>").equals(event))
// Get the identifier of the PPR event source row
String rowReference =
pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Serializable[] parameters = { rowReference };
// Pass the rowReference to a "handler" method in the application module.
262
am.invokeMethod("<handleSomeEvent>", parameters);
In your application module's "handler" method, add the following code to access the source row:
OARow row = (OARow)findRowByRef(rowReference);
if (row != null)
Thanks
Pratap -
How i can find out number of transaction code created in last 6 month
Dear Friends,
How i can find out number of transaction code created in last 6 month and last used date for each transaction code.
System - ECC 5.0
Plz help.
Thanks,
Regards,
SachinHi,
As per your query you can find out the list of t-code not to use in last time details in suim t-code.
Anil -
Find Total Number of Rows in Database
I am trying to find total number of rows in Database? Thanks in advance
I'd come back to a question of "why". What possible reason could you have to want to know the number of rows in every table in the database?
This seems like it is a request from someone non-technical where they're not sure exactly what they need to ask to get the information they want. I'm forseeing something along the lines of
User: How many rows are in the database
DBA: Ummm.... <<goes off and spends a lot of resources to count>>> ... 1 billion.
User: Wow, that's a lot... How big are those rows...
DBA: Hmmm... <<goes off and spends more time trying to find an average row size>>... 100 bytes
User: <<Plugs numbers into Excel>>... OK, our database is 93 GB, so we need to order 100 GB of disk for our new environment.
DBA: <<Months later, after 100 GB of disk has been budgeted, purchased, and delivered>> User, you didn't order enough disk for our disaster recovery environment.
User: You said our database was only 93 GB!!
DBA: 93 GB of data. Plus 100 GB of indexes, TEMP, UNDO, space for archived logs, ...
When "odd" requests come down, it's generally the case that the person asking the question doesn't know what question they really want to ask because they don't have the domain knowledge to know how to ask the question. Walking over and asking them what they're hoping to accomplish/ what they're using the data for generally leads to a case where
- The user gets exactly the information they need, not the information they think they want
- The DBA does a lot less work, since the right question is almost always easier to answer
- The user thinks of the DBA as a really helpful sort of guy and remembers how helpful you were in the past when you have to push back on other things later
- No one ends up playing the blame game when the user gets just what they asked for and not what they want.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
ADF: Best way to find out how many rows are fetched?
Hello,
I have overridden method executeQueryForCollection of ViewObject in which I execute supper.executeQueryForCollection and after that want to find out how many rows are fetched during the execution.
If I try to use getFetchedRowCount I always get "0", if using getEstimatedRowCount, query are being re-executed.
What method is better to use for that?
Thank you,
Veniamin Goldin
Forbis, Ltd.I have a 'home-made' view called RBS, whose definition is this:
create view RBS as
select /*+ RULE */ substr(s.username,1,10) oracle,
substr(case when s.osuser like 'oramt%'
then nvl(upper(s.client_info),'client_info not set')
else substr(s.machine,instr(s.machine, '\')+1,length(s.machine))||':'||s.osuser
end
,1,20) CLIENT
, substr(''''||s.sid||','||s.serial#||''''||decode(s.status,'KILLED','*',''),1,12) kill_id
, lpad(to_char(t.xidusn),4) rbs#
, lpad(to_char(t.used_ublk),4) ublk
, lpad(to_char(t.used_urec),8) urecords
, i.block_gets
, lpad(to_number(round((sysdate - to_date(t.start_time,'MM/DD/YY HH24:MI:SS')) * 60 * 60 * 24)),9) time
, upper(substr(s.program,1,20)) PROGRAM
, to_char(s.LOGON_TIME,'HH24:MI:SS DD-MON') LOGIN_TIME
from sys.v_$transaction t
, sys.v_$session s
, sys.v_$sess_io i
, sys.v_$process p
where s.saddr = t.ses_addr
and i.sid = s.sid
and p.addr = s.paddr
/By monitoring the URECORDS column value of the row that corresponds to my session doing a transaction, I can see how it progresses.
Toon -
To find out how many rows are processed/updated?
Hi Gurus,
I have given an update statement with parallelism. The data to be processed is huge around 50 million records.
I know that from OEM, we can find out how many rows it has processed or completed. I would like to know the dictionary view/ query to find out the same in SQL Plus.
Thanks
Cherrish VaidiyanI have a 'home-made' view called RBS, whose definition is this:
create view RBS as
select /*+ RULE */ substr(s.username,1,10) oracle,
substr(case when s.osuser like 'oramt%'
then nvl(upper(s.client_info),'client_info not set')
else substr(s.machine,instr(s.machine, '\')+1,length(s.machine))||':'||s.osuser
end
,1,20) CLIENT
, substr(''''||s.sid||','||s.serial#||''''||decode(s.status,'KILLED','*',''),1,12) kill_id
, lpad(to_char(t.xidusn),4) rbs#
, lpad(to_char(t.used_ublk),4) ublk
, lpad(to_char(t.used_urec),8) urecords
, i.block_gets
, lpad(to_number(round((sysdate - to_date(t.start_time,'MM/DD/YY HH24:MI:SS')) * 60 * 60 * 24)),9) time
, upper(substr(s.program,1,20)) PROGRAM
, to_char(s.LOGON_TIME,'HH24:MI:SS DD-MON') LOGIN_TIME
from sys.v_$transaction t
, sys.v_$session s
, sys.v_$sess_io i
, sys.v_$process p
where s.saddr = t.ses_addr
and i.sid = s.sid
and p.addr = s.paddr
/By monitoring the URECORDS column value of the row that corresponds to my session doing a transaction, I can see how it progresses.
Toon -
How to find the number of columns in an internal table DYNAMICALLY ?
Hi,
How to find the number of columns in an internal table DYNAMICALLY ?
Thanks and Regards,
saleem.Hi,
you can find the number of columns and their order using
the <b>'REUSE_ALV_FIELDCATALOG_MERGE'</b>
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = sy-repid
changing
ct_fieldcat = IT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 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
now describe your fieldcat . and find no of columns.
and their order also..
regards
vijay -
How to find out the infoProvider for a given dimension table?
Experts:
In RSA1, I want to find out the infoProvider for a given dimension table.
But I am not sure how to display the tables linked to a given infoProvider.
Could you provide a way to display all tables linked to a given infoProvider?
Thanks a lot!See, The dimension table starts with Dcubename1 and incremental Dcubename2 .... so on
Ex.ZSD_C01 is your cube name
Dim tables starts for this is /BIC/DZSD_C011 /BIC/DZSD_C012 ...
Goto - LISTSCHEMA - derive cube name from given dim table and enter cube name - execute - will show you all the tables
Maybe you are looking for
-
My MacBook will no longer connect to my wireless printer.
My MacBook (circa 2010 - it's not a MacBook Pro) stopped connecting wirelessly to my HP printer (3050 J610). I get a message, "Printer is offline." The printer is on and I have no trouble printing from my iMac. I appreciate any advice/insights. Thank
-
How do i get itunes to download on my external, and not my desktop?
I've been trying to get iTunes to download in my external hard drive instead of on my desktop; but every time I download iTunes it starts downloading automaticly onto the desktop. I don't have enough memory on my desktop to transfer all my music onto
-
SOAPException: Local provider only works with URLEndpoints
Hi, I'm writing a JAXM client that uses a messaging provider. Right after the message is sent out by providerConnection.send( ebxmlMessage ), I get an SOAPException: javax.xml.soap.SOAPException: Local provider only works with URLEndpoints at com.sun
-
I can't seem to download InDesign CC for a 30-day trial
I have signed in to Creative Cloud, but cannot seem to download the free 30-day trial for InDesign CC. Any advice?
-
Hi, Is there anyway you can add a picture or icon to a control such as a True/False button.