HOW TO USE LEXICAL PARAMETER IN FORMS9I

CAN I USE LEXICAL PARAMETER IN FORMS9I I WANT TO CREATE QUERY LIKE THIS
SELECT * FROM &TABLE_NAME
WHERE &CHOICE
WHERE &TABLE_NAME = EMP, AND &CHOICE EMPNO=12344
PLS HELP

No, you can do it in sqlplus or reports but not in forms.
If this is a datablock query you need to use set_block_property.
If it is in a trigger you need to use execute immediate.

Similar Messages

  • How to use lexical parameter in report

    i want to use lexical parameter in report and pass parameter from form how it is possible in detail
    A.R

    Hi,
    typically you fill your lexical paramter in the after-paramform-trigger out of the values of your bind-parameters (giving end users directly control over lexical parameters might not be a good idea). Inside PL/SQL a lexical parameter is referenced like bind parameters with ":". In the query it's referenced via "&" and represents a part of the query.
    A simple example.
    - p_deptno as bind parameter
    - p_where as lexical paramter
    - end user choose value for p_deptno (10,20,... or nothing)
    - Trigger: if :p_deptno is not null then
    :p_where := 'WHERE deptno = :p_deptno'
    else
    :p_where := null;
    end if;
    - Query select ... from emp &p_where
    Regards
    Rainer

  • How to use a parameter  of a report program from selection screen in a dialog program

    how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use a parameter of a report program in a dialog program

    how to use a parameter of a report program in a dialog program.
    I have to fetch the value entered in the parameter of report program and display it in a dialog program

    Hi Aasim,
    Just mention like below in your ABAP report.
       PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
    and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro

  • How to use a parameter in a report program in a dialog program

    how to use a parameter in a report program in a dialog program

    Hi Shaikh,
    Post it in http://scn.sap.com/community/abap
    "ABAP Development".
    sree

  • How to use shared parameter on request set

    Hi
    I have a request set with two stages
    First stage contains From Date and To date where i have named the shared parameter as StartSP and EndSP
    i have to use these shared parameter in one of the query in next stage where my Type is SQL Statment and i have these two date fields From date and To date in next stage as well where i am able to retirve the values from previous stage
    based on these values i need to get the name in next parameter where my Type is SQL Statment
    select name from tablename where '02-MAR-09' > =start_Date and '29-MAR-09' <=end_Date
    I have written SQL as
    select name from tablename where StartSP > =start_Date and EndSP <=end_Date but it throws an error.
    I need the values of 02-Mar-09 and 29-Mar-09 from StartSP and EndSP
    Appreciate if any one has idea about this.

    hi user;
    please check:
    http://download-west.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/repset04.htm
    http://download-east.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/10gch609.htm
    Also you can check this search:http://www.google.com.tr/search?hl=tr&source=hp&q=How+to+use+shared+parameter+on+request+set+&meta=&aq=f&oq=
    Hope it helps
    Regard
    Helios

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • Trying to use lexical parameter in ORDER BY

    I'm using BIP in EBS and I have a report that needs to be sorted based on parameters selected in conc. pgm. I'm trying to use lexical parameters to accomplish this, however, it's not working. I have defined my lexical parameter in Package Spec and I'm setting it accordingly in Package Body(BeforeReport trigger). In my data template (dataQuery section) I have the following SQL
    SELECT 'AP_BANK_ACCOUNTS_ALL' as "table_audit2",
    a.bank_account_id,
    to_char(a.audit_timestamp,'DD-MON-YYYY HH:MI P.M.'),
    a.audit_transaction_type ,
    a.audit_user_name,
    a.bank_account_name,
    a.bank_account_num,
    a.account_type,
    a.org_id,
    a.bank_branch_id,
    a.xxap_field_changed,
    a.xxap_new_value,
    a.xxap_old_value,
    b.bank_name,
    d.short_name
    FROM xxap_bank_accounts_all_gtmp a,
    ap_bank_branches b,
    hr_organization_information c,
    gl_sets_of_books d
    WHERE a.bank_branch_id = b.bank_branch_id
    AND a.org_id = c.organization_id
    AND c.org_information_context = 'Operating Unit Information'
    AND c.org_information3 = d.set_of_books_id
    ORDER BY &lv_order_by
    The IF statments below are being used in package to set lexical parameter
    note: p_order_by_1 & 2 are from conc.pgm
    IF p_order_by_1 IS NOT NULL
    THEN
    lv_order_by := to_char(p_order_by_1);
    lv_order_1 := 'Y';
    END IF;
    IF p_order_by_2 IS NOT NULL
    THEN
    IF lv_order_1 = 'Y'
    THEN
    lv_order_by :=lv_order_by||','||to_char (p_order_by_2);
    lv_order_2 := 'Y';
    ELSE
    lv_order_by := to_char(p_order_by_2);
    lv_order_2 := 'Y';
    END IF;
    END IF;
    Any help will be greatly appreciated!!!! I'm a newbie to EBS and BIP so you can probably imagine how frustrated I am.
    Message was edited by:
    user631051

    The conc. pgm completes successfully but my report is not sorted. Data Template below:
    <properties>
    <property name="include_parameters" value="true" />
    <property name="include_null_Element" value="true" />
    <property name="xml_tag_case" value="upper" />
    <property name="db_fetch_size" value="500" />
    <property name="scalable_mode" value="off" />
    <property name="include_rowsettag" value="false" />
    <property name="debug_mode" value="off" />
    </properties>
    <parameters>
         <parameter name="p_start_date" dataType="date"/>
         <parameter name="p_end_date" dataType="date"/>
         <parameter name="p_org_id" dataType="number"/>
         <parameter name="p_data_priority" dataType="character"/>
         <parameter name="p_include" dataType="character"/>
         <parameter name="p_account_type" dataType="character"/>
         <parameter name="p_order_by_1" dataType="character"/>
         <parameter name="p_order_by_2" dataType="character"/>
         <parameter name="p_order_by_3" dataType="character"/>
         </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[SELECT 'AP_BANK_BRANCHES' as "table_audit1", a.bank_branch_id as "bank_branch_id",
                     to_char(a.audit_timestamp,'DD-MON-YYYY HH:MI P.M.') as "audit_timestamp",
                     a.audit_transaction_type as "audit_transaction_type", a.audit_user_name as "audit_user_name",
                     b.bank_name as "bank_name", b.bank_branch_name as "bank_branch_name",
                     to_char(b.bank_number) as "bank_number", a.active_date as "active_date", a.xxap_field_changed,
                     a.xxap_new_value, a.xxap_old_value
                    FROM xxap_bank_branch_gtmp a,
                         ap_bank_branches b
                    WHERE a.bank_branch_id = b.bank_branch_id
          ]]>
    </sqlStatement
    <sqlStatement name="Q2">
    <![CDATA[SELECT 'AP_BANK_ACCOUNTS_ALL' as "table_audit2",
                     a.bank_account_id as "bank_account_id",
                     to_char(a.audit_timestamp,'DD-MON-YYYY HH:MI P.M.') as "audit_timestamp",
                     a.audit_transaction_type as "audit_transaction_type",
                     a.audit_user_name as "audit_user_name",
                     b.bank_name as "bank_name",
                     a.bank_account_name,
                     a.bank_account_num as "bank_account_num",
                     a.account_type as "account_type",
                     to_char(a.org_id) as "org_id",
                     a.bank_branch_id as "bank_branch_id",
                     a.xxap_field_changed,
                     a.xxap_new_value,
                     a.xxap_old_value,
                     d.short_name as "short_name"
                    FROM xxap_bank_accounts_all_gtmp a,
                         ap_bank_branches b,
                         hr_organization_information c,
                         gl_sets_of_books d
                    WHERE a.bank_branch_id = b.bank_branch_id
                    AND   a.org_id = c.organization_id
                    AND   c.org_information_context = 'Operating Unit Information'
                    AND   c.org_information3 = d.set_of_books_id
                    ORDER BY &lv_order_by
          ]]>
    </sqlStatement>
    </dataQuery>
    <dataTrigger name="beforeReportTrigger" source="XXAP_RPT_BANK_AUDIT_EXT_PKG.BeforeReport"/>
    <dataStructure>
    <group name="G_Bank_Branches" source="Q1">
    <element name="table_audit1" value="table_audit1"/>
              <element name="bank_branch_id" value="bank_branch_id"/>
              <element name="audit_timestamp" value="audit_timestamp"/>
              <element name="audit_transaction_type" value="audit_transaction_type"/>
              <element name="audit_user_name" value="audit_user_name"/>
              <element name="bank_name" value="bank_name"/>
              <element name="bank_branch_name" value="bank_branch_name"/>
              <element name="bank_number" value="bank_number"/>
              <element name="active_date" value="active_date"/>
              <element name="xxap_field_changed" value="xxap_field_changed"/>
              <element name="xxap_new_value" value="xxap_new_value"/>
              <element name="xxap_old_value" value="xxap_old_value"/>
    </group>
    <group name="G_Bank_Accounts_All" source="Q2">
         <element name="table_audit2" value="table_audit2"/>
         <element name="account_type" value="account_type"/>
    <element name="bank_account_id" value="bank_account_id"/>
              <element name="audit_timestamp" value="audit_timestamp"/>
              <element name="audit_transaction_type" value="audit_transaction_type"/>
              <element name="audit_user_name" value="audit_user_name"/>
              <element name="bank_name" value="bank_name"/>
              <element name="bank_account_name" value="bank_account_name"/>
              <element name="bank_account_num" value="bank_account_num"/>
              <element name="org_id" value="org_id"/>
              <element name="xxap_field_changed" value="xxap_field_changed"/>
              <element name="xxap_new_value" value="xxap_new_value"/>
              <element name="xxap_old_value" value="xxap_old_value"/>
              <element name="short_name" value="short_name"/>
    </group>
    </dataStructure>
    </dataTemplate>

  • Report are not working using lexical parameter

    Hi !
    i am using oracle 10g and i my query i have laxical parameter as follow
    &to_date
    in after paramform we have
    IF :P_DATE_TO IS NOT NULL THEN
         :TO_DATE := 'AND to_date(head.updated_date,'||chr(39)||'DD/MM/RRRR'||chr(39)||') between TO_DATE(t2.term_start_date,'||chr(39)||'DD/MM/RRRR'||chr(39)||') AND TO_DATE('||CHR(39)||:P_DATE_TO||CHR(39)||','||chr(39)||'DD/MM/RRRR'||chr(39)||')';
    --ELSE
         --:TO_DATE := NULL;
    END IF;
    after compile this report when i run this report then i have following error
    REP-304: '&' in SELECT statement was not followed by a valid lexical parameter.
    any body can tell me how can i resove it.

    What denis is trying to say that change the TO_DATE parameter to any other name because TO_DATE is actually reserve word. So instead of TO_DATE try for example P_TO_DATE or any other name.
    -Ammad

  • How to use import parameter to be instead of SQL where sub-sentence ?

    I wrote a RFC to read data from SAP table. To fetch data flexibility, I want to use import parameter xx instead of where sub-sentence in SQL sentence.
       For example, "SELECT * FROM T WHERE XXX",  and "XXX" is a importing parameter.
       How can I use it.
       Thanks a lot.
       Frank.

    FUNCTION ZRFC_04.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(TARGETTABLE) LIKE  MAKT-MAKTX
    *"     VALUE(TWHERE) LIKE  MAKT-MAKTX
    *"  EXPORTING
    *"     VALUE(ZRETURN) LIKE  MAKT-MAKTX
    *"  TABLES
    *"      TMP_TEST1 STRUCTURE  ZTEST1
      DATA:
      TRANSACTION_ID LIKE ARFCTID,
      V_VAILD(1) TYPE C,
      scond(80) TYPE c.
      V_VAILD = 'X'.
    GET PARAMETER twhere fields scond.
    The error " 'LATE FIELDS' expected, not 'TWHERE FIELDS' " generated.

  • How to use a parameter field value as a substring in a "like" statement?

    Hi all,
    I'm trying to use a parameter field in a Record selection formula where the parameter field value would be a substring of the data stored in the field.
    My parameter field (SlctResearcher) is constructed as follows:
    Type: string
    List of Values: static
    Value Field: (Reports) RptAuthors
    (in Value Options) Allow custom values?: True
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like "*{?SlctResearcher}*"
    When I hit F5 to generate the data, I get no results (and the parameter prompt field does not even come up...)
    If I modify the formula to put a hard-coded string, like
    "*Jones*"
    after the 'like', I get results (all the reports where "Jones" is a substring in the RptAuthors string.) If I modify the formula to just use the parameter field without the quotes/stars like:
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like {?SlctResearcher}
    I do get the parameter prompt field, but still no results even if I put in a valid substring value (since it is not searching for a substring anymore...)
    How can I do this?
    Thanks,
    Will

    1st thing... Make a copy of your report before doing anything!!!
    To use a SQL Command, you'll want to open the Database Expert and look at the Current Connections. Expand the data source and the 1st option you see is the Add Command option.
    To find the SQL That CR is currently using, choose Database from the menu bar and select Show SQL Query...
    You can copy this and paste it directly into the command window. (If you you can write your own SQL you don't need copy CR's, it's just an option.)
    You'll also want to take not of any parameters that you have, you'll need to add them the the Parameter List of the command as well... be sure to spell them EXACTLY as they are in the design pane.
    Anyway, once the SQL statement is in the Command window you'll be able to alter the WHERE clause to use the wild cards.
    For future reference... What type of database are you reporting against???
    Jason

  • When/How to use - "search" parameter type in parameter like other types.

    We recently upgraded BI Publisher to 10.1.3.4. I saw new parameter type "search" in parameter section, when creating report. whats the use of it? How to use it ? like other parameter type Text, Menu,Hidden, Date.
    I couldn't find any help or release notes on this !
    Thanks
    Ayaps

    I started looking into this parameter type when our drop-down for customer numbers went from 13,000 (manageable) to 45,000 (completely unmanageable).
    I imagine this is supposed to mimic the effects of a "Long List" type LOV in Oracle Applications (as I had inquired about in [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=895521&stqc=true|Large List of Values (LoV) hangs. Is there an equivalent for a long list?]), but performance-wise, "Search" does not seem to be any more efficient that using the "Menu" type LOV. Even with the help of having a partial string with a wildcard to match, the "Search" still takes too long to pull up to be of any use to us.

  • How to define Lexical Parameter in Oracle report.

    Dear all,
    I need to know that how i will define lexical parameter in query of report builder
    i have like this
    SELECT R.EXCEPTION_MESSAGE EXP_MESSAGE,
    ER.PROD_ID PRODUCT,
    ER.TNAME SEGMENT1 ,
    DECODE(R.STATUS,'Y','ROW',
    'L','TABLE',
    'Z','CIB LEVEL',
    NULL) STATUS,
    NVL(COUNT(*),0) CNT
    FROM EXCEPTION_RECORDS ER,CIB_PROC_TABLES_RULES R
    WHERE ER.TABLE_ID=R.CIB_TABLE_ID
    AND ER.EXP LIKE '%'||R.EXCEPTION_MESSAGE||'%'
    AND ER.BRWR=:v_brwr
    &v_where
    GROUP BY R.EXCEPTION_MESSAGE,ER.PROD_ID,ER.TNAME,R.STATUS
    ORDER BY 2
    It is giving an error

    V_WHERE should be defined same way as regular parameter. It should acquire certain value that makes the query syntaxically correct bofore the sql is run, usually in the After Param Form trigger, e.g.
    v_where := 'WHERE 1=1';
    ...

  • How to use Extension parameter in BAPI

    Hi,
    Can anyone provide any clue about how to use the EXTENSION paramenters in BAPI? Thanks.
    Regards,
    Chris

    Hi,
    just check this thread you can get some idea how to use extension in BAPI.
    BAPI_ACC_DOCUMENT_POST  (EXTENSION)
    Regards
    Vijay

  • URL iView Problem - How to Use URL Parameter of Type 'User Information'

    Hello URL iView experts
    I am currently working on integration of backend-functionality with the help of an URL iView.
    I want to use a parameter of type 'User Information'. In SAP Help Library it is said, that it is possible to set the value of a parameter according to a dynamic query on the users attributes. (Link SAP HELP)
    It is also said, that one can retrieve the Logon ID of the users account.(Attribute Name: j_user -> Link SAP HELP Attributes )
    I can choose the type 'User Information' but i don't know what to specify in the field 'Value'.
    I have made a screenshot of the problem.->[Link to screenshot|http://img66.imageshack.us/img66/7782/urliviewproblemfrsdnthrel3.jpg]
    But if i am calling the application this way, he doesn't retrieve the Logon-ID of the account, but he just uses the 'j_user' as value for the parameter.
    Can you tell me, what i need to specify in the field value?
    Best Regards
    Marcus
    Edited by: Marcus Böhm on Jun 2, 2008 1:22 PM

    Hi Marcus,
    > It is also said, that one can retrieve the Logon ID of the users account
    This is not correct; on the help.sap.com-page concerning the URL-iView-Parameters, it is printed that "other attributes (general, account, group, role) are not supported". The j_user attribute is part of the account group, so - not supported.
    For your needs, it may be a better choose to use the AppIntegrator, which offers such a possibility by using "<User.LogonUid>"; see http://help.sap.com/saphelp_nw70/helpdata/EN/36/5e3842134bad04e10000000a1550b0/frameset.htm and https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0cbc309-ff89-2a10-8bad-bcde4c152ecb
    Hope it helps
    Detlev

Maybe you are looking for