Table Views - Referencing data rows
I have a table view set up where files are selected from a path and placed into the table and reordering. This works fine. However, I need to now perform other tasks on those files (in the order that they now exist in the table) and I don't know how to reference and call data source. Part of my script:
else if name of theObject = "choose" then
set theFolder to choose folder with prompt "Choose the folder containing the files" default location (path to desktop) without invisibles
tell application "Finder"
set theFiles to every file of theFolder
set theTableViewContents to {}
repeat with aFile in theFiles
tell aFile to set end of theTableViewContents to {its name, it as text}
end repeat
end tell
tell window "merger"
set content of table view 1 of scroll view 1 to theTableViewContents
end tell
end if
set allows reordering of table view 1 of scroll view 1 of window "merger" to true
set allows multiple selection of table view 1 of scroll view 1 of window "merger" to true
===============
Prior to setiing up a table, a typical task was initiated immediately after the files were selected. One of the scripts:
tell application "Finder" to set files_ to files of folder_ as alias list -- *this now needs to reference the updated contents of table - folder_ no longer exists*
--set files_ to items 1 thru 2 of files_
try
set file_ref to open for access output_ with write permission
repeat with file_ in files_
set text_ to read file_
write (text_ & return) to file_ref starting at eof
end repeat
try
close access file_ref
end try
on error e
display dialog e
try
close access file_ref
end try
end try
Thanks so much.
Hi friend,
To import a view follow nexts steps on administration tool:
- File -> import -> from database
- Select correct connection type (at the same way when you import a table).
- Enter correct user and password.
- Go to correct schema which contain data base elements.
- Select check box "Views". Now it will appear views created in that schema.
Good luck.
Similar Messages
-
Build view with data rows from one of two views.
Hello. I've got problem with PL/SQL.
I have built two PL/SQL views. Now I have to write a third
view based on the data from "view_1" or "view_2". "view_2" contains all data rows
but "view_1" contains special information. If the needed data rows (it's
always a tupel of two rows) are available in "view_1" i have to use these data.
Are they not available in "view_1" i have to get it from the second view.
I've tried it with the DECODE function and a procedure I've written but I think it's
the completly wrong way because I have to search for a tour_id and there are always
two shipments for one tour.
It looks something like:
>
SELECT
DECODE(FNC_OPERATION_INSTRUCTION_EXISTS(T1.TOURNO),0,
(SELECT SHIPPING_NO
FROM VIEW_SHIPPINGADRESS
WHERE TOUR_ID=TO_CHAR(T1.TOURNO)),
(SELECT SHIPPING_NO
FROM VIEW_SHIPPINGADRESS_OPERATION_INSTRUCTION
WHERE TOUR_ID=TO_CHAR(T1.TOURNO)) "SHIPPING_NO"
FROM
TB_TOURS T1
WHERE
But for sure I've got the error "ORA-01427: single-row subquery returns more than one row."
because there are always two rows for one T1.TOURNO.
I think that it's a standard problem but I also think that I'm on the wrong way.
I will be very thankful for any hint.
Thanx,
Christophselect col1,
col2,
col3
from (select (select decode(count(*),0,0,1) cnt
from view_1
where ...)) chk,
col1,
col2,
col3
from view_1
where ...) tab1
where tab1.chk = 1
union all
select col1,
col2,
col3
from (select (select decode(count(*),0,0,1) cnt
from view_1
where ...)) chk,
col1,
col2,
col3
from view_2
where ...) tab1
where tab1.chk = 0note: untested. -
Table views as data source to imported in OBIEE
I have a data source that consist of tables view and packages and function and I needed to import them into OBIEE physical layer. I never imported tables view into the physical layer , so I will like some help. As far as the packages and functions, how do you deal with them when importing the tables view in OBIEE?
Hi friend,
To import a view follow nexts steps on administration tool:
- File -> import -> from database
- Select correct connection type (at the same way when you import a table).
- Enter correct user and password.
- Go to correct schema which contain data base elements.
- Select check box "Views". Now it will appear views created in that schema.
Good luck. -
Lock rows and columns header in a table view report. It is possible?
hi,
I have a Dashboard that displays a report in "Table View" with many rows and columns.
Is it possible to set a lock on the rows and columns like Excel?
This would have blocked such headers that contain attributes and measures and to browse the report (eg with a scroll bar) had always viewed the headers.
Can you help me?
Thankshi,
please go through this discussion
Re: SCROLL BAR to FREZZ HEADERS
thanks,
saichand.v -
Data Extraction from SAP R/3 Table View in BW
Dear All,
I am trying to create a BW query from SAP R/3 Table View.
Till now i have created a table view
Extracted Data source in R/3 Useing Tcode : RSA3
In BW Side
1. I have replicated the data source in Source system
2. Created info object
and info object catalog
and assigned it
Now i am little confused over what to do next
wheather to create ODS object in info cube,
Please guide me with rest of steps to follow.
Regards,
GauravHi,
After replicating DS in BW, you have to maintain ODS or Cube for maintaining data in BW.
After loading data into Data Targets you can create Reports based on those Data Targets.
For better reporting performance you can create Cube rather ODS.
Info Source(After Creating info Objects, you have to create a Transfer Structure to map the Fields.)
Then create a Data Target ODS/Cube.
Update rules
Info Package
Hope it helps you .
Let us know if you still have any issues.
Reg
Pra -
In table view, how to add one button for selecting page?
Hi Experts,
In the OBIEE 11.1.1.6, we have one uncommon requirement that customers want to randomly select actual page to view expected data in table view.
For example:
We make use of some columns to create one report in table view, and set 'Rows per Page' equal to '5',
if this report contains 60 rows, it will have 12 pages, so customers want to select sepcial page number to view the some data. Is it possible to implement this requirement? Maybe we should write JS code.
Note: Below table view, it has four buttons: First Row, Previous Row, Next Row and Display (500) rows in per page. So we want to add one button to select per page.
We look at orgnial codes in WebBrowse, but do not know the following codes derive from which JS file.
Could you please tell me how to find this file?
<td class="TapeDeckCell"><img class="TapeDeckImage" onclick="" onkeypress="" src="res/s_blafp/viewui/pivot/first_dis.png" title="" alt="" ><img class="TapeDeckImage" onclick="" onkeypress="" src="res/s_blafp/viewui/pivot/previous_dis.png" title="" alt="" ><img class="TapeDeckImageEna" onclick="PTRowScroll('saw_5083_b','5','5', event)" onkeypress="PTRowScroll('saw_5083_b','5','5', event)" src="res/s_blafp/viewui/pivot/next_ena.png" tabIndex="0" onmouseover="PTTD(event, 'res/s_blafp/viewui/pivot/next_ovr.png');" onmouseout="PTTDO(event)" onmousedown="PTTD(event, 'res/s_blafp/viewui/pivot/next_dwn.png');" title="Next 5 Rows" alt="Next 5 Rows" ><img class="TapeDeckImageEna" onclick="*PTRowScroll*('saw_5083_b','-1)', event)" onkeypress="PTRowScroll('saw_5083_b','-1)', event)" src="res/s_blafp/viewui/pivot/showallrows_ena.png" tabIndex="0" onmouseover="PTTD(event, 'res/s_blafp/viewui/pivot/showallrows_ovr.png');" onmouseout="PTTDO(event)" onmousedown="PTTD(event, 'res/s_blafp/viewui/pivot/showallrows_dwn.png');" title="Display maximum (500) rows per page" alt="Display maximum (500) rows per page" > <Span class="TapeDeckRecords">Rows 1 - 5</Span></td>Hi Kobe,
Thanks for listening me.
I agree 11g have some issues unlike 10g. I've tried the same by creating a measure rcount(1) and name it as Page in RPD. I just pulled column Page in pivot table section 'Pivot Table Prompts' it is working but this may not answer your requirements.
I would suggest to use the column in Prompt and go by between operator to allow user to select the rows between.
In the report make Page as prompted.
If you are okay with this can look forward to tweak it further, like values in the prompt multiple of 5 or 10s some thing like that.
let me know updates on the same. -
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 -
How to get the value from the Input field of the Table view.
Hi Experts,
I have created a table view with 10 rows and each rows contains input fields in it.Can you please help me getting the values that are entered in all 10 rows.
Currently I am using the below code,but using the below I am able to get only the first row details of the table.
lo_el_table->get_static_attributes(
IMPORTING
static_attributes = ls_table).
Please let me know you suggestions on this.Thanks in advance.
Regards,
ArunHi Arun,
You should use this method:
lo_nd_table->get_static_attributes_table(
IMPORTING
table = lt_table).
Cheers,
Roelof
http://www.nl4b.com -
ADF View - Updated key values not updating referenced data in view (JSP)
I have a many-to-many relationship that links 2 tables (2 mandatory and 1 optional).
Relationship 1 is created via a view link.
Relationship 2 is selected from a view.
The optional relationship (3) is required based on a flag in the corresponding row for relationship 2.
To achieve this I have a page with 2 steps, step 1 selects relationship 2 and then the page decides whether relationship 3 is required or not.
The many-to-many relationship is created via a VO that contains the many-to-many table and references and includes some attributes from the other tables.
When I first select the relationship 2, the attributes from the referenced table are then set within the VO and by looking at these I can make my decision.
Now here's the problem....
If I go back and select and different relationship 2, the Id attribute (for the many-to-many table) is updated but the attributes are unchanged, this means that the flag I need to check is invalid.
Also, when I then select the appropriate value for relationship 3 (if required), the associated Id attribute is set but the referenced attributes from this table are not set (these are needed for other purposes).
Is there some setting I'm missing?
Is there some call I need to make to update the referenced data?
I know I could make all of my decisions based on the VOs that I am selecting from but it's much simpler (and less code) to just use the 1 view (less chance of bugs) - plus i'd like to understand why this is not working.
Thanks
AlI don't need to check it for data integrity reasons, I need to check the contents of certain values to determine what to do next, before i commit the data.
For example, if flag a is set then ask for extra information 'X' otherwise ask for extra information 'Y'. -
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]; -
Can't view my data on my table in EM
Can anyone tell me why I am getting the error below after executing my control file and also why I can't view that data which was loaded.
SQL*Loader: Release 10.2.0.1.0 - Production on Thu Jul 12 16:28:57 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: workattribute2.ctl
Data File: workattribute.dat
Bad File: workattribute.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table WORKATTRIBUTE, loaded from every logical record.
Insert option in effect for this table: APPEND
Column Name Position Len Term Encl Datatype
RESUMEID FIRST * CHARACTER
Terminator string : 'x'09''
WORKID NEXT * CHARACTER
Terminator string : 'x'09''
ID NEXT * CHARACTER
Terminator string : 'x'09''
TYPE NEXT * CHARACTER
Terminator string : 'x'09''
Record 1: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 2: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 3: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 4: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 5: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 6: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 7: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 8: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 9: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 10: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 11: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 12: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 13: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 14: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 15: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 16: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 17: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 18: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 19: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 20: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 21: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 22: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 23: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 24: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 25: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 26: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 27: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 28: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 29: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 30: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 31: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 32: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 33: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 34: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 35: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 36: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 37: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 38: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 39: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 40: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 41: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 42: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 43: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 44: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 45: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 46: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 47: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 48: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 49: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 50: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
Record 51: Rejected - Error on table WORKATTRIBUTE, column RESUMEID.
Field in data file exceeds maximum length
MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
Table WORKATTRIBUTE:
0 Rows successfully loaded.
51 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 66048 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 51
Total logical records rejected: 51
Total logical records discarded: 0
Run began on Thu Jul 12 16:28:57 2007
Run ended on Thu Jul 12 16:29:05 2007
Elapsed time was: 00:00:08.09
CPU time was: 00:00:00.12
thank you in advanceHi User572297,
This is the wrong forum for a SQL Loader Q, not a bad thing, you just won't get as many responses.
That said, it seems either your terminator string is not present, incorrect or you are simply trying to load to many characters into a column that is too small. For ex: trying to load 50 characters into a Varchar2(40). You get this error for every row, hence you can not see any of the data, becuase none of the rows loaded. See below:
0 Rows successfully loaded.
51 Rows not loaded due to data errors.
What would help is to know the datatype and size of the RESUMEID column AND to see the first lines of your workattribute.dat file. -
How to make a single row as editable in a table view?
Hello Friends,
As per the requirement,i have created a new table view with table row level actions. But I am able to achieve the delete functionality. But for edit action, if i lock the corresponding entity also it is not becoming as edit.
Let me know any ideas to achieve this??
Thanks in Advance.
Regards,
RaviHi Raviteja,
In your row level buttons if you want to edit a row you have to fallow this steps..
1) get the selected record by using index.
2) get the action mean which action you want to perform ( edit or delete like).
3) lock the current entity.
4) get the custom or comp controller instance based on get the current record.
5) edit the row..
sample code for this..
DATA:
lv_index TYPE int4,
lr_current TYPE REF TO if_bol_bo_property_access,
lr_entity TYPE REF TO cl_crm_bol_entity,
lv_event TYPE string,
lv_dummy TYPE string,
lr_core TYPE REF TO cl_crm_bol_core,
lv_one_click_lock TYPE sysubrc,
lr_col TYPE REF TO if_bol_bo_col,
lr_coco TYPE REF TO component ctrl class name (impl class),
lr_cuco TYPE REF TO custom cntrl class name ( impl.)
CALL METHOD cl_thtmlb_util=>get_event_info
EXPORTING
iv_event = htmlb_event_ex
IMPORTING
ev_index = lv_index.
CHECK lv_index IS NOT INITIAL.
* Get the current entity
lr_entity ?= me->typed_context->urcnode->collection_wrapper->find( iv_index = lv_index ).
CHECK lr_entity IS BOUND.
* Get the action clicked on
SPLIT htmlb_event_ex->event_defined AT '.' INTO lv_event lv_dummy.
* Try to lock the current entity
lv_one_click_lock = cl_crm_uiu_bt_tools=>set_one_click_lock( me->typed_context->cnode->collection_wrapper ).
CASE lv_event.
* Edit the current Partner
WHEN 'EDIT'.
IF lv_one_click_lock <> 2 AND lr_entity->is_send_active( ) = abap_true.
lr_coco ?= me->comp_controller.
CHECK lr_coco IS BOUND.
lr_current = lr_coco->typed_context->cnode->collection_wrapper->find( iv_bo = lr_entity ).
* if entity is not yet there: add it to component controller collection
IF lr_current IS NOT BOUND .
lr_coco->typed_context->cnode->collection_wrapper->add( lr_entity ).
lr_current = lr_coco->typed_context->cnode->collection_wrapper->find( iv_bo = lr_entity ).
ENDIF.
CHECK lr_current IS BOUND.
lr_cuco ?= me->get_custom_controller( 'compname/cnameCuCo' ). "#EC NOTEXT
lr_cuco->typed_context->cnode->on_new_focus( lr_current ).
me->set_editable( ).
ENDIF.
if this is not work then go through this link..
OCA edit button problem
Thanks & Regards,
Srinivask -
Is there a way to open SSRS 2005 tree view in a table in a Details row upward?
Hi.
I building some reports with SSRS, and showing data in a table. The table has one Details row that forms at the end multiple rows with the tree view (+ and -).
Is there a way to open the tree view upwards and not downwards so that the children of level 2, 3 etc come over the parent row?
I've goggled it everywhere, but I don't seem to find the answer. If anyone could help me out, I would appreciated.
Thanks
NoviHi again.
And by the way, this is a parent child hierarchy. I have made a group details row with a "ParentUniqeName" on Parent Group text box and "UniqueName" on the Group On expression box by using Edit Group menu.
In addition, there is a drill down functionality on the table.
Now, it seems that the order of the items is correct, I just want it to have the opposite order.
Thanks again...
Novi -
To determine the number of rows selected in a table view (BSP)
Hi,
My requirement is:
I would be selecting 1 row from a table view ( which is made multiselect for another requirement) , and press a button.
The functionality of button is to open a popup window based on the row selected.
I want to display an error message if more than 1 row is selected, and button is clicked.
Message will say that "you cannot select more than 1 row".
For this, I need to know how I can get the number of selected rows in a table view.
I tried using the below code.
But I feel this will work only in DO_HANDLE_DATA method.
The popup would open, even before control comes in this method.
CALL METHOD cl_hrrcf_iterator=>get_tv_index
EXPORTING
p_id = p_tableview_id
pt_form_fields = table_form_fields
IMPORTING
pt_indices = sel_row_index_tab.
Could you please provide me with a solution.
Quick replies will be highly appreciated.
Thanks,
Nisha Vengal.Hi ,
Your TV :
<htmlb:tableView id = "tv1l"
design = "alternating"
visibleRowCount = "10"
fillUpEmptyRows = "true"
onRowSelection = "MyEventRowSelection" <----This is the event you have to use
selectionMode = "MULTILINEEDIT"
filter = "SERVER"
table = "<%= some table %>" >
in DO_REQUEST:
DATA: tv TYPE REF TO cl_htmlb_tableview,
tv_event TYPE REF TO cl_htmlb_event_tableview ,
event TYPE REF TO if_htmlb_data.
event = cl_htmlb_manager=>get_event( request ).
IF event IS NOT INITIAL AND event->event_name = htmlb_events=>tableview.
tv_event ?= event.
CASE event->event_server_name.
WHEN 'MyEventRowSelection'.
count = count + 1 .
if count ne 1 .
errmsg = 'Your message'.
endif.
ENDCASE.
ENDIF.
in View/Layout:
<% if errmsg is not initial. %>
<s cript t y p e = t e x t / j a v a s c r i p t >
a l e r t ("<%= errmsg %>") .
</ s c r i p t>
<% clear errmsg. %>
<% endif. %>
errmsg is a class attribute of type string and count is also a class attribute of type c .
Regards,
Anubhav.
Reward if useful
Edited by: Anubhav Jain on Sep 19, 2008 3:08 PM -
Adding a button in each row of table view
Hi.
In my application i have to add a button in each row of table view. i have done this by using UICatalog example. now problem is how I can handle the click events of these buttons.
suppose i have 5 buttons in 5 rows ... now one of them is clicked(suppose button in 3rd row). how would i know that button in 3rd row is clicked.
Muhammad Usman Aleem- (UITableViewCell)tableView:(UITableView)tableView
cellForRowAtIndexPath:(NSIndexPath*)indexPath {
static NSString *CellTableIdentifier = @"CellTableIdentifier ";
static NSUInteger nTag = 100;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:
CellTableIdentifier];
if (cell == nil) {
CGRect cellFrame = CGRectMake(0, 0, 300, 65);
cell = [[[UITableViewCell alloc] initWithFrame:cellFrame
reuseIdentifier:CellTableIdentifier] autorelease];
CGRect labelRect = CGRectMake(10, 26, 190, 15);
UILabel *label = [[UILabel alloc] initWithFrame:labelRect];
label.textAlignment = UITextAlignmentLeft;
label.font = [UIFont boldSystemFontOfSize:12];
// set all label tags to 10 so the label can be found in the subviews
label.tag = 10;
[cell.contentView addSubview:label];
[label release];
CGRect buttonRect = CGRectMake(210, 25, 65, 25);
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame = buttonRect;
// set the button title here if it will always be the same
[button setTitle:@"Action" forState:UIControlStateNormal];
button.tag = nTag++;
[button addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
// make sure the button is the lowest subview so it's easy to find
[cell.contentView insertSubview:button atIndex:0];
// button will be autoreleased so don't release it here
// the label text and button title come from an array of NSDictionary in this example
NSUInteger row = [indexPath row];
NSDictionary *rowData = [self.data objectAtIndex:row];
UILabel *thisLabel = (UILabel*)[cell.contentView viewWithTag:10];
thisLabel.text = [rowData objectForKey:@"Text"];
// set the button title here if it depends on the row
UIButton *thisButton = [[cell.contentView subviews] objectAtIndex:0];
[thisButton setTitle:[rowData objectForKey:@"Button"] forState:UIControlStateNormal];
return cell;
- (IBAction)myAction:(id)sender {
UIButton *theSender = sender;
UITableViewCell *cell;
NSUInteger row = 0;
for (cell in [theTableView visibleCells]) {
UIButton *thisButton = [[cell.contentView subviews] objectAtIndex:0];
if (thisButton.tag == theSender.tag) {
row = [[theTableView indexPathForCell:cell] row];
break;
NSLog(@"myAction: row=%d", row);
Maybe you are looking for
-
Ok, i'm ready to tackle this flicker problem once and for all...
ok, so when it comes to dealing with old analogue video, i always have a problem of glitchy flickery video.... it only happens when there is actual movement introduced while recording to tape (to quarantine the problem, i bought a brand new tape for
-
Is there a way to delete an ebook from my iPad a and just leave it in the icloud
I have books in my iPad from Kindle.Is there a way to delete the read books from my device and just leave them in the iCloud ?
-
My iPhoto Library files seems to be self replicating . . . help!
This is a hard dilemma to explain, but I will do my best. I recently created a new library using the free version of iPhoto Library Manager & downloaded new photos off my camera into the new library. It seemed to work fine. MY 2 active iPhoto librari
-
Zoom non-functional in Crop mode?
The zoom menu items are not disabled in Crop mode, but they do nothing. It is often necessary to zoom in when straightening in order to line up precisely with a known vertical or horizontal in the background.
-
No Budget Check on doing Stock Transfer (ME27)
Hi We have activated SAP FM module and currently doing the testing. On doing Stock transfer from one plant to another (ME27), it is observed that the system is deriving the right FM acct assignment. Despite of not maintaining the budget for the Fund