Query Property in DBDataSource object

Hi All,
I use the below VB.NET function for loading a matrix at the time of loading that particular form.
Public Sub BindData(ByVal objform As SAPbouiCOM.Form)
        Dim oMatrix As SAPbouiCOM.Matrix
        Dim oDBDataSrc As SAPbouiCOM.DBDataSource
        Try
            oMatrix = objform.Items.Item("3").Specific
            FillCombo(objform)
            oDBDataSrc = objform.DataSources.DBDataSources.Add("@MY_TABLE")
            oDBDataSrc.Query()
            oMatrix.LoadFromDataSource()
            If oMatrix.RowCount >= 1 Then
                If oMatrix.Columns.Item("V_0").Cells.Item(oMatrix.RowCount).Specific.Value <> "" Then
                    oDBDataSrc.Clear()
                    oMatrix.AddRow()
                    oMatrix.Columns.Item(0).Cells.Item(oMatrix.RowCount).Specific.Value = oMatrix.RowCount
                    oMatrix.Columns.Item(1).Cells.Item(oMatrix.RowCount).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                End If
            ElseIf oMatrix.RowCount = 0 Then
                oMatrix.AddRow()
                oMatrix.Columns.Item(0).Cells.Item(oMatrix.RowCount).Specific.Value = oMatrix.RowCount
                oMatrix.Columns.Item(1).Cells.Item(oMatrix.RowCount).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
            End If
            objform.EnableMenu("1281", False)
            objform.EnableMenu("1282", False)
            objform.EnableMenu("1283", False)
            objform.EnableMenu("1286", False)
            objform.EnableMenu("1293", False)
            objform.EnableMenu("1299", False)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
In the above function, in VB.NET, i don't face any problem, as the parameter (Condition) in query property is optional, and the matrix loads perfectly.
Now for achieving the same functionality in C#.NET, I am quite skeptical on the parameter in query line.  I don't have any specific condition as such, the way it was in VB.NET.
Kindly help me out in solving the same.
Thanks in Advance,
Satish. B.

Satish,
If the query paramater is mandatory did u try  the following query as a paramater..?
SELECT * FROM @MY_TABLE
So that u can get all the data from the user table into the matrix.
Vasu Natari.

