How Can I get multi column values from dynamic search help?
Hi Gurus;
I'm using dynamic search help in my program.
I want to get multi column values from search help. But I dont know solution for this issue.
I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
How Can I get multi column values from dynamic search help?
Thanks.
Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
There are like 3 steps.
You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined (just to keep it straight, i will be putting here) data: It_return type standard table of ddshretval.
Next step is to call the function module. Make sure you have values in IT_VALTAB.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'FLD2'
value_org = 'S'
tables
value_tab = It_VALTAB
return_tab = It_return
dynpfld_mapping = It_dynpfld
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.
else.
perform get_selected_fields tables It_return.
endif.
The code within the perform GET_SELECTED_FIELDS - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
I need a internal table as well as a work area here. like,
data: lt_fields type table of dynpread,
la_fields type dynpread.
field-symbols: <fs_return> type ddshretval.
so fill out LT_FIELDS from the IT_RETURN table
loop at lt_return assigning <fs_return>.
la_fields-fieldname = <fs_return>-retfield.
la_fields-fieldvalue = <fs_return>-fieldval.
append la_fields to lt_fields.
clear: la_fields.
endloop.
Call the FM to update the dynpro
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-repid
dynumb = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
tables
dynpfields = lt_fields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
good luck
Similar Messages
-
How can i get the all values from the Property file to Hashtable?
how can i get the all values from the Property file to Hashtable?
ok,consider my property file name is pro.PROPERTIES
and it contain
8326=sun developer
4306=sun java developer
3943=java developer
how can i get the all keys & values from the pro.PROPERTIES to hashtable
plz help guys..............The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
InputStream is = new FileInputStream("tivoli.properties");
props.load(is); -
How can I get the edited value from the editor in JTable
I have a JTextField added as an editor to a cell in JTable.
I value gets changed when I press enter.
but in actionPerformed of the JTextField when I say
String txtEditorValue = txtEditor.getText();
I am getting the old value. How can I get the edited value? Thanks.Hi,
I guess, your understanding of how JTable works together with its models is not good enough - for example the method getTableCellEditorComponent(...) of the TableCellEditor interface is used to get the component, that should be used as editing component - its second parameter is a value that should be used to setup the editing component - it is normally not the editing component itself.
JTable uses an underlying TableModel to store the cell values - if you have edited a cell, JTable gets the value of the editing component by itself and stores it in the TableModel using its setValueAt(...) method. To retrieve this data you only need to query the TableModel using row and column of this cell as parameters
say jt is your JTable, and row and column are the row and column of the cell - so to get the value, simply use
Object obj = jt.getModel().getValueAt(row,column);
if you know, that there is a String in this cell use
String str = (String) jt.getModel().getValueAt(row,column);
The editor component is used for the view of the JTable - you only want the data, which is stored in the model - you don't have to deal with the GUI components in this case.
greetings Marsian -
How can I access the Attribute Values from the Search Region
Hi all,
I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
I don't know how can I access the data from the Search Region.
Please Help.
Regards,
Ranjithyou could access the parameters entered in search region by the user as follows:
You can get handle to the value entered by the user using queryListener method in af:query.
You can intercept the values entered as described
public void onQueryList(QueryEvent queryEvent) {
// The generated QueryListener replaced by this method
//#{bindings.ImplicitViewCriteriaQuery.processQuery}
QueryDescriptor qdes = queryEvent.getDescriptor();
//get the name of the QueryCriteria
System.out.println("NAME "+qdes.getName());
List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
for ( Criterion c : searchList) {
if (c instanceof AttributeCriterion ) {
AttributeCriterion a = (AttributeCriterion) c;
a.getValues();
for ( Object o : a.getValues()){
System.out.println(o.toString());
//call default Query Event
invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
public void onQueryTable(QueryEvent queryEvent) {
// The generated QueryListener replaced by this method
//#{bindings.ImplicitViewCriteriaQuery.processQuery}
QueryDescriptor qdes = queryEvent.getDescriptor();
//get the name of the QueryCriteria
System.out.println("NAME "+qdes.getName());
invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
FacesContext fctx = FacesContext.getCurrentInstance();
ELContext elctx = fctx.getELContext();
ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
me.invoke(elctx, new Object[]{queryEvent});
Thanks,
Navaneeth -
Stolen ipad 4. How can i get my serial number from Apple?HELP!!
My Apple iPad 4 was stolen i do not have the box anymore because when i bought it i was living as an aupair in the USA so on my return after that about 2 months ago my iPad got stolen i never wrote the serial number down did email it to my father though but he lost that email. PLEASE HELP! how can i find my serial number from Apple, they surely should have my serail number on my apple ID???
It seems it was never registered to your Apple ID.
Do you have an iTunes backup of the iPad?
Open iTunes.
Open Preferences. (In Mac OS X, choose iTunes > Preferences. In Windows, choose Edit > Preferences.)
Click the Devices tab.
Position the mouse over a backup to display the serial number of the backed-up device. iPhone and cellular iPad models also display the IMEI/MEID and Cellular Data Number:
iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number -
How can i get the random values from database?
Hi,
i want to get random values from database.
I try my best find no solution
plz give solution in either sql query or java method.
thanks in advance.try this:
Give a numeric row-id to each row of database.
say (1-100) for 100 rows
In the program use random function to get random number between 0 and 1. this value u multiply with 100(or total number of rows) and take integer value of it . u then perform sql query to select the a row which matches randomly genarated value with row-id assigned to each row of database
madhu -
How can I get selection screen values from outside of program?
Hi. all.
Now. I'm developing moritoring systems and I have problems. for getting selection screen values in runtime. Is there any function, methods or structure to know this?
I'd like to get selection screen values while several programs working in runtime and update these values to table to show current system's status and input values for users in real time.
For example.
Now. 3 PGMs are working on systems.
each PGM is ZAAA01, ZAAA02, ZAAA03.
and ZAAA01 needs input parameter P01, ZAAA02 needs input parameter P02, ZAAA03 needs input parameter P03.
In this case, I have to know values of P01, P02 and P03.
The mornitoring systems will show current working status of PGMs(ZAAA01~03)' and these PGMs' input values.
As fas as I know, the structure 'SCREEN' can be used in each PGM for runtime. Is there any SAP system structure or something else for this purpose?
I hope your hopeful repsponse.
Thanks.Umm..I need to explain more about this.
of course I know SET, GET PARAMETERS.
But I'd like to minimize coding for each PGM level.
I have over hundreds PGMs and I have to develop the PGM(including tables and structures) that mornitor
all of those PGMs on a report in real-time.
This PGM is kind of Process Manager.
First I should know dialogue job PGM and background job that pass parameters using SAP(ABAP) Memory.
And then I have to update those PGMs' input values via screens into tables in real-time.
So, I couldn't use SET,GET PARAMETERS for this PGM.
I want to know methods that can be used for getting information about runtime PGMs' selection screen field values in SAP systems wide.
Please help me some one knows this. -
How can I get some specific value from AP
Hello,
I have AP 350 or 1100 and management software CISCO WORKS for WINDOWS. I need for our customer information how he can get some SNMP specific information OID like signalstrange or something another specific OID. We can get traps from AP but it's not what we can.
Do you know somebody any helps?
Thank you
DavidFor Windows
Download MG-SOFT Corporation's MIB-Browser, its evlauation version.
Download the AP MIBs from Cisco.
Compile the MIBs using the MG-SOFTs MIB-Explorer and then you see the OID values and expalnations. -
How can I get the cursor value from a waveform graph
Is there a way to get the value of cursor position on the waveform graph so mathematical calculations be performed on those values. We can see the value in cursor legend, but can we extract those values for future calculations in the block diagram somehow.
Right-click on the waveform graph icon. Select Create>Property Node>Cursor>Cursor Position. That spits out a a xy cluster for the current cursor position.
If you have more than one cursor, you can either set up a loop and set the Active Cursor property node (right click the property node and select "Change to Write") or you can pull everything you ever wanted to know about every cursor with the Cursor List property node. -
How to get the column values from a BC4J View Table in UIXML?
I am using a default UiXML Application for Order Entry system with Orders & Order Lines & Customers. I have a uix file OrdersView1_View.uix which displays (no updateable columns) all the Orders. How do I get the column value of a selected row in a BC4J Table (example:OrdersId) when a Submit button is pressed using UIXML or Java Classes?
I appreciate any help on this.Hi,
You need to use keyStamp, an example:
<bc4j table name="orders">
<bc4j:keyStamp>
<bc4j:rowKey name="key" />
</bc4j:keyStamp>
Furthermore, you can automatically send the selected row key using the go event handler, so in the handlers section you could send the key to an orderInfo page:
<event name="show">
<!-- forward to the update page, passing
the selected key as a page property -->
<ctrl:go name="orderInfo" redirect="true">
<ctrl:property name="key">
<ctrl:selection name="orders" key="key" />
</ctrl:property>
</ctrl:go>
</event> -
How can i get all these values in single row with comma separated?
I have a table "abxx" with column "absg" Number(3)
which is having following rows
absg
1
3
56
232
43
436
23
677
545
367
xxxxxx No of rows
How can i get all these values in single row with comma separated?
Like
output_absg
1,3,56,232,43,436,23,677,545,367,..,..,...............
Can you send the query Plz!These all will do the same
create or replace type string_agg_type as object
2 (
3 total varchar2(4000),
4
5 static function
6 ODCIAggregateInitialize(sctx IN OUT string_agg_type )
7 return number,
8
9 member function
10 ODCIAggregateIterate(self IN OUT string_agg_type ,
11 value IN varchar2 )
12 return number,
13
14 member function
15 ODCIAggregateTerminate(self IN string_agg_type,
16 returnValue OUT varchar2,
17 flags IN number)
18 return number,
19
20 member function
21 ODCIAggregateMerge(self IN OUT string_agg_type,
22 ctx2 IN string_agg_type)
23 return number
24 );
25 /
create or replace type body string_agg_type
2 is
3
4 static function ODCIAggregateInitialize(sctx IN OUT string_agg_type)
5 return number
6 is
7 begin
8 sctx := string_agg_type( null );
9 return ODCIConst.Success;
10 end;
11
12 member function ODCIAggregateIterate(self IN OUT string_agg_type,
13 value IN varchar2 )
14 return number
15 is
16 begin
17 self.total := self.total || ',' || value;
18 return ODCIConst.Success;
19 end;
20
21 member function ODCIAggregateTerminate(self IN string_agg_type,
22 returnValue OUT varchar2,
23 flags IN number)
24 return number
25 is
26 begin
27 returnValue := ltrim(self.total,',');
28 return ODCIConst.Success;
29 end;
30
31 member function ODCIAggregateMerge(self IN OUT string_agg_type,
32 ctx2 IN string_agg_type)
33 return number
34 is
35 begin
36 self.total := self.total || ctx2.total;
37 return ODCIConst.Success;
38 end;
39
40
41 end;
42 /
Type body created.
[email protected]>
[email protected]> CREATE or replace
2 FUNCTION stragg(input varchar2 )
3 RETURN varchar2
4 PARALLEL_ENABLE AGGREGATE USING string_agg_type;
5 /
CREATE OR REPLACE FUNCTION get_employees (p_deptno in emp.deptno%TYPE)
RETURN VARCHAR2
IS
l_text VARCHAR2(32767) := NULL;
BEGIN
FOR cur_rec IN (SELECT ename FROM emp WHERE deptno = p_deptno) LOOP
l_text := l_text || ',' || cur_rec.ename;
END LOOP;
RETURN LTRIM(l_text, ',');
END;
SHOW ERRORS
The function can then be incorporated into a query as follows.
COLUMN employees FORMAT A50
SELECT deptno,
get_employees(deptno) AS employees
FROM emp
GROUP by deptno;
###########################################3
SELECT SUBSTR(STR,2) FROM
(SELECT SYS_CONNECT_BY_PATH(n,',')
STR ,LENGTH(SYS_CONNECT_BY_PATH(n,',')) LN
FROM
SELECT N,rownum rn from t )
CONNECT BY rn = PRIOR RN+1
ORDER BY LN desc )
WHERE ROWNUM=1
declare
str varchar2(32767);
begin
for i in (select sal from emp) loop
str:= str || i.sal ||',' ;
end loop;
dbms_output.put_line(str);
end;
COLUMN employees FORMAT A50
SELECT e.deptno,
get_employees(e.deptno) AS employees
FROM (SELECT DISTINCT deptno
FROM emp) e;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 SMITH,JONES,SCOTT,ADAMS,FORD
30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
CREATE OR REPLACE FUNCTION concatenate_list (p_cursor IN SYS_REFCURSOR)
RETURN VARCHAR2
IS
l_return VARCHAR2(32767);
l_temp VARCHAR2(32767);
BEGIN
LOOP
FETCH p_cursor
INTO l_temp;
EXIT WHEN p_cursor%NOTFOUND;
l_return := l_return || ',' || l_temp;
END LOOP;
RETURN LTRIM(l_return, ',');
END;
COLUMN employees FORMAT A50
SELECT e1.deptno,
concatenate_list(CURSOR(SELECT e2.ename FROM emp e2 WHERE e2.deptno = e1.deptno)) employees
FROM emp e1
GROUP BY e1.deptno;
DEPTNO EMPLOYEES
10 CLARK,KING,MILLER
20 SMITH,JONES,SCOTT,ADAMS,FORD
30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
CREATE OR REPLACE TYPE t_string_agg AS OBJECT
g_string VARCHAR2(32767),
STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
value IN VARCHAR2 )
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
returnValue OUT VARCHAR2,
flags IN NUMBER)
RETURN NUMBER,
MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
ctx2 IN t_string_agg)
RETURN NUMBER
SHOW ERRORS
CREATE OR REPLACE TYPE BODY t_string_agg IS
STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
RETURN NUMBER IS
BEGIN
sctx := t_string_agg(NULL);
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
value IN VARCHAR2 )
RETURN NUMBER IS
BEGIN
SELF.g_string := self.g_string || ',' || value;
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
returnValue OUT VARCHAR2,
flags IN NUMBER)
RETURN NUMBER IS
BEGIN
returnValue := RTRIM(LTRIM(SELF.g_string, ','), ',');
RETURN ODCIConst.Success;
END;
MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
ctx2 IN t_string_agg)
RETURN NUMBER IS
BEGIN
SELF.g_string := SELF.g_string || ',' || ctx2.g_string;
RETURN ODCIConst.Success;
END;
END;
SHOW ERRORS
CREATE OR REPLACE FUNCTION string_agg (p_input VARCHAR2)
RETURN VARCHAR2
PARALLEL_ENABLE AGGREGATE USING t_string_agg;
/ -
How can I add multi columns to a JCombo Box ?
Dear experts,
How can I add multi columns to a JCombo Box ?
Thankx in advance
UniqueWhat do you mean by adding Multiple columns? JCombobox is a component in which you can choose a value from a list(rows) of values. Could you please explain why do you want multiple columns in the JComboBox. I suppose JComboBox is not meant for that.
Thanks,
Jana -
<blockquote>Locked by Moderator as a duplicate/re-post.
Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
Thanks - c</blockquote>
== Issue
==
I have a problem with my bookmarks, cookies, history or settings
== Description
==
How can I get the default value of a particular preference in FireFox?.
I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
Any help towards acheiving this programtically is greatly appreciated.
If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
== User Agent
==
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)Dear Friend,
Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
Then you can get the value from the outparameter using callablestatement.getXXX().
Try that way.
For free tral versions of JDBC Drivers go to www.Atinav.com -
How can i select other column values('-' separated) in group by function
CREATE TABLE EMP (
EMPNO NUMBER(4) NOT NULL,
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
SAL NUMBER(7)
INSERT INTO EMP(EMPNO, ENAME, JOB, SAL) VALUES (7369, 'SMITH', 'CLERK', 800);
INSERT INTO EMP(EMPNO, ENAME, JOB, SAL) VALUES (7499, 'SMITH', 'SALESMAN', 1600);
INSERT INTO EMP(EMPNO, ENAME, JOB, SAL) VALUES (7521, 'ALLEN', 'SALESMAN', 2400);
In Output I want 3 columns : EMP,SUM(SAL),JOB(hyphenSeparated)
Means i want my output like
First row : SMITH,2400,CLERK-SALESMAN
Second row : ALLEN,2400,SALESMAN
I tried to write following sql : select ename,sum(sal) from emp group by ename
But i want other colummn value in '-' separated. but group by is only allowing agreegated function.
How can i select other column value using group by function.SQL> select ename,sum(sal), listagg(job, '-') within group (order by job) as job from emp group by ename;
ENAME SUM(SAL) JOB
ALLEN 2400 SALESMAN
SMITH 2400 CLERK-SALESMANnote: LISTAGG is a feature of 11.2 -
how can I get an itunes movie from macbook to apple tv via airplay?
You don't use Airplay. You set up Home Sharing on both and under the Computers section of AppleTV you'll then find it under Movies (or Rentals if rented), assuming it's in a compatible format.
AC
Maybe you are looking for
-
Can I use a external hard drive to install windows?
Is that possible? Cause my mac only has 80GB and my windows portion is low 6GB left.
-
Modification of print preview of alv report
Dear all, I got a new requirement, after running CADO transaction with sel.parameters PERNR and DATERANGE it displays alvgrid . If an enduser want to print this ALVGRID that must display sel.parameters at the top of first page.Is it possible
-
[AS CS3] Search first occurence then next search item
Hi! I have a 1000+ page book. I need to change several (2000+) names to character style but only first occurence of that name and then search first occurence of next name. Names are on a text file which i read to AS but if i use set myFoundItems to c
-
Hi Does 'Java technologies for Web services" have APIs for parsing WSDL files? Are there any open source implementations for parsing WSDL files. Thanks Pradeep
-
I just read this page...
I just read this page http://www.ipadnewsdaily.com/631-how-to-fix-a-broken-ipad-screen.html .. and found it very interesting .. but here the values are much higher .. to replace a value is from 650 to 750 dollars ... does not pay .. if the same amo