How to Hide a entire column in a Table Control?
Can we hide an entire column in a Table control? Plz give some hints in doing the same...
Here is a sample, if you wish to do it programattically. If you used the table control wizard, then you should have a module which is listed in the flow logic PBO of the screen. Its probably commented out.
itabcon_change_col_attr
Uncomment it and create the module. Then put the code that I have in the module below into your module.
report zrich_0003 .
*&spwizard: declaration of tablecontrol 'ITABCON' itself
controls: itabcon type tableview using screen 0100.
data: begin of itab occurs 0,
fld1 type c,
fld2 type c,
end of itab.
start-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
* text
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
endmodule.
*& Module ITABCON_change_col_attr OUTPUT
* text
module itabcon_change_col_attr output.
<b> data: wa like line of itabcon-cols.
loop at itabcon-cols into wa.
if wa-screen-name = 'ITAB-FLD2'.
wa-invisible = '1'.
modify itabcon-cols from wa.
endif.
endloop.</b>
endmodule.
Regards,
Rich Heilman
Similar Messages
-
How to hide/suppress empty columns in pivot tables
In a pivot table, is there any way to do something like "suppress missing data" to make an entire column hidden only if it is empty? I have a situation where I can't hide an entire measure because the measure has values for another dimension, but I would like to hide the column that is empty. See the example below. I would like to hide the combination of Dim1 and Measure 2, and the combination of Dim 2 and Measure 3. I can't hide all columns with Dim1 and/or Dim2, or Measure2 and/or Measure3. Is there any way to hide just the column with the empty combination? Thanks.
Dim1 Measure1 Always populated
Dim2 Measure1 Always populated
Dim1 Measure2 Always null
Dim2 Measure2 Always populated
Dim1 Measure3 Always populated
Dim2 Measure3 Always nullBhawna -
That made a difference, but it still needs some work. The IfNull() function picked up every value in the columns that I wanted to hide and changed them to zero. The conditional formatting that you suggested hid the content in those columns from the HTML. However, there ended up being several issues:
1) IfNull() picked up other null values that happened to be in the resultset, so the conditional formatting was applied to more than intended. I could correct that by changing the data value in the physical database columns for the entire pivot table columns that I want hidden, but then I have to work around having bogus values in those intersections. Still, that is a possible workaround.
2) The column headers for the columns that I want to disappear did not go away. When I applied CSS display:none, it shifts the pivot table cells to the left, so a lot of the data ends up under the wrong column headings.
3) CSS display:none only hides the content from screen readers. When I view the pivot table on the dashboard and print it to a PDF, the data in the columns that I want to disappear are back.
That still seems like it's a long ways from "suppress missing data" for the entire column. Thanks for your suggestion.
Daniel -
How to freeze the selection column in the table control of the module pool.
hi ,
in my module pool there is a row selection field <b>w/selcolumn</b> of the table control called as mark.
how to freeze the selection column where there is no record in the table control row.
or in other words where wa is initial.
thanks
ektaHi all,
in the PBO of the screen the following code is written.
say the selection column is MARK and is declared in the data as well.
thanks
ekta
*************************C O D E **************************************************
MODULE disp_tabctrl1 OUTPUT.
IF flag_c = 1.
READ TABLE it_create_data INTO wa_material_data
INDEX tab_ctrl1-current_line.
ELSE.
READ TABLE it_material_data INTO wa_material_data
INDEX tab_ctrl1-current_line.
IF sy-subrc = 0.
IF ok_code_0101 = '&SEL1'.
mark = 'X'.
ELSEIF ok_code_0101 = '&DSEL'.
mark = ' '.
ENDIF.
ELSE.
LOOP AT SCREEN.
IF screen-name = 'MARK'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
index_t = tab_ctrl1-top_line.
index_d = tab_ctrl1-top_line + n.
ENDMODULE. " DISP_TABCTRL1 OUTPUT -
How to grey out one single column in a table control of TPMOE
Hi Experts,
Any body please tell me how to greyout a single column in a table control of TPMOE.
Help needed ASAP.
Thanks,
sreenivas.lr_result TYPE REF TO if_bol_bo_property_access
lr_iterator TYPE REF TO if_bol_bo_col_iterator
CALL METHOD lr_iterator->get_by_index
EXPORTING
iv_index = index
RECEIVING
rv_result = lr_result.
CALL METHOD lr_result->get_property_as_value
EXPORTING
iv_attr_name = 'TRANSFER_STATUS'
IMPORTING
ev_result = lv_status.
if lv_status = x and component = cost_category.
rv_disabled = true.
else.
call super.
endif.
INDEX will have the row number.
Frame ur logic based on this. -
How to Hide/show the columns data while doing Drill down or drill up
Hi ,
How to Hide/show the columns data while doing Drill down or drill up in webi report .
Does it possible BO 3.1 version ?
Please suggest me on this.
Thanks & Regards
VenkatWhile that is not there yet, you can make use of the show when empty yes/no in combination with alerters.
So I have an alerter applied to every cell of the table.
When a condition is true (say I drilled down) I just put = "" in every cell, emptying the table,
because its now empty and doesn't need to show, it wont.
For the detail table I use the opposite, so when you drilled down it becomes visible...
Hope this helps all that do not have 40 yet
Good luck,
Marianne -
How to delete a column from the table control in module pool?
Hi,
can any one please tell How to delete a column from the table control in module pool?
thanks in advance
warm regards
HareeshKumar Nhi hareesh,
I think it is better to hide it.
How to hide: You can check this link
Dynamic Hide column in table control -
How we can replace the column in Core Table plz see this msg
Hi,
How we can replace the column in Core Table plz see this msg
Req:
when i push the Insert button the data inserted into the Table
like
Cols Values
FOCD CUFZ14
PRDCD FU6
Month 082008
AgencyCD AG02
PLAN 123
This is FO_Plan Table....
Requirement:
i need at table show to replace the Prd_CD to Prd_Desc while inserting the above Row....
There is no Prd_Desc in FO Plan Table....
Prd_desc comes from Product Table.
did u get my point...
how to solve.
Thanks
Ram
Edited by: Ram Vungarala on Sep 24, 2008 9:09 AM
Edited by: Ram Vungarala on Sep 24, 2008 9:15 AMHi,
I'm not sure if I understood what are you trying to do. But you can modify your table in a backing bean code. JSF page code for a table:
<af:table id="product_search_results_tbl" binding="#{backingBean.boundTable}" ... />
And a backing bean code:
import oracle.adf.view.faces.component.core.data.CoreTable;
public class YourBackingBean {
private CoreTable boundTable;
public void setBoundTable(CoreTable boundTable) {
this.boundTable = boundTable;
public CoreTable getBoundTable() {
return boundTable;
public String insertButtonAction() {
// Bind your button action to this method and modify here your bound table
return null;
{code}
Look for column modification methods in a CoreTable class documentation.
Marius -
How to provide Link to Column in the Table
Hi
please let me know how to provide link to one column in the table.
i have two views
in one view i will dispaly emp id and emp dept in a table
i have to provide link to the emp id column table
when i click emp id column then it will fire other view and display remaining details of emp.
so please let me know how to provide link to column in the table.
Solution is urgent
regards
mmukeshHi Mukesh,
You can insert LinkToAction column in table.you can have two cattributes in Valuenode one is of type boolean and other is of type string(empno)
you can create eventhander in that you can fire plug to seconf view where you can displays the emp details
With Regards
Naidu -
Is it possible to change nunmber of columns dynamically in table control
Is it possible to change number of columns dynamically in table control? if so how it could be done?
Thnaks in advance.
SounderYou can update the table control in your program, the table control is a structure of the type CXTAB_CONTROL of TYPE-POOLS cxtab.
There you can hide or display column the same way you do for fields in LOOP AT SCREEN. there you will ahve to LOOP AT <control>-COLS.
TYPE-POOL CXTAB .
TYPES:
BEGIN OF CXTAB_COLUMN,
SCREEN LIKE SCREEN, "Attributes struktur SCREEN
INDEX TYPE I, "Position of a column on the screen
SELECTED(1) TYPE C, "Indicator 'column selected'
VISLENGTH LIKE ICON-OLENG, "Visualised length of a column
INVISIBLE(1) TYPE C, "Indicator 'column invisible'
END OF CXTAB_COLUMN,
BEGIN OF CXTAB_CONTROL,
FIXED_COLS TYPE I, "Number of fixed columns
LINES TYPE I, "Number of lines to display
TOP_LINE TYPE I, "Top line during next PBO
CURRENT_LINE TYPE I, "Current line during LOOP/ENDLOOP
LEFT_COL TYPE I, "Fist scrollable column after fixed area
LINE_SEL_MODE TYPE I, "Line-selection : none(0), single(1),
COL_SEL_MODE TYPE I, "Column-selection: multiple(2)
LINE_SELECTOR(1) TYPE C, "Indicator: 'With line-selection col'
V_SCROLL(1) TYPE C, "not used
H_GRID(1) TYPE C, "Indicator: 'Horizontal grid-lines'
V_GRID(1) TYPE C, "Indicator: 'Vertikal grid-lines'
COLS TYPE STANDARD TABLE OF CXTAB_COLUMN
WITH NON-UNIQUE DEFAULT KEY,
INVISIBLE(1) TYPE C,
END OF CXTAB_CONTROL,
Regards -
New columns in the table control do not appear
Hi,
We have a requirement to add two fields(columns) in a table control for a transaction upon clicking Create button and those two fields should be editable. We have added the two fields in the table control. But, they do not appear in the transaction ( If I delete an existing column, then I am able see the new column). Have checked everywhere, but not sure if I am missing something here. There is no hide statement used.
Appreciate help on this.
Thanks,
PavanHi Pavan,
What I understood is you are adding fields to the table control dynamically.\
For that you have to use field-symbols to add fields to the work area dynamically.
( If this is not your actual requirement share your code with me I will try to solve it. )
Regards,
Swaroop -
Column Header In Table Control
Hi all,
how to mentain the column header in table control,
in case of manually table control( not with wizard).
Thanks.Hi,
First just drag and drop all the fields that are to be a part of the table control. Then drag the label on the column header. Give name and text to the label.
Regards,
Nikhil -
Sort functionality using MULTIPLE columns in a table control
Hi all,
I have a custom screen with table control.Now i need to provide SORT functinality in this screen for the columns in the table control.
My questins:
1.Is it possible to seelct MULTIPLE columns in a table control for SORTING?If yes,what explicit settings do i need to do while creatng the TABEL CONTROL in the screen?DO I need to select "Column selection " as MULTIPLE??
2.How do I write the code for SORT functinonality for multiple columns?
I know how to write the code for SORTING on basis of single column .
Thanks!Hi Rob,
Thanks for the reply.
However I was thinking to apply the same logic as for single columns as follows:
types : begin of ty_fields,
c_fieldname(20),
end of ty_fields.
data : t_fields type table of ty_fields,
wa_fields like line of t_fields.
WHEN 'SORTUP'.(Ascending)
loop at TABLE tc01-cols INTO wa_tc01 where selected = 'X'.
SPLIT wa_tc01-screen-name AT '-' INTO g_help g_fieldname.
wa_fields-c_fieldname = g_fieldname.
append wa_fields to t_fields.
endloop.
describe table t_fields lines l_index.
c_count = 1.
if c_count <= l_index.
read table t_fields into wa_fields index c_count.
case c_count.
when '1'.
l_field1 = wa_fields-c_fieldname.
when '2'.
l_field2 = wa_fields-c_fieldname.
and so on depending on the no of columns in the table control...
endcase.
endif.
SORT t_tvbdpl_scr BY l_fields1 l_fields 2......l_fieldn.
Let me know if the above method will work!Also for the above method to work will the type of fields(columns on whihc sort function will be applied) matter???
Thanks again for your time. -
Add a new column in item table control of va01 screen
Hi All,
i have requirement to add new column in item table control of va01 screen 4900 for the custome field of vbap table
the required coloum is add with the help of access key
however whem i am trying to save data, that custom field is not populate
please let me know if any one had work on thisI think i solved the problem . The single way to to that is to modify the SAP standard Screen.
-
Can you programmatically change the width of columns in a table control\indicator
Is it possible to programmatically change the width of columns in a table control\indicator ie to fit to width of the data or in my case the header information.
Create a property node (or reference) and use the 'Active Cell' property to select which column you want to change and then use the 'Cell size'--> 'Width' property to change the size.
"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
Attachments:
table.vi 33 KB -
How to find the current line in the table control in module pool ?
How to find the current line in the table control in module pool ?
This is an urgent requirement? please do help me.refer to this example
REPORT demo_dynpro_tabcont_loop_at.
CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
DATA: cols LIKE LINE OF flights-cols,
lines TYPE i.
DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
DATA: itab TYPE TABLE OF demo_conn.
TABLES demo_conn.
SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
LOOP AT flights-cols INTO cols WHERE index GT 2.
cols-screen-input = '0'.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDLOOP.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
DESCRIBE TABLE itab LINES lines.
flights-lines = lines.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE read_table_control INPUT.
MODIFY itab FROM demo_conn INDEX<b> flights-current_line.</b>
ENDMODULE.
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'TOGGLE'.
LOOP AT flights-cols INTO cols WHERE index GT 2.
IF cols-screen-input = '0'.
cols-screen-input = '1'.
ELSEIF cols-screen-input = '1'.
cols-screen-input = '0'.
ENDIF.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDLOOP.
WHEN 'SORT_UP'.
READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
IF sy-subrc = 0.
SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
cols-selected = ' '.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDIF.
WHEN 'SORT_DOWN'.
READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
IF sy-subrc = 0.
SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
cols-selected = ' '.
MODIFY flights-cols FROM cols INDEX sy-tabix.
ENDIF.
WHEN 'DELETE'.
READ TABLE flights-cols INTO cols
WITH KEY screen-input = '1'.
IF sy-subrc = 0.
LOOP AT itab INTO demo_conn WHERE mark = 'X'.
DELETE itab.
ENDLOOP.
ENDIF.
ENDCASE.
ENDMODULE.
Maybe you are looking for
-
Need info on Flash to Hardware Communication via TCP/IP
Need someone to throw light on how to talk to hardware devices from flash. For instance a message needs to be sent to mobile on click of a button, looks complex but this just an example. would like to just the method that one needs to follow to achiv
-
Hi, I have a simple holding page... http://www.mjcaudioservices.com When viewed in IE7, the page displays as I have intended, with the image butted up to the very top of the page. However, I have just upgraded to IE8 and the border "0" setting I hav
-
Nvidia GeForce 7300 GT Card Drivers
I was just on the Nvidia site looking to see whether or not there was a new driver for my GeForce 7300 GT card. I've had my Mac Pro for a year now, and wasn't sure if Software Update included non-Apple stuff like updated video card drivers. Long stor
-
HELP! can't import .cr2 files
I have been trying for four hours now to import a bunch of raw image files (.cr2) from my canon EOS rebel t2i camera into aperture. When I plug the camera in I see thumbnail images of the photos, but when I import them I only see black squares with a
-
When I try to install GuideGuide extension this error message popups " This extension cannot be installed, since it conflicts with an existing one. To install this extension, please remove the extension 'GuideGuide' which has been installed in", then