Call a method on row selection in table.
Here is my use case:
I have created my dc using a wsdl. I have a main page having a panel splitter which divides the page vertically. On the right panel I have created a dynamic region which displays result of task flows on clicking a task flow links present on the left panel. In one of the task flows i am displaying an adf table. My requirement is that on selecting a row in this table i want to call a method present in my dc which will take the value from selected row and should display the result depending on this input parameter received. I want its result to be displayed on the same page (below the table). How do i achieve this?
-Pankaj
Drag the method you want to invoke from the data control palette onto the table's column and drop it as a link there.
This will create a component that when pressed will call the method.
If instead you want to enable this through a selection of a line in the table - then you can write a selectionListener on the table that will do the same thing that the link does.
(double click the link to generate its activation code in your backing bean).
Similar Messages
-
No rows selected in table Transfer Rules
Hi All,
I have a Generic master datasource which is working fine. I am trying to append a field ZEINH to generic existing master datasource which uses user exit in R/3. It is working fine in R/3.
I have replicated R/3 datasource to BW and assign source system and datasource to infosource.I can see the ZEINH field in Transfer structure .I have tried to map ZEINH with infoobject of same domain and data element in the Infobject assign column of Transfer rule.
When It does not propose transfer rule for new field,however old fields are there. When I select new field and try to transfer to the comm.struc/Trns. rule column, it gives me error"No rows selected in table Transfer Rules"
Thanks in advance for your attentionHi,
In 'Transfer rules' tab, in the right frame, in the 'Infoobject' column, type in a name of infoobject to which you want to map incoming data from datasource.
Best regards,
Eugene -
Get index of row selectable in table in web dynpro abap
Hi all,
How i get the index for the row in a table which i selected .
Help me.
Points are Sured.
Sanket sethiHi ,
in the wdevent parameter of the action get the selected element
eg
context_element type ref to if_wd_context_element .
context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
then call the get_index method..
context_element->get_index( ).
Regards
Yash -
Multiple row selection for table element
Hi,
I have a requirement where I require to select multiple rows from a table element in a WD for abap application.
I have defined a node with cardinality and selection set to 1..n.
The contex node contains 4 fields : emp_name, pernr, manager and position.
The attributes of the table element for selectionmode is set to 'multi' and 'selectionchangebehaviour' is set to 'auto'.
I have defined an action on the 'onleadselection' event.
The code in this method also includes the statement 'lo_el_team_view->set_selected( EXPORTING flag = abap_true ).'
When I execute the application only 1 row is highlighted at any one time when I select it. You can select multiple rows by holding down the 'ctrl' key but I want to avoid having to do this. Is there anything I have missed out causing multiple row selections not to be all highlighted.
Thanks in advance for any assistance.Hi raj,
you can try the following code in the 'onleadselect' event of the table,
create one attribute ' Flag' of type WDY_BOOLEAN under the node which has been binded to the table.
DATA lo_nd_node_tab1 TYPE REF TO if_wd_context_node.
DATA lo_el_node_tab1 TYPE REF TO if_wd_context_element.
DATA lo_elements TYPE wdr_context_element_set.
DATA lo_ele_select_new TYPE REF TO if_wd_context_element.
DATA lv_deselect TYPE wdy_boolean.
DATA lv_flag TYPE wdy_boolean.
DATA lv_select TYPE wdy_boolean.
DATA lv_index TYPE i VALUE 0.
lo_nd_node_tab1 = wd_context->get_child_node( name = wd_this->wdctx_node_tab1 ).
get the current selected element
lo_ele_select_new = wdevent->get_context_element( name = 'NEW_ROW_ELEMENT' ).
CHECK lo_ele_select_new IS NOT INITIAL.
check whether it has been selected or not
CALL METHOD lo_ele_select_new->is_selected
RECEIVING
flag = lv_select.
lo_ele_select_new->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_deselect ).
check whether element has been previously selected or not,if not, set the flag to select it
IF lv_select IS NOT INITIAL AND lv_deselect IS INITIAL.
lo_ele_select_new->set_attribute( name = 'FLAG' value = 'X' ).
if selected currently and previously then set the flag as false,in order to delect it
ELSEIF lv_select IS NOT INITIAL AND lv_deselect IS NOT INITIAL..
lo_ele_select_new->set_attribute( name = 'FLAG' value = ' ' ).
ENDIF.
CALL METHOD lo_nd_node_tab1->get_elements
RECEIVING
set = lo_elements.
according to the falg, select and delect the elements
LOOP AT lo_elements INTO lo_el_node_tab1.
lo_el_node_tab1->get_attribute( EXPORTING name = 'FLAG' IMPORTING value = lv_flag ).
IF lv_flag = 'X'.
lo_el_node_tab1->set_selected( abap_true ).
lo_nd_node_tab1->set_lead_selection_index( lv_index ). * this statement deselects the lead selection index*
ELSE.
lo_el_node_tab1->set_selected( abap_false ).
lo_nd_node_tab1->set_lead_selection_index( lv_index ).
ENDIF.
ENDLOOP.
I hope this resolves your problem.
Thanks,
krishna -
ABAP WD, Multiple Row selection in table control
Hi all,
I am populating and displaying the records using the table control, i have to select the multiple records in the list and want do some deletion,selection,so i could not select the more than one record.
How do i solve this?
Please give me your valuable suggestions.
ThanksHi ulli,
thanks for your quick reply,
now its working for me but i have to press the 'CTRL' key and select the row, for selecting the multiple rows.
one more thing i wanted some methods for "DELETION", "SELECTING ALL RECORDS","DESELECTING",in the displayed list.
plz suggest me..,
thanks and regards
kamal -
Need to get the row selected in table control without ay action
Dear Team,
I have a requirement in which I need to pass the row selected of a table control to a variable.
Here I need to get the row selected with out any other action
then the action of selection of a row.
Is it possible to read table control values using FM DYNP_VALUES_READ.
thanks in advance,
regards,
SaiHI,
Sai Kumar Potluri
I tried in IDES it working.
Here is the code.
REPORT ZPRA_TC_D.
TABLES : SCARR.
CONTROLS TC TYPE TABLEVIEW USING SCREEN 1.
DATA : SELLINE TYPE I,
SELINDEX TYPE I.
DATA : ACT LIKE SCARR-CARRID,
ANT LIKE SCARR-CARRNAME.
DATA : ITAB LIKE SCARR OCCURS 0 WITH HEADER LINE.
CALL SCREEN 1.
*& Module STATUS_0001 OUTPUT
* text
MODULE STATUS_0001 OUTPUT.
SET PF-STATUS 'ME'.
* SET TITLEBAR 'xxx'.
SELECT * FROM SCARR INTO TABLE ITAB.
ENDMODULE. " STATUS_0001 OUTPUT
*& Module MOV OUTPUT
* text
MODULE MOV OUTPUT.
MOVE-CORRESPONDING ITAB TO SCARR.
ENDMODULE. " MOV OUTPUT
*& Module USER_COMMAND_0001 INPUT
* text
MODULE USER_COMMAND_0001 INPUT.
CASE SY-UCOMM.
WHEN 'BACK' OR 'UP' OR 'EXIT'.
LEAVE PROGRAM.
WHEN 'SEL'.
GET CURSOR FIELD SCARR-CARRID LINE SELLINE.
SELINDEX = TC-TOP_LINE + SELLINE - 1.
READ TABLE ITAB INDEX SELINDEX.
ACT = ITAB-CARRID.
ANT = ITAB-CARRNAME.
ENDCASE.
ENDMODULE. " USER_COMMAND_0001 INPUT
In Flow Logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0001.
LOOP AT ITAB WITH CONTROL TC.
MODULE MOV.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT ITAB.
ENDLOOP.
MODULE USER_COMMAND_0001. -
Row selection in Table should be the same, if we came back to the page?
Hello All,
I am using JDeveloper 11g.
I created one adf Table on jsp(empPage) page and selected one row(single selection) , than user can move to other page(to finish some other task), after coming back to the earlier page(empPage), row selection should be the same.
Can you please help me?
--Neelmani Jaiswal
Edited by: Neelmani Jaiswal on Jan 11, 2009 12:09 PM
Edited by: Neelmani Jaiswal on Jan 11, 2009 12:10 PMcheck this post here. I still have the same issue.
Code for getting the selected row in ADF Table 11G prod -
Multiple row select for table not working..
Hi Experts,
I have a table in ABAP Web Dynpro where I have enabled the multiple row select functionality. I can select all and deselect all. I can also select a block of adjacent rows of table by choosing first and last by pressing Shift key.
But I am not able to select multiple individual records for that table.
I tried the same thing in different system and it works fine there.
Please let me know if we are missing some standard plugin or we need to enable this in some settings.
System where the issue is:
SAP_APPL: release 600, level 18
SAP_BASIS: Release 700, level 22
System where it is working fine:
SAP_APPL: release 604, level 8
SAP_BASIS: release 701, level 8
Regards,
Anand KolteHi
Press CTRL key and Select records, you can select multiple records, continuously or randomly your desired selection.
Cheers,
Kris. -
My Swing GUI appliaction has a large table in it, and I'm using a custom Table Cell Renderer. One of my columns uses a widget I wrote myself that is identical to the "star rating" widget you see in iTunes. (In fact, you can basically think of this app as being iTunes-like in terms of its UI.) It's working pretty well: when I see an item I want to rate, I can click on the widget in a particular row, and it shows the appropriate number of stars, etc.
But here's the problem: this doesn't work if the row has already been selected. I can only modify the star widget on rows that are unselected.
Does anyone have an idea of how I could correct this problem?
Thanks very much.Does anyone have an idea of how I could correct this problem?Given that we have very little information to go by, I'm guessing that you have a custom TableModel and you are not firing the TableCellUpdated() method when you change the data, so the table doesn't know it should repaint the cell.
-
Hi All,
I created a table with three columns - Select(Checkbox), EmpID(TextView), Status(TextView).
The data for EmpId column and Status column is coming from a webservice. While i created a node with a boolean attribute and bound to the "Checked" property of the Select column editor.
I created a method RowSelect and assigned it to the onToggleEvent of the check box.
I need to have a functionality where the user should be able to select some Emp ids through the checkbox, and on the click of Activate button, the ids and the status of the selected rows should be passed to webservice as input.
But when i deploy the code, the check boxes in the table are disabled.
Can anyone tell me where iam doing wrong?
Regards,
MaggieHi,
In the Init() method of the view editor, initialize the boolean attribute to false and try once:
for(int i=0; i < tablesize; i++)
wdContext().node<nodename>.get<nodename>ElementAt(i).set<booleanvalue>(false);
Regards,
Poojith MV -
Multi Row Selection in Table list
Hi All,
Currently in our scenorio, we are able to select only one row at a time from the table list, but we need to select multiple row at a time.
Even we have tried to select multi row using CTRL key but if we select another row previous selection got removed.
Kindly suggest where we need to make modification.
Thank you,
ChaBalan,
I have a Search Result View which allows users to select multiple rows. To process, user clicks the custom button "Submit" added on the Tool bar. In the event handler i wrote the below code. This is selecting only last record. But i want to read all selected rows.
--- htm page
<chmlb:configTable id
= "Table"
reset
= "<%= controller->get_reset_flag( ) %>"
actions
= "<%= controller->gt_button %>"
navigationMode = "BYPAGE"
table
= "//RESULT/Table"
visibleRowCount = "<%= lv_visiblerows %>"
usage
= "SEARCHRESULT"
downloadToExcel = "<%= lv_export %>"
selectedRowIndexTable = "<%= RESULT->SELECTION_TAB %>"
selectionMode
= "<%= RESULT->SELMODE_MULTI %>"
onRowSelection
= "SELECT"
showNoMatchText = "FALSE" />
method submit.
data: lv_collection TYPE REF TO if_bol_bo_col,
lv_property_access TYPE REF TO if_bol_bo_property_access.
lv_collection ?= me->typed_context->result->collection_wrapper->get_marked( ).
lv_property_access = lv_collection->get_first( ).
WHILE lv_property_access IS not INITIAL.
lv_property_access = lv_collection->get_next( ).
endwhile.
endmethod.
Thanks
Tim -
How to get the o/p of the report by calling a method in grid form or table.
Hi All,
I have a doubt in using the function module from the report . Can any one tell me how to achieve this.l
method GET_CUSTOMERS.
DATA IT_IDRANGE TYPE TABLE OF BAPICUSTOMER_IDRANGE INITIAL SIZE 0.
DATA IT_ADDRDATA TYPE TABLE OF BAPICUSTOMER_ADDRESSDATA INITIAL SIZE 0.
DATA WA_IDRANGE LIKE LINE OF IT_IDRANGE.
DATA WA_ADDRDATA LIKE LINE OF IT_ADDRDATA.
*WA_IDRANGE = IDRANGE.
*WRITE / WA_IDRANGE.
WA_IDRANGE-SIGN = 'I'.
WA_IDRANGE-OPTION = 'CP'.
WA_IDRANGE-LOW = '*'.
WA_IDRANGE-HIGH = ' '.
WRITE: / WA_IDRANGE-SIGN,WA_IDRANGE-OPTION,WA_IDRANGE-LOW,WA_IDRANGE-HIGH.
APPEND WA_IDRANGE TO IT_IDRANGE.
CALL FUNCTION 'BAPI_CUSTOMER_GETLIST'
EXPORTING
MAXROWS = 0
CPDONLY =
IMPORTING
RETURN =
TABLES
IDRANGE = IT_IDRANGE
ADDRESSDATA = it_addrdata
SPECIALDATA =
loop at it_addrdata into wa_addrdata.
write / wa_addrdata.
ENDLOOP.
endmethod.
now from the report am calling this and i need the result ie wa_addrdata in table form so while using the FM ALV_GRID_DISPLAY in class am getting the o/p. but how do i acheive it from report(SE38)
DATA OBJ TYPE REF TO ZGBAPI_CUSTOMER_GETLIST.
CREATE OBJECT OBJ.
DATA IT_IDRANGE TYPE TABLE OF BAPICUSTOMER_IDRANGE INITIAL SIZE 0.
DATA IT_ADDRDATA TYPE TABLE OF BAPICUSTOMER_ADDRESSDATA INITIAL SIZE 0.
DATA WA_IDRANGE LIKE LINE OF IT_IDRANGE.
DATA WA_ADDRDATA LIKE LINE OF IT_ADDRDATA.
*WRITE / WA_IDRANGE.
*WA_IDRANGE-SIGN = 'I'.
*WA_IDRANGE-OPTION = 'CP'.
WA_IDRANGE-LOW = ''.
*WA_IDRANGE-HIGH = ' '.
CALL METHOD OBJ->get_customers
EXPORTING
idrange = WA_IDRANGE
IMPORTING
addressdata = WA_ADDRDATA
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'BAPICUSTOMER_ADDRESSDATA'
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
*IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_ADDRDATA
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
Implement suitable error handling here
ENDIF.
**"endloop.
i want the o/p of this in table form... Pleae help.Thanks a lot Rod for your prompt reply.
I agree with you about the accuracy of the data. Are you aware of any other way to track the execution times of Discoverer reports?
Thanks
Giovanni -
EJB 3.0 - Custom create method - current row in adf table
Hello,
its funny I cannot find a good solution for such simple problem.
I'm using EJB 3.0 stateles session bean, ADF controller and ADF Faces.
I have simple page with read-only adf table containing roles and Create Role button. The button sends you to create page. This works.
I wrote my own create role method in session bean.
When I use this method instead of standard create then the new role row is no longer current in adf table. So create page displays different row not the new one.
How to make my new role row current in the adf table?
RadoThank you Frank,
yes this seems to be the only solution I can use.
In fact the role table is detail table. This is why I have my own constructor with one parameter: master entity. So the "create page" you suggested have to have access to master entity and this is why I wanted to create new role instance on fist page - there is master entity accessible.
Now I need to send master instance to create_page somehow.
What you think is the best way? Are bindings from previous page accessible directly or I have to use request/session/process scope?
Another solution would be to have method "createAnotherDetail" in master entity. But I'm afraid I will have again problem with currency.
Rado -
Row selection in Table (Web Dynpro Abap)
Hello,
I have 2 views in my web dynpro component.
In first view , i am taking carrid and on click of submit button , i am displaying connid,fldate,currency,planetype,seatsmax in second view.
I have one button on second view to go back to fist screen.
Now, My question is :
if i select a one row of table , i want to dispaly deatils of that row in first view.
How can i do this?
Please help.The second part of the requirement is not clear on where woudl you click and where shoudl the data be shown.
However, all this data should be ideally maintained in the component controller i.e. the c.controller should have the conterxts and map relevant nodes to the appropriate views.
Now, all the data is in c.controller which can be accessed from any view within the component. This way you can show any data in contexts in preferred view.
Regards,
Sharath -
Multiple row selection in table contrl with wizard
Hi all,
i developed a table control using wizard . i have the plus and sub buttons that came when i udes wizard to delete or adda row.
My question is : It allows me to delete one row ata time is there way where i can delete mutliple rows in a single attemp i.e i wiuld select multiple rows at one and click the delete row and it need to delete all selected rows , now it allows me to select only one row at atime
Thanks all in advance
SuchitraHI,
Set the Mulbiple row selet propery at the table control level to get this working.
Thanks
mahesh
Maybe you are looking for
-
The white background makes my eyes hurt. How can I make the background a different color?
-
Line border not properly on PDF file
Dear Guru, I need help. I created an Invoice using Oralce report 61. And I modified the format border. Let say one format border field top and left (from menu format->border, I click top and left only), when I saw it on the screen, everything was per
-
I can't install CS6 update on my new iMac. Suggestions?
Having trouble with installing new update for CS6.
-
Help please!! Untrusted connection no issuer chain provided...
firefox untrusted connection no issuer chain was provided... I cannot browse almost any website without receiving this error. I've tried the adjusting the date/clock and I've deleting the cert8. data in the profile for firefox. Nothing is working. Al
-
Firefox 6 disabled my virus protection. I need to reinstall Firefox 5
When firefox wanted to install an update, it disabled my Kaspersky virus protection. I don't need this!! I want to reinstall the previous version of firefox.