Using prepareStatement with parameter in existsNode() function

Hello,
I have an xml file like the following:
<MyDocRoot id="myId" xmlns="..." xmlns:xsi="..." xsi:schemaLocation="...">
</MyDocRoot>
I am retrieving my documents from an XMLType table with aquery like:
SELECT OBJECT_VALUE FROM MY_TABLE
WHERE existsNode(OBJECT_VALUE, '/MyDocRoot[@id="myId"]') = 1;
When I run it using oracle client everything works fine and great.
Now I would like to execute that query from a Java application, using prepared statement, so with a query now like:
SELECT OBJECT_VALUE FROM MY_TABLE
WHERE existsNode(OBJECT_VALUE, '/MyDocRoot[@id="?"]') = 1;
And passing the id value as the parameter at execution time.
The problem I am facing is that it seems that the prepare statement does not recognize the parameter at that place. I get an error specifying that one parameter was provided but none was expected.
I get the same problem when I try to update a document in the database. In this case I have the query is:
UPDATE MY_TABLE SET OBJECT_VALUE = XMLType(?)
WHERE existsNode(OBJECT_VALUE, '/MyDocRoot[@id="?"]') = 1
The error I receive specify that 2 parameters were provided but only one was expected (the parameter in the XMLType() is recognized but not the one in the XPATH expression)
Does anybody have an example on how to use prepare statement with parameters in XPATH expression like above?

Try this
package com.oracle.st.xmldb.pm.examples;
import com.oracle.st.xmldb.pm.common.baseApp.BaseApplication;
import oracle.jdbc.OraclePreparedStatement;
import oracle.jdbc.OracleResultSet;
import oracle.xdb.XMLType;
import oracle.xml.parser.v2.XMLDocument;
public class GetXMLType extends BaseApplication
   public void doSomething(String[] Args) throws Exception
     OraclePreparedStatement  statement = null;
     String statementText;
     statementText = "select object_value from PURCHASEORDER where existsNode(object_value,'/PurchaseOrder[Reference=\"' || :1 || '\"]') = 1";
     OracleResultSet resultSet = null;
     XMLDocument  doc = null;
     XMLType xml;
     statement = (OraclePreparedStatement) getConnection().prepareStatement(statementText);
     statement.setString(1,"AHUNOLD-20040817185414366GMT");
     resultSet = (OracleResultSet) statement.executeQuery();
     while (resultSet.next())
        xml = (XMLType) resultSet.getObject(1);
        doc = (XMLDocument) xml.getDocument();
        doc.print(System.out);
       resultSet.close();
       statement.close();
       getConnection().close();
  public static void main (String[] args)
    try
      GetXMLType example = new GetXMLType();
      example.initializeConnection();
      example.doSomething(args);
    catch (Exception e)
      e.printStackTrace();
}Gives
C:\TEMP>
C:\oracle\product\11.1.0\db_1\jdk\bin\javaw.exe -client -classpath C:\xdb\JDeveloper\Classes;C:\oracle\product\11.1.0\db_1\jdbc\lib\ojdbc5.jar;C:\oracle\product\11.1.0\db_1\LIB\xmlparserv2.jar;C:\oracle\product\11.1.0\db_1\RDBMS\jlib\xdb.jar;C:\oracle\JDeveloper\j2ee\home\oc4j.jar;C:\oracle\JDeveloper\j2ee\home\lib\servlet.jar -Dcom.oracle.st.xmldb.pm.ConnectionParameters=C:\\xdb\\jdeveloper\\SimpleExamples\\LocalConnection.xml -Dhttp.proxyHost=www-proxy.us.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|us.oracle.com|*.oracle.com -Dhttps.proxyHost=www-proxy.us.oracle.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts=localhost|us.oracle.com|*.oracle.com com.oracle.st.xmldb.pm.examples.GetXMLType -mx2048M
Using connection Parameters from : C:\\xdb\\jdeveloper\\SimpleExamples\\LocalConnection.xml
ConnectionProvider.establishConnection(): Connecting as SQLLDR/SQLLDR@jdbc:oracle:oci8:@(description=(address=(host=localhost)(protocol=tcp)(port=1521))(connect_data=(service_name=ORA11GR1.xp.mark.drake.oracle.com)(server=DEDICATED)))
ConnectionProvider.establishConnection(): Database Connection Established
<PurchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://localhost:8080/home/SCOTT/poSource/xsd/purchaseOrder.xsd">
   <Reference>AHUNOLD-20040817185414366GMT</Reference>
   <Actions>
      <Action>
         <User>AHUNOLD</User>
      </Action>
   </Actions>
   <Reject/>
   <Requestor>Alexander Hunold</Requestor>
   <User>AHUNOLD</User>
   <CostCenter>A60</CostCenter>
   <ShippingInstructions>
      <name>Elizabeth Bates</name>
      <address>Magdalen Centre, The Oxford Science Park,
