How to get row no of matrix
i created a matrix. It is having some data. If i click any row cell in the matrix it should show the row no its urgent.
Regards,
Puneeth S
Hi puneeth,
you know, iam a c# guy
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ItemUID == "mtxUID" && pVal.FormType == insertyourformtype)
string sRow = "";
sRow = pVal.Row.ToString();
lg David
Similar Messages
-
How To Get Row numbers in matrix report
Hi All
i created an matrix dril down report
in which i have to get row numbers
my requirement is something like
state City RowNumber
Apr May
Jun Jul Aug
AP + Vij
1 300000
5666
Guntur
2 70000
8888
Hyd
3 0000
555
MP+ RJA
4 7770
0
KL+ Kollam
5 80000
555
Trv 6
50000 666
SP+ Trj
7 666
666
JP+ mka
8 6667
66668
RP+ Rja
9 899
like that above i have to get
i used RowNumber(Nothing) And Also RowNumber("Group")
iam not getting like above iam getting either randomly or sum of all months
means for each month it is taking 1
so total iam getting 12,24,36,48..................like that
but i want the above requirement
so any one suggest how get that in matrix report..........Hi Mr.SMK,
Per my understanding you want to get the row number based on the row group of "City", right?
I have tested on my local environment and you can using the expression below to do this:
Right click the city column and select the "Insert Column" and select the "Inside group-right"
Add below expression to get the row number:
=RunningValue(CountDistinct("DataSetName"),Count,"DataSetName")
Preview result like below:
If you still have any problem, please try to provide some sample data and more details information.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
How to get row number of selected entry from OVS search result
Hi,
Anyone having any idea on how to get row number of the selected entry/ how to differentiate rows in OVS search result in ON_OVS method?
Regards,
JatinHi,
You can get the selected record to <ls_selection> structure in co phase 3.
From that structure you can get what ever field you want.,
check the below code for reference,
<< Moderator message - Cut and paste response from F4 help for ALV table field removed. Plagiarism is not allowed in SCN >>
hope this helps u.,
Thanks & Regards,
Kiran
Edited by: Rob Burbank on Jan 5, 2012 5:24 PM -
Hi,
can any one tell me how to get the particular row index matrix. I need to get the row index when et_validate event raised.
Regards,
SivaHi Siva,
Use offset property in DBDataSource Object.
Int RowNo;
RowNo= DbDatasource.Offset;
Regards,
Sravan Kumar Pothu -
How to get rows values in a column only ?
How to get all returned values in rows in a column.
e.g., a query gives output as :
123
234
233
12121
all in different rows. But i want the result like this:
123,234,233,12121.All in a single row and a single column .
How is this possible ?prakash wrote:
hi ,
Use the following example
CREATE or replace FUNCTION fn_return_row
RETURN VARCHAR2
IS
v_row VARCHAR2 (32767);
BEGIN
FOR curr_row IN (SELECT ename
FROM emp11)
LOOP
v_row := v_row ||','|| curr_row.ename;
END LOOP;
RETURN v_row;
EXCEPTION
WHEN OTHERS
THEN
RETURN NULL;
END fn_return_row;
select fn_return_row from dual ;Thanks,
P PrakashThere's no need to use PL/SQL when SQL provides adequate functionality to do it.
The title of the thread is misleading as turning rows into columns is called pivoting, but the description of the issue wanting to join all the rows together into a single column, is actually called string aggregation.
As already demonstrated it can be done several ways.
1. with XML functionality
2. using the SYS_CONNECT_BY_PATH method
and if you have 11gR2, there's...
3. the new LISTAGG analytical function.
There is also an undocumented WMSYS.WM_CONCAT function, though this isn't as flexible as other methods in that you can't control the order of the aggregated data so easily, and using such undocumented functions in production code is dangerous, as the functionality could change in future versions of Oracle, as well as it's use making your code such that Oracle will not provide support if the code with issue is using it. -
How to get row index of data table in the while ValueChangeListener fired?
Hi,
i have a data table in my page, which contains various components like inputText, selectOneChoice in each row.
i am invoking a method ValueChangeListener attribute of the selectOneChoice component. I have given the autoSubmit=true for this component.
<tr:selectOneChoice id="ratingModelType"
value="#{childRatio.ratingModelType}" binding="#{pageManager.form.bindRatioType}"
valueChangeListener="#{pageManager.form.onRatingModelTypeChange}" autoSubmit="true"
contentStyle="width:150px" required="#{!childRatio.disableChildRatioRatingModelType}"
requiredMessageDetail="#{appBundle['error.ratingModelTypeShouldNotBeEmpty']}">
<f:selectItems value="#{pageManager.catalog['Rating Model Type']}" />
<tr:selectOneChoice>In that method i want to fetch the map(with all updated values) relevant to the currently modified row of the table.
Since i am not using the selectionListener or any radio buttons in the page i am not able to get the row index of the table.
somebody please tell me how to get the row index of the table, while ValueChangeListener fired?
Thanks in advance.
SubbuHi niki,
Thank you so much. With your suggestion i got the result exactly what i want.
thanks again.
--subbu -
How to get row index in dynamically populated table?
Hi,
I am following example given in http://balusc.xs4all.nl/srv/dev-jep-dat.html to Dynamically populate datatable. How can I get row index while populating table in populateDynamicDataTable() method
private List myList;
private String[] headers; // Optional.
private HtmlDataTable dynamicDataTable;
// Actions ----------------------------------------------------------
public void loadMyList() {
// Set headers (optional).
headers = new String[] {"header1", "header2", "header3"};
// Set rows. This is a stub example, just do your dynamic thing.
String[] row1 = {"ID1", "Name1", "Value1"};
String[] row2 = {"ID2", "Name2", "Value2"};
String[] row3 = {"ID3", "Name3", "Value3"};
// Convert rows to List and set the List.
myList = new ArrayList();
myList.add(Arrays.asList(row1));
myList.add(Arrays.asList(row2));
myList.add(Arrays.asList(row3));
public void populateDynamicDataTable() {
//*********************** I want current row in this method *************//
// Any columns?
if (myList != null && myList.size() > 0) {
dynamicDataTable = new HtmlDataTable();
// Get amount of columns.
int columns = ((List) myList.get(0)).size();
// Set columns.
for (int i = 0; i < columns; i++) {
// Set header (optional).
UIOutput header = new UIOutput();
header.setValue(headers);
// Set output.
UIOutput output = new UIOutput();
ValueBinding myItem =
FacesContext
.getCurrentInstance()
.getApplication()
.createValueBinding("#{myItem[" + i + "]}");
output.setValueBinding("value", myItem);
// Set column.
UIColumn column = new UIColumn();
column.setHeader(header);
column.getChildren().add(output);
// Add column.
dynamicDataTable.getChildren().add(column);
// Getters ----------------------------------------------------------
public List getMyList() {
return myList;
public HtmlDataTable getDynamicDataTable() {
if (dynamicDataTable == null) {
loadMyList(); // Reload to get most recent data.
populateDynamicDataTable();
return dynamicDataTable;
// Setters ----------------------------------------------------------
public void setMyList(List myList) {
this.myList = myList;
public void setDynamicDataTable(HtmlDataTable dynamicDataTable) {
this.dynamicDataTable = dynamicDataTable;
I have tried dynamicDataTable.getRowIndex, but it returns -1
Is there any other way?
Thanks ,
Chitra.When you dynamically populate a datatable, you're populating the columns, not the actual rows.
Just add EL to the styleClass attribute, like:styleClass="#{myBean.myTable.rowIndex == 1 ? 'highlightedClass' : 'defaultClass'}"where 'myTable' refers to a HtmlDataTable property in the backing bean. -
How to get row number in the fetch row itself in Sql Query ?
Hi,
i am fetching some rows from a sql query . Is there any way to get row number as well in each row while all rows are fetched ?
like this :
RowNum data1 data2
1 abc ere
2 bnh ioiHello
Ofcourse you can get the rownum inside a query, just keep in mind that the rownum is the number of order in which the records were fetched from the table, so if you do an order by, the rownum will not be sequential, unless you query the information in a subquery first.
SELECT rown, col1, col1
FROM table
Or
SELECT rownum, col1, col2
FROM (SELECT col_1, col_2 FROM table ORDER BY col1)
Regards
Johan -
How to get row of the selected cell in ALV while implementing OVS
Dear Folks,
I am implementing OVS search help in ALV.When i click on cell, i can see the search help in cell and now i can identify the colomn of the cell but i can't identify the row of the cell.Can any one tell me how to identify row of the cell in this case.
Nirad.Thnx for the answer nithya.I have solved problem my self.
DATA: elem_ovs TYPE REF TO if_wd_context_element,
ls_data TYPE REF TO data,
ls_index type string.
FIELD-SYMBOLS : <ovs_data> TYPE data.
elem_ovs = ovs_callback_object->context_element.
ls_data = elem_ovs->get_static_attributes_ref( ).
ls_index = elem_ovs->GET_INDEX( ).
and this is the solution. -
Hi,
I want to get row number in an table using some condition.
Any solutions?
Thanks
shrishri,
That's nice - you answered one question out of my three.
Version number of JDev/ADF?
What technologies are you using, particularly on the model layer?
and some new ones:
are you using ADF binding?
are you trying to display a row number on the table, or determine which row is selected (for example)?
and do you mean the row number relative to the first row displayed currently, or to the "top" of the table?
As I said - a proper use case (which would have answered all these questions) would enable you to get some answers. See [url http://www.catb.org/~esr/faqs/smart-questions.html]this if you still don't understand.
John -
GeoMap Point Theme: how to get row data in a click listener?
How can I get data (short of latitude, longitude, label and value) for a clicked FOI point from an iterator in a point theme click listener?
In a bar/pie theme I can set location column to be the primary key column, and then in a listener do something like
public void myClickListener(MapClickActionEvent mapClickActionEvent) {
DataContent data = mapClickActionEvent.getDataContent();
GeoRowObject row = data.getGeoRowObject();
GeoObject key = row.getKey();
Integer ID = Integer.valueOf(key.getLocation());
// Use our ID to get data from an iterator
But there's no such thing as a location column in the mapPointTheme.sorry ..I am using Jde11g
and the reason i am using trinidad is ,I want checkbox option to select ,unselect multiple row .
Even i also tried by adding one column with checkbox in ADF table but no success regarding same i also post question on thread but no any positive reply
Problem with af:selectBooleanCheckbox added in ADf table's Column
Edited by: JaydeepJ on Aug 12, 2009 3:06 AM -
hai all,
1Q. let us assume that i am accessing a table.
let us assume its emp table with fields eno, ename, sal then by using result set i have to get the resultset as
1 bvrkii 4000
2 xxxxxx 5000
---- and so on
if i am accessing a dept table with fields deptno, deptnm then my resultset should be as
1 aaaaa
2 bbbbb
what i want to say is, let any number of rows or columns in the table. but i have to get them row by row till the end of the resultset. is it possible.
2Q. is there any command in java just as in vb
rs.recordcount()
where rs is a result set.
3Q. is there any way to find the field names of a table in java.
that is if i am using emp table means it has
to give the result as the fields are
eno
ename
sal
Thanks in advance.
by
bvrk.1) Yes, you can keep looping through a ResultSet to retrieve all the rows. You can just place your rs.next() call inside a loop, since it returns false when there are no more rows.
while(rs.next())
String no = rs.getString("eno");
String name = rs.getString("ename");
//etc...
}As far as how many columns are in the table, since you know what table you're pulling data from, you should know how many columns there are.
2) There is no method to give you the count of a ResultSet, mainly because of the nature of the ResultSet, which doesn't actually contain data itself, but is really just a cursor that moves along the data in the database. So it doesn't really know where the end is until it gets there. However, give me the reason you want the count of the rows, and i'll give you a reason why it's not necessary.
3) Retrieving table and column names is database independent, so you'll need to construct a SQL query with the correct syntax for whichever database you're using, retrieve the column names from that, and then use them to retrieve data from your other tables. Most databases provide a few system tables for this reason. -
How to get row count of a sql query
After firing a query, how can i get the number of records returned by the query from the database, it should be database indipendent.
Statement stmt = conn.createStatement();
stmt.executeQuery(query);After this I want the number of row i.e. the number of records returned by the database.Number of rows in a ResultSet may be obtained with:
ResultSet rs;
int numRows=rs.last().getRow();
I would have said this too, as a matter of fact I mentioned scrollable result sets in my post, but as I said, not all drivers support this, and he said he needed it to be database independent, so this method should not be used. -
How to get image in the matrix column.
Dear All,
I am using an add-on for displaying image in a matrix column. When user selects an item in the matrix, image corresponding to that item should be displayed in the matrix column. How can I do that.? Please help me regarding this. Any suggestion would be appreciated. Please provide a sample if you can provide.
Thanks & Regards
Ankit ChauhanHello freind
as my suggestion yu can developed it as in activity form like attechment folder.for that yu can create matrix feild type "genral and strcture like "Link" after that yu can give one browse button on which yu open show browser and when select on pertcular file .yu save the path in matrix row .after that when yu select perticlar row yu can link your image.use the logic of actvity form
by this code yu can open the browse to select the file
Public Function FindFile() As String
Dim ShowFolderBrowserThread As Threading.Thread
Try
ShowFolderBrowserThread = New Threading.Thread(AddressOf ShowFolderBrowser)
If ShowFolderBrowserThread.ThreadState = System.Threading.ThreadState.Unstarted Then
ShowFolderBrowserThread.SetApartmentState(System.Threading.ApartmentState.STA)
ShowFolderBrowserThread.Start()
ElseIf ShowFolderBrowserThread.ThreadState = System.Threading.ThreadState.Stopped Then
ShowFolderBrowserThread.Start()
ShowFolderBrowserThread.Join()
End If
While ShowFolderBrowserThread.ThreadState = Threading.ThreadState.Running
System.Windows.Forms.Application.DoEvents()
End While
If FileName <> "" Then
Return FileName
End If
Catch ex As Exception
objMain.objApplication.MessageBox("FileFile" & ex.Message)
End Try
Return ""
End Function -
How to get row index in table?
I will show row no in table.
In help,I find a example and follow it,I test:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="rowSetProperty"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetProperty name="estimatedRowCount"/>
</boundAttribute>
</bc4j:input>
</contents>
</bc4j:column>
It's OK! But I couldn't get current row index.
I test:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="rowSetProperty"/>
</columnHeader>
<contents>
<bc4j:input readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetProperty name="currentRowIndex"/>
</boundAttribute>
</bc4j:input>
</contents>
</bc4j:column>
It's error! How can I do?Thanks
I try:
<bc4j:column attrName="Fdesc">
<columnHeader>
<bc4j:sortableHeader text="Seq No"/>
</columnHeader>
<contents>
<textInput readOnly="true">
<boundAttribute name="text">
<bc4j:rowSetIteratorProperty name="currentRowIndex"/>
</boundAttribute>
</textInput>
</contents>
</bc4j:column>
Nothing be showed in the table cells.
Here, I finished using Javabean:
public class ClsRowIndexBean
private int _counter=0;
public ClsRowIndexBean()
public int getCounter()
return _counter++;
public int getCurrentCounter()
return _counter;
public void setCounter(int counter)
_counter = counter;
}
Maybe you are looking for
-
Is it possible to export tables from diffrent schema using expdp?
Hi, We can export tables from different schema using exp. Ex: exp user/pass file=sample.dmp log=sample.log tables=scott.dept,system.sales ...But Is it possible in expdp? Thanks in advance .. Thanks,
-
TNS:protocol adapter error in oracle 9i
hi, I am using Windows vista in my PC. I just installed Oracle 9i. When I put in my user-name and password to run SQL+ 9.0.1 it gives me the following error message : ERROR:ORA-12560: TNS:protocol adapter error. Please give me the steps how to fix th
-
SOS problem using one Entity bean for editing records. please help me
Hello I have one great problem using one entity bean 2.1 and i am working with this problem several days and i dont solve it. i am using this jb 2.1 for add new records to one oracle database and for editing records. I have one great problem for edit
-
Hi, could anyone help me with this problem. When I try to install Keynote from App Store, I keep getting the "An error has occurred" dialogue and it didn't explain why. Thank you!
-
Hi can anyone help? I have Photoshop elements 9 and have just purchased a Pentax k5 ii camera but I am unable to view my RAW images can you help?