How to diasble selection for particular rows in a Table?
im currently working on a multiple select table.. i need to disable the checkbox for some particular rows. How can i get runtime control over that cell??
To disable one or more rows of single or multiple selection in your table, add the following code to your controller processRequest method:
OATableBean tableBean = ...;
tableBean.setSelectionDisabledBindingAttr("Disabled");
In the example above, "Disabled" represents the Boolean view attribute that returns 1/"Y" if one or more rows is (are) to be disabled, otherwise it returns 0/"N". The view attribute "Disabled" must belong to the same view object as the one associated with the table items.
If its an advanced table, use the same method on OAAdvancedTableBean instead.
Similar Messages
-
How to set fire action event for particular rows in a table
HI All,
I have a requirement in which I want to set fire action event for particular rows in a table based on some condition.
The table has columns like fullname,employee id etc.
So i want to set fire action event for particulars rows only which will saisfy some condition.Atanu,
Your approach(setting fire action for few rows) seems not possible. Better to go ahead with workaround.
Do you want this functionality in processRequest(while page loading) or processFromRequest(on some event) method ? Give more explanation regd. your requirement ?
In either case loop through the rows and when your condition is met write the action to be performed in controller.
Regards,
Anand -
How can I auto-number particular rows in a table?
I have a table within a dynamic form. In column 2 there is a drop-down where the user can pick a certain reagent. I would like to set it up so that column 1 auto-populates with a series of numbers when certain reagents are chosen. It needs to be an action/formula as the rows are added as needed to the form.
For example:
Reagent
1
Bottle
2
Bottle
Can
Paper
3
Bottle
Can anyone help me out with a script or other way to accomplish this?
Also, I'm relatively new to LiveCycle and although I have some limited scripting experience, I haven't applied it here yet - so I may need a little extra instruction on how to apply any script fixes...Hi,
Turn on trace for the session, tkprof the trace file and review what indexes were used.
Regards,
Gareth
Blog: http://garethroberts.blogspot.com/ -
Radio button for every row in a table
Can anyone tell me how to get abutton for every row of a table.This button is used for selecting taht particular row.
Thanks in advanceCreate a table region in Jdev. Then right click on it New--> Choose Single Selection.
Thanks
--Anil -
How to select a particular row in a JTable?
I want to select a particular row in a JTable. i.e something like
table.setSelectedRow(arg)how can i do it.You can use
table.getSelectionModel().setwhateverIsInTheAPI(...)
depending on your selection mode.Thanx,
but i don't want to change the selectionMode, i
want to select a particular row thro program.
This is like list.setSelected(index) in
JListThe original poster was pointing you in the right direction. You have to use the SelectionModel when you want to work with the selected indexes of a JTable. It will return a ListSelectionModel, which will be an instance of DefaultListSelectionModel unless you implemented your own. Refer to the API for the appropiate method(s).
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/ListSelectionModel.html -
How to select a particular row in grid?
I am trying to generate a user defined CFL form which should work exactly as system CFL. Using Matrix takes minutes to load the query's output so I m using grid instead and passing the query as a parameter to datatable. is there any way to select a particular row in grid through SDK ? for matrix , it cud be written like 'matrix.selectrow(). doesn't seem to have such property for grid. Any help on this will be appreciated.
Thank you..hi
oGrid.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single;
oGrid.Rows.SelectedRows.Add(pVal.Row);
i think that will help you
Regards,
Rajesh Saini -
How to delete a particular row in ALV table
Hi,
How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
Thanks
Bala DuvvuriHello Bala,
Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
data : lr_table_settings TYPE REF TO if_salv_wd_table_settings,
lr_config TYPE REF TO cl_salv_wd_config_table.
lr_table_settings ?= lr_config.
** Setting the ALV selection to multiple selection with no lead selection
lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
Next delete the selected rows in the action triggered by the button:
METHOD onactiondelete_rows .
DATA: wd_node TYPE REF TO if_wd_context_node,
lt_node1 TYPE ig_componentcontroller=>elements_node,
wa_temp TYPE REF TO if_wd_context_element,
lt_temp TYPE wdr_context_element_set,
row_number TYPE i VALUE 0.
wd_node = wd_context->get_child_node( name = 'NODE' ).
CALL METHOD wd_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
wd_node->remove_element( EXPORTING element = wa_temp ).
ENDLOOP.
CALL METHOD wd_node->get_static_attributes_table
EXPORTING
from = 1
to = 2147483647
IMPORTING
table = lt_node1.
wd_node->bind_table( new_items = lt_node1 ).
ENDMETHOD.
If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
Regards,
Uday -
How to edit a particular row in the table ctrl when a push button is clickd
Hi Experts,
How to edit a particular row (except the Primary keys) after selecting it in the TABLE CONTROL when a
push button is clicked in the table control.
For Eg. If you have a push button say "Modify", the particular row what we select in the table control should be in a
editable mode after clicking "Modify" Push button.
Please help me out.
Thanks in advance.Hey Ram,
Thanks a ton.
Its working fine...sorry for the late reply.
The reason behind the delay is because i had modified my code as per your logic it worked fine but the thing is that the whole column was in editable mode but not a single row.
For E.g If i want to edit a particular row, first i select the row and then click on "Modify" button. After i click on the button, the whole column gets in a editable mode including the one which i intentionally selected.
Here, the solution is that you have to set a flag in PBO so that once it is done with PBO then it need not come back again after we click on "Modify" button.
And one more query is that after you modify a particular row in the table control ( When it is in editable mode) and click on the "Save" button, it is not getting updated to database.
To update the database, we need to select the row once again after modifying it and click on the "Save" button.
Here, database is updating only when it is selected again. If it is not selected, it is not getting updated.
If you have any alternative solution, then please help me out.( I hope i am clear with the question.)
Thanks,
Ananth. -
Add radioButton to select the particular Row
Hello
Team
I have one af:table componant i want to give the radio button to a row for select the particular row...
this functionality bydefault added in 10g but..now i am working in 11g,how can i achive this functionalityHi,
this is tricky because it involves manual coding. You would need to add a radio button. You would use
http://adfui.us.oracle.com/projects/adf.faces/multiproject/adf-richclient-api/tagdoc/af_selectBooleanRadio.html
in an extra column and define the group attribute so all rows participate in a single select case. The, when you select a group you need to fire a change event that allows you to determine which radio button is clicked. Based on this information you select the current row in the table. I didn't code this, but this is how I would do it. As said, gows with some coding especially when you nedd to synchronize the radio button with the selction users do by directly clicking into the table
Frank -
How can I do for a row of a query be data provider for a variable?
Hi friends, I have a problem !
How can I do for a row of a query be data provider for a variable?
I need that a value of variable be stored when the user select a row in a query. At the BPS we can do this configuring the variable selector in WIB, and in a WAB how I can do this ?
Best regards,
Gustavo LiberadoIn this case when I press the key to call other forms I need to wait for the response in the secondary form and then process the result.That is exactly what a "modal JDialog" (or JOptionPane) are used for.
Try it. Create a short demo program. All you need is a JFrame with a single button to show the modal dialog. All you modal dialog needs is a single button to close the dialog. After you show the modal dialog add a System.out.println(...) statement in your code and you will see that it is not executed until the dialog is closed.
Then once you understand the basics you add the code to your real program.
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area. -
How do i select a particular cell from a AbstractTableModel?
I m using abstractTableModel to create my table. My table display 4 columns of different info, now i can capture my info from the other window and compare the value with my table but i don't know how to highlight/or select the particular rows in table.
Hi,
as I said before, the changeSelection(...) method of JTable will setup it's ListSelectionModel so that the row, you want, gets selected/highlighted:
yourTable.changeSelection(row,0,false,false);
will select a certain cell - but if selection of a single cell is not allowed and row selection is allowed, the whole row will be selected this way. You can allow selection of a single cell, selection of a column, selection of a row, or simultaneous selection of column and row at the same time. You can have single selection and multi selection.
Hope this helps
greetings Marsian -
How to display particular ROW of a table control in display/change mode
Hi,
Can we make particular ROW in a table control display mode or editable mode depending upon the conditions?.
Any inputs..
Rgds,
LakshmirajHi,
Yes it is possible. check the follwoing code for help.
*& Include Z101954_ASSIGNMENT1I01
*& Module VALIDATE_SALES_ORG INPUT
text
MODULE validate_sales_org INPUT.
SELECT SINGLE zvkorg FROM vbak INTO zvbak-zvkorg
*WHERE zvbeln = zbookhdr-zvbeln.
IF sy-subrc <> 0.
MESSAGE 'INVALID AIRLINE ID INPUT' TYPE 'I'.
CALL SCREEN 1000.
ENDIF.
ENDMODULE. " VALIDATE_SALES_ORG INPUT
*& Module USER_COMMAND_1001 INPUT
text
MODULE user_command_1001 INPUT.
var3 = 1.
IF sy-ucomm <> 'SAVE'.
PERFORM material_check.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT MATERIAL NUMBER' TYPE 'I'.
ELSE.
SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara
INTO CORRESPONDING FIELDS OF it_salesitems
WHERE zmatnr = it_salesitems-zmatnr.
SELECT SINGLE zwerks zlgort FROM zorg
INTO CORRESPONDING FIELDS OF it_salesitems
WHERE zvkorg = wa_salesorder-zvkorg
AND zvtweg = wa_salesorder-zvtweg
AND zspart = wa_salesorder-zspart.
it_salesitems-znetwr = it_salesitems-zstprs * it_salesitems-zbrgew.
MODIFY it_salesitems FROM it_salesitems INDEX sy-tabix.
MOVE-CORRESPONDING it_salesitems TO temp_salesitems.
APPEND temp_salesitems.
REFRESH it_salesitems.
ENDIF.
ENDIF.
LOOP AT temp_salesitems.
if it_salesitems-pick = 'X'.
LOOP AT SCREEN.
IF screen-name EQ 'DETAIL'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
endloop.
CASE sy-ucomm.
WHEN 'SAVE'.
PERFORM check_ship_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
ELSE.
PERFORM check_payer.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
ELSE.
PERFORM check_bill_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
ELSE.
wa_salesorder-zernam = sy-uname.
MOVE-CORRESPONDING wa_salesorder TO zvbak.
MODIFY zvbak.
LOOP AT it_salesitems.
it_salesitems-zvbeln = wa_salesorder-zvbeln.
MOVE-CORRESPONDING it_salesitems TO zvbap.
MODIFY zvbap.
ENDLOOP.
IF sy-subrc = 0.
MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
IF sy-tcode = 'ZVA01'.
CALL SCREEN '1000'.
ELSE.
CALL SCREEN '1003'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
WHEN 'DETAIL'.
CALL SCREEN '1002'.
WHEN 'BACK'.
IF sy-tcode = 'ZVA03'.
CLEAR wa_salesorder.
CALL SCREEN '1003'.
ELSE.
PERFORM pop_up.
ENDIF.
WHEN 'EXIT'.
IF sy-tcode = 'ZVA03'.
LEAVE PROGRAM.
ELSE.
PERFORM pop_up.
ENDIF.
WHEN 'CANCEL'.
IF sy-tcode = 'ZVA03'.
CLEAR wa_salesorder.
CALL SCREEN '1003'.
ELSE.
PERFORM pop_up.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_1001 INPUT
*& Module input_help_sold_to_party INPUT
text
MODULE input_help_sold_to_party INPUT.
SELECT zkunag FROM zvbak INTO CORRESPONDING FIELDS OF TABLE
itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ZKUNAG'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = '1000'
dynprofield = 'ZKUNAG'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = itab
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " input_help_sold_to_party INPUT
*& Form pop_up
text
--> p1 text
<-- p2 text
FORM pop_up .
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = ' '
DIAGNOSE_OBJECT = ' '
text_question = 'DO YOU WANT TO SAVE THE ORDER?'
text_button_1 = 'YES'(001)
icon_button_1 = ' '
text_button_2 = 'No'(002)
icon_button_2 = ' '
default_button = '1'
display_cancel_button = 'X'
userdefined_f1_help = ' '
START_COLUMN = 25
START_ROW = 6
POPUP_TYPE =
IV_QUICKINFO_BUTTON_1 = ' '
IV_QUICKINFO_BUTTON_2 = ' '
IMPORTING
answer = ans
TABLES
PARAMETER =
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CASE ans.
WHEN '001'.
PERFORM check_ship_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
ELSE.
PERFORM check_payer.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
ELSE.
PERFORM check_bill_to_party.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
ELSE.
wa_salesorder-zernam = sy-uname.
MOVE-CORRESPONDING wa_salesorder TO zvbak.
MODIFY zvbak_101954.
temp_salesitems-zvbeln = wa_salesorder-zvbeln.
MOVE-CORRESPONDING temp_salesitems TO zvbap.
MODIFY zvbap.
IF sy-subrc = 0.
MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
IF sy-ucomm = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
IF sy-tcode = 'ZVA01'.
CALL SCREEN '1000'.
ELSE.
CALL SCREEN '1003'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
WHEN '002'.
IF sy-tcode = 'ZVA01'.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
CALL SCREEN '1000'.
ELSE.
CLEAR wa_salesorder.
REFRESH it_salesitems.
REFRESH temp_salesitems.
CALL SCREEN '1003'.
CLEAR ans.
ENDIF.
ENDCASE.
ENDFORM. " pop_up
*& Module USER_COMMAND_1002 INPUT
text
MODULE user_command_1002 INPUT.
IF sy-datar = 'X'.
PERFORM material_check.
IF sy-subrc <> 0.
MESSAGE 'ENTER THE CORRECT MATERIAL' TYPE 'I'.
ELSE.
SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara_101954
INTO CORRESPONDING FIELDS OF wa_salesitems
WHERE zmatnr = wa_salesitems-zmatnr.
wa_salesitems-znetwr = wa_salesitems-zstprs * wa_salesitems-zbrgew.
ENDIF.
var = 1.
ENDIF.
IF sy-ucomm = 'BACK'.
LOOP AT temp_salesitems.
MODIFY temp_salesitems FROM wa_salesitems .
ENDLOOP.
it_salesitems-pick = ' '.
CALL SCREEN '1001'.
ENDIF.
ENDMODULE. " USER_COMMAND_1002 INPUT
*& Module USER_COMMAND_1000 INPUT
text
MODULE user_command_1000 INPUT.
CASE sy-ucomm.
WHEN 'NEXT'.
SELECT * FROM zt001k_101954 INTO CORRESPONDING FIELDS OF
temp_salesorder WHERE
zvkorg = wa_salesorder-zvkorg AND
zvtweg = wa_salesorder-zvtweg AND
zspart = wa_salesorder-zspart.
ENDSELECT.
IF sy-subrc = 0.
CALL SCREEN '1001'.
ELSE.
MESSAGE 'Invalid Data Entered' TYPE 'I'.
CALL SCREEN '1000'.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
*& Module USER_COMMAND_1003 INPUT
text
MODULE user_command_1003 INPUT.
IF sy-ucomm = 'NEXT'.
IF sy-datar = ' '.
MESSAGE 'ENTER PURCHASE ORDER NUMBER' TYPE 'I'.
CALL SCREEN 1000.
IF NOT wa_salesorder-zvbeln CO '0123456789'.
MESSAGE 'PURCHASE ORDER NUMBER IS NOT IN THE EXPECTED FORMAT' TYPE 'I'.
CALL SCREEN '1003'.
ENDIF.
var3 = 0.
CALL SCREEN '1001'.
ENDIF.
ENDMODULE. " USER_COMMAND_1003 INPUT
*& Module input_help_sales_order INPUT
text
MODULE input_help_sales_order INPUT.
SELECT zvbeln FROM zvbak_101954 INTO CORRESPONDING FIELDS OF TABLE
itab1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ZVBELN'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = '1003'
dynprofield = 'ZVBELN'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = itab1
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " input_help_sales_order INPUT
*& Module back_command INPUT
text
module back_command input.
*if sy-ucomm = 'SAVE' OR 'BACK' OR 'DETAIL' OR 'EXIT' OR 'CANCEL'.
*endif.
endmodule. " back_command INPUT
Regards
Rajesh Kumar -
Checkboxes only for particular rows.
Hi frends..
Here my requirement can we keep checkboxes only for particular in the alv using oops..
I need to display a report showing first column as checkbox.But I need to display checkbox only
for particular rows which satifies the condition.
pls reply me
ThanksHi,
Refer these threads for editing fields for certain rows only:-
Re: Making selected alv rows editable
Re: selective edit in ALV grid
Locking Row in ALV
And refer this wiki for code for using checkbox with alv grid:-
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
Edited by: Tarun Gambhir on Feb 10, 2009 10:31 AM -
How should restrict data for particular month?
Hi Experts,
How should retrieve data for particular month without where condition.Hi,
You must be having Month Object right in your Webi?
User will be given opportunity to Select his/her required [Month]
Create variable as =Userresponse("Enter value for Month")same text as you are giving in the Prompt text....Name it as [UMonth]
Go to analysis tab..Filter..Add filter...[Month]=[UMonth]
always this report will run for the month user require -
Reg:How to check Vendor for particular Asset
HI
How to check Vendor for particular Asset?
regards
JK raoHi,
Good morning and greetings,
It would be very difficult to go into each and every asset and display the asset...instead create a quick viewer query using SQVI and use the table ANLA and the field name is LIFNR for Vendor Code and for Asset Number it is ANLN1.
Please reward points if found useful
Thanking you
With kindest regards
Ramesh Padmanabhan
Maybe you are looking for
-
Supplier Open Interface Import Program
Hi All, I am getting the error "SHIP_VIA_LOOKUP_CODE is invalid " for few Orgs when I am running Supplier Open Interface Import Program. I appreciate if anyone help me to get rid of this issue. Thanks , Arya Sreedhar.
-
my nano 6th gen shows in windows but does not show under devces. tried everything in the help program but still doesnt show under devices. can drag and drop music into nano from library to top right i pod symbol.
-
Unable to Access Data Form with Users Provisioned as 'Planner'
Hello, I am currently experiencing an issue that I can't seem to resolve. I was hoping someone else might have some insight and/or have come across this issue. I created two data forms. Users have been assigned permissions to the dimensions included
-
Adding a query to the approval template
Hello I'm trying to setup an approval template for AR Invoices based on a UDF. Basically I want to add a query to the approval template that will trigger an approval request based on the following query but i don't know how to set it properly. trigge
-
Creative Cloud is installed and working on my computer, nevertheless the Application "Adobe Illustrator" appears as "Installed and Updated" but it is physically NOT in my computer. I cannot find the Application in my computer, I installed Photoshop a