Similar Messages

  • Getting a dataprovider object QUERY property with JavaScript

    Hi, I'm trying to get the QUERY property of a DataProvider Object, but can't seem to get it. Can anyone tell me if this code is ok?
    Thanks!
    <object>
    <param name="OWNER" value="SAP_BW"/>
    <param name="CMD" value="SET_DATA_PROVIDER"/>
    <param name="NAME" value="DP1"/>
    <param name="QUERY" value="ZGZMPASDPL_SR21_CNRTY_DASH_01"/>
    <param name="INFOCUBE" value="ZMPASDPL"/>
    DATA_PROVIDER:             DP1
    </object>
    var currentQuery = SAPBWGetItemProp("DP1");
    var queryName;
    if (currentQuery != null)
    {   for(i=1; i<currentQuery.length; i++)
            {  if (currentQuery<i>[0] == "QUERY")
                   queryName = (currentQuery<i>[1]);

    Hi Kenneth,
    copy&paste the attached webtemplate coding in your WAD...
    regards Jens
    <HTML>
    <!-- BW data source object tags -->
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_DATA_PROVIDER"/>
             <param name="NAME" value="DATAPROVIDER_1"/>
             <param name="QUERY" value="ZGZMPASDPL_SR21_CNRTY_DASH_01"/>
             <param name="INFOCUBE" value="ZMPASDPL"/>
             DATA_PROVIDER:             DATAPROVIDER_1
    </object>
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_PROPERTIES"/>
             <param name="TEMPLATE_ID" value="Z_GETQUERYID"/>
             TEMPLATE PROPERTIES
    </object>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
    <TITLE>BW Web Application</TITLE>
          <link href= "/sap/bw/Mime/BEx/StyleSheets/BWReports.css" type="text/css" rel="stylesheet"/>
    </HEAD>
    <BODY>
    <span style="DISPLAY: none; VISIBILITY: hidden" id="queryname">
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="TEXTELEMENTS_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEXT_ELEMENTS"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="BORDER_STYLE" value="NO_BORDER"/>
             <param name="SHOW_COMMON_ELEMENTS" value=""/>
             <param name="SHOW_FILTERS" value=""/>
             <param name="SHOW_VARIABLES" value=""/>
             <param name="ELEMENT_TYPE_1" value="COMMON"/>
             <param name="ELEMENT_NAME_1" value="REPTNAME"/>
             <param name="ONLY_VALUES" value="X"/>
             ITEM:            TEXTELEMENTS_1
    </object>
    </span>
    <P></P>
    <P><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="TABLE_1"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
             ITEM:            TABLE_1
    </object></P>
    <script language="JavaScript">
    var queryid = document.getElementById('queryname').innerHTML;
    alert(queryid);
      </script>
    </BODY>
    </HTML>

  • Query elements while collecting objects

    HI,
    I have  a query ,when i have changed some objects(means properties of chars and added some chars to rows )and save in a request .if i check in a SE09 particular request .
    i'm not able to understand those elements of technical names.
    can anyone help me how to find those objects collected  properly or not .Is there any table to find .
    Thanks,
    EDK...

    Hi,
    The entries under your Transport request -> Elements of the Query Builder in SE09 is nothing but the collected query components.
    Suppose you make change to a single query with UID (You can find this in Query Designer -> Query Propertiers -> Advanced )e.g. - ABCDXXXXXXXXXXXXX , then all the components starting with first few letters of the UID will be part of same query.
    There are multiple entries in your tranport request.
    Before releaseing the request do the following checks under SE09-> Request/Task -> Complete Check and if any inconsistencies error message willl be popped up.
    Object Syntax Check
    Check Request Consistency
    Display Inactive Objects
    If no errors, proceed with release and transport of request.
    Hope it clears your doubts.
    -VA

  • Changing the query on a view object

    I have a view object right now, based on an entity. It is the default view object, so that means the query in the view object is straight forward, it grabs all of the attributes from the table. And there is no WHERE clause.
    In reality I only want to show a finite set of rows from my table. Every time a record is changed/edited in this entity and committed, a new row in the database is created with the same information (I'm using CreateWithParams) except for a few columns.
    I actually don't really have update on this table, just creation of new rows. But to the user, I want it to 'look' like they are editing something in the table.
    Example:
    12, 11:32,Thompson, 60 (the user edits this information in an adf table, and a new row is created in the db)
    12, 11:55, Thompson, 75
    I have a timestamp (see above) field in the database that is used as part of my primary key, so that I know which record is the latest.
    When the VO query is run, I want the user to only see the latest row from the db.
    12, 11:55, Thompson, 75
    So...
    I went to my VO, and I changed the WHERE query to add this:
    where t1.TimeStamp = (Select MAX(t2.TimeStamp) FROM rcl.x t2 where t1.uid = t2.uid);
    Now, this isn't a mysql/sql question. There's actually a better query that I'd rather run, but the VO editor doesn't allow me to change the query itself....
    When I save the new WHERE to my VO, run my page again, I get the expected result (showing me only the latest records).
    However, when I try and sort on the table in which my data is displayed, I am now getting ORDER BY errors.
    I don't want my VO to be read-only sql based. I want to be able to update my table, so I have my VO running off of the entity.
    Why doesn't the VO allow me to change the query itself? (Like do a subquery, instead of having my where clause do the work)
    Why are order by errors being thrown when I sort on my adf table after changing the where clause in my view?
    Hopefully I wasn't too convoluted in the explanation of my problem..
    Thanks in advance,
    Joel

    HI Joe,
    Regarding your problem you can do one of the following tasks:
    1- easily to tuning on your view object, I mean in the tuning page of the view you can set that only return 1 record or 2-3 record fetch not all the record.
    in the order by you will order by the timestamp field and descending.
    2- you can order by the timestamp descending and in the where clause only set the rownum<2 (will return the last record) you can also set rownum<5 and get the 4 last record etc.
    3-editing the view query in the expert mode is not advised at all because of many consequences that you will face.
    4- maybe it is not bat that you add a readonly view for the table you mentioned and every time you unpdate the entity just re-execute the read-only view.( this method maybe is good maybe is not it depends on your business logic)
    Regards.
    Edited by: Amir Khanof on Sep 3, 2010 11:11 PM

  • Query for recurring reports using Query Builder in Business objects

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

  • Setting property for multiple objects?

    Adobe Pro X; ES2
    I need to set the access property for multiple objects based on the selection of a radio button group. I assume I have to use resolveNodes(), but cannot for the life of me get it to work. Here's what I've played with :
    if (this.rawValue == "1") { 
    xfa.resolveNodes("OtherCase_gp.[*]").access = "open";     
    } else {  
    xfa.resolveNodes("OtherCase_gp.[*]").access = "readOnly";
    If I use Action Builder, I get endless lines of "oTargetField = this.resolveNode("OtherCase_gp.OtherCaseOther_cb"); oTargetField.access = "readOnly";" There must be a better, more efficient way to do this!

    Hi,
    Here's another way to try;
    var fields = xfa.resolveNodes("OtherCase_gp.#field.(name.substring(0,9) == 'OtherCase')");
    for (var i = 0; i < fields.length; i++)
        fields.item(0).access = (this.rawValue == "1") ? "open" : "readOnly";
    This approach will only work if your fields are all under OtherCase_gp, Radzmar's solution is more general if your form has a more complicated hierarchy.
    Regards
    Bruce

  • How to deselect query property 'suppress repeated key values'

    hj gurus,
    In BEx analyser there is a query property 'suppress repeated key values' which can be de-selected.
    regards,
    Preety

    Hello preety.
    Is simple.
    In BEx query designer push the button designated by "query properties" (the 13 button from left to right).
    Go to the tab "Display" and mark the second option "Hide Repeated Key Values"
    And there you go.
    Please assign points.
    Diogo.

  • I'm trying to create a list using CustomSchemalXml property in ListCreationInformation object in CSOM. But, the code throws an error "Invalid List Schema".

    I'm trying to create a list using CustomSchemalXml  property in ListCreationInformation object in CSOM. But, the code throws an error "Invalid List Schema". Any pointers on how to set the CustomSchemalXml property?
    Sri

    Hi Lakshmanan,
    Thanks for your reply.
    I checked this post and there was no solution to the problem there. I undersand we cannot create a list based on custom template in CSOM, but what I'm looking for is how of form xml and set it to CustomSchemalXml
     property, so that everytime when I want to create a list with similar content types and stuff, I can just set the
    CustomSchemalXml  property. 
    Sri

  • WEBI Sample Result Set Query Property Question

    Wnen I set the WEBI Sample Result Set query property my retrievals took longer than I thought they should especially with a limited result set.  When I hit the View SQL button and look at SQL I notice that the following order by is added to the query:
    Order by dbms_random.value
    I copied the query and ran it against our Oracle database with and without the order by.  Without the order by the query ran significantly faster.   Is there any way to stop the order by from being generated when the Sample Result Set property is set?
    Thanks,
    Bob

    Thanks for your reply.
    I tried to locate the parameter you mentioned in the parameters for my universe and did not find anything referencing not enforcing order bys.  I checked the documentation and did not see anything there either.   Please respond with the exact name of the parameter or if it is a custom parameter the settings you used to create it.
    Thanks,
    Bob

  • RSRT -- Query Property

    Hi all,
       is there any way to force Transport request when user change the setting of query property in RSRT.
    thanks
    cekap

    Hi,
    RSRT to test and set the properties, if you want to transport you must collect the TR, but RSRT is not the place to collect the TR.
    Thanks
    Reddy

  • Flash issue:  Contribute does not put the  id property in the object tag.

    Notice the id property in the object tag.
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
    width="550" height="400" id="source2">
    Well Contribute is not inserting this tag. Therefore the
    flash movie will not run the folowing (Flash Action Script):
    import flash.external.ExternalInterface;
    theURL = ExternalInterface.call("getLocation");
    Anyone know what to do?

    It appears that your issue is about web service development, and not about Visual Studio Installation/Setup (this forum's topic).
    I suggest you ask about your web service deserialization issue in a topical forum here:
    http://forums.asp.net/

  • Need query to find out object Accessibility

    Hi Gurus,
    I am in need of a query that can show object accessibiliy .i.e
    given table can be accessed by which all oracle users.
    it should take into account grants given by roles.
    Please help.
    Regrads

    user5228856 wrote:
    the solution you give me l give me a all out report ,
    what i need is
    select <<>>
    from <<>>
    where object_name = owner.object_name
    result set should return what all db user has select priv on the given object.site below contains desired code
    http://www.petefinnigan.com/tools.htm

  • Getting info about a particular property of an object....

    Hi ,
    How to get info/help about a particular property of an object...???? I mean that if all the properties of an object displayed in the property palette(for example an iterator) how to get info about and only about RefreshCondition property , without having to activate the whole on-line help and search it in there.....????? Pressing F1 , on it , displays general help about the Property Inspector....
    NOTE : I use JDev 10.1.3.
    Many thanks ,
    Simon

    If you'll look carefully at the property inspector window you'll notice two bars at the bottom - if you pull them up then the second one contains help text for each property you stand on.
    Note that this only works for properties that have the help in them.
    I think for the pagedef items it doesn't show much info, but try for example standing on JSF objects in your page.

  • A simple query for an Account object *SOLUTION INSIDE*

    I've been trying to do a query to the Account object in CRM for release 16.
    This is the result after i run my app:
    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Server
    at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:171)
    at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:102)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:240)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
    at $Proxy30.accountQueryPage(Unknown Source)
    at integra.universal.accountWS.AccountWS.<init>(AccountWS.java:145)
    at integra.universal.accountWS.AccountWS.main(AccountWS.java:162)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 10 seconds)
    My code is :
    crmondemand.xml.account.query.AccountQuery queryCuenta = new AccountQuery();
    //Definimos el query a traves de QueryType
    * Cada clase tiene su propia definicion de QueryType
    * por lo que hay que ir a la direccion crmondemand.xml.<i>tipo</i>.query.QueryType
    crmondemand.xml.account.query.QueryType qt = new QueryType();
    //Definimos el valor del query
    qt.setValue("LIKE 'Ivan*'");
    //Llamamos los parametros de cada query para definir los campos de busqueda
    queryCuenta.setAccountName(qt);
    * queryCuenta.setAccountType(qt);
    * queryCuenta.setCreatedBy(qt2);
    * etc etc
    //agregamos a ListOfAccountQuery los parametros de busqueda
    crmondemand.xml.account.query.ListOfAccountQuery laqlaq = new ListOfAccountQuery();
    laqlaq.setAccount(queryCuenta);
    laqlaq.setPagesize(new BigInteger("20"));
    AccountQueryPageInput aqpi = new AccountQueryPageInput();
    * Generamos los objetos que reciben el parametro de busqueda y que regresan el resultado.
    URL wsURL, wsURL2 = null;
    //I can create the connection np.
    Conexion conecta = new Conexion();
    String jSessionId = conecta.conectaSiebel();
    String wsLocation = "https://secure-ausomxcia.crmondemand.com/Services/Integration";
    try {
    wsURL = new URL(wsLocation + ";jsessionid=" + jSessionId);
    wsURL2 = new URL(wsURL, "file:/C:/Some/Dir/Account.wsdl");
    } catch (MalformedURLException ex) {
    Logger.getLogger(AccountWS.class.getName()).log(Level.SEVERE, null, ex);
    Account_Service as = new Account_Service(wsURL2, new QName("urn:crmondemand/ws/ecbs/account/10/2004", "Account"));
    Account cuenta = as.getAccount();
    AccountQueryPageOutput aqpo = new AccountQueryPageOutput();
    //Agregamos al query la lista de propiedades a buscarse.
    aqpi.setViewMode("Manager");
    aqpi.setListOfAccount(laqlaq);
    aqpi.setBookId("");
    aqpi.setBookName("");
    aqpi.setLOVLanguageMode("");
    //Obtenemos el resultado en un objeto de tipo AccounQueryPageOutput
    aqpo = cuenta.accountQueryPage(aqpi); //The execution stops on this line.
    //Wrapper de una lista de AccountData objects
    // crmondemand.xml.account.data.ListOfAccountData lad = aqpo.getListOfAccount();
    //Estructura de datos que contiene cada AccountData object
    // List<AccountData> listaDeResultados = lad.getAccount();
    //Aqui recorremos la lista de objetos de tipo AccountData
    // for (AccountData accountData : listaDeResultados) {
    // accountData.getAccountName(); //Devuelven Strings y tipos basicos.
    Any suggestions really appreciated : )
    Edited by: user10957396 on Apr 28, 2009 1:01 PM
    Edited by: user10957396 on May 25, 2009 8:55 AM

    Thanxs for your reply Venky. You was right, i had to use wsdl instead of wsdl2, but that didn't fix it.
    Since i'm using release 16 i'm kinda lost, even that i think you guys did an amazing job with the new Web Services api(v2.0).
    Correct me if i'm wrong but i should use a code like this:
    endpoint = "https://secure-ausomxdsa.crmondemand.com/Services/Integration" + ";jsessionid=" + jsessionid;
    URL urlAddr = new java.net.URL( endpoint);
    crmondemand.ws.contact.Contact service = new crmondemand.ws.contact.ContactLocator();
    crmondemand.ws.contact.Default_Binding_Contact stub = service.getDefault(urlAddr);
    crmondemand.ws.contact.ContactWS_ContactQueryPage_Input contactlist = new crmondemand.ws.contact.ContactWS_ContactQueryPage_Input();
    crmondemand.ws.contact.ContactWS_ContactQueryPage_Output outlist = new crmondemand.ws.contact.ContactWS_ContactQueryPage_Output();
    crmondemand.xml.contact.Contact[] contacts = new crmondemand.xml.contact.Contact[1];
    crmondemand.xml.contact.Contact contact = new crmondemand.xml.contact.Contact();
    crmondemand.xml.contact.Activity[] activities = new crmondemand.xml.contact.Activity[1];
    crmondemand.xml.contact.Activity activity = new crmondemand.xml.contact.Activity();
    activity.setSubject("");
    activity.setType("");
    activity.setRowStatusOld("");
    activities[0] = activity;
    contact.setContactLastName("='Wallmueller'");
    contact.setContactFirstName("");
    contact.setContactId("");
    contact.setListOfActivity(activities);
    contacts[0] = contact;
    contactlist.setPageSize("10");
    contactlist.setUseChildAnd("false");
    contactlist.setStartRowNum("0");
    contactlist.setListOfContact(contacts);
    outlist = stub.contactQueryPage(contactlist);
    crmondemand.xml.contact.Contact[] results =
    new crmondemand.xml.contact.Contact[1];
    results = outlist.getListOfContact();
    crmondemand.xml.contact.Activity[] activitiesout =
    new crmondemand.xml.contact.Activity[1];
    int lenC = results.length;
    if (lenC > 0) {
    for (int i = 0; i < lenC; i++) {
    System.out.println(results.getContactFirstName());
    System.out.println(results[i].getContactLastName());
    System.out.println(results[i].getContactId());
    int lenA = results[i].getListOfActivity().length;
    if (lenA > 0) {
    for (int j = 0; j < lenA; j++) {
    activitiesout = results[i].getListOfActivity();
    System.out.println(" " + activitiesout[j].getSubject() + ", " + activitiesout[j].getType());
    that i found here [http://www.webbasedcrmsoftware.com.au/crm-on-demand-tutorials/65-java-access-to-crm-on-demand|http://www.webbasedcrmsoftware.com.au/crm-on-demand-tutorials/65-java-access-to-crm-on-demand]
    for the release 15. Wich is almost the same code i'm using for the new release besides lists(that now are actually lists) and i think i don't need to use any bindings.
    In particular for Account i found that only the name is a required field, so i'm just using that field for the query.
    Thanks in advance.

  • Property dataid references object in a scope with shorter lifetime than the

    Hi,
    Can some one help me with this error.
    <h:dataTable value="myBean.list" var="data">
    <h:column>
    <h:outputText rendered="#{data.ok} value="This item is Ok"/>
    </h:column>
    </h:dataTable>
    Error -
    Property dataid references object in a scope with shorter lifetime than the target scope session

    What you have in the faces-config.xml is more important here. It sounds like on of the property of the session bean scope references to the request bean scope bean. This is illegal.
    Sergey : http://jsfTutorials.net

Maybe you are looking for

  • Q55: Relating AP Invoice payment direct to a Purchase Order

    Dear All, I want to create a report  that tells me which AP Invoice relates to a line item on a purchase order but am having difficulty in thinking through the logic. I can relate a GRPO to a PO and an API but cannot think how to relate an API direct

  • How large should i make my bootcamp partition for Windows to use basic autodesk programs like Revit and Autocad?

    I dont think ill be using windows for much more than revit and autocad (i use autocad on the mac side, but just in case), but i want to make sure I am not going to have a problem in the future.  I am a grad student in interior design, and have access

  • InDesign drops Colour Management Policies

    We have an issue where Indesign stops using the colour management policies, we are using Ask when opening on mismatch profiles, missing profiles and pasting. This works fine for a while, opening 3 or 4 documents but after that InDesign stops asking.

  • Af:train across taskflows

    I have four jsff pages used with af:train tag. In a single taskflow all the four jsff pages flow is coming up fine and it works as expected. The requirement is i want to move each jsff page into a seperate taskflow and than have the same functionalit

  • Above downloading double character file

    Hello experts: i use the   CALL METHOD cl_gui_frontend_services=>gui_download     EXPORTING       filename                = a_full_filename       filetype                = a_filetype      TRUNC_TRAILING_BLANKS   = SPACE      DAT_MODE                =