How to optimize the column width in Table Control
Hi all,
When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
thanks for your help.
Points would be awarded .
Regards,
Anil .
Hi,
In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
Regards
Sudheer
Similar Messages
-
How to sum the column in a table seperated by sign.
How to sum the column in a table separate by sign.
For Example:
A B
10 MOHAN
-15 KUMAR
-25 MARCH
50 MAYSELECT SUM(CASE SIGN(A) WHEN 1 THEN A ELSE NULL END) SUM_POSTIIVE,
SUM(CASE SIGN(A) WHEN -1 THEN A ELSE NULL END) SUM_NEGATIIVE
FROM tbl
/SY. -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
How to change the column width in Smartforms..?
Hi All..
I need to change the column width in a smartform.
The requirement has been mentioned as follows...
Adjust the column width of the following columns:
MATERIAL: 14 char
DESCRIPTION: 20 char
How to perform this..??
Where can i find the column width of various columns of a smartform..???
Please Help me...
Regards
PavanIn the SMART Forms, you would have created a Table object and specified the line width and divided that into no. of columns that you want, you have to mandatorily specify the width of each column so that total of column width will be equal to that of the line width.
When you double click on the Table object, you can TABLE tab on the right side. If you can't see the line / columns details, click on the DETAILS button.
Regards,
Ravi
Note - Please mark all the helpful answers -
How to set the column width of JTable
I want do remember the column width and write it to a file, when the window is started , the column width is read from the file and the table is set as that. I also want the column width is not fixed and can be changed by mouse.But I am always failded.
How to do? would you please help me!
Thanks a lots.To "remember" the column widths, add a mouse listener to the table header. Upon mouseReleased(), get the column widths and save them to your file. When the application starts next time, get the stored widths and set them using:
table.getColumn("XXX").setPreferredWidth(...);
By default, your columns are adjustable, but you can use:
table.getTableHeader().setResizingAllowed(true); -
How to extract the column width in ALv report if its executed in background
I am executing an ALV report in background , in front end i am getting data properly, in back end for some columns some of the digits are missing.For example if PO no is of 10 digits it will display only 8 becos column size is like that , how to extract coulmns in back ground.
I have executed in background and checked the spool and for some of the columns width is not sufficient to display comeplete data so please suggest how to extract the columns sizes if executed inj background for an ALVHi Deepthi,
you can try with the above mentioned suggestions ,if its worked its fine ,
If not use Docking container instead of custom container, For ALV in back ground jobs, its suggest to use docking container instead of custom container , below you can find the declaration for docking container and code to use docking and custom container in your program for fore and back ground.
or you can use docking container alone for both operations.
Data : G_DOCK1 TYPE REF TO CL_GUI_DOCKING_CONTAINER,
IF CCON IS INITIAL. (ccon is container name )
*Check whether the program is run in batch or foreground
IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
*Run in foreground
CREATE OBJECT CCON
EXPORTING
CONTAINER_NAME = 'CON1'.
CREATE OBJECT GRID1
EXPORTING
I_PARENT = parent_1.
ELSE.
*Run in background
CREATE OBJECT GRID1
EXPORTING
I_PARENT = G_DOCK1.
ENDIF.
ENDIF.
B&R,
Saravana.S -
How to set the column width in the PDF exports of interactive reports ?
Hello,
I have a huge problem with the PDF export for the Interactive reports. I'm using APEX 3.2.
I have to produce a PDF report in landscape format that show 21 columns. My problem is that the columns have a ridiculous short width and that the text inside the columns do not wrap in the columns. So I get things like that :
Date Name
2011 Leina
I should see 2011-08-01 and the name Leinad Jan
I tried several things to format the columns, but none of the them has any effect on the PDF itself.
1) I used HTML code in the report query. It works well with the interactive report, but display the HTML tags in the PDF.
2) I used css to set the width of my columns. It works in the interactive report, but not in the PDF, the column width do not change.
It's like the report do not notice that my page format is Legal 14 x 8.5 (Landscape) and still believe it's 8.5 x 11 (which is "portrait")
Do you have any idea so set the columkn widths in the reports ?
Thank you !
Edited by: leinadjan on Aug 1, 2011 11:15 AMTo "remember" the column widths, add a mouse listener to the table header. Upon mouseReleased(), get the column widths and save them to your file. When the application starts next time, get the stored widths and set them using:
table.getColumn("XXX").setPreferredWidth(...);
By default, your columns are adjustable, but you can use:
table.getTableHeader().setResizingAllowed(true); -
How I compare the columns of 2 tables
Hi, what's the query I use to compare all the columns of 2 tables, or how I use the result of COLUMN_NAME in the DBA_TAB_COLS?
Tnks for helping...
MnkI have this select:
SELECT D.COLUMN_NAME AS CFINAL
FROM DBA_TAB_COLS D,
(SELECT A.COLUMN_NAME AS C1
FROM DBA_TAB_COLS A
WHERE (A.OWNER LIKE '%TEL_USJ07%' AND
A.TABLE_NAME = 'BOLETOS')) F
WHERE D.COLUMN_NAME = F.C1
AND D.OWNER LIKE '%TEL_USJ07%'
This will return the column's name where tabel_name LIKE BOLETOS.
I want use this result in another select where the table have this columns and more, but I want to see all the results in the second table where the columns came from the first select.
For example: the first select bring to me the columns: cod_tipo_bol and cod_tipo_corte, I want to see in the second select only the results of this 2 columns.
THIS IS THE COLUMNS OF THE SECOND TABLE I WANT TO USE:
cod_tipo_bol
cod_frente_corte
num_carga
cod_caminhao
cod_motorista
lib_numero
cod_enc_frente
cod_div2
cod_div3
cod_div4
bol_data
cod_carregadora1
cod_oper_carreg1
cod_carregadora2
cod_oper_carreg2
cod_colhedora1
cod_oper_colhed1
cod_colhedora2
cod_oper_colhed2
cod_colhedora3
cod_oper_colhed3
cod_trat_reb
cod_oper_trat_reb
cod_trat_transb1
cod_oper_transb1
cod_trat_transb2
cod_oper_transb2
cod_trat_transb3
cod_oper_transb3
cod_julieta_sm_reboque
bol_status
-------- -
How to get the column name and table name with value
Hi All
I have one difficult requirement
I have some column values and they have given some alias column names but i need to find the correct column name and table name from the database.
For example value is "SRI" and i dont know the table and exact column name so is there any possibilities to find the column name and table name for the given value
Thanks & Regards
Srikkanth.MSearching all the database for a word...
Courtesy of michaels...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
11g upwards
SQL> select table_name,
column_name,
:search_string search_string,
result
from (select column_name,
table_name,
'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
from cols
where table_name in ('EMP', 'DEPT')),
xmltable (str columns result varchar2(10) path '.')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME es RESEARCH
EMP ENAME es JAMES
EMP JOB es SALESMAN
EMP JOB es SALESMAN
4 rows selected. -
How to deactivate the fields in a table control of a standard screen
Hi,
I have an requirement to deactivate the fields in a table control of a standard screen in ME22n transaction.I am using a BADI "ME_PROCESS_PO" and in item mathod i am looping at screen for the screen field name in the table control.But it is not working. Can anyone give me the possible solution . Thanx in advance.
With Regards,
Ajit.>
Vivek Joshi wrote:
> Hello Router ,
> I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
> I hope , I am clear now .
> Thanks for your help
> Regards
> Vivek
An yet you keep getting suggestions of how to set the focus. I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is. Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point. I can pass the requirement onto Product Definition, as the use case does seem interesting. Perhaps it is something we have even considered in the past.
But for now, there might be a better way to solve your problem. It will probably mean redesign the interaction. What exactly are your requirements? Do you need to be able to get the data in a particular cell of table when a button is clicked? Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work. Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table. -
How to read the field value from Table Control
Hello Experts,
I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
When Clicked on 'SAVE' the data (MATNR) from a previous screen (101) and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
Internal table t_data has 3 fields.
MATNR
A_QTY
B_QTY.
Table Control TC_RACK was declared like this:
controls tc_rack type tableview using screen 0102.
I/0 Fields:
A_QTY type ZQTY.
B_QTY type ZQTY.
The screen Flow Logic:
process before output.
module status_0102.
loop at t_data into w_data with control tc_rack.
endloop.
process after input.
module exit_0102 at exit-command.
loop at tc_rack.
endloop.
module user_command_0102.
module status_0102output.
set pf-status 'STATUS_102'.
set titlebar 'TITLE_102'.
describe table t_rack lines tc_rack-lines.
endmodule. "status_0102 output
process after input.
module user_command_0615 input.
case ok_code.
when 'SAVE_RK'.
when others.
endcase.
endmodule. "user_command_0102 input
Now for eg, when the users enter values for A_QTY and B_QTY like this:
A_QTY B_QTY
1000 2000
3000 4000
How can I read these values and pass them to T_DATA so that I can save it into Z-table?
I greatly appreciate your help.
I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
Thanks a lot.
Could you please let me know
Edited by: dev a on Jan 13, 2010 2:46 PMHi dev a
You should use
DATA: lv_name(30) TYPE c.
FIELD-SYMBOLS: <QTY> type ZQTY.
GET CURSOR FIELD lv_name. "Get the field name in table control
check sy-subrc = 0.
assign (lv_name) to <QTY>. "Here you get the value in <QTY>
check sy-subrc = 0.
Also use <your table control>-current_line to get the table index uo're currently on.
Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
Good luck
Dean Q.
Edited by: Dean Q on Jan 13, 2010 11:11 PM -
How do I set Column Width in table displayed - have tried everything :-(
Hi,
I'm using Jdev 10.1.2, adf bc and jsp's.
Simple problem, driving me nuts. In my app i display a number of different view objects in a number of jsp's. i want to set the width of the columns so that the info (if large) in each field will stay on one line. i.e. it wont continue onto the next line and take up two rows.
i have tried setting the width property of the <th> & <td>, setting the disply width property in the entity object editor and the view object editor, nothing makes a bit of difference to how the column is displayed.
this results in the tables looking messy and squised, which is totally unsatisfactory.
so if anyone could shed any light on the subject, i would be most grateful.
Thanks in advance......hi Newbe,
if you set the option noWrap="true" on the column the text will not be wrapped;
<af:column noWrap="true" sortable="false" headerText="col5">
<af:outputText value="#{row.col5}"/>
</af:column>
Good luck
Luc Bors -
How to Reduce the Column Width in JSP?
Hi -
I have developed a JSP with the Jdeveloper3.2 Wizard.
I want to reduce the column size on the screen as some columns appear too big. How do I do this ?
Any help will be greatly appreciated
Thanks
Fahim ChestiIn the SMART Forms, you would have created a Table object and specified the line width and divided that into no. of columns that you want, you have to mandatorily specify the width of each column so that total of column width will be equal to that of the line width.
When you double click on the Table object, you can TABLE tab on the right side. If you can't see the line / columns details, click on the DETAILS button.
Regards,
Ravi
Note - Please mark all the helpful answers -
How to resize the columns of a table?
Hi there!
I want to resize the column of a JTable(constructed via AbstractTableModel) to
fit the exact width of the word in the header?
Can anyone tell me how to do this thing?
Regards,import java.awt.*;
import javax.swing.table.*;
public class ColumnResizeDemo extends javax.swing.JFrame {
public ColumnResizeDemo() {
initComponents();
TableColumn column = null;
for (int i = 0; i < jTable1.getColumnModel().getColumnCount(); i++) {
column = jTable1.getColumnModel().getColumn(i);
String hv = column.getHeaderValue().toString();
JTableHeader th = jTable1.getTableHeader();
FontMetrics fm = th.getFontMetrics(th.getFont());
column.setPreferredWidth(fm.stringWidth(hv)+5);
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Column Resize Demo");
jLabel1.setText("Sets column width to fit exactly the corresponding header value");
getContentPane().add(jLabel1, java.awt.BorderLayout.NORTH);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
new String [] {
"Title 1", "Title 0002", "Title 0000003", "Title 00000000000004"
jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
jScrollPane1.setViewportView(jTable1);
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
pack();
public static void main(String args[]) {
new ColumnResizeDemo().setVisible(true);
private javax.swing.JLabel jLabel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
} -
How to fix the column length and table length?
Hi Experts/Gurus,
I want to fix the column lenght so that if data exceeds it should be in the same colum. But the size of the table should not get changed.. I used the width property of both table and column. But its not working..
Regards,
YugeshHi Yugesh,
For column wrapping you can use the SET_WRAPPING of cl_salv_wd_header and the data.....you have got cell editor for that column right...then using the cell edtior reference you can get the specific cell tyep(like cl_salv_wd_text_view type check this)
this is object reference and you can use the set_wrapping of this class. using this you can get the wrapping functionality for the data also....
DATA: lr_column TYPE REF TO cl_salv_wd_column,
lr_column_header type ref to cl_salv_wd_header,
lr_editor type ref to cl_salv_wd_uie,
lr_textview type ref to cl_salv_wd_uie_text_view.
wd_this->alv_value->if_salv_wd_table_settings~set_fixed_table_layout( ABAP_TRUE ).
lr_column = wd_this->alv_value->if_salv_wd_column_settings~get_column( 'EDITION' ).
lr_column->set_width( '55' ).
lr_column_header = lr_column->get_header( ).
lr_column_header->set_wrapping( abap_true).
lr_editor = lr_column->get_cell_editor( ).
lr_textview ?= lr_editor.
lr_textview->set_wrapping( abap_true ).
Now for the column and it's data the wrapping is set...
Regards,
Lekha.
Edited by: Lekha on Nov 16, 2009 2:12 PM
Maybe you are looking for
-
I don't know if this can be done with VI Logger or need to use Labview V7.1.
-
Automatic Creation of Employee Vendor record when hired in HR
Hi Gurus, Any assistance in Automatic creation of Employee vendor record when the employee is hired in HR master data. Thanks in Advance BLITZZ
-
Page Properties- Background Color Change
Can anyone help me here? I know how basic the subject sounds but for some reason it does cause me trouble here today. We recently had a company design our site and now we are using contribute to edit pages etc. Now, we have admin access so that isnt
-
I just got apple tv and am trying to rent a movie. It's prompting me for my security code which it then says is not correct. However the four digits of the credit card it displays are not the card linked to my account (maybe from an old credit card).
-
1.4.2_01 Plugin Size?
Cross posted from Programming forum - have an applet that we're upgrading to 1.4.2 and I can't find a Plugin download smaller than 9.4MB - that seems ridiculously huge for a Plugin and our clients over 26.4 dial up will be banging their heads on the