Disabling a Table View
Hi Friends,
I have a requirement like this..
I need to disable(not editable) a table view's particular row based on a condition.
Is there any method or way to do this.
I am looking into the TV class for the view.
Regards,
Imran.
Hi Imran,
I think you can acheive this functionality in GET_I_<field> method. You can write some validation there, if you want to set the row as non editable. This method triggered for each row. So, i guess you need to implement the same logic for each field in the table.
Sample code:
METHOD get_i_zzkommun.
DATA: current TYPE REF TO if_bol_bo_property_access,
lv_kommun TYPE string.
rv_disabled = 'TRUE'.
IF iterator IS BOUND.
current = iterator->get_current( ).
ELSE.
current = collection_wrapper->get_current( ).
ENDIF.
TRY.
CALL METHOD current->get_property_as_string
EXPORTING
iv_attr_name = 'ZZKOMMUN'
RECEIVING
rv_result = lv_kommun.
IF lv_kommun IS INITIAL.
IF current->is_property_readonly(
'ZZKOMMUN' ) = abap_false. "#EC NOTEXT
rv_disabled = 'FALSE'.
ENDIF.
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
cx_crm_genil_model_error.
RETURN.
ENDTRY.
Thanks
Swagatika
Similar Messages
-
Disable sorting and resizing columns on table view
Is there a way to disable sorting and resizing columns on table view?
ThanksUse
setSortable(false)
setResizable(false)
on each TableColumn -
How to get the count of the entries in the table view
Hello experts,
I have got a requirement where i need to display the total number of entries present in the table view, since the result comprises of several pages. This requirement is even applicable for the filter options in the table view i.e., if i use a filter it should count the total number of entries that satisfy the filter criteria.
Thanks in advance,
Vijayalakshmihi,
its simple,just place an input field in the layout and display the cpunt in that field.
for that do as below,
first in the layout of the page where you are giving tableview tab,in the next line give
<b><htmlb:inputField id="Count"
value="<%=ln%>"
disabled = 'X'/></b>
to display the count in that input field which is disabled.
and if i am mot wrong in the Initialization event, you are writing select query right to populate internal table.
after that write,
<b>describe table it_mara lines ln.</b>
and define this ln in page attributes as type i.
do award points f it helps u,
regards,
Message was edited by:
sowjanya s -
How to make a field Mandatory in a Table view?
How to make a field Mandatory in a Table view?
The requirement is, the user should not be able to append a new Row, unless and untill he enteres the data in the column SOLD-TO. Now how do i acheive making this field madatory. Normally in Edit form view, we can go in customizing and flag Mandatory, for table view we don't have this option.
Please can anyone of you guide me in this approach?
Jagadish.GHi Jagadish,
have a look in this thread, part of the code you can use in eh_insert method or logic to write enable/disable insert button.
Re: Assignment Block Mandatory
regards
Ismail
Edited by: Ismail Shaik on Oct 21, 2009 11:36 AM -
How to make the Pager for table view as non editable?
Hi,
I am using an HTMLB pager for my table view .
It appears as Page '1' of 2 for examle.
But '1' is dispalyed in an input field.
How do I make this input field as disabled.
I just want to use the Vertical and horizontal indicators to traverse through the pages of the table view.
I do not want the user to enter the page number ..
Thanks,
SachinLook at SBSPEXT_XHTMLB sample, pages pager.bsp and pagerX.bsp.
If you use the external pager, then you can specify a format where a text string will only be displayed without an inputfield for editing. -
Hi Experts,
I have few questations in tableView(not using MVC). I am using simple forms with flologic and iterators.
1. In table View I have around 12 to 15 columns and occuping fill screen with scroll bars.Hi Ray,
For your second question
In one of my tableview I have a DDLB in a column,based on value selected in this DDLB , the next two columns that are inputfields are enabled and disabled.
The code in render cell start is:
when 'ZZREQUIRED'. <--DDLB
if p_edit_mode is not initial.
data: required type ref to cl_htmlb_dropdownlistbox.
required = cl_htmlb_dropdownlistbox=>factory( id = p_cell_id
table = m_required_ref
selection = m_row_ref->zzrequired
ons elect = 'required'
nameofkeycolumn = 'NAME'
nameofvaluecolumn = 'VALUE' ).
p_replacement_bee = required .
reqtype = required->selection .<--Read the value selected in DDLB
endif.
when 'ZZENDDA'. <--Inputfield baesd on selection in DDLB
data: obj_fr_zzendda type ref to cl_bsp_find_and_replace,
obj_zzendda type ref to cl_htmlb_inputfield,
obj_bee_zzendda type ref to cl_bsp_bee_table.
if p_edit_mode is not initial.
if reqtype = 'FROM' or reqtype = 'ON'.
clear : find , replace .
concatenate '<input on Cha nge=isitToday(this.value,"' p_cell_id '");' into replace .
find = '<input' .
replace = replace.
obj_fr_zzendda = cl_bsp_find_and_replace=>factory( find = find
replace = replace
mode = `FIRST_OCCURRENCE` ).
obj_zzendda = cl_htmlb_inputfield=>factory( id = p_cell_id type = 'date' showhelp = ' ' disabled = 'true' ).
obj_zzendda->value = m_row_ref->zzendda.
create object obj_bee_zzendda.
obj_bee_zzendda->add( level = 1 element = obj_fr_zzendda ).
obj_bee_zzendda->add( level = 2 element = obj_zzendda ).
p_replacement_bee = obj_bee_zzendda.
endif.
clear reqtype.
endif.
Where reqtype is defined in attributes as Instance Public String
Similarly you can read the value of one column in your tableview and enable or disable all other fields in that row depending on its value.
Regards,
Anubhav -
Dynamically Hiding Column in a Table View in VC Model
How to dynamacally hide the columns in a table view in a VC model. Through the expression in Control Property, Form element/field or table view as a whole can be made hidden, however, the individual column can not seem to be hidden.
I am using VC server version 700.8.0.1.
Any help would be much appreciated.
Kind Regards
SanjoyIn this scenario, if the source is SAP BI, you can use the webapi commands. If not, you would have to have 2 separate tables in different layers and you can show and hide those layers or UI elements...
-
How to use a Table View in AppleScriptObjC
How can I use a table view and add data to it? And how can I display a button cell and image cell in the table? Thanks.
Hi all,
Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
for ex : select * from (tab_name) where....?
Can we do inner join on such select statements? If so how?
Thanks & Regards,
Mallik. -
Deleting data from a table view
I have a data source that is in dictionary form (for why, see here). I have the following code that gets called in the commitEditing method for the table view:
- (void)removeObjectFromListAtIndex:(NSIndexPath *)indexPath {
NSMutableDictionary *mutableDataDictionary = [[NSMutableDictionary alloc] initWithDictionary:[listContent mutableCopy]];
dNSLog (@"listContent: %@, mutableDataDictionary: %@", listContent, mutableDataDictionary);
dNSLog (@"indexPath.section is %d", indexPath.section);
NSString *section = [[NSString alloc] init];
switch (indexPath.section) {
case 0:
dNSLog (@"Case Zero");
section = @"A";
break;
case 1:
dNSLog (@"Case One");
section = @"B";
break;
case 2:
section = @"C";
break;
case 3:
section = @"D";
break;
case 4:
section = @"E";
break;
case 5:
section = @"F";
break;
case 6:
section = @"G";
break;
case 7:
section = @"H";
break;
case 8:
section = @"I";
break;
case 9:
section = @"J";
break;
case 10:
section = @"K";
break;
case 11:
section = @"L";
break;
case 12:
section = @"M";
break;
case 13:
section = @"N";
break;
case 14:
section = @"O";
break;
case 15:
section = @"P";
break;
case 16:
section = @"Q";
break;
case 17:
section = @"R";
break;
case 18:
section = @"S";
break;
case 19:
section = @"T";
break;
case 20:
section = @"U";
break;
case 21:
section = @"V";
break;
case 22:
section = @"W";
break;
case 23:
section = @"X";
break;
case 24:
section = @"Y";
break;
case 25:
section = @"Z";
break;
default:
dNSLog (@"Default");
section = nil;
break;
if (mutableDataDictionary) {
NSMutableArray *arrayForNameSection = [[[NSMutableArray alloc] initWithArray:[mutableDataDictionary objectForKey:section]] mutableCopy];
[arrayForNameSection removeObjectAtIndex:indexPath.row];
NSArray *array = [[NSArray alloc] initWithArray:arrayForNameSection];
[mutableDataDictionary setObject:array forKey:section];
listContent = [NSDictionary dictionaryWithDictionary:mutableDataDictionary];
[array release];
[arrayForNameSection release];
[section release];
[mutableDataDictionary release];
The code works flawlessly the first time through, but when I try to delete a second item, it crashes with a CALayer exception involving copyWithZone. The analyzer in Xcode (3.2) is telling me something's going on with the NSString section, but I'm not sure what...I'd appreciate any help!
BTW, Ray if you happen to get this, the code is identical to what I emailed you, except that I added this code. The method name is the same.I have a data source that is in dictionary form (for why, see here). I have the following code that gets called in the commitEditing method for the table view:
- (void)removeObjectFromListAtIndex:(NSIndexPath *)indexPath {
NSMutableDictionary *mutableDataDictionary = [[NSMutableDictionary alloc] initWithDictionary:[listContent mutableCopy]];
// What happens to the mutableCopy? Looks like a leak.
dNSLog (@"listContent: %@, mutableDataDictionary: %@", listContent, mutableDataDictionary);
dNSLog (@"indexPath.section is %d", indexPath.section);
NSString *section = [[NSString alloc] init];
// Memory leak because in all cases you re-assign the variable.
// Arrrgggg!
NSString * section = nil;
if((indexPath.section >= 0) || (indexPath.section < 26))
section = [NSString stringWithFormat: @"%c", 'A' + indexPath.section];
switch (indexPath.section) {
case 0:
dNSLog (@"Case Zero");
section = @"A";
break;
case 1:
dNSLog (@"Case One");
section = @"B";
break;
case 2:
section = @"C";
break;
case 3:
section = @"D";
break;
case 4:
section = @"E";
break;
case 5:
section = @"F";
break;
case 6:
section = @"G";
break;
case 7:
section = @"H";
break;
case 8:
section = @"I";
break;
case 9:
section = @"J";
break;
case 10:
section = @"K";
break;
case 11:
section = @"L";
break;
case 12:
section = @"M";
break;
case 13:
section = @"N";
break;
case 14:
section = @"O";
break;
case 15:
section = @"P";
break;
case 16:
section = @"Q";
break;
case 17:
section = @"R";
break;
case 18:
section = @"S";
break;
case 19:
section = @"T";
break;
case 20:
section = @"U";
break;
case 21:
section = @"V";
break;
case 22:
section = @"W";
break;
case 23:
section = @"X";
break;
case 24:
section = @"Y";
break;
case 25:
section = @"Z";
break;
default:
dNSLog (@"Default");
section = nil;
break;
if (mutableDataDictionary) {
NSMutableArray *arrayForNameSection = [[[NSMutableArray alloc] initWithArray:[mutableDataDictionary objectForKey:section]] mutableCopy];
// Get rid of this copy too.
[arrayForNameSection removeObjectAtIndex:indexPath.row];
NSArray *array = [[NSArray alloc] initWithArray:arrayForNameSection];
[mutableDataDictionary setObject:array forKey:section];
listContent = [NSDictionary dictionaryWithDictionary:mutableDataDictionary];
// This is autoreleased. You might want to retain it.
[array release];
[arrayForNameSection release];
[section release];
[mutableDataDictionary release]; -
Error while creating a hyperlink for a field in a table view
Hi all,
I have created a table view to display the lead information.Now i wanted to make the lead number to be made as a hyperlink.I have tried the delow code
<htmlb:tableView id = "tvX"
headerText = "Leads Details"
headerVisible = "true"
design = "alternating"
visibleRowCount = "5"
visibleFirstRow = "<%= firstvisiblerow %>"
fillUpEmptyRows = "true"
onHeaderClick = "MyEventHeaderClick"
onRowSelection = "select"
selectionMode = "singleselect"
table = "<%= activities %>"
iterator = "<%= z_it %>"
sort = "SERVER" >
<htmlb:tableViewColumns>
<htmlb:tableViewColumn
columnName = "object_id"
type = "link" >
</htmlb:tableViewColumn>
</htmlb:tableViewColumns>
</htmlb:tableView>
But am getting the following error whlle am activating the code
Internal error occured during runtime generation
of Class CL_O2D59X6KFES8AMMPAFQ6AV1R3WF (Dump ID:
DBIF_REPO_SQL_ERROR).
When i remove the code for <htmlb:tableViewColumns> this error does not exist
Can canyone help me in solving this?
ThanksHi,
in iterator method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
you need to call method cl_hrrcf_iterator=>get_bee_link to define the link for a specific filed.
for example check the below code.
IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
CASE p_column_key.
WHEN 'PERNR'.
CALL METHOD cl_hrrcf_iterator=>get_bee_link
EXPORTING
p_cell_id = p_cell_id
p_onclientclick =link_url
p_column_key = p_column_key
p_row_data_ref = p_row_data_ref
p_tooltip_alias = l_alias
IMPORTING
po_bee = p_replacement_bee.
ENDCASE.
endmethod.
vijay -
Access the nodes data in a table view (generated by aet).
Hi all ,
I have created a table view in bp overview page.
so it has created new component /ztable/zbol entity .
Now how can i access the nodes of BP page..in the new component created?.thanks vishal ,
but as per the thread,when we create table view using aet ,
Table view in EHP1 CRM 7.0
You dont need to worry about the component usage nor you need to create or handle anything like that for AET compoent for table extension. SAP has a special way to handle it in WD_USAGE_INITIALIZE of component controller for AET extension generated component so its nothing for us to do about it. Thanks to SAP
so still i need to redefine..or can directly access the nodes in do_prepare_output.? -
Hi,
I need to hide data in a table..Only column headers required to display.. I tried by (display column headers only) in view..It is showing only column header in the view ..But when iam displaying the table in dashboard it displays data also..another approach i took is to hide data from column properties ...Custom css display:none.. it is working fine..But the thing is it will not display data in other views also.I need to hide data only in table view..any helps will be appreciated.. Thank youHi Aswin,
Try this....
Take columns twice and first set which is use in table view (use display:none)
and second set use in pivot table and exclude first set columns........
Cheers,
Aravind -
BSP: How to create check box in a column of a Table View
Hi All,
I have a table view in Web IC scenario. my requirement is to display check box in one of the column of the table view.. so that i can select multiple lines from the table and do some calculations!.
Anybody have any hint/clue
Thanks in advance,
sudeep v d.Hi,
This can be achieved by using a Table iterator.
Please check the standard examples for this.
Thanks,
Rashmi. -
How do I use the option "table view" in NetWeaver 2004s Query Designer?
Dear,
We have used NetWeaver 2004s Query Designer, We found a strange problem. The option to select table view is not available. It is greyed out. How can you select table view (tabular) in 2004s Query Designer?
I have read the help doc about tabular view of NetWeaver 2004s Query Designer, I check my query, it has only one structure . but the option is still greyed out. I rebuild the query with 3.x Query Designer in tabular view, and reopen it with 2004s Query Designer, So there is a tab named "tabular view" display, but the option to select table view is still not available, and when users view the query result in web , it is still not in tabular view display. So I am confused, is there a bug with NetWeaver 2004s Query Designer?
Please help me. Thanks!Note 1002271. Seach this note to use key word "table view"
-
How to get the List of Database Objects (Table/View) for a given APEX Page.
Hi,
I have an application and that consist of pages like page1,2,3,.....
*1.* I want a report which can give me the list of all the Pages1,2,3,....
I am using the following query to acheive this.... THIS IS FINE..
select a.workspace, a.owner, a.application_name, b.page_id, b.page_name
from apex_applications a,
apex_application_pages b
where a.workspace = b.workspace
and a.application_id = b.application_id*2. Now, I want for each individual page*, the list all the database objects (tables/views), which that page is using.
I am using ALL_DEPENDENCIES , but I am not getting the result.
So, want to know if there any view/table, where I can get the Application Pages & there database object list...
Thanks,
DeepakHari,
Thanks for the response.
The view APEX_APPLICATION_PAGE_DB_ITEMS will only give me the table name related to any Page Items defined to that page..It will not give me all the database objects..
suppose we have a Page, having a report based on multiple tables and there is no Page items defined on that page, we will not have any value in this ....DB_ITEMS table. same thing if we have define some PL|SQL(using some table/view) in a Process, that will not be populated in .....DB_ITEMS table. I want some thing like all the database objects (table/views/function/procedure/.....) for a particular Page ID.
Thanks,
Deepak
Maybe you are looking for
-
Open a URL from InDesign (JS OSX CS3)
Hi -- I have some limited experience javascripting In InDesign. Most of what I have done focuses on text and documents, so I need to ask a question that is outside my current experience. I am trying to write an Indesign script that when deployed by a
-
AFAR test run showing the values but not posting in Real run.
Hi Friends, i have an issue with AFAR recalculating the depreclation. The details are as below; 1. Asset value date is 15.07.2010. but ordinary dep. start date was set as 01.01.2010 manually by the user. 2. The Period control method 11, the dep. is c
-
To not allow billing cancellation when the invoice is cleared
Hello I would like to know if there is any way to avoid the cancellation of an invoice via VF11 when the invoice has been already cleared. Thanks in advance.
-
Why won't chapter markers in FCP5 import to idvd6?
I recently imported a video project that I created in FCP5 into iDVD6 for DVD authoring. I put chapter markers in the video project with the idea that IDVD6 would create the sub menus. For some reason they are not showing up. I've checked the appropr
-
i can't download or update free apps on my ipad or iphone. i can log in to my i-store account on my laptop and download stuff. when i try on the iphone or ipad i keep getting apple ID disabled message. i had to enter in my account and new password t