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.
Sounder
You 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
Similar Messages
-
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 -
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. -
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 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. -
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 -
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.
-
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 -
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 -
How to change/remove Details column in a table?
Hi,
I need to build an interface where the user would be able to review summary information on some records and edit them one in detail mode.
This all works very nice through detailDisclosure but it also automatically includes a Details column which I do not seem to be able to manipulate in any way.
Ideally I would like to replace the Details column with one called Action and positioned as last column in the table and replace the "Show" and "Hide" links with "Edit" and "Cancel" buttons... I am able to add the column with the buttons and they work just as expected as long as the table is defined with its <detail>...</detail> section in the .uix file, however that also triggers the addition of Details column, which is not desirable.
I have used JHeadstart to create the page and then edited the UIX file for the page in order to add the buttons.
Is what I am trying to do possible at all with <table>? The functionality I need is all there. I just cannot make it look the way I want on the screen because of that Automatically inserted Details column. If not possible to
remove it completely is there a way to change the title and replace Show and Hide with something else? Preferably icons?
Thanks!This has been much discussed earlier. Do search posts.
For your scenario i would do the following.
inside your node which is binded to the table, i create a new node image with cardinality 1 ..1 and a attribute called path of type string.
create a supply function for the node image .
Supply method now has a Element (Parent element ) and node.
Based on your record in element, set the right image source to path attribute and bind the node.
This will make sure that the framework calls the image supply function for every row in a table. -
Error while trying to change the Column description in Table Control
Hi,
I have created a table control using the wizard in Module Pool.
When i try to change the column description of the table control or adjust any other element which is already available on the screen and not in table control. It gives me an error
Unable to transfer data. End Program?
Any help would be appreciated.
Thanks
Sarves S V KHi.,
Check these [Table Control Change Column Description|Add new columns in table control in custom screen program;
and [Add Columns in Table Control|Re: Table control columns]
else delete and create Table control Again..!!
hope this helps u.,
Thanks & Regards,
Kiran -
How to change color of column in advanced table
Hi Guys
I need to change the color of column in advanced table.
Please help me .
Thanks
SubramanianHi
Can you please give the sample code for this
I created advancedtable
under this advancedtable , I created columngroup
under this columngroup
I created column1 and column2
Here I need change the color for entire column1.
Thanks
Subra -
Background color change of a column in Advance table
Hi,
We have requirement to change the background color of column in advance table based on some condition. We tried putting code to change background color in Custom.xss using background-color property and setting newly created css dynamically based on condition but it seems it only changes the background color of text not the complete cell. We want to change the color of complete cell in an advance table.
Please let me know if there is any other way I can achieve this requirement. Any help would be highly appreciated.
Thanks<FONT FACE="Arial" size=2 color="2D0000">
Pls look into "Alter Table"section.
LOB_storage_clause
This might help
-SK
</FONT> -
Changing the column postion in table control
Hi All,
In table control i want to change the columns postion according to users requirement.
How to do that?
Thanks for advance.
Regards,
krishnaHi,
In the top right hand side of the table control..there will be button for variant..
there you can create a variant..in the variant..you can move the columns around and save it as variant..then they can choose the variant..
Thanks
Naren -
Why can't i change row and column height in tables?
a mind-boggling problem to be sure. For some odd reason, I can't use the inspector to type in row/column heights for tables. I can use the up/down arrows, but those only work in increments of 1. I can manually adjust them one by one but as soon as I edit text in a different table cell, I have to start all over again. Does anyone else have this problem?
Hi Gerry & Ric
I had already tried both of your suggestions without any luck but I appreciate the help anyway. I should've been a bit more specific: I can actually type in the column/row height windows, but when I press return or tab, Pages ignores the numbers. I've tried using both the number pad and the regular keyboard numbers and every manner of clicking, enter, tab, control, alt......there must be some setting with my computer that is causing an incompatibility with Pages. Boh!
Susie
Maybe you are looking for
-
System launchd agent error starting/stopping system processes
I installed PHP 5.4 via brew package manager. I kept the system Apache & configured it to work with this version of PHP rather than the system copy. I used launchctl (sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist) to loa
-
Sending pdfs from Mac Mail to Outlook
I have users that are sending pdfs from mac mail to outlook and the attachements are not going through. All you see is the paperclip and nothing else. This has just started happening. I am telling the users to send emails as plain text with window
-
Error when installing apex 4.2.2
Hi All, I know it's a quite new version of APEX but we have decided to upgrade our current version (4.1.1) to the new 4.2.2. I downloaded it from this link (OTN). I unzipped downloaded file in: /usr/lib/oracle/xe/ (Renamed previous APEX version folde
-
Urgent Help Needed with Adobe Reader
I exported a single page of a document to adobe reader as a PDF file, and the document was deleted shortly there after. I now realize I need a few more pages from this document, so would there be any way to extract all the pages from the document fro
-
Error on creating process order
Hello All, I am new to PP-PI module. I have created resources and master recipe without Xsteps for a finished material. Now when i create a process order for this material i am getting an error "No control data maintained for checking group 02 and c