Lexical parameters problem ?

In my data model ,
I have plsql function which returns ref.cursor.
with in the function my sql query wants dynamic order by ?
is it possible ?
If possible when I pass deptno,mgr I want the resultent records based on deptno,mgr.
when i pass ename,deptno I want the resultent records based on ename,deptno.
how can i do this ?
thanx for help.
srini

You need to create dynamic SQL cursors. Check the PL/SQL manual "Chapter 11: Native Dynamic SQL".
Examples of Dynamic SQL for Records, Objects, and Collections
As the following example shows, you can fetch rows from the result set of a dynamic multi-row query into a record:
DECLARE
TYPE EmpCurTyp IS REF CURSOR;
emp_cv EmpCurTyp;
emp_rec emp%ROWTYPE;
sql_stmt VARCHAR2(200);
my_job VARCHAR2(15) := 'CLERK';
BEGIN
sql_stmt := 'SELECT * FROM emp' || ' WHERE job = :j';
OPEN emp_cv FOR sql_stmt USING my_job;
LOOP
FETCH emp_cv INTO emp_rec;
EXIT WHEN emp_cv%NOTFOUND;
-- process record
END LOOP;
CLOSE emp_cv;
END;

Similar Messages

  • Problem in executing report using rwrun.sh with runtime/lexical parameters

    hi..
    My problem is as follows..
    I'm using SuSE8.0, with Oracle DS installed..
    I made a rep file to execute a report from command line using rwrun.sh.
    For the first time I got problems with single quotes and later I solved it by using \ as escape sequence and I can generate the report.
    I have 2 lexical parameters.
    1) atable --> for table names
    2) whereford --> for WHERE condition
    When I make the following command I execute it successfully and get the report .
    /opt/oracle/OraHome1/bin/rwrun.sh /opt/jakarta/webapps/ROOT/std-reports/DiagnoseProtokolle.rep userid=test/test@approxim batch=yes desname=/opt/jakarta/webapps/ROOT/kovi_361_Report.PDF destype=file desformat=PDF atable=\',SD_DIAGNOSESYSTEME\' whereford=\'\ \(\(\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'AIRBAG\'\ \)\)\ AND\ \(\(\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'ABS\'\ \)\)\ AND\' tracefile=/opt/jakarta/webapps/ROOT/trace/trace.log tracemode=TRACE_REPLACE
    ** In one line..
    If I don't use \ for escaping braces it doesn't work and also for spaces and single quotes.
    I use braces as I get sometimes mixed conditions..
    But when I make a condition like for eg: emp.emp_id = dept.emp_emp_id it is not executing..
    i mean primary key is referd to foreign key of another table.
    so in the same way the error prone command looks like this
    /opt/oracle/OraHome1/bin/rwrun.sh /opt/jakarta/webapps/ROOT/std-reports/DiagnoseProtokolle.rep userid=test/test@approxim batch=yes desname=/opt/jakarta/webapps/ROOT/kovi_361_Report.PDF destype=file desformat=PDF atable=\',MESSWERTE,SD_DIAGNOSESYSTEME\' whereford=\'\ \(\(\ MESSWERTE.mess_id\ =\ SD_DIAGNOSESYSTEME.mess_mess_id\ AND\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'AIRBAG\'\ \)\)\ AND\ \(\(\ SD_DIAGNOSESYSTEME.bezeichnung\ =\'ABS\'\ \)\)\ AND\' tracefile=/opt/jakarta/webapps/ROOT/trace/trace.log tracemode=TRACE_REPLACE
    when I had a look at the trace.log file I see that particular condition is transformed in to
    MESSWERTE.mess_id = 'SD_DIAGNOSESYSTEME.mess_mess_id'
    but this is completely awkward.
    Then I made a batch file and tested it on windows and i put the whole condition in double quotes and it worked always fine..
    It seems the problem is with the shell ..or ??
    In my rwrun.sh th elast line looks like this..
    $ORACLE_HOME/bin/rwrun $*
    I also tried to chaneg this to
    $ORACLE_HOME/bin/rwrun "$@" and also $ORACLE_HOME/bin/rwrun "$*"
    but no progress..
    If some one could help me it would be gratefull for me..
    Thanx in advance..
    regards
    Kovi

    Here's the relevant portion from the Bash manual:
    Enclosing characters in double quotes preserves the literal value of all characters within the quotes, with the exception of $, `, and \. The characters $ and ` retain their special meaning within double quotes. The backslash retains its special meaning only when followed by one of the following characters: $, `, ", \, or <newline>. A double quote may be quoted within double quotes by preceding it with a backslash.
    So basically stop escaping the single-quotes with a backslash, and instead enclose the entire argument value in double-quotes. Add the single-quotes only if you want them literally, don't escape the parentheses, etc. Let's know if it works for you.
    -Manish

  • Help desiging a 10g Oracle Report with Matrix and Lexical Parameters - Long

    Hello all:
    I apologize in advance for this long post.... I'm using Oracle Reports 10g (9.0.4.0.33). First -- the question:
    I need to create a Matrix where the rows come from one database table
    (TABLE1) and the columns and cell contents come from a linked query (pulled from TABLE2) that is generated with lexical parameters based on the current TABLE1 row. The lexical parameters contain a WHERE clause for the TABLE2 query. Basically, I have a linked query between TABLE1 and TABLE2. I need to generate a Matrix around it.
    Does anyone know if this is even possible?
    Here's the background on the application, if that is helpful...
    I have an application where I maintain database tables containing names/addresses along with information pertaining to them. As part of the processing, I need to produce reports that contain statistics based on values in the table. For example, each row has a field RTYPE that identifies the Record Type (1-Suppress, 2-Buyer, 3-Inquirer). Each row also has a last purchase date field. The statistics produced for this field would look like this:
              2001     2002     2003     11/03     12/03 01/04     02/04 03/04     04/04     05/04 ...
    Buyer      100 150 250 30 25 15 8 9 22 83
    Inquirer     1000 800 493 ...
    Suppress ... ...
    Totals ... ...
    Each cell contains the count of the number of records that have the corresponding RTYPE and Last Purchase date. The dates across the top are determined by the most recent purchase date in the file. We count the last 12 months, month by month, and then anything older than that is grouped by
    year of purchase. So, the column headings are variable.
    The SQL query for this example looks like this:
    SELECT CASE WHEN rtype = '2' THEN 'Buyers'
    WHEN rtype = '3' THEN 'Inquirers'
    WHEN rtype = '1' THEN 'Suppress'
    END HLDESC,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END YYMM_8,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'MM/YY')
    ELSE TO_CHAR(T.HOTLINE, 'YYYY')
    END FmtDate_8,
    COUNT(*) HLCOUNT
    FROM &TABLENAME T
    GROUP BY CASE WHEN rtype = '2' THEN 'Buyers'
    WHEN rtype = '3' THEN 'Inquirers'
    WHEN rtype = '1' THEN 'Suppress'
    END,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END,
    CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'MM/YY')
    ELSE TO_CHAR(T.HOTLINE, 'YYYY')
    END
    ORDER BY CASE WHEN MONTHS_BETWEEN(trunc(:MAXHLDATE,'MONTH'),
    TRUNC(T.HOTLINE,'MONTH')) < 12
    THEN TO_CHAR(T.HOTLINE,'YYYYMM')
    ELSE TO_CHAR(T.HOTLINE,'YYYY') || '00'
    END
    There might be a better way to write this, but that isn't the issue at the moment.
    I have many different tables, each with different fields. I need to produce counts on each of those fields. Some of those fields have a limited number of values where I need to count the occurrences and attach a description (like the RTYPE counts above). Others, like Last Purchase Amount, require counts within ranges (between 0 and 9.99, 10 and 19.99, etc.). Still others are "multiple choice"-style fields (such as products purchased), where we have multiple single-char flags that are not null when the corresponding products are purchased. In this case, we need to produce statistics that look like this:
              2001     2002     2003     11/03     12/03 01/04     02/04 03/04     04/04     05/04 ...
    Product 1 .........
    Product 2 .........
    The worst of the bunch is a field where I need to count the occurrence of each value within it (hundreds of values) without entering descriptions, so I don't know how many rows will appear ahead of time. This is used for "source codes" that identify where the name/address came from. They look similar to the RTYPE above, but the leftmost column contains each value from the field rather than a description. There are so many possible values and they change so often that it isn't feasible to enter a description for each one.
    Right now, I manually create an Oracle Report for each table when I design/load it. This is becoming difficult to manage, since I have over 150 of them now. Each of these reports can have any number of matrices to display (the largest right now has about 25).
    The new table structure to generate these reports consists of two tables: A COUNTHDR table and a COUNTROW table. The COUNTHDR table represents a single Matrix within the report. It contains info such as a heading for the Matrix and whether column totals should be calculated or not. The COUNTROW table contains a description for each row and an SQL Fragment that contains an appropriate WHERE clause to match the description. In the event of a "source code" style count, COUNTHDR has the name of the field to count. COUNTROWs won't exist, so I'll be handling those counts differently. But, ignoring that issue for now, the report structure looks like this:
    + Q1 +
    |
    + COUNTHDR +
    |
    + COUNTROW +
    | linked query
    + Q2 +
    |
    + COUNTDTL +
    Q2 is the query with lexical parameters for the table and "where clause" that identifies the actual statistic I need counted. I need fields from COUNTROW and COUNTDTL to form a Matrix.
    Can this be done? How?
    Of course, if anyone out there has a better idea on how to achieve my goal of not writing a report per table, please let me know!! :-)
    TIA
    Eric Raskin
    PS. This structure does not exactly duplicate my original query, since multiple Matrix rows are created by the single SQL query given in the example. Instead, I'll end up executing an SQL query for each row, which is less than desirable. The design will need some tweaking...
    PPS. I have tried handling this problem by pre-counting the target table and storing the results in a COUNTCOL table, containing the details of the matrix. This actually does work, but the performance is terrible. I have one "source code"-style count that generated over 20,000 detail cells, including all the "0" cells needed to fill out the matrix. If you don't generate the "0" cells, you get holes in the matrix presentation and/or error messages (which I can explain if you wish). I never did get Oracle Reports to print this one -- I gave up after an hour of runtime on a P4 3GHz machine connected via Gigabit Ethernet to the server. Hence the attempt to push the SQL Queries back into the Oracle Report itself.
    Eric H. Raskin Voice: 914-765-0500
    Professional Advertising Systems Inc. Fax: 914-765-0503
    200 Business Park Dr Suite 107 [email protected]
    Armonk, NY 10504

    Hi there
    here's example of my code
    Html header of the page :
    <script language="JavaScript" type="text/javascript">
    function callMyPopup (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url;
    url = 'f?p=&APP_ID.:8:&APP_SESSION.::::P8_PROJECT,P8_PDRL_NO:' + formVal1 + ',' + formVal2;
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    </script>
    troubleshooting
    1.Test each parameter separate first - each work ?
    2.Use code above, rerig it, create multiple parameter
    3.try again...
    hope this helps...
    check your orginial source (page where items are) - what data

  • Not all lexical parameters are being bound

    Reports SQL parser is binding to only 2 of 4 variables. SQL TRACE option confirms this:
    AND CABCHCK_CORT_CODE = :P_COURT_CODE
    AND CABCHCK_LOCN_CODE = :P_COURT_LOCATION_CODE
    AND CABCHCK.CABCHCK_DATE >= TO_DATE(:P_DATE_FROM)
    AND CABCHCK.CABCHCK_DATE <= TO_DATE(:P_DATE_TO)
    Bind Variable Value
    P_COURT_CODE 23
    P_COURT_LOCATION_CODE TC
    Note that :P_DATE_FROM and :P_DATE_TO are not shown in the trace as a 'Bind Variable'. The error message when running the report is:
    ORA-01008: not all variables bound
    This is a report which has previously worked and where the SQL code and the lexical parameters have not changed (but the layout changed slightly). Could this be yet another corrupted .rdf file? If so, how is this circumvented?
    Regards,
    Steve

    The issue has been found and solved.
    The SQL code is loaded into a lexiconal variable and run from the query. For example,
    :P_WHERE_COURT = 'and cabchck_cort_code = :p_court_code';
    This was in the BEFORE_REPORT trigger. It worked.
    However, the third and forth lines (with the TO_DATE function call) were not working. In the SQL statement, the functions referenced the :P_DATE fields but they weren't bound.
    The date statements were loaded in the same BEFORE_REPORT trigger as the court and location lines. By moving all of the code into the AFTER_PARAMETER trigger, the errors went away and the SQL processed normally.
    Why would this move from BEFORE_REPORT to AFTER_PARAMETER have done this?

  • How to use lexical parameters with Sql Server Stored Procedure?

    Hi,
    I'm developing a BI Publisher report on a sql server database. I need to execute a stored procedure to dynamically build the query by replacing the lexical parameters with the values of varaibles of the stored procedure. With Oracle stored procedures, I have used data template and had reference the varaiable in SP by prefixing it with '&'.
    It doesn't work if I try to do the same thing with SQL server. Is there anyone who has come across the similar situation? Please let me know if anyone has got any ideas...
    Thanks in Advance
    Rag

    TopLink currently doesn't support multiple ResultSets. Multiple ResultSets support is considered for a future release.

  • Usage of Lexical Parameters in PL/SQL code

    Hello Everyone,
    I am trying to use a query in the pl/sql code which has 9 parameters ( Earlier this query was used in a Report i.e. report6i , so we used the lexical parameter to handle the parameters). But according to our new requirement i have to use this query with the same set of parameters in a PL/SQL code.
    To be more specific of the 9 input parameters to the report one of the parameter is order_date_from and order_date_to. the possibilities are like
    order_date_from = null and order_date_to = null
    order_date_from = not null (some value) and order_date_to = null
    order_date_from = null and order_date_to = not null (some value)
    order_date_from = not null (some value) and order_date_to =not null (some value)
    these above four possibilities are for one lexical parameter (say) like this i have six more combinations.
    Since PL/SQL doesnt support any lexical parameters do i have any other way to handle this situation ?? Any help is greatly appreciated.
    Thanks
    Tarun

    If your columns are named order_date_from and order_date_to and your corresponding parameters are named p_order_date_from and p_order_date_to then you can go with the following approach.
    WHERE order_date_from = NVL(p_order_date_from, order_date_from)
       AND order_date_to = NVL(p_order_date_to, order_date_to)Message was edited by:
    scott.swank

  • Using Lexical Parameters in OBIEE 11g Publisher

    Hello All,
    I want to know if there is a provision to use lexical parameters to be used in 11g Publisher. I know we could do this in 10g Publisher with the use of data template and database package. This is a very useful functionality to dynamically deduce the SELECT and WHERE clauses based on the input parameters.
    For what I have explored, this functionality seems to be missing in 11g.
    Can anybody throw some light on this please?

    Does anyone know about this please?

  • Maximum size - Lexical Parameters - Report 2.5

    Hi
    We are using Oracle Reports 2.5 .
    Want to know what is the maximus size we can have for a lexical parameter .
    Is it 2000 chars ?
    We have 3 lexical parameters in our where clause of the query .
    What is the maximum Length of the 3 lexical parameters (combined) we can have ?
    Thanks

    Post Author: Aravind
    CA Forum: Older Products
    Hi Kai,Thanks for the reply.I can see that the maximum cache size has been set to 10000KB.Does this govern the number of records that is returned by a report?The idle jobs get closed in 20 minutes. Could you please provide me a pointer of where do we set up this parameter of limitting the number of records that a report returns? Thanks again,Aravind.   

  • Z77A-GD65 mixing two DDRAM pack, same brand with same parameters problem

    Hello. I have question. My mobo is z77a-gd65. I have 16gb of ram. Is it pack of 4x4gb modules from corsair vengeance lp (CML16GX3M4A1600C9). Because one module is damaged (tested in memtest) i buy new pack. This new pack is absolutely the same as previous but only 8gb (2x4gb). Is it same brand and timings (CML8GX3M2A1600C9). My problem is.. i can not enable the xmp profile in bios. This option is not accesible if i use 2x2gb from first pack and 2x2gb from second pack. Next problem.. if i change the ddram frequency  manually to 1600mhz (from 1333 - detected whith bios) which is default fq after save settings and restart, bios automatically set frequency to 1333. I try use oc genie but the same and no luck.
    Is not possible use two different memory pack from one brand with absolutely same parameters? Why i cant use and is disabled xmp option? Why bios automatically changing ddram frequency?
    Thanks.

    Corsair warns of mixing RAM even with the same exact part numbers. Best thing to do would be to contact Corsair and ask them to replace what you have with a factory matched and tested RAM kit. I have heard they are very good about doing that for the end user.

  • Query Parameters Problem

    Please excuse the formatting as I am not sure why the forum is bunching everything together and not putting my query in code format.
    Hi All,
    We are using SAP B1 2007 A SP01 PL05
    I am having a problem with getting a query to run in SAP with parameter selections.  The query below runs fine as is however once I add date parameters which look like this
    AND T2.[DocDate] >= '[%0]' AND T2.[DocDate] <= '[%1]'
    I start getting errors.  The first error I got was RIGHT.CardCode could not be bound once I removed the parameter and added them again I got an error Conversion failed when converting datetime from character string.  I then removed the parameters again and added them once more and got another error An expression of non-boolean type specified in a context where a condition is expected.  I saved the query and logged out and logged back in and ran it again and now am getting the error RIGHT.CardCode could not be bound again.
    Could someone please have a look at this and try and help me get this running as I want to add more parameters where you can select the Customer Group and the Item Group as well.
    SELECT     T2.DocDate, T2.DocNum, T2.CardCode, T2.CardName, T5.GroupName, T1.ItemCode, T1.Dscription AS 'Description', T7.ItmsGrpNam, T1.Quantity, T0.Price AS 'Unit Price (List)', T0.Price * T1.Quantity AS 'Gross Total', T1.LineTotal / T1.Quantity AS 'Unit Price (Doc)', T1.LineTotal AS 'Nett Total'
    FROM         ITM1 AS T0 INNER JOIN
                          INV1 AS T1 ON T0.ItemCode = T1.ItemCode INNER JOIN
                          OINV AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
                          OPLN AS T3 ON T0.PriceList = T3.ListNum INNER JOIN
                          OCRD AS T4 ON T2.CardCode = T4.CardCode INNER JOIN
                          OCRG AS T5 ON T4.GroupCode = T5.GroupCode INNER JOIN
                          OITM AS T6 ON T1.ItemCode = T6.ItemCode INNER JOIN
                          OITB AS T7 ON T6.ItmsGrpCod = T7.ItmsGrpCod
    WHERE     T0.PriceList = 1
    UNION ALL
    SELECT     T2.DocDate, T2.DocNum, T2.CardCode, T2.CardName, T5.GroupName, T1.ItemCode, T1.Dscription AS 'Description', T7.ItmsGrpNam, - (1 * T1.Quantity) AS Quantity, - (1 * T0.Price) AS 'Unit Price (List)', - (1 * (T0.Price * T1.Quantity)) AS 'Gross Total', - (1 * (T1.LineTotal / T1.Quantity)) AS 'Unit Price (Doc)', - (1 * T1.LineTotal) AS 'Nett Total'
    FROM         ITM1 AS T0 INNER JOIN
                          RIN1 AS T1 ON T0.ItemCode = T1.ItemCode INNER JOIN
                          ORIN AS T2 ON T1.DocEntry = T2.DocEntry INNER JOIN
                          OPLN AS T3 ON T0.PriceList = T3.ListNum INNER JOIN
                          OCRD AS T4 ON T2.CardCode = T4.CardCode INNER JOIN
                          OCRG AS T5 ON T4.GroupCode = T5.GroupCode INNER JOIN
                          OITM AS T6 ON T1.ItemCode = T6.ItemCode INNER JOIN
                          OITB AS T7 ON T6.ItmsGrpCod = T7.ItmsGrpCod
    WHERE     T0.PriceList = 1
    Any help will be greatly appreciated.

    Try this one:
    Declare @d1 datetime
    Declare @d2 datetime
    set @d2=/*Select T2.DocNum  from oinv T2
    where T2.Docdate between [%0] and */[%1]
    set @d1=[%0]
    SELECT T2.DocDate, T2.DocNum, T2.CardCode, T2.CardName,
    T5.GroupName, T1.ItemCode, T1.Dscription AS 'Description',
    T7.ItmsGrpNam, T1.Quantity, T0.Price AS 'Unit Price (List)',
    T0.Price * T1.Quantity AS 'Gross Total',
    T1.LineTotal / T1.Quantity AS 'Unit Price (Doc)', T1.LineTotal AS 'Nett Total'
    FROM ITM1 AS T0 INNER JOIN INV1 AS T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN OINV AS T2 ON T1.DocEntry = T2.DocEntry
    INNER JOIN OPLN AS T3 ON T0.PriceList = T3.ListNum
    INNER JOIN OCRD AS T4 ON T2.CardCode = T4.CardCode
    INNER JOIN OCRG AS T5 ON T4.GroupCode = T5.GroupCode
    INNER JOIN OITM AS T6 ON T1.ItemCode = T6.ItemCode
    INNER JOIN OITB AS T7 ON T6.ItmsGrpCod = T7.ItmsGrpCod
    WHERE T0.PriceList = 1
       and T2.Docdate between @d1 and @d2
    UNION ALL
    SELECT T2.DocDate, T2.DocNum, T2.CardCode, T2.CardName,
    T5.GroupName, T1.ItemCode, T1.Dscription AS 'Description',
    T7.ItmsGrpNam, - (1 * T1.Quantity) AS Quantity,
    - (1 * T0.Price) AS 'Unit Price (List)',
    - (1 * (T0.Price * T1.Quantity)) AS 'Gross Total',
    - (1 * (T1.LineTotal / T1.Quantity)) AS 'Unit Price (Doc)',
    - (1 * T1.LineTotal) AS 'Nett Total'
    FROM ITM1 AS T0 INNER JOIN RIN1 AS T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN ORIN AS T2 ON T1.DocEntry = T2.DocEntry
    INNER JOIN OPLN AS T3 ON T0.PriceList = T3.ListNum
    INNER JOIN OCRD AS T4 ON T2.CardCode = T4.CardCode
    INNER JOIN OCRG AS T5 ON T4.GroupCode = T5.GroupCode
    INNER JOIN OITM AS T6 ON T1.ItemCode = T6.ItemCode
    INNER JOIN OITB AS T7 ON T6.ItmsGrpCod = T7.ItmsGrpCod
    WHERE T0.PriceList = 1
       and T2.Docdate between @d1 and @d2
    Sometimes SBO does not manage correctly variables in complicated queries and there is a note about the workaround to solve the problem:[Note730960|https://websmp130.sap-ag.de/sap/bc/bsp/spn/sapnotes/index2.htm?numm=730960]

  • GP - consolidating structured parameters problem

    Hi,
    I have a problem when consolidating parameters of the same structure type.
    I want to consolidate parameters between two Web Service CO. The output parameter of the first has the same type as the input parameter of the second. They are structures (the parameters are lists of java objects, which themself contain lists of objects and other string objects. That means
    List1
       List2
       String).
    So, when I consolidate them (I group the List2 structures), as an input to the second CO I get the Strings matched but only the last list element of List2, the others are overwritten maybe.
    I have read in the SAP Help Pages in the consolidating parameter page that :
    The Group option is enabled only for:
    &#9675;       Standard parameters of the same type (for example, String, Integer, Time)
    &#9675;       Structure (and Structure Template) parameters, regardless of their internal hierarchy
    So, I thought that I can consolidate parameters with arbitrary hierarchy.
    Do I understand that wrongly or is there any way to make such thing?
    Thanks in advance
    Best regards,
    Vera

    I don't think GP forgot your changes here.
    I assume you don't have any problems with defining the GP interfaces for your 3 actions (implementing GetDescription).
    Now when you implement the Execute or Complete method to set or get the GP List structure or array you've defined, you need to:
    - make sure that in the A1 callable object, you're passing correctly the content of the Webdynpro array to the GP interface structure.
    - make sure that in the A2 callable object, you're passing correctly the content of the GP interface structure to the Webdynpro array.
    Your problem is a Webdynpro problem not GP. You can use the mechanism of looping through the first array and add element or row to the second array.
    That's a good webdynpro exercise and enjoy it!

  • Run Report Object and Lexical Parameters

    Hi all,
    I am trying to pass a value for a lexical parameter in a report. The report query is as follows:
    SELECT EMP.EMPNO, EMP.ENAME,
    EMP.JOB, EMP.MGR, EMP.HIREDATE, EMP.SAL, EMP.COMM, EMP.DEPTNO
    FROM EMP
    &Where_St
    The Where_St is a lexical parameter which will hold the Where Statement the end user need it to be executed.
    I build a form on the EMP table in order to let the user get benefit from the Enter Query/Execute Query functionality in forms. Like this, he/she can query the data he likes with the condtions he wish to have.
    I created a button to call the report I did before from the form
    The Button has the following code in the trigger
    WHEN-BUTTON-PRESSED
    declare
    rep_id report_object;
    rep_status varchar2(30);
    Where_Pos number(3);
    Where_Statement varchar2(200);
    begin
    Where_Pos := InStr(:System.Last_Query, 'WHERE');
    if Where_Pos > 0 then
    Where_Statement := SubStr(:System.Last_Query,
    Where_Pos);
    end if;
    rep_id := Find_Report_Object('emp_rep');
    Set_Report_Object_Property(rep_id, REPORT_EXECUTION_MODE, RUNTIME);
    Set_Report_Object_Property(rep_id, REPORT_COMM_MODE, ASYNCHRONOUS);
    Set_Report_Object_Property(rep_id, REPORT_DESTYPE, PREVIEW);
    Set_Report_Object_Property(rep_id, REPORT_OTHER, 'MAXIMIZE=YES Where_St=' &#0124; &#0124; Where_Statement);
    rep_status := Run_Report_Object(rep_id);
    end;
    Whenever I run the report it did not show up at all. I doubt the value I am passing, so I deleted the line that pass the value for the Lexical parameter to the report. The report worked just fine.
    Moreover, I passed this value using Run_Product to the reports and the report is working fine with the forms. But I would like to use Run_Report_Object to pass this value to the reports.
    Any ideas??
    Thanks

    PROCEDURE PROC_test IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(100);
    v_server_length NUMBER;
    REP_SERV VARCHAR2(100);
    paramlist_id ParamList;
    paramlist_name VARCHAR2(10):='tmplist';
    Begin
    repid := find_report_object('HIST_DISPENSE');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'HTML');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'REP_ORACLEWEB');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no R_ST_DT='||:BLK_A_NUM_GT7_NO_HIS_DISP.FROM_DATE 'paramform=no R_END_DT='||:BLK_A_NUM_GT7_NO_HIS_DISP.TODATE);
    v_rep := RUN_REPORT_OBJECT(repid,paramlist_id);
    message('vrep is '||v_rep);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    message('status is'||rep_status);
    v_server_length := LENGTH(GET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER));
    message('server length is '||v_server_length );
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    message('REP STATUS IS'||rep_status);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('http://10.20.56.20:7778/reports/rwservlet/getjobid'||
    substr(v_rep,v_server_length + 2)||'?'||'server=REP_ORACLEWEB','_blank');
    ELSE
    message('Error when running report');
    message('SQLERRM ' ||SQLERRM);
    END IF;
    end;
    Hi
    I'm having problem passing two paramters, Pl helpme by correcting the syntax.
    Thx

  • PL/SQL Procedure Parameters PROBLEM

    Here's my problem:
    When we describe the successfully compiled PL/SQL packaged procedures in SQL*Plus, the parameter order seems reversed. For instance, my PL/SQL source looks like this:
    Create Package pkg1...
    Procedure func1 (param1 in varchar2,
    param2 in number) is
    ...function body...
    end func1;
    end pkg1;
    After it is successfully compiled in SQL*Plus, when I describe it using the desc command, it shows:
    PROCEDURE FUNC1
    Argument Name Type ......
    PARAM2 VARCHAR2
    PARAM1 VARCHAF2
    This problem occurs occasionally, if we recompile the source, it goes away. We couldn't quite tell when and how this happens. When the problem occurs, we checked the ALL_SOURCE view and verified that the parameters are in the right order.
    We use the Merant Drivers for our client side interfaces and whenever we have this problem on the db server, we get the "wrong number of types or parameters" error.
    Any clues, hints, solutions are greatly appreciated.
    Thank you for your time.
    On a different note, I couldn't find the appropriate forum to post this PL/SQL specific message, wondering why there isn't a PL/SQL forum.
    Murthy.

    Hi Yegneshwar
    Can U tell me how to invoke the procedure ? If all it can be invoked the post it or mail me and then I might help U out.
    Thank U.
    edwin

  • RFC Lookup - BAPI-TABLE Parameters problem

    Hello All,
    I had a scenario where i need to export parameters and am supposed to get import parameters from BAPI between source and target structures.
    like -
    source --> BAPI execution = result --> target
    We had succeeded in getting those but the only problem is with TABLE parameters in that BAPI.
    How can we achieve it.
    Faster reply would be appreciated.
    Thanks & regards
    Reddy

    Hi VJ,
    Its not a simple source-target mapping .
    For Ex :
    Source-Bapi-Idoc
    Source will send some parameters to BAPI and bapi will execute it and respond with values in table parameter of the bapi and result would be assigned to idoc-field.
    For this i am using RFC Look up with sample code as :
    String rfcxml ="<ns0:Z_BAPI xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">" +
    "     <A>" + A + "</A>" +       --- Export parameters
    "     <B>" + B + "</B>" +       --- Export parameters
    //"                       <TABLE><FIELD1>" + FIELD2 + "</FIELD1></TABLE>" +
    //"                       <TABLE><FIELD2>" + FIELD2 + "</FIELD2></TABLE>" +
    //"                       <TABLE><FIELD3>" + KDMAT+ "</FIELD3></TABLE>" +
    //          "<FIELD1>" + FIELD1 + "</FIELD1>" +
    "</ns0:Z_BAPI> "  ;
    Passing A & B as export parameters and getting TABLE-FIELD1&2&3 as response.
    I hope some problem in the syntax.
    Regards,
    HP

  • Navigation and Parameters problem

    Hey all,
    I'm very new to JSF and we are attempting a very basic test app to try and get our heads round things. The app is basically a list of people, with a link to edit them, and a page which lets you edit the person and a button to save the person, after which, you will go back to the list of people.
    I have a personlist.jsp page which obtains a (fixed) list of people from the PeopleDAO, using a h:dataTable to iterate and display each person. Each row has an edit link of the form "......editperson.jsp?PersonID=<number>" where number is the person ID for that person.
    In the edit person page, I have a PersonBean which is used to display the person details. The person bean is specified in faces-config.xml as a managed bean, and I hook the PersonID property of the PersonBean up using a managed property linked to the PersonID param.
    <managed-bean>
    <managed-bean-name>personbean</managed-bean-name>
    <managed-bean-class>mypackage.view.PersonBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>personID</property-name>
    <value>#{param.personID}</value>
    </managed-property>
    </managed-bean>
    I have the navigation set up to go back to the personlist.jsp page once you click the save button :
    <navigation-rule>
    <from-view-id>/editperson.jsp</from-view-id>
    <navigation-case>
    <from-outcome>save</from-outcome>
    <to-view-id>/personlist.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    On editperson.jsp, I have a commandbutton that has an action="save" (this is for simple testing since we are having problems with it) :
    (in the form for editing the person)
    <h:commandButton value="Update" action="save"/>
    The problem is that when you click the button, it tries to reload editperson.jsp without the personID parameter, which causes an error because it is expecting a parameter as specified in the PersonBean managed bean declaration.
    If I set the property to a constant value in the managed bean declaration, everything works fine, but when bound to the parameter, it causes an error.
    I can see why it is an error, but I have no idea how to get around it. Am I passing parameters the wrong way, or is there some option to set a default value for the param, or am I navigating incorrectly?
    Any help is appreciated,
    Cheers,
    Andy

    Well, at last, it seems that after another day of testing, I have found the answer.
    I'm posting back here since I found a number of people who had this problem, and none of them received an answer. Hopefully this might help some poor soul in the future.
    The problem is data type conversion. When there is no person ID, the parameter is effectively a blank string, which of course cannot be converted to an integer. Even specifying the type in the managed property did not help the conversion process.
    I have a mini test app that has a bean with managed int and string properties. The page renders fine when the intValue param is there, but crashes if it is not. The page doesn't give a hoot about whether the textValue parameter is there or not and will always render by substituting a blank string as the value.
    I'm sure there must be some way to pass a parameter to a managed property as an integer without having the application crash if it is missing, especially considering most applications use integers for primary keys.
    I have seen samples that do this, alas, since many don't compile, deploy and run out of the box, I am unable to verify whether or not they break under the same conditions.
    The only thing I can think of is to have the backing bean act as a container for my real objects. I.e. PersonBean has a managed person ID string property which when set, converts the ID to an integer and loads up the person and assigns it to PersonBean.Person .
    This is probably actually a better structure all round, especially if the backing bean for a view needs to contain other objects, i.e. a list of orders for that person. By adding the extra layer in there, it will make it easier to add additional model objects to the backing bean.

Maybe you are looking for

  • How to get the current class name in static method?

    Hi, I'd like to get the current class name in a static method. This class is intended to be extended. So I would expect that the subclass need not to override this method and at the runtime, the method can get the subclass name. getClass() doesn't wo

  • Auto complete duplicate last name

    I am using Mail (4.2) on Snow Leopard (10.6.2) with a single email account on Exchange 2007. My address book is sync'd with Exchange (250 entries) and 2 entries in the "on my Mac" address book. for many of my most commonly used addresses (in the comp

  • I have two queries do do with Mail  running 10.9

    1     ICloud seems to have lost a great many of my sent messages.  I have a few recent ones and then some from 2012 and a few others going back to 2010. I rely on the iCloud sent mesages to know what I have said to people.  Are they lost forwever or

  • Role of slapd on linux SRSS servers/misconfiguration of slapd?

    Recently one of our failover SRSS4 servers (running on OpenSuSE 10.3) ended up having a catastrophic hardware failure necessitating rerolling a new one. In the past we have used a method for doing this that hasn't given us any problems. Basically we

  • Where are TREX index stored? TREX server File system? or KM repository?

    hi, friends: can  someone tell me where are TREX index stored ? in TREX server file system? or in portal KM repository? file system or DB? thank you Carol