How to access single column in table?
Hi,everybody!
How to access a single column in table.
I sorted my table with standard TableSorter.
Now I need to get one column from this table to
do something with it's data.How do I get it?
Regards,
Michael
Hi Michael,
If you just want to retrieve the data, you could use the following code.
//Get the node which the table is bound to
IWDNode node = wdContext.nodeTable();
//iterate thru the elements
for(int i = 0 ; i<node.size();i++)
IWDNodeElement ne = node.getElementAt(i);
Object value = ne.getAttributeValue("<column name>");
//Here you have the data in the value variable
//and you can manipulate this now
Regards,
Sudeep
Similar Messages
-
How to Sort single column in webdynpro table
Hi all
I have requirement as follows.
i have webdynpro table with the following columns like Date,firstname,lastname,address etc.
now when i run the the application the table is populating the data at runtime that is fine.
i need as soon as table is loaded , Date field in the table should be displayed the values in the decending order...i have the requirement as follows...
how to sort the single column in table ...by default the values of the column displayed with decending order as soon as table displays at runtime....i dont want to click any button specific button to do the sort for that column
Regards
binduHi, I solved the same problem by modifying the sort() method in the default TableSorter class so that it takes a column id and direction rather than an event.
I assume you have read the TableSorter tutorial.
Like this. (This was done on nw ce 7.1 btw but may work on older versions as well.
Oh and then you just call the sort method right after you have made the request
//Code that goes into controller/view to execute sorting
wdContext.currentContextElement().getPensionplanTableSorter().sort("MyColumnId", "Up", wdContext.nodePensionPlan());
//Part of TableSorter.java
//The original method that needs an event. Now it just calls the new method
public void sort(IWDCustomEvent wdEvent, IWDNode dataSource) {
// find the things we need
String columnId = wdEvent.getString("selectedColumn");
String direction = wdEvent.getString("sortDirection");
sort(columnId, direction, dataSource);
//This is the new method.
public void sort(String columnId, String direction, IWDNode dataSource) {
if (columnId == null || direction == null ) {
return;
IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
NodeElementByAttributeComparator elementComparator =
(NodeElementByAttributeComparator) comparatorForColumn.get(column);
if (elementComparator == null){
//not a sortable column
column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE);
return;
// sorting
elementComparator.setSortDirection(WDTableColumnSortDirection.valueOf(direction));
dataSource.sortElements(elementComparator); -
Reg:How to delete the column in table control also from database table.
Hi Experts,
Once again thank u all for giving the responses.
one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
With Regards,
Saroja.P.Hi,
If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
"This portion of code inside the LOOP...ENDLOOP.
IF sy-ucomm eq 'F_DELETE'.
gt_itab2-check = mark. " Store the MARK field status into your internal table's correspoding field 'check'
MODIFY gt_itab INDEX tabcontrol-current_line.
ENDIF.
iF sy-ucomm eq 'DELETE1'.
DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
ENDIF.
Now you can modify your database table using the MODIFY statement.
MODIFY ZDB FROM TABLE gt_itab. -
How to add a column in table control
Hi ,
Can any one tell me how to add a column in table control? My requirement is to add two columns ( custom fields ) into table control ( It is a standard program). I have added the column in the table and also in the table control. But when I am running the standard program, The newly added column is not there. But I have added in the perticular screen. Change is not reflected.
Can anyone help me on this please.
Thanks in advance.
Regards,
Lakshmi.Hi,
Ensure the following :
1. After adjusting the database, you`ll have to use the database utility and activate the table.
2. If you have changed the standard screen, in tcode se80 -- right click on the program and click activate all. This activates all objects related to that program.
Now execute the program.
Reward if helpful.
Regards -
How to find the columns and tables used in a stored procedure?
Hi,
Can someone suggest how to find the columns and tables used within a stored procedure?
Thanks
VBKFor example:
SQL> create or replace
2 procedure p1
3 is
4 cnt number;
5 begin
6 select count(*) into cnt from emp;
7 end;
8 /
Procedure created.
SQL> select referenced_owner,
2 referenced_name
3 from dba_dependencies
4 where owner = 'SCOTT'
5 and name = 'P1'
6 and referenced_type = 'TABLE'
7 /
REFERENCED_OWNER REFERENCED_NAME
SCOTT EMP
SQL> SY. -
How to access RT and CRT tables
Hi experts can any one guide me how to view RT and CRT Tables.
How to access RT and CRT tables.
Is there any Tcode existing to access these.
Thanks in advance
Regards
vamsi.Hi Vamsi,
1) You can use the function module : CU_READ_RGDIR
In this function module you can pass PERNR and you can get SEQNR(Sequence No) or you can take the sequence no from any transparent table also.
2)After getting the sequence NO Pass the employee NO and Sequence NO in the function module : PYXX_READ_PAYROLL_RESULT.
From this function module you can get the RT,BTand CRT Table results.
Thanks and Regards
Partha -
How to access the java stack table "xi_af_msg" from the ABAP engine.
Hello Guys,
How to access the java stack table "xi_af_msg" from the ABAP engine.
I need to access this table.These 3 are the tables that are for XI Adapter in ABAP Stack.
SWFRXICNT
SWFRXIHDR
SWFRXIPRC
You can also try the following tables.
SXMSAEADPMOD XI: Adapter and Module Information
SXMSAEADPMODCHN XI: Adapter Module Chains
SXMSAEAGG XI: Adapter Runtime Data (Aggregated)
SXMSAERAW XI: Adapter Runtime Data (Raw Data)
Cheers,
Sarath.
Award if helpful. -
How to make a column in Table popin read only
Hi Everyone
Could anyone let me know how to make a column in table popin read only.
Regardsif you ar eusing an ALV table
try this
DATA: lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,
r_table TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
* get reference to ALV component interface
lr_salv_wd_table = wd_this->wd_cpifc_alvmain( ).
* get ConfigurationModel from ALV Component
wd_this->r_table = lr_salv_wd_table->get_model( ).
* init ColumnSettings
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_col_header TYPE REF TO cl_salv_wd_column_header.
lr_column_settings ?= wd_this->r_table.
* get table of column settings - each line one column
DATA: lt_columns TYPE salv_wd_t_column_ref.
lt_columns = lr_column_settings->get_columns( ).
* loop over table - in each loop another column can be modified
DATA: ls_column TYPE salv_wd_s_column_ref.
* define visible columns (fields) by naming them,
* exclude others by setting visibility to none
DATA: ls_tooltip TYPE string.
LOOP AT lt_columns INTO ls_column.
" get header of column
lr_col_header = ls_column-r_column->get_header( ).
" do settings here
ENDLOOP.
Or see this document for more tips.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4</a>
regards,
Joris -
How to access the ORACLE APPS table structures from SAP
Hi Experts,
How to access the ORACLE APPS table structures from SAP? Is it possible from SAP?
Thanks in advance
ThomasHi Silviya,
you can access this database using a technique called DB Multiconnect - sometimes written as multi-connect.
Search the SAP documentation and notes for this term and you will find how to do it.
Essentially you configure the remote database connection via transaction DBCON.
If your SAP system is not running on Oracle you will need to install the db-specific kernel files for Oracle along with the Oracel db client software - SQL*Net.
Then you can access the Oracle database from ABAP using native-SQL. It works a treat!
Cheers
Graham Robbo -
How to access AdvancedDatagrid column Header information?
I have an AdvancedDatagrid with custom Column header
renderers.
column = new AdvancedDataGridColumn("Header Text");
column.headerRenderer = new
ClassFactory(PE_FilterHeaderRenderer);
MyAdvancedDataGrid.columns = [column];
Within my header renderer class I have some code to implement
the children the way that I want. Now.. does anyone know how to
access those headers from the outside without storing off an
intance of the header itself within the class. Basically, I need to
get the right header and access an accessor within that header to
set something to change the header text and such if the user does
something to the datagrid. Any ideas would be helpfull..
Thanks!Hi Michael,
If you just want to retrieve the data, you could use the following code.
//Get the node which the table is bound to
IWDNode node = wdContext.nodeTable();
//iterate thru the elements
for(int i = 0 ; i<node.size();i++)
IWDNodeElement ne = node.getElementAt(i);
Object value = ne.getAttributeValue("<column name>");
//Here you have the data in the value variable
//and you can manipulate this now
Regards,
Sudeep -
How to use single column in a group by clause
hi frs
i hve used sum function in a sql how to use a single column in a query.
for ex
select sum(sal),ename,job,deptno,empno from emp
group by deptnowhether its possible to use single column in a group by class.
i want like this because in my custom report i need it. Report query has more than 30 column so its not possible to use 30 columns in a group by.
pls help.
Thanks
RajeshMaybe something like this -
Select ename, job, deptno, empno, sal, col1, col2, col3, col4 ......, coln
From
Select SUM(sal) sal, deptno deptno_i
From Emp
Group By deptno
,Emp
Where deptno = deptno_i
Shailender Mehta -
How to update 2 columns on table A with 2 cols in table B
Hi all,
I am confused when updating more that 1 cols from tableB to tableA.
Single column is easy as this:
update TableA set col1 = (select col1 from TableB where ssno=100)
where ssno=100;
But for 2 column updates, I can not do this:
update TableA set (col1,col2) = (select col1,col2 from TableB where ssno=100)
where ssno=100;
Please help,
Thanks a lot,Hi,
as far as the following subquery:
select col1,col2 from TableB where ssno=100
{code}
is returning only one row your statement:
{code:sql}
update TableA set (col1,col2) = (select col1,col2 from TableB where ssno=100)
where ssno=100;
{code}
is valid.
By the way, you can avoid repeating ssno=100 2 times in this way:
{code:sql}
update TableA A set (col1,col2) = (select col1,col2 from TableB where ssno=A.ssno)
where ssno=100;
{code}
Regards.
Al
Regards.
Al -
How to do Single Column Visble and Invisible
Hi All,
I tried following code for doing Column visible and invisible. But in this when i click single columne all values invisible. I want when i again click on that Column i want to bind previuse value.
Means i have taken one Matrix and in that Matrix of first column i taken ChooseFromList and on this i fill second column also. When i click on second column it invisible. I want when i click again i want bind that value which i got on ChooseFromList.
I tried hardcode value "X". That line commented in code.
Can anybody suggest me how to do it ? How to get again that value ?
Code is,
If pVal.ColUID = "V_0" Then
For i = 0 To matrix.RowCount - 2
If matrix.Columns.Item("V_0").Cells.Item(i + 1).Specific.Value = "" Then
' matrix.Columns.Item("V_0").Cells.Item(i + 1).Specific.Value = "X"
Else
matrix.Columns.Item("V_0").Cells.Item(i + 1).Specific.Value = ""
End If
Next
End IfHi,
I guess i understood now.. Plz bind all ur cols in the matrix u can take a look at the following code snippent to bind the cols
oForm.DataSources.UserDataSources.Add("Usr1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 50)
objMatrix = oForm.Items.Item("matIndent").Specific
oCol = objMatrix.Columns.Item("V_20")
oCol.DataBind.SetBound(True, "", "Usr1")
oForm.DataSources.UserDataSources.Add("Usr2", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 50)
objMatrix = oForm.Items.Item("matIndent").Specific
oCol = objMatrix.Columns.Item("V_21")
oCol.DataBind.SetBound(True, "", "Usr2")
Execute this code after the form is loaded. (U can use the load Event or if the form is loaded with the Menu u can also use the menu event.)
Hope it helps,
Vasu Natari. -
How to access single channels of multichannel acquisition?
I want to access single channels of a multichannel acquisition in the Getting Started Analog Input.vi
The purpose of this is to analyse i.e. do Min-Max or FFT on the individual channels. Can somebody help me to unbundle the data? Why does AI Read give Scaled Data while in other vi Waveform data?Hi,
Getting Started Analog Input.vi uses AIRead.vi to read data from your hardware.
1. This is from the help about AIRead.vi:
"scaled data is a 2D array that contains analog input data in scaled data units. The data appears in columns, where each column contains the data for a single channel."
So to access the single channel you must use "Functions->Array->Index Array.vi" to get data from your 2D array. All you need is to wire your 2D array to this VI and the specified number to the "column" input node.
2. To change the Data type of array you receive from hardware you have to right-click on the AIRead.vi and choose any of 4 options (Binary Array, Scaled and Binary Arrays, Scaled Array, Waveform) from "Select Type" sub-menu.
Good luck.
Oleg Chutko. -
How to access oracle eb-suit tables
Can someone pls help me how to access po_vendors table of oracle purchasing.
Using any SQL connection tool.
Ask your DBA to give TNS for your server.
Connect using SQL*Plus or Toad and
select * form po_vendors.
Maybe you are looking for
-
HD erasure to prevent dropped frames.
I know I am not alone on this dropped frames thing. I have received a lot of great info and areas to consider. Here is my little situation. I had a HD replaced on my PB G4. I have 2 GB of memmory... I reinstalled all my apps... but my new project is
-
Slideshow software suggestions???
New to Mac and want to burn my iPhoto slideshow to a DVD for TV viewing. Any suggestions on what software to use?
-
Hi, I need to get a report from SAP to identify the AUC numbers which are capitalized to regular asset with PO details. Gayani
-
N80 firmware update question...
I think I have read this in other posts but am unsure how valid it is... I have several N80 handsets 2 of which were Vodafone UK but have subsequently been unlocked by Vodafone. The firmware versions are both v4.0623.0.41 26/02/06 RM- 92 NOKIA N80 (4
-
ADOBE FORM - Start subform on current page only if space is there
Hello, i have created an adobe form for printout of CRM business partner details. The form consists of several subforms. Each subform consists of a text as header and a table. examples for the subforms: - contact persons of account - opportunities of