Can be passed Formula Column value to Procedure/Function?
Below cf_value is return after some calculation by using main query.
Can be directly passed formula column value to procedure without assinged to placeorder?
as below..
f_convert(:cf_value,new_value);
My Procedure is...
PROCEDURE f_convert( val1 in number,val2 in out number) IS
BEGIN
val2 := val1 * 100;
END;
If anyone knows pls reply me....
Actually, if there is any other calculations there (In Proceudre)
Can I used is as below??
PROCEDURE f_convert( val1 in number,val2 in out number) IS
BEGIN
val2 := val1 * 100;
return (val2);
END;
----A procedure cannot return a value, the return clause in my previous post was part of the function for formula column.
Suppose you have a formula column say CF_2 then the function for it will be as:
function cf_2formula return number
is
val1 number;
val2 number;
begin
val2 := :cf_1 * 100; -- or val2 := val1 * 100 --parameters not allowed in formula column function
-- All the other code that you need inclusive of calling function, procedure as in any PL/SQL block can be placed
return (val2);
end;So any other calculation can be used in the formula column function
Similar Messages
-
Dml error logging: can we pass source column values to ora_err_tag$
Hi Experts,
We can set ora_err_tag$ values while implementing dml error logging feature.
Can we pass source column values to ora_err_tag$ field of error table?
Thanks,
DhirajF5wrong forum
Philip -
Can formula column values be used as parameters
Post Author: vdm
CA Forum: Formula
Hi,
I have various formula columns setup in my crystal report, these formula columns act as prompts when end users run the report. i am using crystal reports xi and sql server databse.
Now I would like to use these formula columns to restrict my result set. basically, these should act as predicates (where clauses) to my query.
Is there a way to pass formula columns as parameters to stored procedures or to commands or to simpy add them to a sql query ?
thanks in advancePost Author: foghat
CA Forum: Formula
Have you tried adding the formula fields as a filter in the Record Selection Formula editor?So Report --> Selection Formulas --> Recordand add: {database.field_a} = and {database.field_b} = and so on -
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 -
Unable to pass report column value to url in select statement. Please help
Hi all,
I am trying to pass the report column value as follows:
select key, num,
case when Attachmentcnt(KEY) != 0 then
'f?p=&APP_ID.:91:&SESSION.:'' '':NO::P91_KEY,P91NUM,P91_PREVPG:'And I am passing values as follows:
{noformat}
'#KEY#,'#NUM#','9' ELSE null
END Attachment
from tableA
{noformat}
But, I am not able to figure out correct sysntax to pass these column values. Can anyone give me some help. I appreciate it.
rgds,
Suma.
Edited by: sumak on Jun 23, 2009 12:11 PM
Edited by: sumak on Jun 23, 2009 12:22 PMSuma,
If you're trying to generate a column with a URL, try something like the following:
select key, num,
case when Attachmentcnt(KEY) != 0 then
'f?p=&APP_ID.:91:&SESSION.:'' '':NO::P91_KEY,P91NUM,P91_PREVPG:'
|| tableA.key || ',' || tableA.num || ',' || :P91_PREVPG
else NULL
end
FROM tableA;
But the best way to pass these would include checksum values against the values of your parameters (to make sure a user doesn't hack them). You'll need to check the Apex User manual for details - See "Understanding Session State Protection".
Good luck,
Stew -
How can i pass the parameter for strored procedure from java
dear all,
I am very new for stored procedure
1. I want to write the strored procedure for insert.
2. How can i pass the parameter for that procedure from java.
if any material available in internet create procedure and call procedure from java , and passing parameter to procedure from javaHi Ram,
To call the callable statement use the below sample.
stmt = conn.prepareCall("{call <procedure name>(?,?)}");
stmt.setString(1,value);//Input parameter
stmt.registerOutParameter(2,Types.BIGINT);//Output parameter
stmt.execute();
seq = (int)stmt.getLong(2);//Getting the result from the procedure. -
Can we use formula column in lexical parameter in sql query ...
hi
can we use formula column in lexical parameter in sql query ...
as example
i want to give
select * from & c_table
forumula
function c_table
if :p_sort = 1 then
return 'dept'
else
return 'emp'
end;
c_table formula column
is this possible ...
i have such example in oracle apps reports
if i try in ordinary report usinf emp table it show error ..
how we can give formula column...
please help me in this regard...
Edited by: 797525 on Feb 20, 2012 9:31 PMthanks sir,
iam not exactly saying select * from &c_table but some thing that like columns in select stmt also will be populated in user_parameters ,there are lot of table select.......from mtl_demand md, mtl_system_items msi, mtl_txn_source_types mtst, mtl_item_locations loc &C_source_from &C_from_cat
&c_source_from and &c_from_cat formula column and there are defined at report level only ......
pl/sql code &c_source_from is
function C_source_fromFormula return VARCHAR2 is
begin
if :P_source_type_id = 2 then return(',MTL_SALES_ORDERS mkts');
else if :P_source_type_id = 3 then return(',GL_CODE_COMBINATIONS gl');
else if :P_source_type_id = 6 then return(',MTL_GENERIC_DISPOSITIONS mdsp');
else if :P_source_type_id = 5 then
if :C_source_where is null then
return NULL;
else
return(',WIP_ENTITIES wip');
end if;
else if :P_source_type_id = 8 then return(',MTL_SALES_ORDERS mkts');
else if :P_source_type_id is null then
return(',MTL_SALES_ORDERS mkts,
MTL_GENERIC_DISPOSITIONS mdsp,
GL_CODE_COMBINATIONS gl ');
else null;
end if; end if; end if; end if; end if; end if;
RETURN NULL; end;
this is forumula column i hope that you understand what iam saying
please help me in this regard....
thanking you... -
How can i pass the Input value to the sql file in the korn shell ??
Hi,
How can i pass the Input value to the sql file in the korn shell ??
I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
can any one help me out.
RajaCan you please more elaberate., perhaps you should more elaberate.
sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense. -
HOW CAN I PASS A DEFAULT VALUE IN INTERNAL TABLE
HOW CAN I PASS A DEFAULT VALUE IN INTERNAL TABLE.
DATA : BEGIN OF ITAB OCCURS 0,
FIELD1(2) TYPC C DEFAULT '12',
FIELD2 TYPE C ,
END OF ITAB1.
IT'S GIVING ERROR MESSAGE.
PLZ LOOK INTO THIS AND GIVE ME CORRECT SOLUTION.
THANKS
SURIDATA : BEGIN OF ITAB OCCURS 0,
FIELD1(2) TYPC C,
FIELD2 TYPE C ,
END OF ITAB1.
itab-field1 = '12'.
itab-field2 = 'A'.
append itab.
clear itab-field2.
itab-field1 = '12'.
itab-field2 = 'B'.
append itab.
clear itab-field2.
Now everytime u'll have the value for field1 = '12'.
Regards
Vasu -
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 -
Can we Pass two variable values in to one Varaible which is Cust Exit?
Hi all,
Can we pass two Variable values to a Variable which is Custexit?(For Example posting Period and the fiscalyear in to the FicalPeriod )
Regards
KiranHello,
For that example you had to "convert" both post period and fiscalyear into fiscalperiod, and yes it is possible, but not throwing up the two values, you had to do it yourself in the user exit code.
Diogo. -
Can you pass a hidden value along with your select option in the form selec
Can you pass a hidden value along with your select option in the html form select
Off topic. Locking.
-
Can we set h:outputText value= "(some javascript function value)"/
Hi
Can we set <h:outputText value= "(some javascript function value)"/>
In a scenario like when user changes the item in dropdown box. label name as to change for the next text box.
-----JSP page------
h:outputText value="*" styleClass="mandatoryField" />
<h:outputText value="Matching Criteria:" />
<h:selectOneMenu id="MatchingCriteria" styleClass="dropDownMenu" value="#{OffsetTradingRuleBean.matchingCriteria}"immediate="true" onchange="unitChange()">
<f:selectItems value="#{OffsetTradingRuleBean.matchingCriteriaMap}"/>
</h:selectOneMenu>
<h:outputText value=""></h:outputText>
<h:outputText value=""></h:outputText>
<h:outputText id="DeminimisLabel" value="" ></h:outputText>
<h:inputText id="DeMinimisUnit" styleClass="text" value="#{OffsetTradingRuleBean.deMinimisUnit}" maxlength="15" onchange="detectChange()" >
<f:validator validatorId="DefaultValidator"/>
</h:inputText>
<h:outputText value=""></h:outputText>
-----Java Script-----
function unitChange(){
if(document.getElementById("frm:MatchingCriteria").value!="1"){
alert('inside unitchange--'+document.getElementById("frm:MatchingCriteria").value)
document.getElementById("frm:DeminimisLabel").value="Deminimis Dollars";
if(document.getElementById("frm:MatchingCriteria").value!="0"){
document.getElementById("frm:DeminimisLabel").value="Deminimis Shares";
thanks in advance
Rambhapuribalu
actually i want to swap label name using javascript. first i will call onchange event from matching criteria dropdown box . then it will fire unitChange() function.
then i am putting value Deminimis dollor or deminimis shares accroiding to the value which is there in dropdown.
this value as to come in <h:outputText id="deminimisLabel" value=" should come value from java script" />
and it should act dynamically ,. like when ever user changes the dropdown item . the corresponding name should change in lable name.
thanks
rambhapuri -
How i pass table column value to string variable or return to java applete
Hi Master,
How do I pass a table column value into string variable. See my code below:
import java.sql.*;
public class Waheed {
public Waheed() {
public static void main (String args [])
String s = "9 23 45.4 56.7";
System.out.println ("going for connection");
// DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:@fahim:1521:aamir","muhammad","mfa786");
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select accid from accbal");
System.out.println ("going for connection");
while (rset.next())
s= rset.getString("accid"); this line give me error
System.out.println (rset.getString("accid"));
System.out.println (s);
catch(Exception e){
e.printStackTrace();
This line give me an error:
s= rset.getString("accid");
s is string variable
Plese give me an idea how I can pass accid in s variable.
Thanks.
AamirSee the code sample in the following thread (try using upeercase).
JDBC connection
Kuassi -
How to pass report column value
I'm trying to implement a AJAX report pull from one of the response on this forum. The report column calls the following javascript function below. The #COL2# values are dotted values like 10.2.3.5.6. The function passes values correctly passed if the values are without special characters. I tried to put the value 10.2.3.5.6 in escape(10.2.3.5.6), but didn't work. Any ideas to pass this value in javascript encode/decode way is appreciated.
javascript:GetReport(#COL02#)
thanks,
SuryaHello Surya,
>> I have put an example on APEX site …
This is indeed the best and fastest way to get help.
>> but the third version value "1.2.3" fails to display …
String parameters should be encapsulated with single/double quote signs.
Your first two rows could have been considered as numbers, so the systems let them pass. The third one – 1.2.3 – is not a number, but you didn’t mark it as a string.
I changed your code to the following:
javascript:GetReport_r1('#COL01#');And now it’s working as you need.
General remark: I saw in your report page that you are using the “Generic Column Names”. Just so you know, this not is the optimal choice. If you don't have to use it, you should use the first option of “Query Specific Column name”. If you have to use generic columns, try to minimize the number as close as you can to the real number of columns, and not just to default of 60.
Regards,
Arie.
Maybe you are looking for
-
Hallo, I just recently read a post from a few months ago in regards to delaying the time it takes on load for text to appear (I can do the effect "appear" on load but would like a two second delay of nothing before you start to see the text) The code
-
External hd not recognized after 8.1 upgrade
my 3 tb seagate external is not being recognized after 8.1 upgrade. plugged in bothe sides of usb ports still no response. lights up when plugged but thats about it. Please help, thanks.
-
How could i display yahoo mail in Portal UWL
Hi, Can any one tell me how can i diaplay my yahoo mail in Portal UWL any connector is avilable to connect Portal to yahoo server. thanks in advance Chitta
-
How do I change a tracks position in a playlist?
Is it possible to move tracks up and down the play order once I have put them in a playlist? Thanks
-
Hi, We have a requirement to transfer personnel details from one client to another. We are using the inbound FM 'IDOC_INPUT_HRMD' for this purpose. So far, we are able to update existing records. How do we proceed when we need to transfer records for