HOW TO GET VALUE OF A PARTICULAR CELL IN ALV GRID
I HAVE 2 ALV GRID. IWANT WHEN I DOUBLE CLICK ON ANY PARTICULAR CELL OF FIRST GRID I WILL GET THE VALUE DISPLAYED ON THAT PARTICULAR CELL.
THANKS IN ADVANCE
Hi,
If you are using a class alv, you only need to create a local class to control event and, before setting the screen to present the alv, you need to assign the class as a handler, like this:
CREATE OBJECT event_handler.
SET HANDLER event_handler->double_click FOR alv_grid.
This event handler was defined before like below and a object was created for it:
CLASS cl_event_handler DEFINITION.
PUBLIC SECTION.
METHODS double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING e_row e_column.
ENDCLASS. "cl_event_handler DEFINITION
Then you need to implement this class, creating the method double click and do a READ TABLE to the itab you presented in the alv to recover the data, like this:
READ TABLE itab INTO wk_itab
INDEX e_row-index.
The e_row structure was sent to the method by the handler, setting it with the line index that you double clicked in the alv. After that, you can manipulate the data that you selected in your internal table to generate the data to the other ALV.
Best Regards,
-h
Similar Messages
-
How to get row of the selected cell in ALV while implementing OVS
Dear Folks,
I am implementing OVS search help in ALV.When i click on cell, i can see the search help in cell and now i can identify the colomn of the cell but i can't identify the row of the cell.Can any one tell me how to identify row of the cell in this case.
Nirad.Thnx for the answer nithya.I have solved problem my self.
DATA: elem_ovs TYPE REF TO if_wd_context_element,
ls_data TYPE REF TO data,
ls_index type string.
FIELD-SYMBOLS : <ovs_data> TYPE data.
elem_ovs = ovs_callback_object->context_element.
ls_data = elem_ovs->get_static_attributes_ref( ).
ls_index = elem_ovs->GET_INDEX( ).
and this is the solution. -
How to get value in a web page automatically and sava output in database
how to get value this table output is
row 1, cell 1
row 1, cell 2
row 2, cell 1
row 2, cell 2
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>Note: This thread was originally posted in the [Java Technologies for Web Services|http://forums.sun.com/forum.jspa?forumID=331] forum, but moved to this forum for closer topic alignment.
-
How to get keys of a particular type
Following are my objects:
DepartmentKey - primary key is departmentName, a String
Department
EmployeeKey - primary key is employeeId, an integer
Employee
I have 5 DepartmentKey-Department key-value entries in a cache and 2000 EmployeeKey-Employee key-value entries in the same cache.
How do I get all the DepartmentKeys from the cache? In general, how to get keys of a particular type (class name)?
Thanks
GhanshyamI guess I am deeply off track regarding the general approach towards storing items in the cache.
Following is my problem domain:
A Merchant is any establishment that accepts credit cards. (It could be the local Subway down the street or Macy's, etc.). A Transaction is a credit card transaction.
public class Merchant implements Serializable{
private String merchantId; // primary key
private double averageTxnAmount;
private double totalTxnAmount;
private long totalTxnCount;
public class Transaction implements Serializable{
private String merchantId; // merchant that originated the txn
private double amount;
private Timestamp txnTime;
private String txnType; // sale, return, etc.
public class MerchantKey implements Serializable, KeyAssociation{
private String merchantId;
public Object getAssociatedKey{
return merchantId;
public class TransactionKey implements Serializable, KeyAssociation{
private String merchantId;
private Timestamp txnTime;
private double amount;
public Object getAssociatedKey{
return merchantId;
I want to update a merchant's average txn amount as transactions come in.
Let's say I have a million merchants in a partitioned cache cluster spread across some machines.
Transactions come into the cluster quite rapidly, say tens in a second. The process that inserts the transaction into the cluster must also update the merchant to which the transaction belongs, as follows:
Transaction t = ...
cache.put(tKey, t); // store the transaction into the cache
MerchantKey mKey = new MerchantKey(txn.getMerchantId());
Merchant m = (Merchant)cache.get(mKey);
// update the merchant's avg txn amt
m.setAverageTxnAmount((txn.getAmount() + m.getTotalTxnAmount())/m.getTotalTxnCount() + 1);
m.setTotalCount(m.getTotalCount() + 1);
// store the updated merchant back into cache
cache.put(mKey, m);
OR
Transaction t = ...
cache.put(tKey, t); // store the transaction into the cache
MerchantKey mKey = new MerchantKey(txn.getMerchantId());
Merchant m = (Merchant)cache.get(mKey);
MerchantUpdater agent = new MerchantUpdater(t);
cache.invoke(mKey, agent);
public class MerchantUpdater implements AbstractProcessor{
public Object process(Entry entry){
Merchant m = (Merchant)entry.getValue();
// update m's avg txn amt, total count using t
entry.setValue(m);
The basic idea is to store all merchants and all transactions (which could be tens of millions in a day) for a day in memory and to update the merchant objects as transactions come in throughout the day. The above example shows updating just the merchant's average txn amount, but in reality, it could be updating a number of things about the merchant.
Am I using the api in the right spirit or is my approach seriously whacked? Can you please comment?
Thanks
Ghanshyam -
How to get the focus of particular UI Element
Hi All,
How to get the focus of particular UI Element in webdynpro Page,
I have a page where i am creating a ALV, I want to get that keyboard focus is on that element is there or not?
Can anyone please give some update?
Best regards,
RohitI would suggest try invoking REFRESH of ALV on the ON_CELL_ACTION event.
Below excerpt is from Thomas
The Events of inner UI elements are not exposed directly as they normally would be if they were standalone. Generally you can capture them using either the
ON_DATA_CHECK:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/frameset.htm
This gets trigger for any press of ENTER, so it generally works like the Input Field onEnter.
You could also consider ON_CELL_ACTION:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/12093591152464e10000000a1553f7/frameset.htm
It is a higher level Event that encompasses both ON_DATA_CHECK and ON_CLICK.
if you want to capture & refresh on some hot key combination then refer to this thread
[https://www.sdn.sap.com/irj/scn/profile?editmode=true&userid=3760417] -
How to get the coordinate of a cell in the jtable?
How to get the coordinate of a cell in the jtable?
How to get the point of a cell in the jtable?
Thanks for help!getCellRect(...);
-
How to get value from list item
Hi all,
How to get value from list item?
I have a problem with the List Item object
in the Oracle forms.
How can I retrieve the selected item from
a list ?
I didn't find any function like 'list.GET_
SELECTED_ITEM()'...
thanks
BalaHello,
You get the value as for any other Forms item:
:value := :block.list_tem ;Francois -
How to get values/data stored in the database into a list-item.
how to get values/data stored in the database into a list-item.
i tried to make a list item without any values assigned to it...but i got the below error.
FRM-30191: No list items defined for required poplist.
or
FRM-32082: Invalid value for given item type.
List EMPNO
Item: EMPNO
Block: EMP
Form: MODULE5
FRM-30085: Unable to adjust form for output.
then according to some docs, i tried the the following for the trigger
when-new-form-instance
declare
rg_name varchar2(40) := 'emp_rec';
status number;
groupid recordgroup;
it_id item;
begin
it_id := Find_Item('empno');
groupid := create_group_from_query(rg_name, 'select empno from emp');
status := populate_group(groupid);
populate_list(it_id, groupid);
end;
but yet didnt work... :(
so how the heck do i get values fetched from the database table into the list item?for list items you need to values in the record group, one is the shown value and one is the returned value.
Check out the online help for the populate_list built-in.
You'll need something like select ename,ename from emp as the record group query. -
How to get value in showModalDialog()
Hi,
I would like to know how to get value pass into showModalDialog() to be used by the server (using request.getParameter())
TQplease try out this kind of code
<script language="javascript">
function trial(){
var retVal = new Object();
retVal = ShowModalDialog("ur JSp");
</script>
<script>
<form >
<input type="hidden" name ="mylink "value= javascript:trial();>
</form>
<%
String str=request.getParameter("mylink");
%>
and plz let me know .. if it works -
How to get value in function insert table test ?
Hi
I use function insert table test in order to get value in table for use in code page but i don't know how to get value in table.If somebody have any idea.Please give me some advice.
Thank you,
WarujaYou will need to grab the contents with VBA
Table test is user interface only.
This thread may help
http://qazone.empirix.com/thread.jspa?threadID=748&tstart=0 -
How to get value of URL parameter
Hi,
If an ABAP Web Dynpro URL looks like this: http://<server>:<port>/sap/bc/webdynpro/sap/zny_test1?sap-client=100&sap-language=EN, how to get value of the URL parameter sap-client at runtime in the application?
Thanks,
NancyThe framework currently strips all the framework specific params.
Perhaps the will be made available in a future release. Thomas, any comments ?
However, I dont understand the requriement to know the sap-client URL value.
If your code is running, a user has successfully connected to system a therefore he has a session open and this session is associated with exactly 1 client at any point in time.
See SYSTEM VARAIBLE SY-MANDT.
this represents the client in which the users session is running and negates the need to see
sap-client URL value.
regards
Phil. -
How to get value of html combo box (i.e select) in jsp?
Hello,
I was just wondering how to get value of html combo box in jsp page. My code for combo box is:
<select name="combo" size="1">
<%
List<Project> projects = mgr.getProjects();
for(Project project : projects){
%>
<option value="<%= project.getId()%>"><%= project.getName()%></option>
<%
%>
</select>
I thought combo.value might give me the value, but it throws exception.
Any help is appreciated.
Thanks.The combo does not exists in Java, but only in HTML. You have to submit the form containing the combo and then use request.getParameter("combo") to get it's value ;-)
-
How to get Value of tree node without Reload Page
hi,
i worked with apex 4.2 and i created Tree and tabular form to retrieve the date according the value of tree select node the code of tree something like this
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
"ENAME" as title,
null as icon,
"EMPNO" as value,
null as tooltip,
'f?p=36648:34:5234984107903::::P40_SELECTED_NODE:'||empno as link
from "DEPT"."EMP"
start with "MGR" is null
connect by prior "EMPNO" = "MGR"
order siblings by "ENAME
and i put Selected Node Page Item: P40_SELECTED_NODE . the tree worked good and retrieve the data into tabular form according to tree node value
my Question :
1- i want to retrieve the data without submit the page where each time i select value from tree make page reload to update the tabular form with new value ,there is any way to pass the value of tree node to P40_SELECTED_NODE item and refresh tabular form without page reload .
2- i want when selected from tree run page process according to value of tree node i tray to create Dynamic action with *(jquery selector : div.tree li>a)* but the Value of node incorrect.
Regards
Ahmed;look at this link
Re: How to get Value of tree node without Reload Page ..! -
How to get value of a textfield which has been set as Renderd false.
Hi all
how to get value of a TEXTFIELD which has been set as Renderd false.
i am getting the value of this textfield from an lov but dont want to show it to the user.
getting error as:
attribute xxxx required for view object yyyyy.
pls help
naveenYou can create item inside your LOV region, set the item style to formValue. You can associate this to a View Object field. It can also act as mirror of any other text input field.
FormValue can hold the value and will not be diaplyed to user. You can read value from it controller
example
OAFormValueBean orgValue = (OAFormValueBean)webBean.findChildRecursive("OrgIdFormVal");
Or you can read it fro the VO associated with this form value. -
How to get Value of a item of first record when current record is second
How to get Value of a item of first record when current record is second in Form6i ?
get_item_instance_property dose not allow to get value.Gerd,
You're right, there are several other triggers that must be coded, but I was responding to Steve's statement about Inserting or deleting records from the multi-record block. For the record, I use the following to manage a Record Group:
* When-New-Block-Instance - Initialize the RG
* block Post-Query - populate the RG
* When-Create-Record - add new record to RG
* When-Remove-Record - remove record from RG
* block When-New-Item-Instance - capture previous value of the item or row
* When-Validate-Item - Item specific Insert, Update, Delete of values in the RG
There are a few other places as well, but these are the minimum. It might seem like a lot of code, but then again, I don't use this solution for every multi-line block. Like all tools, you use the right tool for the job. :-)
Craig...
Maybe you are looking for
-
Can't Send Attachments Using Exchange Account
For some reason I can't send attachments using my Exchange account on my iPhone. Pictures, Word docs, Excel Docs, doesn't matter. They just get stuck in my out box and I get the following message, "Cannot Send Mail - An error occurred while deliverin
-
2 New packages=BibleTime and Sword
Hi, I just wanted to post a couple of scripts for BibleTime and Sword Heres Sword pkgname=sword pkgver=1.5.7a pkgrel=1 pkgdesc="SWORD libraries for Bible programs" url="http://www.kernel.org" backup=(etc/modules.conf) makedepends=('bash' 'mawk') depe
-
Any alternatives for dbms_utility.format_call_stack?
For the freaks out there: isn't there an alternative for dbms_utility.format_call_stack, since this will not work in server-side pl/sql when called from Oracle Forms. I'm searching something like a Data Dictionary View where I can retrieve this kind
-
needed to update iphone4
-
Planning application is taking alias name in Essbase
Hi, I have successfully created and deployed an EPMA application.But when i'm looking at the application in EAS two of my dimensions are taking Alias names instead of original names.. :( :( one dimension is Entity type and one dimesion is Generic typ