Capture the rows selected ,tableView
Hi Friends,
I have a requirement and i was searching in the forum and i have seen the same question been asked
Capture the rows selected in a multiselect table view (BSP) but i couldn't able to judge how the thread is closed
We have a tableView that is filled on selecting a value from a dropDownListBox.
and now i select some rows from the table view and click on a button(say btn_ok)
now the data is processed .
now what is my requirement is when i again run the page and select the same drop down value i want to see the rows to be already selected for which i have done before
example
dropdown -
> a is selected
table view
1----> selected
2
3---->selected
4
5---->selected
6
btn ok
next time i want to c these selected rows already as SELECTED
Regards
Bhavana
Hi,
Are you able to fetch single row? If yes then debug and try to solve it. I don't have SAP System right now but this will help you. First change your table selection mode "Multiple". After that write following code in your "OnInputProcessing"
Sending Selected Field to the calling Screen
DATA : tv TYPE REF TO cl_htmlb_tableview,
tv_data TYPE REF TO cl_htmlb_event_tableview,
event TYPE REF TO cl_htmlb_event.
tv ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'tableView'
id = 'tv_field' ).
RECEIVING
data = tv.
tv_data = tv->data.
w_field = tv_data->row_key.
Where w_field is your field name. By the way this I used to get one row. Try debugging and may be you will find your way.
Thanks,
Muhammad Usman
Similar Messages
-
Capture the rows selected in a multiselect table view (BSP)
Hi,
My requirement is:
I have a table view in which I can select multiple rows.
I will be selecting some rows, and pressing a button.
Functionality of button is written in Javascript, to open a popup window.
But how will I capture which all rows were selected ?
Should I use a Java code or ABAP code ?
And where should I put that code ?
I tried calling the method cl_hrrcf_iterator=>get_tv_attr in the Javascript of the button. But it doesnt work. But if its in DO_HANDLE_DATA it works. Why is it like that ?
Is it possible in BSP, to use the function htmlbevent.obj.getSelectedRows() ? If so, how should the code be ?
Could you please tell me some of the possible solutions.
Would definitely appreciate quick replies.
Thanks,
Nisha Vengal.Hi Nisha,
You can have the ABAP code itself. I had also faced with then same issue. Use the below piece of code form your requirements.
In *IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START*
* Data : M_ROW_REF type <Structure type>
*m_row_ref ?= p_row_data_ref*
In *IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START*
* DATA : CHK TYPE FLAG
*case p_column_key.*
when ' <Column Name>'.*
CHK = m_row_ref-><Column Name>.*
p_replacement_bee = CL_HTMLB_CHECKBOX=>FACTORY(
id = p_cell_id
checked = CHK ).
In *Do Request*
Data : loc_table_event type ref to cl_htmlb_event_tableview
call method cl_hrrcf_iterator=>get_tv_attr
exporting
p_tv_id = '<Tabe View ID'
p_component_id = me->component_id
po_request = me->request
importing
po_tv_event = loc_table_event.
The above methods are used to get the values which are selected in the table view and operated further.
Reward points if useful.
Regards,
Gokul.N -
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. -
How can we capture the row count of the rows affected by executing an update statement?
If you are doing this by PLSQL block:
declare
v_num pls_integer := 0;
begin
for c_rec in (select id
from table_name
where ...)
loop
update other_table
set col_name = ...
where fk_id = c_rec.id;
v_num := v_num + 1;
end loop;
dbms_output.put_line ('Total count is '||v_num);
end; -
How to capture the value selected in the drop down box
Hi all,
I am populating values in drop down box by using FM vrm_set_values in module pool.
like below
01 ABC
02 ACB
03 BCA
04 CAB
in module pool drop down box element name is RQGM-VALUE.
Problem is what ever the value is select in the drop down box from above element RQGM-VALUE is not filling any value.
i need to capture the value selected in the drop down box and pass it to another variable.Hi,
Refer this standard code. Your issue will be resolve.
REPORT demo_dynpro_dropdown_listbox.
TYPE-POOLS vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
DATA: wa_spfli TYPE spfli,
ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
TABLES demof4help.
name = 'DEMOF4HELP-CONNID'.
CALL SCREEN 100.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE init_listbox OUTPUT.
CLEAR demof4help-connid.
SELECT connid cityfrom cityto deptime
FROM spfli
INTO CORRESPONDING FIELDS OF wa_spfli
WHERE carrid = demof4help-carrier2.
value-key = wa_spfli-connid.
WRITE wa_spfli-deptime TO value-text USING EDIT MASK '__:__:__'.
CONCATENATE value-text
wa_spfli-cityfrom
wa_spfli-cityto
INTO value-text SEPARATED BY space.
APPEND value TO list.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
ENDMODULE.
MODULE user_command_100.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'CARRIER' AND NOT demof4help-carrier2 IS INITIAL.
LEAVE TO SCREEN 200.
ELSE.
SET SCREEN 100.
ENDIF.
ENDMODULE.
MODULE user_command_200.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'SELECTED'.
MESSAGE i888(sabapdocu) WITH text-001 demof4help-carrier2
demof4help-connid.
ENDIF.
ENDMODULE. -
HOW to emphasize the row selected in a different colour
Hi all,
there is any way to set the selected row in a table in a different background-colour?
i want to emphasize the row selected by user, i try this:
<af:column headerText="#{res['abogados.nombre']}"
sortProperty="Nombre" sortable="true"
binding="#{backing_app_Abogados.column14}"
id="column14">
<af:outputText value="#{row.Nombre}"
binding="#{backing_app_Abogados.outputText14}"
id="outputText14"
inlineStyle="background-color:#{bindings.AbogadosView1.currentRow.codigo == row.Codigo ? 'red' : 'transparent'};"/>
</af:column>
but this sets the outputText's background to red, i want to set in red all the row..
any idea?Does Rado's following blog entry help: http://adf-rk.blogspot.com/2007/01/adf-oracle-form-like-overflow-in-adf.html
-
What happens when the row selection of a table is set as 'none'?
I have a page, with a Search box, Departments and Employees tables. The user will enter a departmentId and click on Search button. Departments will be displayed. The departmentId column in Departments table is surrounded with a link. So when the user will click on the link, the desired employees will be displayed in the Employees table, if there is a view link between the VOs.
Now suppose I have removed the view link. And the row selection of the Departments table is set as 'none'. So is it possible to get the desired employees of the chosen departmentId in this scenario, as because row selection has been disabled in the Departments table?
I also dont want to use the Set Property Listener in this use case.Hi,
If you have disabled rowselection and also are not implementing the selection listener? How will you find which row did the user select?
Ramandeep -
How do I change the row selection by mouse movement
How do I change the row selection on a jtable by mouse over events?
Thanks, Randygot it thanks...
-
How to capture the row value in Advanced Table on OAF ?
Hi:
I was wondering, if anyone has any idea as to how to capture a row value on an advanced table on a OAF Page.
I am currently trying to capture the Expense Report Number ( first column) on the Track Expenses Reports table on the page /oracle/apps/ap/oie/webui/HomePG.
Any idea would be helpful ?
Thank YouHi,
856070 wrote:
This is what I am looking for :
Default Functionality
On the expenses home page there is a table for the Submitted expenses Table ( advanced table) with multiple Expense Number rows , which has a link associated with every expense number. When the user clicks the expense number link , EBS takes you to a more detail information page. ---As per default functionality :::whene ever user clicks on link it will takes u to details info page based expense no right.
---Check the property of the Destination URL of the ExpensionNumber column.
---In this property u can find the page path and paramam ex:pexpencenumber.
Customized functionality
I would like to capture the Expense number on the detailed page to call another application based on the expense number. The expense number on the
detailed page is not available on the request-parameter or on the VO.
I was thinking of capturing the ExpenseNumber when the user clicks it and save the expense number on a >transientvalue to retrieve it on the detaile dpage..but unable to do so.---Here get the paramereter pexpencenumber and pass it to another appilcation.
Regards
Meher Irk -
How to capture the values selected at selection screen
Hi.
I need some basic idea reg. to capture the selected values at selection screen into an internal table.
for example.
Selection-screen having the following fields,
Grade1....a1
grade2..a2
grade3..a3
grade4..a4
grade15--a15
Now i want to get the values of grade into an internal table.. so that i can create dynamic table based on selected values
a1 a2 a3 a4 a5...use function moduel
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = repname " Your report name
TABLES
SELECTION_TABLE = it_sels.
you can get all values from the selection screen
a® -
Capturing the row selector and perform logical delete
Hi All ,
I add a tabular report in one of my page .But in the MULTI_ROW_DELETE button I like to capture the checkbox (row selector) and fire a PL/SQL anonymous block where rather than performing actual row delete it will update a database field and perform some sort of logical delete .
Now my problem is I cant able to capture that what are the rows need to be logically deleted :
DECLARE
vRow BINARY_INTEGER;
BEGIN
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
vRow := apex_application.g_f01(i);
update test123 set delete_flag='y' where col2=vRow ;
end loop;
end;
Its throwing error .Can anyone help on this pls how to write the pl/sql code to perform the logical delete.
Thanks in advance ,
Regards,
Debashis.Guys ,
Got the solution by searhcing several of the therads from Denes...
Create the checkbox from Form page :
htmldb_item.checkbox(1,t.USERNAME) DeleteItem,
and then captured it as :
FOR i in 1..HTMLDB_APPLICATION.G_F01.count
LOOP
UPDATE table1 set DELETE_FLAG='Y'
WHERE USERNAME = HTMLDB_APPLICATION.G_F01(i);
END LOOP;
Cheers, -
Try to capture the dynamic selections of a standard LDB
Hi experts,
I checked on the SDN, some people said we can use set parameter and EXPORT/IMPORT to do it. Does it mean we use this statement in the LDB and send the value of selections to memory then get them in the program? If there is a standard LDB, how can I get the value of its dynamic selections?
Also There are some FMs, such as FREE_SELECT_*, but the INIT and DIALOG FM are used to show the user dialog and fetch its results. The rest FMs in the FG are used to convert the format of the selection reults. So is there any FM which can be used to get the value of the dynamic selections of a standard LDB in my program? I hope there is a selection ID for the LDB's dynamic selection and it can be captured by a FM.
Thanks for reading and help.use fm RS_REFRESH_FROM_DYNAMICAL_SEL
here's a sample to search for a free selection (her field XBILK)
DATA RANGE TYPE RSDS_TRANGE.
DATA : BEGIN OF WA OCCURS 0,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
FRANGE_T TYPE RSDS_FRANGE_T,
END OF WA.
DATA : BEGIN OF CA OCCURS 0,
FIELDNAME LIKE RSDSTABS-PRIM_FNAME,
SELOPT_T TYPE RSDS_SELOPT_T,
END OF CA.
DATA ERR.
DATA: RSDSSELOPT LIKE RSDSSELOPT OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'
EXPORTING
CURR_REPORT = SY-REPID
MODE_WRITE_OR_MOVE = 'M'
IMPORTING
P_TRANGE = RANGE
EXCEPTIONS
NOT_FOUND = 1
WRONG_TYPE = 2
OTHERS = 3.
ERR = 9.
LOOP AT RANGE INTO WA.
APPEND WA.
IF WA-TABLENAME = 'SKA1'.
ERR = 0.
ENDIF.
ENDLOOP.
CHECK ERR = 0.
ERR = 9.
LOOP AT WA-FRANGE_T INTO CA.
APPEND CA.
IF CA-FIELDNAME = 'XBILK'.
ERR = 0.
ENDIF.
ENDLOOP.
CHECK ERR = 0.
ERR = 9.
LOOP AT CA-SELOPT_T INTO RSDSSELOPT.
IF RSDSSELOPT = 'IEQX'.
ERR = 0.
ENDIF.
ENDLOOP.
hope that helps
Andreas -
How do we capture the record selected in the table control?
Hi,
In the table control when the user selects a record we need to capture that record and pass it to the next screen.how can we do this?
Thanks,
Rakesh.Hello
First of all you need a 'mark' column in your TC structure.This should be char1.
This column has to be put into the TC Attributes as mark column.
Then to get back the info from the TC go the following way:
PAI
loop at <fs_it> . "Field symbol of your table.
MODIFY <fs_it> FROM wa_basic
INDEX tc_maintenance-current_line.
endloop.
Message was edited by:
Werner Gerbert -
How to get the row selected in af:inputComboBoxListOfValues
Hi,
Am using jdev 11.1.1.2.1.
Am using af:inputComboBoxListOfValues component , i have made the component based on the " department id" and the display value is " department name".
In the value change listener i want to get the selected department id but currently am getting only the department name.(using valueChangeEvent.getNewValue().toString())
So is there any way to get the entire row and get the "department id" using that ??
Please help.
Thanks,
HariSorry for the confusion, needed to check it out:
this code should work:
public void nameValueCangeListener(ValueChangeEvent valueChangeEvent) {
FacesContext contxt = FacesContext.getCurrentInstance();
valueChangeEvent.getComponent().processUpdates(contxt); // after this the new row is selected!
BindingContext lBindingContext = BindingContext.getCurrent();
BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry();
JUCtrlListBinding list = (JUCtrlListBinding) lBindingContainer.get("YOUR_LIST_BINDING_NAME");
Row lFromList = (Row)list.getCurrentRow();
Object lAttribute = lFromList.getAttribute("YOUR_ATTRIBUTE_YUO_WANT_TO_GET");
}Timo -
How capture the value selected in the component ( Select Many Choice )
Hello Everyone ,
I am new to ADF and i have a ADF page developed with Select Many Choice as one of the component , this field can be multiple numbers , i would
like to capture each one the value being selected under each message choice and print them using sop .
Let me explain through example :
Application 1
: Role 1
: Role 2
Application 2
: Role 4
: Role 5
Where Application 1 , 2 are name of the Select Many choice component and Role 1 , 2 .. are values inside various Message choice .
Now if i select Role 1 in Application 1 and Role 5 in Application 2 , i would like to print each of these information on click of a button.
can some one help to achieve this .
Note : All the values like Application 1 , 2 and Role 1,2,3 etc are just hard coded , not using any data base .
--KeerthiHi Pratap ,
Thanks for your response ,Its just a page with component ( Select Many Choice ) i have hard coded some of the values for
select choice .
Let me know if you need any further input .
--Keerthi
Maybe you are looking for
-
I want to know if I can record a DVD movie in my Macbook and then record the movie in a DVD blank disc?
-
Error in Invoking Webservices from ODI
Hi, I started getting the below error when using the ODI Webservice Invocation Tool. "com.sunopsis.wsinvocation.SnpsWSInvocationException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0" The webservice does get invoked properly inspite of the
-
my library opens, but when i click on the itunes store, i get an error message
-
En plus d'être lent, l'affichage wysiwyg part dans tous les sens surtout dès qu'il y a un peu de css responsive. Je suis obligé de passer par coda pour travailler plus rapidement dans le code Pareil pour acrobat reader, la navigation dans les pdf est
-
Burrito Mobile Apps Extremely Slow
I just deployed a simple little app, built with Adobe Burrito. it has a list view for locations and a map view for Google maps. You touch a location in the list and it displays your location (obtained via GPS) and the selected location. Simple. Yet,