Tableview setting to enable to select the table columns to display
Hi All,
In webdynppto in the table ALV display we have the settings option with which users can control what columns of the table to display and what columns to hide in the table display.
Users can also control the columns of the display to show or hide in the display. Can any of you please clarify how we can do this with the tableview
The tableview I am using is below what setting do I need to enable to get the column display/hide by users at runtime
Thanks
Karen
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page>
<htmlb:form>
<htmlb:tableView id = "tv1"
visibleRowCount = "10"
selectionMode = "lineEdit"
table = "<%= flights %>"
filter = "SERVER"
sort = "server"
iterator = "<%= iterator %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
hello,
I do not think it's possible dynamically like ALV...on screen itself...
to hide / display a column you can code in iterator class with some condition...
Thanks,
Similar Messages
-
Enable Inputfield in the table column even though the column is empty
Dear Experts
How to enable or disable a table column(it is an inputfield) dynamically.
I done this and strugling to proceed from this point
DATA lr_container TYPE REF TO cl_wd_uielement_container.
DATA lr_table TYPE REF TO cl_wd_table.
DATA lr_view TYPE REF TO if_wd_view.
DATA lr_child TYPE REF TO cl_wd_uielement.
data : lr_col TYPE REF TO CL_WD_TABLE_COLUMN.
data : lr_inp TYPE REF TO cl_wd_input_field .
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lt_children = lr_container->get_children( ).
CALL METHOD lr_container->get_child
EXPORTING
id = 'ITEMS_TABLE'
index = 1
RECEIVING
the_child = lr_child.
lr_table ?= lr_child.
CALL METHOD lr_table->get_column
EXPORTING
id = 'ZVPN_IT_INP'
index = '6'
receiving
the_column = lr_col.
Upto this the code is working fine as per the requirement .Now the thing is in that in column we r having an input field which should be enabled dynamically
Regards
ArunHi Arun.,
For enabling and disabiling any field on the view, there is only procedure.
1. Make an attribute of type 'ABAP_BOOL' in the context.
2. Bind the enable property of the UI element to this attribute.
3. Enable or Disable the UI element in the code.
So for your question you can follow :
1. Make an attribute 'ENABLE' in the context node bound to the table. Type ABAP BOOL.
2. Bind 'ENABLE' property of the desired input field with this attribute.
3. In WDDOMODIFYVIEW check your condition and based on the condition use set_attribute method of if_wd_context_node to change the value to 00 - None or 01 - Enabled.
I hope your question is answered. -
Select the table based on 2 months ? Query no working
I have a table TEST1 in schema MESSAGE_REPORT. What i want to do is select the table based on 2 months ( JULY and AUGUST ). The requirement is Whole JULY data should be there and for AUG the data should be till 01 aug . Below is the query i m using but its giving me error . Moreover the Where clause "TRUNC(HIRE,'MONTH') " part is compulsary to be used ,changes have to be made in the ">= timestamp '2010-07-01 00:00:00' and frd.sent_timestamp < timestamp '2010-08-10 00:00:00';" part only . please can anyone help me out
NAME HIRE
SALE 01.07.2010 00:00:00,000000000
cops 15.07.2010 00:00:00,000000000
NAVEED 31.07.2010 00:00:00,000000000
HEN 01.08.2010 00:00:00,000000000
BEN 10.08.2010 00:00:00,000000000
CROSS 15.08.2010 00:00:00,000000000
select * from MESSAGE_REPORT.test1 where
TRUNC(HIRE,'MONTH') >= timestamp '2010-07-01 00:00:00' and frd.sent_timestamp < timestamp '2010-08-10 00:00:00';
ERROR:
ORA-00904: "FRD"."SENT_TIMESTAMP": invalid identifier
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Error at Line: 24 Column: 60Edited by: user12633486 on Aug 11, 2010 1:13 PM
Edited by: user12633486 on Aug 11, 2010 1:51 PMThats becuase you are comparing with Month and not the complete date.
Check this:
SQL> ed
Wrote file afiedt.buf
1 with t as (select 'SALE' col1,'01.07.2010 00:00:00' col2 from dual
2 union all select 'cops','15.07.2010 00:00:00' from dual
3 union all select 'NAVEED','31.07.2010 00:00:00' from dual
4 union all select 'HEN','01.08.2010 00:00:00' from dual
5 union all select 'BEN','10.08.2010 00:00:00' from dual
6 union all select 'CROSS','15.08.2010 00:00:00' from dual)
7 select * from t
8 where
9 TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') >= timestamp '2010-07-01 00:00:00'
10* and TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') < timestamp '2010-08-10 00:00:00'
SQL> /
COL1 COL2
SALE 01.07.2010 00:00:00
cops 15.07.2010 00:00:00
NAVEED 31.07.2010 00:00:00
HEN 01.08.2010 00:00:00
SQL>
-- For less than equal to
SQL> ed
Wrote file afiedt.buf
1 with t as (select 'SALE' col1,'01.07.2010 00:00:00' col2 from dual
2 union all select 'cops','15.07.2010 00:00:00' from dual
3 union all select 'NAVEED','31.07.2010 00:00:00' from dual
4 union all select 'HEN','01.08.2010 00:00:00' from dual
5 union all select 'BEN','10.08.2010 00:00:00' from dual
6 union all select 'CROSS','15.08.2010 00:00:00' from dual)
7 select * from t
8 where
9 TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') >= timestamp '2010-07-01 00:00:00'
10* and TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') <= timestamp '2010-08-10 00:00:00' -- less than equal to includes data for 10th august as well
SQL> /
COL1 COL2
SALE 01.07.2010 00:00:00
cops 15.07.2010 00:00:00
NAVEED 31.07.2010 00:00:00
HEN 01.08.2010 00:00:00
BEN 10.08.2010 00:00:00
SQL> Edited by: AP on Aug 11, 2010 1:31 AM
Edited by: AP on Aug 11, 2010 1:32 AM -
Hi,
I have a LOV in the table column. I want to disable/enable the LOV on the basis of the values of other column.
How can i do that?
My JDeveloper version is 11.1.1.6.0
Thanks
-HarishHi
Thanks for your reply.
I found the problem, now it is working.
Previosly i was using readonly parameter in the selectOneChoice list like
readOnly="#{bindings.EnabledFlag.inputValue eq 'ACTIVE'}"
but when i changed this like
readOnly="#{row.EnabledFlag eq 'ACTIVE'}"
Then it worked. Because previously it was comparing the value of EnabledFlag of the selected row.
That is why all the rows are gettting enabled or disabled by the changing of the selected row depending upon the value of the EnableFlag.
Thanks anyways for the help
Thanks
Harish -
How can i select the next column instead of next row when press enter key
I need to know how can i select the next column instead of next row when i press the enter key.By default ,when i press enter key the next row is selected and the column remain unchanged but I wants opposite that is the row should remain unchanged but column index will changed.
Thanks to all.Well, the right arrow key will already move you to the next column, so the easiest way to do this is to modify the InputMap to have the Enter key invoke the same Action as the right arrow key.
You can search the forum for my "Table Actions" (without the space) example that will show you how to do this. -
Selecting the 'right' column in a FMS window
Hello,
If I have a FMS showing up say 3-4 columns in the search results.. say Customer name, Invoice number, value and Due Date...
How to set the user to select values between one of these columns. At the moment, clicking on the row selects the First Column always (Customer Name in my case).
I would like to be able to select the Due Date (or any other column) without altering the order of the columns shown here.Dear Gautam Ganguly,
We have investigated on the issue.
It is the current system behaviour that if defining a FMS showing up more than one column, always the first column will be selected.
In your case I suggest that you define several UDFs (eg: Customer Name & Due Date) and link seperate FMS to retrieved the required information.
Hope this helps.
Best Regards,
Summer Ding
SAP Business One Forums Team
Edited by: Summer Ding on Dec 26, 2008 9:45 AM -
The order of the table columns to Srini Chavali
OK I made a mistake Srini Chavali.
So why dont you try to help me now beyond just warn me about burocratic issues, what you really should had done instead just to block the answers of my former question ?
The question is:
How to influence the order of the table columns in time of transformation logic to relational ?
Nelson Alberti da Rosabecause exist an order among primary key columns that was definied in the logical model and it he can't see that.fixed :
function addPKcolumns(list,table){
pk = table.getPK();
if(pk!=null){
pcols = pk.getColumns();
for(var i = 0;i<pcols.length;i++){
col = pcols;
//in fact don't need this check, because PK columns are processed first
if(!list.contains(col)){
list.add(col);
function addFKcolumns(list,fkeys){
for(var k=0;k<fkeys.length;k++){
fcols = fkeys[k].getColumns();
for(var i = 0;i<fcols.length;i++){
col = fcols[i];
if(!list.contains(col)){
list.add(col);
//adds mandatory or oprional columns to list depending on mand parameter
function addMandatoryOptColumns(list,cols, mand){
for(var i = 0;i<cols.length;i++){
col = cols[i];
if(col.isMandatory() == mand && !list.contains(col)){
list.add(col);
tables = model.getTableSet().toArray();
list = new java.util.ArrayList();
for (var t = 0; t<tables.length;t++){
list.clear();
table = tables[t];
cols = table.getElements();
// add PK columns to list
addPKcolumns(list,table);
// add FK columns to list
addFKcolumns(list,table.getFKAssociations());
//add mandatory columns
addMandatoryOptColumns(list,cols,true);
//add optional columns
addMandatoryOptColumns(list,cols,false);
//use list to reorder columns
ord_cols = list.toArray();
for(var n = 0;n<ord_cols.length;n++){
table.moveToIndex(ord_cols[n],n);
//prevent reordering from enginnering, can be changed with UI
table.setAllowColumnReorder(false);
table.setDirty(true); -
How to display the sorting arrows in the table column header
Hi
I am doing a sorting for some columns from the click of the table column headers, In Developer studio, we are able to view the up and down arrows, I need that also to be made visible at run time, so that the user knows that there exists sorting based on that particular column. Is there any other way of doing it ? I cant place more than one control on the header or wrap the text to two lines..also. please clarify. thanksI assume you are using NW 04.
The table column header contains a IWDCaption element which may display an icon and a text. See property IWDCaption.imageSource.
The table tutorial might also be helpful.
Armin -
How to fix the table column header and resize the width of a table column?
Hi all,
I have the following two requirements,
1) I need to wrap the table column header into two rows. I mean the header must be displayed in two rows.
2) I need to to able to resize the width of the column. i.e The user should be able to drag the column width according to his requirement.
Is this possible. Any help would be appreciated!
Regards
KishanHi Kishan,
Refer to these links.They may ne useful for you.
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80d81237-b780-2a10-d398-cc33af6bd75c
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30291df2-b980-2a10-0884-839c4f7f147e
Regards,
Sumangala -
Using Alias for the table column
Dear all,
Can we use alias name for the table column while developing zreport.
ie.,
without using standard table column name ( like mara-matnr ), i wish to use mat_num for matnr. So that, one can easily understand the column.
Could you help me out in this regard.
Thanks in Advance,
S.Sridhar.yes you can declare in ur internal table like
material_number like mara-matnr. -
How can i indicate that the table columns have different size?
How can i indicate that the table columns have different size?
It is because i have a table that has several columns....but i would like to have the possibility to indicate the size for every column....could somebody help me please?
Thanks,
MaryHi,
don't know as much as I should about JTable, but it seems that using yourTable.getDefaultRenderer() could help you: if I clearly understood the javadoc notes, it returns an object inheriting from JLabel, so you should be able to use setHorizontalAlignment(int align) on it... no time to verify this, but I'd be thankfull if you tell me the results !!!
Regards -
Unable to lead select the table
Hi All ,
i i have some requirement something like this i have three table side by side in a view when i select the row of the first table the data in the second table should be dislayed and similarly for the third table as well .
Now my problem is when i am lead selecting the first table i a able to fetch the data and display but i am unable to lead select that rows in the table to display the lead selection i used Lead selection by Index then is is displaying properly BUT when i click on the second row or the third row or so...... It is not getting lead selected. I am Surprised i tried to check but did not found a single clue please help me with this.......
Good Day....................
Thanks and Regards,
Sana.hi ,
did u check the LeadSelect property of ur context node to which ur table is binded ?
http://help.sap.com/saphelp_nw04s/helpdata/EN/79/555e3f71e41e26e10000000a114084/content.htm
regards,
amit -
Dynamic SQL statement to select the tables which are updated today...
Hi Guys,
I need to find the names of all the tables which contain rows that are inserted/updated in a given time stamp...
Below statement gives me the list of all the tables in the database...
select t.table_name from all_tables t;All these tables in the database have a column called rowversion which gives the updated/inserted date of a record. I need to write a select statement (probably dynamic) which will give me the table names which contain the rowversion value 24-01-2013....
Any help is very much appreciated...Napster wrote:
Hi Karthick,
Thanks for your reply...
But when I execute your select statement I am getting an error saying table SYS.DBMS_XMLGEN does not exist.
Probably something wrong in my environment?Yes you can, here is a quick untested code
declare
my_filter date := to_date('24-01-2013', 'dd-mm-yyyy');
my_count integer;
begin
for i in (select table_name from user_tables)
loop
execute immediate q'[select count(*) from ]' || i.table_name || q'[ where rowversion = :1]'
using my_filter
into my_count;
if my_count > 0 then
dbms_output.put_line(i.table_name);
end if;
end loop;
end;
/ -
Plz help for set focus in the table column
hi
I have aproblem like i want that when i click on submit button aftr filling tables column value if there is any error the error massage displaying after that click on masaage ok button get focus of my cursor on the same column where i was not fill any value .
i am giving a piece of code also with this also
thanks in advance
else if(!checkResources())//check if all resource brackets are set
JOptionPane.showMessageDialog(this, "Resource Brackets are not correct or complete." , "Error", JOptionPane.OK_OPTION);
//resourceTable.requestFocus(true);
return;
private boolean checkResources()
try
float number = -999999999.0F;
float[] lowerRange = new float[ resourceModel.getRowCount()];
float[] upperRange = new float[ resourceModel.getRowCount()];
allResource.setVisible(false);
overlapRes.setVisible(false);
for( int i =0; i< resourceModel.getRowCount(); i++)
if(((Boolean)resourceModel.getValueAt(i,4)).booleanValue())
lowerRange[i] = -999999999.0F;
else
lowerRange[i] = ((Float)resourceModel.getValueAt(i,2)).floatValue();
if(((Boolean)resourceModel.getValueAt(i,5)).booleanValue())
upperRange[i] = 999999999.0F;
else
upperRange[i] = ((Float)resourceModel.getValueAt(i,3)).floatValue();
for(int i =0; i<lowerRange.length-1 ; i++)
{ int temp =i;
for(int j= i+1; j<lowerRange.length; j++)
{ if(lowerRange[temp] > lowerRange[j])
temp = j;
else if(lowerRange[temp] == lowerRange[j])
if(upperRange[temp] > upperRange[j])
temp = j;
if(temp != i)
{ float swapt = lowerRange[i];
lowerRange[i] =lowerRange[temp];
lowerRange[temp] = swapt;
swapt = upperRange;
upperRange[i] =upperRange[temp];
upperRange[temp] = swapt;
for(int i=0; i<lowerRange.length; i++)
{ if(lowerRange[i] != number )
{ if(lowerRange[i] < number)
overlapRes.setVisible(true);
else
allResource.setVisible(true);
return false;
number = upperRange[i];
if(number != 999999999.0F)
{ allResource.setVisible(true);
return false;
return true;
catch(Exception e)
CAT.error("Error in checking wheather resource Bracket is complete or not",e);
return false;
this code belongs to action perform method....
the function for chek rong value is ritten insisde checkresources() function
plz helpplz help ASAP
-
How do I select a date column and display the millesecond along with it.
I am trying to select a date column from database and want to
display millesecond with it. How do I do this. I am aware of
the "alter session set NLS_DATE_FORMAT = 'MM/DD/YY HH:MI:SS'"
command. However, I do not know how to display this with the
millesecond.
Thanks for all the help.Example:
SQL> CREATE OR REPLACE JAVA SOURCE
2 NAMED "MyTimestamp"
3 AS
4 import java.lang.String;
5 import java.sql.Timestamp;
6
7 public class MyTimestamp
8 {
9 public static String getTimestamp()
10 {
11 return (new
12 Timestamp(System.currentTimeMillis())).toString();
13 }
14 };
15 /
Java created.
SQL> CREATE OR REPLACE FUNCTION my_timestamp
2 RETURN VARCHAR2
3 AS LANGUAGE JAVA
4 NAME 'MyTimestamp.getTimestamp() return java.lang.String';
5 /
Function created.
SQL> CREATE TABLE test_time
2 (date_col VARCHAR2 (23))
3 /
Table created.
SQL> INSERT INTO test_time (date_col)
2 SELECT my_timestamp
3 FROM dual
4 /
1 row created.
SQL> SELECT date_col
2 FROM test_time
3 /
DATE_COL
2001-11-02 14:58:51.766
Maybe you are looking for
-
Set up binary mode for backup over FTP
Hello! I am about to set up the backup for Oracle DB from Tcode DB13. My SAP systems are installed on Windows (64 Bit). The backup data should be saved on the Unix-Samba share via FTP. If I execute DB-Backup the backup is successful, BUT: The file na
-
Transfer cFP 1808 bank to delivery computer
I have a cFP setup working fine in LV 2010 on my development computer. Now I need to move it to a delivery computer. I copied all the project including the.iak to the (shiny) new computer which has LV and PF and Visa etc all freshly installed and app
-
Create Application in Apex Employee Directory
Hi, I need some sample application or suggestion me designing employee directory application. Please suggest me if you have some links or sample applications. Thanks Sudhir
-
Urgent help in copying STANDARD Texts of various lang from 1 client to anot
Hi, I have a require ment in which i have to copy all standard texts in chinese,thai language from one client to another. Can any one please help me with this . I don't have any idea on proceeding .
-
OBI to Essbase Connectivity Problems
We are trying to connect OBI 11.1.1.5 to Essbase 11.1.1.3. We are able to import essbase cubes into the rpd, and even view the members of those cubes while the rpd is in offline mode. When the bi server is brought back up however, every query we run