Oxford,
Oxford OX9 9ZB
United Kingdom</address>
      <telephone>980-985-4081</telephone>
   </ShippingInstructions>
   <SpecialInstructions>Next Day Air</SpecialInstructions>
   <LineItems>
      <LineItem ItemNumber="1">
         <Description>Farewell, My Concubine</Description>
         <Part Id="717951002723" UnitPrice="19.99" Quantity="3"/>
      </LineItem>
      <LineItem ItemNumber="2">
         <Description>Willy Wonka and the Chocolate Factory</Description>
         <Part Id="85392229123" UnitPrice="19.99" Quantity="4"/>
      </LineItem>
      <LineItem ItemNumber="3">
         <Description>Best In Show</Description>
         <Part Id="85391895121" UnitPrice="19.99" Quantity="3"/>
      </LineItem>
      <LineItem ItemNumber="4">
         <Description>The Reggae Movie</Description>
         <Part Id="13023004597" UnitPrice="19.99" Quantity="1"/>
      </LineItem>
   </LineItems>
</PurchaseOrder>
Process exited with exit code 0.

Similar Messages

  • Use of exporting parameter VIA_T777D in function module RH_READ_INFTY

    Hi,
    Can any one explain me the use of exporting parameter VIA_T777D in the function module RH_READ_INFTY.
    Regards,
    Aravind

    Closing.

  • LinkToAction how to use it with parameter?

    Hello,
    searching for tutorials about the use of the LinkToAction I have seen that here is a possiblity in WD4J to use a context-node.
    How can you pass a parameter in WD4A? (I am using a rowrepeater for a list of books and would like to pass the bookID to the event)
    How can I do this?
    Thanks a lot,
      Vanessa

    Thanks for your answer Lekha,
    unfortunaltely I don't get the point.
    >
    Lekha wrote:
    > From this action if you want to export the bookid then it should be a exporting parameter..
    >
    > you can specify this way...
    Somehow I don't get the point. How can I pass the bookid to the method?
    I have a rowrepeater. One of the elements is the link to the action. I will add the bookid as parameter. That is clear.
    My problem is how to connect the bookid of the row that is displayed to the method? Is it just because of the name? I don't see any context I can associate?
    Could you please go a little bit more in detail,
      Vanessa

  • Using PDF with parameter /p /h

    Hi,
    i'm using CL_GUI_FRONTEND_SERVICES=>EXECUTE with
    acrobat reader and the parameters /p /h.
    When executing is finished, the reader is still open. Is there a possibility to
    close the reader via an abap statement or fm or with
    CL_GUI_FRONTEND_SERVICES=>EXECUTE?
    Does anybody know more parameters than /p /h for acrobat reader?
    I whant to print the PDF-Document 3 times.
    regards, Dieter

    Hi Rod,
    I tried creating a new report and saved into database. But, i dont see an option the no.of columns that has to be displayed in Discoverer Plus/Viewer. I just want to display, for example 10 columns at a stretch by not changing the no.of columns after I run the report in the Viewer. When I run the report, I should be able to see 10 columns at once. When I click next in the viewer it should show the next 10 columns. The Discoverer Viewer shows only 6 columns at a time by default when I ran a report.
    Is the something a setting that has to be done in pref.txt file?
    Thanks,
    Gran

  • How i use start with and rollup both in one query

    hi master
    sir i use rollup function for subtotal but rollup not give tree
    for tree i want to use start with and connect by function
    but that query give error
    sir how i use both rollup and start with connect by in one query
    for tree wise subtotal
    please give me idea
    thanking you

    hi master
    thank for your reply
    sir i get accid and title from master table and balance from detial table then system give me error
    sir i send me all table and data with query and error
    Sir this is my master table
    SQL> desc chartofacc;
    Name Null? Type
    PARENT NUMBER
    CHILD NUMBER
    ACCID NOT NULL VARCHAR2(15)
    TITLE VARCHAR2(99)
    CAMPID VARCHAR2(2)
    ACTIVE NUMBER
    FSTATUS NUMBER
    Data
    Parent child accid
         1     K1
    1     11     K11
    11     1101     K1101
    11     1102     K1102
    11     1103     K1103
    11     1104     K1104
    11     1105     K1105
    11     1106     K1106
    11     1107     K1107
    11     1108     K1108
    11     1109     K1109
    11     1110     K1110
    11     1111     K1111
    11     1112     K1112
    11     1113     K1113
    11     1114     K1114
    1     12     K12
    12     1201     K1201
    12     1202     K1202
    12     1203     K1203
    1     13     K13
    13     1301     K1301
    1301     130101     K130101
    1301     130102     K130102
    1301     130103     K130103
    1301     130104     K130104
    1301     130105     K130105
    1301     130106     K130106
    1301     130107     K130107
    1301     130108     K130108
    1301     130109     K130109
    1301     130110     K130110
    1301     130111     K130111
    1301     130112     K130112
    1301     130113     K130113
    1301     130114     K130114
    1301     130115     K130115
    13     1302     K1302
    1302     130201     K130201
    1302     130202     K130202
    1302     130203     K130203
    1302     130204     K130204
    1302     130205     K130205
    13     1303     K1303
    1303     130301     K130301
    1303     130302     K130302
    1303     130303     K130303
    13     1304     K1304
    1304     130401     K130401
    1304     130402     K130402
    1304     130403     K130403
    1304     130404     K130404
    1304     130405     K130405
    1304     130406     K130406
    1304     130407     K130407
    1304     130408     K130408
    13     1305     K1305
    1305     130501     K130501
    1305     130502     K130502
    13     1306     K1306
    1306     130601     K130601
    13     1307     K1307
    1307     130701     K130701
    1307     130702     K130702
    1307     130703     K130703
    1307     130704     K130704
    13     1308     K1308
    1308     130801     K130801
    1308     130802     K130802
    1308     130803     K130803
    1308     130804     K130804
    1308     130805     K130805
    1308     130806     K130806
    1308     130807     K130807
    1308     130808     K130808
    1308     130809     K130809
    1308     130810     K130810
    1308     130811     K130811
    1308     130812     K130812
    1308     130813     K130813
    13     1309     K1309
    13     1310     K1310
    13     1311     K1311
    1311     131101     K131101
         2     K2
    2     21     K21
    21     2101     K2101
    2101     210101     K210101
    2101     210102     K210102
    2101     210103     K210103
    2101     210104     K210104
    21     2102     K2102
    2102     210201     K210201
    2102     210202     K210202
    2102     210203     K210203
    2102     210204     K210204
    21     2103     K2103
    2103     210301     K210301
    2103     210302     K210302
    2103     210303     K210303
    2103     210304     K210304
    21     2104     K2104
    2104     210401     K210401
    2104     210402     K210402
    2104     210403     K210403
    2104     210404     K210404
    2     22     K22
    22     2201     K2201
    2201     220101     K220101
    2201     220102     K220102
    2201     220103     K220103
    2201     220104     K220104
    2201     220105     K220105
    22     2202     K2202
    2202     220201     K220201
    2202     220202     K220202
    2202     220203     K220203
    2202     220204     K220204
    22     2203     K2203
    2203     220301     K220301
    2203     220302     K220302
    2203     220303     K220303
    2203     220304     K220304
    22     2204     K2204
    2204     220401     K220401
    2204     220402     K220402
    2204     220403     K220403
    22     2205     K2205
    2205     220501     K220501
    2205     220502     K220502
    220502     22050201     K22050201
    220502     22050202     K22050202
    220502     22050203     K22050203
    220502     22050204     K22050204
    22     2206     K2206
    2206     220601     K220601
    2206     220602     K220602
    2206     220603     K220603
    2206     220604     K220604
    2     23     K23
    23     2301     K2301
    2301     230101     K230101
    2301     230102     K230102
    2301     230103     K230103
    2301     230104     K230104
    2301     230105     K230105
    2301     230106     K230106
    2301     230107     K230107
    2301     230108     K230108
    23     2302     K2302
    2302     230201     K230201
    2302     230202     K230202
    2302     230203     K230203
    2302     230204     K230204
    23     2303     K2303
    2303     230301     K230301
    2303     230302     K230302
    23     2304     K2304
    2304     230401     K230401
    2304     230402     K230402
    2304     230403     K230403
    23     2305     K2305
    2305     230501     K230501
    23     2306     K2306
    2306     230601     K230601
    2306     230602     K230602
    2306     230603     K230603
    2306     230604     K230604
    23     2307     K2307
    23     2308     K2308
    2308     230801     K230801
    2308     230802     K230802
    2308     230803     K230803
    23     2309     K2309
    2309     230901     K230901
    2309     230902     K230902
    2309     230903     K230903
    2309     230904     K230904
    23     2310     K2310
    2310     231001     K231001
    2310     231002     K231002
    2310     231003     K231003
    23     2311     K2311
    2311     231101     K231101
    2311     231102     K231102
    2311     231103     K231103
    23     2312     K2312
    2312     231201     K231201
    2312     231202     K231202
    2312     231203     K231203
    2312     231204     K231204
    23     2313     K2313
    2313     231301     K231301
    2313     231302     K231302
    2313     231303     K231303
    2313     231304     K231304
    2313     231305     K231305
    2313     231306     K231306
    2313     231307     K231307
    2313     231308     K231308
    2313     231309     K231309
    2313     231310     K231310
    2313     231311     K231311
    2313     231312     K231312
    2313     231313     K231313
    2313     231314     K231314
    2313     231315     K231315
    23     2314     K2314
    2314     231401     K231401
    2314     231402     K231402
    2314     231403     K231403
    2314     231404     K231404
    2314     231405     K231405
    2314     231406     K231406
    2314     231407     K231407
    23     2315     K2315
    23     2316     K2316
    2316     231601     K231601
    2316     231602     K231602
    23     2317     K2317
    23     2318     K2318
    23     2319     K2319
    2319     231901     K231901
    2319     231902     K231902
    2319     231903     K231903
    2319     231904     K231904
    2319     231905     K231905
    2319     231906     K231906
    23     2320     K2320
    2320     232001     K232001
         3     K3
    3     31     K31
    31     3101     K3101
    31     3102     K3102
    31     3103     K3103
    31     3104     K3104
    31     3105     K3105
    3     32     K32
    32     3201     K3201
    32     3202     K3202
    32     3203     K3203
    32     3204     K3204
    32     3205     K3205
    32     3206     K3206
    32     3207     K3207
         4     K4
    4     41     K41
    41     4101     K4101
    4101     410101     K410101
    4101     410102     K410102
    4101     410103     K410103
    4101     410104     K410104
    4101     410105     K410105
    4101     410106     K410106
    4101     410107     K410107
    4101     410108     K410108
    4101     410109     K410109
    4101     410110     K410110
    4101     410111     K410111
    4101     410112     K410112
    4101     410113     K410113
    4101     410114     K410114
    4101     410115     K410115
    4101     410116     K410116
    4101     410117     K410117
    4101     410118     K410118
    4101     410119     K410119
    4101     410120     K410120
    4101     410121     K410121
    4101     410122     K410122
    4101     410123     K410123
    4101     410124     K410124
    4101     410125     K410125
    4101     410126     K410126
    4101     410127     K410127
    4101     410128     K410128
    4101     410129     K410129
    4101     410130     K410130
    4101     410131     K410131
    4101     410132     K410132
    41     4102     K4102
    41     4103     K4103
    41     4104     K4104
    4104     410401     K410401
    4104     410402     K410402
    4104     410403     K410403
    4104     410404     K410404
    41     4105     K4105
    41     4106     K4106
    41     4107     K4107
    41     4108     K4108
    4108     410801     K410801
    4108     410802     K410802
    4108     410803     K410803
    41     4109     K4109
    4109     410901     K410901
    4109     410902     K410902
    4109     410903     K410903
    41     4110     K4110
    41     4111     K4111
    4111     411101     K411101
    4111     411102     K411102
    4111     411103     K411103
    41     4112     K4112
    4112     411201     K411201
    41     4113     K4113
    4113     411301     K411301
    41     4114     K4114
    4114     411401     K411401
    4114     411402     K411402
         5     K5
    5     51     K51
    51     5101     K5101
    51     5102     K5102
    51     5103     K5103
    51     5104     K5104
    51     5105     K5105
    51     5106     K5106
    51     5107     K5107
    51     5108     K5108
    51     5109     K5109
    51     5110     K5110
    51     5111     K5111
    51     5112     K5112
    51     5113     K5113
    51     5114     K5114
         6     K6
    6     61     K61
         7     K7
    7     71     K71
    7     72     K72
    7     73     K73
    7     74     K74
    7     75     K75
    7     76     K76
    This is my detil table
    SQL> desc accbal;
    Name Null? Type
    ACCID VARCHAR2(15)
    YEARID NUMBER
    CRBAL NUMBER
    DRBAL NUMBER
    ENTDATE DATE
    BALID NUMBER
    Data in detail
    K1101     46291132     
    K1102     13182173     
    K1103     23784045     
    K1107     10001795     
    K1108     9083529     
    K1110     4224350     
    K1112     6696832     
    K1113     7963381     
    K1114     742766     
    K1201     1486082     
    K130104     1977616     
    K130106     736266     
    K130107     396673     
    K130108     42751     
    K130109     298362     
    K130110     187696     
    K130111     537     
    K130112     942     
    K130113     987     
    K130114     1272     
    K130115     40000     
    K130205     259941     
    K130303     177716     
    K130406     809719     
    K130408     1786091     
    K130701     301000     
    K130702     151200     
    K130703     7570     
    K130704     34400     
    K1308          
    K130801     5400     
    K130802     45000     
    K130803     10856     
    K130807     24300     
    K130808     16500     
    K130810     104500     
    K130811     60000     
    K130812     181000     
    K130813     1750000     
    K1309     1225565     
    K1310     2176259     
    K1311          
    K131101     788780     
    K410101          24926
    K410102          9545
    K410103          28500
    K410104          8192
    K410105          847
    K410106          37100
    K410107          2332
    K410108          9844
    K410109          7843
    K410110          9313
    K410111          1425
    K410112          6089
    K410113          15497
    K410114          5790
    K410115          4251
    K410116          22293
    K410117          855
    K410118          6497
    K410119          14996
    K410120          124214
    K410121          6713
    K410122          1567
    K410123          75821
    K410124          5085
    K410125          7125
    K410126          4342
    K410127          21485
    K410128          641111
    K410129          589
    K410130          50
    K410131          163900
    K410132          3849
    K4105          3946489
    K4107          100000
    K410801          972011
    K410802          1707806
    K410803          116450
    K4110          13113874
    K411101          98335
    K411102          32454
    K411103          53569
    K411201          25327406
    K411301          7143103
    K411401          4500000
    K411402          12754
    K5102          2120031
    K5103          13543810
    K5107          4596103
    K5108          5604493
    K5110          2008401
    K5112          2182778
    K5113          4748537
    K5114          556914
    K61          43297680
    Sir I use this query
    select lpad(' ',2*(level-1)) || to_char(child),title,sum(drbal),sum(crbal),
    from chartofacc, accbal
    where chartofacc.accid=accbal.accid(+)
    start with parent is null
    connect by prior child = parent
    group by rollup(substr(mas.accid,2,1),substr(mas.accid,3,1),substr(mas.accid,4,2),substr(mas.accid,6,2) ,chartofacc.accid,title,fstatus);
    sir this query not give me result and give me error this
    SQL> /
    from chartofacc, accbal
    ERROR at line 2:
    ORA-00936: missing expression
    Please give me idea how I get tree type subtotal tribalance
    Thanking you
    Aamir

  • Can I use ajaxOnLoad with a function to which I give a parameter?

    I accidentaly posted this on the live docs... So here I go again:
    Can I use ajaxOnLoad with a function to which I give a parameter? 
    e.g.: 
    <cfset ajaxOnLoad("initCourses('#tmpUUID#')") /> 
    The JS function looks as following: 
    initCourses=function(tmpUUID){ 
         ColdFusion.Layout.collapseAccordion('awCourseList','awCourseList_1_'+tmpUUID); 
         // the _1_ in the name is set through the currentRow attribute while looping through a query
         setWinUnsaved; 
    I'm having the problem, that my first accordion panel doesn't initialize hidden, so I wrote this method. Later on I noticed, that the accordions were somehow cached, so the URL params given whithin the source weren't right anymore. This might be, because I gave name attributes to the layoutareas. I added an UUID to the name attribute so the source wasn't cached anymore. But now it doesn't seem to find the cflayout container anymore. (I checked the name of the layoutarea and the temporary saved uuid, they are the same.) 
    I tried using cfhtmlhead instead, but that didn't seem to work neither.

    So I've been searching the whole day yesterday and many hours today and this is what I got:
    <cfsavecontent variable="jsheadcont">
         <script type="text/javascript">
         <!--
              initCourses('#tmpUUID#');
         //-->
         </script>
    </cfsavecontent>
    <cfhtmlhead text="#jsheadcont#">
    And that's what my JavaScript function looks like:
    initCourses=function(tmpUUID){
         setTimeout("ColdFusion.Layout.collapseAccordion('awCourseList','awCourseList_1_"+tmpUUID+ "')",1);
         setWinUnsaved;
    So I'll have to write all that instead of a simple
    <cfset ajaxOnLoad("initCourses('#tmpUUID#')") /> ?
    Or am I completely wrong? I forgot to mention that the accordion is inside a tab-layout which is inside a border-layout.
    Cheers
    Boris

  • SSRS countrow Aggregate error(Aggregate and lookup functions cannot be used in query parameter expressions.)

    Below expression works fine with text box but gives error in dataset expression.
    ="SET FMTONLY OFF select  "+ join(Parameters!Column.Value,",") +" FROM pamcustom.dbo.vw_HFL_HFD_HotfileData INNER JOIN pamcustom.dbo.HFL_HFB_HotFileBatch  on BatchID = HFB_intBatchID where BatchID ="+Parameters!BatchId.Value+"
    and "+Parameters!cmbTranType.Value+" "+ iif(CountRows("DS_Aml_Mnr_Iss_Desc")=Parameters!Mnr_Iss_Desc.count," "," and aml_mnr_iss_desc in "+"('" & join(Parameters!Mnr_Iss_Desc.Value,"','")
    & "')")+iif(CountRows("ds_ReportingCategory")=Parameters!ReportingCategory.count," "," and ReportingCategory in "+"('" & join(Parameters!ReportingCategory.Value,"','") & "')")+iif(CountRows("ds_NAICSubGroup")=Parameters!NAICSubGroup.count,"
    "," and naicsubgroup in "+"('" & join(Parameters!NAICSubGroup.Value,"','") & "')")+iif(CountRows("ds_PortTrading")=Parameters!PortTrading.count," "," and porttrading in "+"('"
    & join(Parameters!PortTrading.Value,"','") & "')")+iif(CountRows("ds_GL_LE")=Parameters!GL_LE.count," "," and gl_le in "+"('" & join(Parameters!GL_LE.Value,"','") &
    "')")+iif(CountRows("ds_coagroup")=Parameters!cmbCoaGrp.count," "," and coagroup in "+"('" & join(Parameters!cmbCoaGrp.Value,"','") & "')")+iif(CountRows("Portfolio")=Parameters!cmbPort.count,"
    "," and portfolio in "+"('" & join(Parameters!cmbPort.Value,"','") & "')")+IIf(IsNothing(Parameters!txtSecID.Value)," "," and secid in ('"+Replace(Parameters!txtSecID.Value,",","','")+"')")+iif(IsNothing(Parameters!minPortFilter.Value)
    and IsNothing(Parameters!MinPort.Value)," "," and portfolio "+Parameters!minPortFilter.Value+Parameters!MinPort.Value)+iif(IsNothing(Parameters!maxPortFilter.Value) and IsNothing(Parameters!MaxPort.Value)," ","
    and portfolio "+Parameters!maxPortFilter.Value+Parameters!MaxPort.Value)+iif(IsNothing(Parameters!minCoaFilter.Value) and IsNothing(Parameters!txtMinCoa.Value)," "," and portfolio "+Parameters!minCoaFilter.Value+Parameters!txtMinCoa.Value)+iif(IsNothing(Parameters!maxCoaFilter.Value)
    and IsNothing(Parameters!txtMaxCoa.Value)," "," and portfolio "+Parameters!maxCoaFilter.Value+Parameters!txtMaxCoa.Value)
    I guess the error " Aggregate and lookup functions cannot be used in query parameter expressions." is because I am using CountRow to ensure that if all values of multi select all selected i will not use that filter in where clause.
    Pls. guide...

    Hi, Include your parameter total count in the dataset for parameter and instead of using countrows() function use the count from dataset in the expression.
    Hope this helps.........
    Ione

  • How to use ET_ATTACH importing parameter Function module BBP_PD_SC_CREATE

    hi,
    how to use ET_ATTACH importing parameter of Function module BBP_PD_SC_CREATE, my requirement is to create SC with attachment.
    an example would really help.
    Kind Regards,
    Kailash.

    Hi,
    Generally we create the SC from ITS or Portal, and there in the Create SC screen , once you add the item into the shopping cart , in the Item details, there is the section called , Documents and Attachements, where in you can upload the attachments which ever you want. Sometimes the extn .DOC, .pdf and .xls are allowed. but that also you can check which are the Authorized files extns avaialbe in Backend R/3.
    Using the FM RFC_READ_TABLE, in table pass TDWP and in the i_field pass 'APPSFX' and then you can get the authorized file formats. in Backend Transaction DC30 you can verify which are the allowed file formats.
    Moreover for restricting the User from uploading the attachment BADI BBP_ITEM_CHECK_BADI can be implemented for raising the error message if required.
    Regarding the ET_ATTACH, it is the structure of type BBPT_PDS_ATT_T,  so you have to provide the complete details for this structure. Like : GUID, P_GUID ,LOGICAL_SYSTEM, DESCRIPTION, URL, TYPE,DISP_URL, PHIO_EXT ,etc.
    Once all the entries are fine.
    You can create the SC, but the recommeded way for creating the SC is thru ITS or Portal.
    I hope this will help. Feel Free while asking questions.
    Thanks and Regards,
    Ankur Goyal

  • Use of input parameter of function module

    Hi,
    we implemented an enhancement of a function module with a new inputparameter.
    Now we would like to do some follow-up to see if our developers are starting to use this new parameter.
    Is there a way to find this out? We can do a program scan on the name of this new parameter, but this does not seem to be enough.
    Thanks for the advice.
    Kris

    Hi Kris,
    as described, you can do a where-used-list and expand the nodes.
    This will not cover any dynamic calls.
    If you want to know the real use of the new parameter, then you can implement a LOG-POINT in the function module, like
    FUNCTION xyz.
    IF NEW_PARAMETER IS SUPPLIED.
      LOG-POINT ID YOUR_LOG_POINT FIELDS sy-uname sy-uzeit sy-cprog NEW_PARAMETER.
    ENDIF.
    You can create, activate and evaluate LOG-POINTS with transaction SAAB. It is extremely helpful for a lot of analyzing purposes as you can switch logging on and off for users and servers on the fly. If you know what you want to know you can leave the log-points in the program code and just deactivate logging.
    Regards,
    Clemens

  • How to turn a stored procedure with a parameter into table function?

    Could someone please let me know how to turn the SP below into table-value function? I want to be able to run this function by using SELECT statements with the parameter. Thanks
    CREATE
    PROCEDURE
    [dbo].[Transformation](@year
    varchar(4))
    AS
    BEGIN
    Declare@Q1
    Varchar(100)=
    '['+@year+'Q1'+']'
    Declare@Q2
    Varchar(100)=
    '['+@year+'Q2'+']'
    Declare@Q3
    Varchar(100)=
    '['+@year+'Q3'+']'
    Declare@Q4
    Varchar(100)=
    '['+@year+'Q4'+']'
    Declare@StrQuery
    Varchar(1000)
    Set@StrQuery
    = 'Select Date, Job, [Cost Elements],Units,
    '+@Q1+'+'+'+'+@Q2+'+'+'+'+@Q3+'+'+'+'+@Q4+'
    as [Amounts], ''Update'' as [Description]  From Export with (nolock)'
    --Print @StrQuery
    Exec(@StrQuery)
    END

    You cannot use dynamic SQL in user-defined functions.
    Work around (not an ideal solution, it has problems): OPENQUERY.
    Blog:  http://www.sqlusa.com/bestpractices2005/selectfromsproc/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • Can we use OUT or IN OUT parameter mode in function?

    Can we use OUT or IN OUT parameter mode in function & if YES then what's limitations?

    hi,
    Yes we can have OUT and IN OUT parameters for a function.
    As per my knowledge there are no limitations , but as per the convention we will use OUT ,IN OUT Parameter modes for only procedures .
    Thanks,
    P Prakash

  • Not able to copying files/folders from one Document Library to another Document Library using Open with Browser functionality

    Hi All, 
    We have SharePoint Production server 2013 where users are complaining that they are not able to copy or move files from one document library to another document library using “Open with Explorer” functionality.
    We tried to activate publishing features on production server but it did not work. We users reported following errors:  
    Copying files from one document library to another document library:
    Tried to map the document libraries and still not get the error to copy files: 
    In our UAT environment we are able to copy and move folders from using “Open with Explorer” though.
    We have tried to simulate in the UAT environment but could not reproduce the production environment.  
    Any pointers about this issue would be highly appertained.
    Thanks in advance
    Regards,
    Aroh  
    Aroh Shukla

    Hi John and all,
    One the newly created web applications that we created few days back and navigated to document library, clicked on “Open with Explorer”, we get this error.
    We're having a problem opening this location in file explorer. Add this website to your trusted and try again.
    We added to the trusted site in Internet Explorer for this web application, cleared the cache and open the site with same document library but still get the same above error.
    However, another existing web application (In same the Farm) that we are troubleshooting at the moment, we are able click on “Open with Explorer”,  login in credentials opens and we entered the details we are able to open the document
    library and tried to follow these steps:
    From Windows Explorer (using with Open with Explorer), tried to copy or move a files to
    source document library.
    From Windows Explorer moved this file to another destination document library and we got this error.
    What we have to achieve is users should be able to copy files and folders using
    Open with Explorer functionality. We don’t know why Open with Explorer
    functionality not work working for our environment.  
    Are we doing something wrong? 
    We have referred to following websites.
    we hope concepts of copying / Moving files are similar as SharePoint 2010. Our production environment is SharePoint 2013.   
    http://www.mcstech.net/blog/index.cfm/2012/1/4/SharePoint-2010-Moving-Documents-Between-Libraries https://andreakalli.wordpress.com/2014/01/28/moving-or-copying-files-and-folders-in-sharepoint/
    Please advise us. Thank you.
    Regards,
    Aroh
    Aroh Shukla

  • How to use a table as Parameter to a function?

    Hi,
    I would like to know how we can use a "nested table " ( pl/sql collection)
    as parameter in a function and that function also return a table.
    How we execute this type of function in a pl/sql block?
    Thanks
    Jobin JSP
    Edited by: Jobin .SP on Dec 18, 2008 1:45 AM

    Some thing like this?
    SQL> create or replace type tbl is table of number(10)
      2  /
    Type created.
    SQL> create or replace function my_fn (ptbl in tbl) return tbl
      2  as
      3     ltbl tbl;
      4  begin
      5     ltbl := ptbl;
      6
      7     for i in 1..ltbl.count
      8     loop
      9             ltbl(i) := ltbl(i) + 10;
    10     end loop;
    11
    12     return ltbl;
    13  end;
    14  /
    Function created.
    SQL> select * from table(my_fn(tbl(1,2,3,4,5,6,7,8,9,10)))
      2  /
    COLUMN_VALUE
              11
              12
              13
              14
              15
              16
              17
              18
              19
              20
    10 rows selected.

  • My iCloud is defaulting to an old Hotmail address that I no longer use, my apple ID is currently functioning fine with a gmail account.  I'm not able to change my iCloud email on my phone or on desktop... Any advice?

    My iCloud is defaulting to an old Hotmail address that I no longer use, my apple ID is currently functioning fine with a gmail account.  I'm not able to change my iCloud email on my phone or on desktop... Any advice?

    You would have to change your Apple ID back to your old hotmail address (https://appleid.apple.com ) in order to turn off "Find My iPhone" and change the iCloud ID. After you changed it back and verified your old hotmail address you should be able turn off "Find My iPhone" and to temporarily delete your iCloud account from your devices. After that you can change your Apple ID back to your gmail address again. After it is verfied, you could add back your iCloud account by using your gmail address.

Maybe you are looking for