How to use a bind variable in a table-validated flexfield

Hi,
I want to prepare a table-validated descriptive flexfield, which uses as source a select statement.
So, in the form "Validation table information" I use as table name the statement:
(SELECT my_procedure('test_value') FROM DUAL)
Up to here it works fine.
But instead of 'test_value' I want to use the value of a field in the form or a value of another flex (using $FLEX$ bind variables).
Please advice if it is possible to perform this in "table name" statement. I use it in "where/order by" clauses and it works fine.
Thank you.

Hi,
I have posted in the place where you did advise,
https://forums.oracle.com/thread/2560192
but they reply there that this is an EBS question, with no much relation to dev tools in general.
Please, can I continue in this place with this question?
Thank you.

Similar Messages

  • How to use the bind variable in custom.pll

    Hi,
    How to use the bind variable in custom.pll.Its through error.
    any one gem me.
    very urgent.
    M.Soundrapandian.

    Hello,
    Please, ask this kind of questions in the e-business forum.
    Francois

  • How to use a bind variable in an IN clause

    I am trying to use a bind variable in an IN clause where the column is a varchar2 type. Something like:
    select *
    from test
    where test_column in (:bindVariable)I have tried assigning the bind variable comma separated strings (eg. test,test,test) and comma separated strings with quotes (eg. 'test','test','test'). Neither of these work. Does anyone know the correct way to do this?
    Thanks in advance.

    http://tkyte.blogspot.com/2006/06/varying-in-lists.html
    Presents many options.

  • How to use a bind variable in XE for accessing data from different sources

    Hi,
    I am new to XE and trying to create an application like this:
    (region source)
    Select * from v$session@:P1_DATABASE ;
    My intention is to give the name of the database at runtime to fetch the relevant data.
    But I am getting error like this
    1 error has occurred
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-01729: database link name expected
    Doesn't work even when I check the "Generic Columns" and run the query at the run time (same error).
    Can some one please help!
    Regards,
    Santosh Loke

    Hi,
    There are rules using names in SQL. I think you could use dynamic SQL to achieve the goal in your case. It is not clear for me what are you going to do. Moreover bind variable are difficult to use some times.
    You could start with something simple as a report and a form.
    Konstantin

  • How to use the :$PROFILE$ token in a table validation value set

    Hi Community,
    Let me explain the scenario.
    We have a Flex Value Set (CLIENTES SERVICIO DIRECTO) with a table validation, included in the PO Headers DFF, which shows a LOV with the Ship-to addressfrom the customer which we want to serve the goods; i.e. we are acting as a commisionists and the supplier puts the goods in the Ship-to address of the customer.
    This Flex Value Set, as I mentioned, have a table validation, with the following validation table information:
    Table Application: Oracle Receivables
    Table Name: RA_ADDRESSES_ALL a, RA_CUSTOMERS b
    Table Columnns: b.CUSTOMER_NAME Varchar2(20), a.PARTY_LOCATION_ID Varchar2(20)
    Where/Order By: a.CUSTOMER_ID = b.CUSTOMER_ID
    Additional Columns: a.ADDRESS1 "Dirección"(20), a.CITY "Ciudad"(10)
    If we translate this to a SQL code:
    select a.address1,
    a.city,
    a.party_location_id,
    b.customer_name
    from ra_addresses_all a,
    ra_customers b
    where a.customer_id = b.customer_id
    and b.customer_id = 6283 <--- This last condition clause is for narrowing the result to the interested customer.
    This select retrive us two records; for the same customer, one of them for one organization_id (let's say 85) and one of them for the other organization_id (84).
    What we are looking for and want is that the LOV, which actually display the two records, shows only the ship-to site of the customer that belongs to the organization_id which belongs the user who queries or creates the Purchase Order.
    I.e. Suppose that we enter to Purchasing using the responsibility assigned to the Operating Unit or Organization_id 84. We want that theLOV only shows the Ship-to Site from the customer that belongs to the Operating Unit or Organization_id 84.
    I believe that we can achieve this using the :$PROFILE$ token, but we do not know how.
    Any ideas?
    Thanks a lot for your answer.

    Hi Rcana,
    We have just test your suggestion and it works. We believe that the correc sentence was fnd_profile.get('profile_name'), but the value feature solve the problem. Thanks for your help.
    Regards.

  • How to properly set bind variables

    Dear All,
    I am currently confused about how to properly set my Bind Variables
    I have this view using HR standard schema
    Select *
    from Employees
    where EMPLOYEE_ID = :EMP_IDI somehow see three options on how to use this bind variable in an application module.
    Option 1:
    ViewObjectImpl view = this.getEmployeesView();
    VariableValueManager vm = view.ensureVariableManager();
    vm.setVariableValue("EMP_ID", value);
    view.executeQuery();Option 2:
    ViewObjectImpl view = this.getEmployeesView();
    view.setNamedWhereClauseParam("EMP_ID", value);
    view.executeQuery();Option 3:
    EmployeeViewImpl empView =this.getEmployeesView();
    RowSetIterator it = empView.createRowSetIterator(null);
    empView.setEmployeeId(value);
    empView.executeQuery();Question is which is which and what should I use?
    JDEV 11G PS3

    I use is this
    DCIteratorBinding iteratorStatus = Util.getIterator("NameIterator");
    operationBinding.execute();
    Util is reserved in a class.
    public static DCIteratorBinding getIterator(String iteratorName){
    return getDCBindings().findIteratorBinding(iteratorName);
    }

  • How to find out if a SQL is using a bind variable or not?

    In order to make a SQL use consistent execution plan, I want to create a profile for a SQL. But I need to know if a SQL is using bind variable or not to create a profile for all the same SQLs except the literal value. How can I do that?
    Thanks in advance

    You can tell if an SQL statement uses a bind variable by looking at the SQL statement.
    If you look in the program that submits the SQL statement you can see how it constructs, prepares, and executes the statement.
    If you are just looking at the SQL in the shared pool then depending on how the statement is written and the setting of database parameters like cursor sharing then it can be more difficult but if you see a constant (actual value) that is a constant. A bind variable would appear as a name in the where clause where that name does not exist any of the tables referenced in the query. Note it is technically possible to create pl/sql variables with the same name as columns in the query but that is poor coding and leads to issues.
    Note - To Oracle two versions of the otherwise same query where one has a constant and the other has a bind variable are not the same query and often produce different plans. This is a common error made by developers new to Oracle when using explain plan. To explain a query that uses bind variables place a ":" in front of the variable name in the SQL submitted to explain plan.
    HTH -- Mark D Powell --

  • How to have the BIND variables value using the TKPROF utility.

    WE have a JAVA application and Oracle 9i database.We need to figure out what all select/update/insert sql staements are firing if i am doing one complete processing in my JAVA front application.
    Initally I have planned for using TKPROF utility after makeing AUTO_TRCE=TRUE in the database.But the problem is that all select/insert/update sql statements are using the BIND variables in the JAVA code and same is coming/printing on the trace file also.
    can we print out the BIND variables values also,while making the TRACE ON?
    eg: trace is generaitng the all insert statements like below.
    insert into TEST(Column1,Column2) values(:1,:2);
    I want to know the value of :1 and :2 bind variables.
    If you have any cluse about it please let me know.
    Mitesh Shah

    Thanks Guys,
    I got the BIND variable values in the TRACE file.Previously i was searching on the OUtputfile.
    I am pasting the same trce file format.Can you please verify it.Is i am looking the correct file and corect location.
    PARSING IN CURSOR #2 len=1571 dep=0 uid=66 oct=3 lid=66 tim=18446744071740803342 hv=1462188955 ad='123434f0'
    SELECT PARENTIDKEY,CONTRACTKEY,COMPANYKEY,BACKENDKEY,DATAREP,BANKHOLDINGID,BANKID,CARRIERPARTYID,PRODUCTID,ID,PREMIUMINDEXRATE,ILLUSTRATEDMATURITYLOW,ILLUSTRATEDMATURITYHIGH,SPECIALHANDLING,CARRIERCOMMCODE,MONEYTRANSFERTYPE,FIRSTBILLSKIPMONTH,CONTESTABILITYENDDATE,DEDUCTIONDATE,MARKETVALADJUSTIND,FREEAVAILABLEAMT,ADVANCINGREJECTEDIND,RATEDIND,OTHERINSUREDIND,ENDORSEMENTIND,BENEFICIARYIND,CASECONTROLNUMBERASSUMING,OWNERLEGALNAME,STAMPDUTY,COMMISSIONANNUALIZEDIND,NONSTDCOMMTAKEN,LAPSETAXABLEGAIN,GOVTALLOTMENTSUSPENSEACCTAMT,LASTNOGOODCHECKREASON,LASTNOGOODCHECKDATE,LASTCOIDATE,LASTDEDUCTEDEXPENSECHARGES,LASTDEDUCTEDCOICHARGES,STATEMENTBASIS,LASTNOTICETYPE,LASTNOTICEDATE,PAYMENTDUEDATE,LASTBANKCHANGEDATE,EFTENDDATE,BANKBRANCHNAME,BANKNAME,PAYMENTDRAFTDAY,BANKACCTTYPE,CREDITCARDTYPE,CREDITCARDEXPDATE,ACCTHOLDERNAME,ROUTINGNUMBER,ACCOUNTNUMBER,PAYMENTMETHOD,ANNUALPAYMENTAMT,PAYMENTAMT,PAYMENTMODE,LASTCOIANNIVDATE,BILLINGSTOPDATE,BILLEDTODATE,FINALPAYMENTDATE,GRACEPERIODENDDATE,PAIDTODATE,STATUSCHANGEDATE,REINSTATEMENTDATE,TERMDATE,ISSUEDATE,EFFDATE,DOWNLOADDATE,DURATION,POLFEE,POLICYVALUE,COMMISSIONROLLOVERPCT,COMMISSIONOPTIONSELECTED,REPLACEMENTTYPE,CUSIPNUM,CONVERTTOPRIVATEIND,PORTABILITYIND,REINSURANCEIND,BILLNUMBER,JURISDICTION,ISSUETYPE,ISSUENATION,STATUSREASON,PRIORPOLICYSTATUS,POLICYSTATUS,SHORTNAME,ADMINISTERINGCARRIERCODE,PLANNAME,FILEDFORMNUMBER,FORMNO,CARRIERCODE,PRODUCTCODE,PRODUCTTYPE,LINEOFBUSINESS,CERTIFICATENO,POLNUMBER,CARRIERADMINSYSTEM FROM "POLICY" WHERE PARENTIDKEY = :1 AND CONTRACTKEY = :2 AND COMPANYKEY = :3 AND BACKENDKEY = :4
    END OF STMT
    PARSE #2:c=0,e=1298,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=0,tim=18446744071740803336
    BINDS #2:
    bind 0: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=082a5a9c bln=4000 avl=09 flg=05
    value="Holding_1"
    bind 1: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=082a4af0 bln=4000 avl=10 flg=05
    value="DUL001138U"
    bind 2: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=069bb890 bln=4000 avl=02 flg=05
    value="00"
    bind 3: dty=1 mxl=4000(4000) mal=00 scl=00 pre=00 oacflg=01 oacfl2=0 size=4000 offset=0
    bfp=069ba8e4 bln=4000 avl=04 flg=05
    value="CLIF"
    **********************************************************************************

  • How to make a bind variable out of a comparison like statement

    I have a statement similar to the following -
    select x from atable where acolumn like '1%';
    How do I turn that into a variable in an anonymous block like -
    declare
    l_var varchar2(1) := '1';
    begin
    select x from atable where acolumn like 'l_var%'
    end;
    I need to prevent the database from using a literal in the plan so I need to convert like '%1' into a variable.
    Any suggestions?

    Not quite sure what you mean by 'binding' or 'substitution'.
    If you mean bind variables, the yes oracle does automatically use bind variables:
    SQL> CREATE TABLE atable
      2  (
      3          x VARCHAR2(10)
      4  )
      5  /
    Table created.
    SQL>
    SQL> INSERT INTO atable VALUES ('1234');
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL>
    SQL> set serveroutput on size unlimited
    SQL>
    SQL> declare
      2    l_var atable.x%TYPE := '1';
      3    l_str atable.x%TYPE;
      4  begin
      5    select x
      6      into l_str
      7      from atable
      8     where x like l_var || '%';
      9
    10    dbms_output.put_line ('l_str = "' || l_str || '"');
    11  end;
    12  /
    l_str = "1234"
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT SQL_TEXT FROM v$sql WHERE sql_text LIKE 'SELECT %ATABLE%' AND sql_text NOT LIKE '%V$SQL%';
    SQL_TEXT
    SELECT X FROM ATABLE WHERE X LIKE :B1 || '%'
    SQL>Where that is the sql statement that the sql engine actually ran on behalf of the pl/sql routine.
    GP>

  • How to declare a bind variable with 'date' data type in command prompt?

    how to declare a bind variable with 'date' data type in command prompt?
    sql>variable q date;
    when i execute it show list of datatypes

    Hi,
    As Lokanath said, there are no DATE bind variables.
    You can use a VARCHAR2 bind variable, and convert it to a DATE in your SQL statment.
    If you're using SQL*Plus, consider a substitution variable. It won't be as efficient as a bind variable, but it will be as convenient.
    For example:
    DEFINE  first_entrry_date = "DATE '2010-06-20''
    SELECT   ...
    WHERE   entry_date >= &first_entry_date
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to set the bind variable on page load and execute query ?

    Hi All,
    I am using Jdeveloper 11.1.1.5
    I have a table called "Employee"
    Columns :- id , name , location
    Data :- 1, ,james , chicago
    2 ,Raj ,capetown
    Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
    Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
    I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
    How can i use the bind variable appropriately ??
    Please suggest !!!!
    Thanks.

    Hi,
    Check
    http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
    http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
    -Suresh

  • How can i create "bind variable"

    How can i create "bind variable" in my DB to support any procedure in my DB.
    Thank you very much.

    In SQL*PLUS we can defined bind variable
    SQL>var x varchar2(250); -- Is x bind variable or i'm misunderstand ?
    and ... in my procedure i can used ' &x ' to pass valued of 'x' from sql prompt to my procedure.
    but i'm not sure variable x is still remain in DB because i need to pass variable
    " v_stmt := 'and employee_id between ..... ' " from FORM to PROCEDURE in DB
    how can i do

  • Script logic - how to use a selection variable within an allocation logic

    Hi,
    I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
    If we hard code the members it works fine:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
    So if we start with write the following logic, it does not work anymore:
    *RUNALLOCATION
    *FACTOR=USING/TOTAL
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
    *DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
    *DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
    *ENDALLOCATION
    So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
    regards
    Dries
    solved it ...
    Edited by: Dries Paesmans on Feb 22, 2009 8:31 PM

    Hi Dries,
    Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
    *DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
    *DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
    each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
    You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
    *DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
    This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
    I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
    Regards,
    Tim

  • How to use attributes in variable substitution???:(

    Hi all,
    Could you please help me out in how to use attributes in variable substitution....
    Regards,
    Sundar

    Hi,
    Use Adapter Specific Identifiers , instead of Variable Name substitution.
    Sender File adapter --> Adapter Specific Attributes --> Select File Name
    Reciver File Adapter -->Adapter Specific Attributes --> Select File Name
    In the mapping , use this code in an UDF to change the filename to what you want,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String filename="YOURFILENAME";
    String rSourceFileName = conf.put(key,filename);
    Regards,
    Bhavesh

  • Functionality loss when 'Using Query Bind Variables in Advanced Search

    Regarding: 'Using Query Bind Variables in Quick or Advanced Search'
    The functionality to do the following is lost when I use bind variables in the Advanced Search:
    "Result matches all conditions"
    "Result matches any condition"
    "Case Sensitive?"
    Is there a way to Search with Detail groups but to keep the above functionality?

    Hi,
    Your application module impl java class extends the JHeadstart class JhsApplicationModuleImpl. THe latter declares a method:
    public void advancedSearch(String viewObjectUsage,java.util.ArrayList arguments,Boolean allConditionsMet).
    In your application module impl java override the advancedSearch method where you can include your own custom code before invoking the super method:
    super.advancedSearch(viewObjectUsage,arguments,allConditionsMet);
    The 'arguments' parameter is an arraylist of QueryCondition objects. You can set several properties for QueryCondition objects such as case-sensitity, operators etc.
    Regards,
    Ibrahim

Maybe you are looking for