Setnamespace for ns defined as attributes

Hi
I have below XML document.
<ConfigDataFile xmlns="myProjectName" xmlns:S2I="S2I" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="MotoManager_GEMINI ../schema/myProject.xsd">
<fileHeader fileFormatVersion="03" cfgVersion="0" fileName="sample.xml" cfgMinorVersion="0" senderName="CNEOMI" fileType="sample" vendorName="myVendor" swVersion="1.1" cfgSavedMinorVersion="0">
<configData dnPrefix="String">
<S2I:S2I>
<S2I:system id="1">
<S2I:sysContact>Motorola</S2I:sysContact>
<S2I:sysName></S2I:sysName>
<S2I:sysLocation>Pole #x</S2I:sysLocation>
</S2I:system>
</S2I:S2I>
</configData>
</fileHeader>
</ConfigDataFile>
I have tried invoking setNameSpace as below
qc.setNamespace("xmlns","myProjectName");
qc.setNamespace("S2I","S2I");
qc.setNamespace("xsi","http://www.w3.org/2001/XMLSchema-instance");
qc.setNamespace("schemaLocation","MotoManager_GEMINI ../schema/myProject.xsd");
But the query ( "collection('myContainer.dbxml')/ConfigDataFile/fileHeader/configData/S2I:S2I/S2I:system[@id=\"1\"]";) doesn't return any result. Please help me in invoking(c++) setNameSpace() for above doc.
Thanks,
Santhosh

Hi,
You need to handle 2 things in your query:
1. The default namespace (because of xmlns='myProjectName')
2. The S2I namespace
qc.setNamespace("S2I","S2I") is correct for the second. The first can be handled in
2 ways:
1. Add a declaration to your query and make it look like:
declare default element namespace 'myProjectName'; collection(....)/...
2. Add an explicit namespace mapping for myProjectName and add that prefix to
the query:
qc.setNamespace("n", "myProjectName")
collection('myContainer.dbxml')/n:ConfigDataFile/n:fileHeader/n:configData/S2I:S2I/...
Using the dbxml shell to experiment is a quick way to figure out what's needed. It has
a setNamespace command.
Regards,
George

Similar Messages

  • Defining Dimensions, Attribute Hierarchies for a Link Table(Many to Many)

    I have 3 Tables in the Database
    Table 1: Transactions (Fact Table) - PK(TransactionId)
    Table 2: Relationship (Dimension1) - PK(Relationship Id), FK_TransactionId, FK_CompanyId, RelationshipType
    Table 3: Companies (Dimension 2) - PK(CompanyId)
    Table 2: Relationship table is a link table between Transactions & Companies to facilitate many to many relationship. 
    I defined Fact and Dimension tables accordingly but having issues defining Dimension & Attributes for Relationship tables
    Relationship Dimension:
    I have 3 hierarchy groups defined
    Hierarchy 1 - Relation -Relationship Type,Relationship Id(PK)
    Hierarchy 2 - Transaction - Transaction, Relationship Id(PK)
    Hiearchy 3 - Company - CompanyId, Relationship Id(PK)
    Defined the attribute relationship in the following way
    RelationshipID(PK) ---> CompanyId , RelationshipID(PK) ---> TransactionId, RelationshipID(PK)
    ---> RelationshipTYpe
    I am getting incorrect results when I deploy the cube. Not all the types are being displayed only 4 types are being displayed out of 27 types though there exists Transactions for all the Types.
    To fix the incorrect results, I tried to break the Relationship Dimension into 2 dimensions seperating Transaction(Relationship Dim) & Company,Type (Companies Dim). I tried to configure a many
    to many Relationship type between my  Companies Dim & Fact Table Transaction. But I get the error that says 
    "Companies Dim many to many dimension in the Tansaction measure group requires that the granularity of the Relationship dimension is lower than that of the Relationship measure group "
    Any help regarding how to difine Dimensions & Attribute Hierarchies on a Many to many link table is appreciated.

    Hi Jaya,
    According to your description, you are experiencing the issue when implement many to many relationship by using a bridge table in your SQL Server Analysis Services project, right?
    Generally, a bridge table will have a surrogate key for the dimension and a surrogate key to the fact table or a degenerate dimension based on the fact table. Here are some blogs which describe how to implement many to many relationship using a bridge
    table.
    http://bifuture.blogspot.com/2011/06/ssaskimball-modeling-nm-relation.html
    http://www.sqlchick.com/entries/2012/1/22/data-modeling-tip-when-using-many-to-many-bridge-tables-in-s.html
    http://social.technet.microsoft.com/wiki/contents/articles/22202.a-practical-example-of-how-to-handle-simple-many-to-many-relationships-in-power-pivotssas-tabular-models.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to define CMP attribute unique

    I have an CMP attribute called IDENTIFIER and I want to define that as a unique column in database. How can I define the SSN attribute while creating CMP beans ? Is there any way if map.xmi can be altered to define the attribute as UNIQUE ?
    Please help....
    Thanks in advance...

    Hi,
    See these related threads for steps:
    Re: Problem with T77OMATTR
    Creation of Custom Attributes in org structure
    BR,
    Disha.
    <b>Pls reward points for useful answers.</b>

  • Getting Keynote's "Defining Default Attributes of Text Boxes" to work

    The following is from the iWorks09 Keynote "Help" for the topic "Defining Default Attributes of Text Boxes and Shapes":
    4. Do one of the following:
    To make the text box the default for only the current master slide, choose Format > Advanced > “Define Text for Current Master.”
    To make the text box the default for all master slides in the current theme, choose Format > Advanced > “Define Text for All Masters.”
    I tried doing everything up to this point, but when I select "Format > Advanced" there is NO OPTION (not even unselectable "faded") for > “Define Text for All Masters.” There is only a an option for "Charts" & it is unselectable (there should be options for text, shapes, charts, etc.)
    Can anyone help me?
    If not, this is definitely a *+_major bug_+* that needs to be fixed!!

    Kogiah,.
    What do you mean when you say that the Lock commands don't work? Are they grayed-out, or is that once you use them you don't like the result? If the option is grayed-out, you either don't have an object selected, or the selected object is formatted as Inline. Changing the format to Floating will bring back the Lock option.
    Jerry

  • What is the Best Approach for System Defined Fields and Default values

    Hi ,
    Please let me know that what can be the best approach for providing a Default value for the System defined fields when creating a User and How can we hide the System defined fields at the time of User creation

    You cannot provide default values for any attributes defined in the FormMetaData.xml file. You can only provide default values for fields defined in the User Defined Fields and supply a default value.
    You can using entity adapters to populate some of the values, but you must supply an Organization because there is an entity adapter that you cannot modify that verifies the organization name.
    -Kevin

  • Crystal Report Templates for User-Defined Objects

    Hello Experts,
    I am running SAP B1 8.8 PL11. In the current patch SAP has default Crystal Reports that can be used as Layouts for Invoices, Credit Memo's so on. Is it possbile to have layouts for user defined objects ( say for instance i have a customized form under sales module, can i import a crystal template for this customized form?). In the report layout manager i don't see an option to import user-defind objects.
    Any help would be appreciated.
    Thanks,
    Praneeth

    If this is still a problem please re-post to the SAP Integration Kit forum.

  • How can i see the code of SAP Exit for SAP Defined Variables

    Hi,
       It's very Urgent! How can i see the Source Code of SAP Provided Variables. I need to write code for User Defined Variables. please help me. It's very Urgent.
    Thanks in Advance.
    Nagesh.

    hi Nagesh,
    sample code for variable exit,
    there is 'how to' docs, can't see your email address.
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      CASE I_VNAM.
      WHEN 'CUMMONTH'.
        IF I_STEP = 2.                                  "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'MONTH'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
            L_S_RANGE-LOW+4(2) = '01'.
            L_S_RANGE-HIGH     = LOC_VAR_RANGE-LOW.   "high value = input
            L_S_RANGE-SIGN     = 'I'.
            L_S_RANGE-OPT      = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      ENDCASE.

  • Standard report for User defined feild in order operation

    Hi all,
    do we have any standard report? for User defined field in order operation. actually we have User defined field in task list and same could be reflected in order operation. so i am using those user defied field to record extra info in maintenance order.  i am wondering how to get the reports . do we have any standard reports?
    thanks
    Amit kushwaha

    Dear Amit
    I have utilised 3 user fields & activated order enhancement tab. I could find these three fields in report IW37N & IW49N. I m using ECC 6.0 EHP4. Try to set the layout & look for  fields - user field for quantity in the layout. For this please maintain some data in these user fields of some orders and then check for those orders in t code- IW37N & IW49n.
    Shakti

  • AUTHORITY-CHECK for an defined USER

    Hi,
    i write a abap (protokol) which shell be started every hour. In this report i will use
    an AUTHORITY-CHECK for an defined user, because i will send the protokol via email, but i have
    to check if this user is allowed to see the data.
    I will use this:
    AUTHORITY-CHECK OBJECT 'F_LFA1_BEK'
    ID 'BRGRU' FIELD '__________'
    ID 'ACTVT' FIELD '__________'.
    for an defined user.
    Is this possible, or how can i check this in another way?
    Thanks.
    Regards, Dieter

    Hi Eric,
    i tried it like this:
    UTHORITY-CHECK OBJECT 'F_LFA1_BEK'
             ID 'BRGRU' FIELD 'KRED'
             ID 'ACTVT' FIELD '03'.
    BREAK-POINT.
    CALL FUNCTION 'AUTHORITY_CHECK'
      EXPORTING
      NEW_BUFFERING             = 3
      USER                      = SY-UNAME
        OBJECT                    = 'F_LFA1_BEK'
        FIELD1                    = 'BRGRU'
        VALUE1                    = 'KRED'
        FIELD2                    = 'ACTVT'
        VALUE2                    = '03'
    EXCEPTIONS
       USER_DONT_EXIST           = 1
       USER_IS_AUTHORIZED        = 2
       USER_NOT_AUTHORIZED       = 3
       USER_IS_LOCKED            = 4
       OTHERS                    = 5.
    BREAK-POINT.
    at first breakt-point sy-subrc = 0 at second sy-subrc = 2. Can you tell why i get another sy-subrc?
    is my FM-Call correct?
    thanks.
    Regards, Dieter

  • Batch Input for user defined fields (SRM 4.0)

    Hello.
    Now in my project,we are developping Batch Input function about PO,CONF in SRM 4.0.
    and in this time, we will use over 20 user defined fields.so we have to enter the value to user defined fields by using Batch Input function.
    But if we will enter over the 10 value for user defined fields,we have to scroll the screen.
    How do I scroll in SRM?(What's the command to scroll in SRM)
    Regards
    Ogiwara

    better lock the user since he may some business documnt open and you can not proceed further.
    br
    muthu

  • Badi: for user defined fields in Budget Entry Document

    HI,
    I am implmenting BADI for user defined field in budget entry document definatin name 'FMBW_CUSTOMER' . I have created two fields in include 'CI_FMBH' and also created a sub screen and assign this subscreen to badi. I have called get data and put data methods in PBO and PAI. like this.
    <b>
    PBO
    create object grid1.
      CALL METHOD grid1->if_ex_fmbw_customer~get_data_from_screen
      importing doc_header = doc_header.</b>
    <b>PAI
      CALL METHOD grid1->if_ex_fmbw_customer~put_data_to_screen
        EXPORTING
          doc_header = doc_header
          processing_mode = 'CRE'.</b>
    But the system is not saving these fields in database.
    What could be the problem .

    Hi, did you have any advance on this issue?

  • Documentation for user defined field

    Hai gurus,
        parameters : x type i.
    i want create documentation for this field x in selection screen.
    please replay me

    Hello Ankal ,
    parameters: p_docu type zdoc.
    create a Data element ZDOC follow normal procedure to ceate a Data element .
    when u press create -> it asks for domain and other attributes , in the same screen , click
    DOCUMENTATION  ( CTRL F7 ) -->  editor opens , type the description or the document you want and then activate it .
    then go to report and execute it , on selection screen you get p_docu and one input field ,
    in that press F1 and you will get the documentation that you mentioned for that Data Element.
    Regards,
    Aby.
    Please clsoe this thread as soon as your problem is solved.

  • How to create IDOC for customer defined table

    hi,
    How to create IDOC for customer defined table Records and how to send this IDOC to target system.
      what message type will be used and on receiving system how to post these records.
      thankx.
      pillac.

    Hi,
    You need to create a custom message type and custom IDOC type for this with whatever fields you want send. You need to create segments (WE30), IDOC type (WE30), Message types (WE81) and assign the message type to the IDOC type (WE82).
    You will have trigger the IDOC using a Report or something after doing the partner profile settings.
    Similary in the target system also, you will have do all the settings.
    Take a look the links to find out what settings needs to be done.
    http://help.sap.com//saphelp_470/helpdata/EN/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm
    http://www.sappro.com/downloads/OneClientDistribution.pdf
    Regards,
    Ravi
    Note : Please mark the helpful answers and close the thread if the issue is resolved.

  • Extract schema/metadata - names for all tables and attributes

    Hi, I am quite new to Oracle DB (only been doing dev mostly with sqlserver before). Is there a way to extract schema (names for all tables and attributes) for 10g and 11g in application code (either java or .net) or pl/sql?
    Thank you,
    -Tony

    There are built in views that start with DBA_, ALL_, and USER_. All means all the user can see, user means all the user has, and dba means everything, which generally means the same as the others plus an owner. So you can desc user_tables to see what-all that view has, then select columns from the view with ordinary sql. See the doc set for all the views available, interesting ones are ...views, ...objects, ...tab_cols and so forth.
    There are also built in procedures for getting metadata, google for details.
    Many tools have easy GUI's for this too. EM has ways on the administration screen to get to various objects, and then you can show the ddl. Maybe sqldeveloper has something too.

  • DI Sever for User Defined Table

    Hai Guys,
      I am using B1WS web service. I want to post values to User Defined Table (EX: @TableName)  using web services,is there any services for User Defined Table in Web Services
    please give me a solution for this..

    Hello madhu,
    B1WS is unable to access UDT. But DI Server can access UDT with RecordSet
    SOAP Request Message:
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header>
      <SessionID>4FFCFAA3-5493-456A-BC89-410B35AF096C</SessionID>
    </env:Header>
    <env:Body>
      <dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
       <DoQuery>SELECT OCRD.CardCode, OCRD.CardName, OCPR.Name FROM OCRD
    JOIN OCPR ON OCRD.CardCode = OCPR.CardCode
    WHERE OCRD.CardCode IN (SELECT DISTINCT ORDN.CardCode FROM ORDN)</DoQuery>
      </dis:ExecuteSQL>
    </env:Body>
    </env:Envelope>
    SOAP Response Message:
    <?xml version="1.0"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <env:Body><ExecuteSQLResponse xmlns="http://www.sap.com/SBO/DIS"><BOM><BO><AdmInfo><Object>oRecordset</Object></AdmInfo>
    <OCRD><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>2</Name></row><row><CardCode>C002</CardCode>
    <CardName>SAP</CardName><Name>l</Name></row><row><CardCode>C002</CardCode><CardName>SAP</CardName><Name>Z</Name>
    </row></OCRD></BO></BOM></ExecuteSQLResponse></env:Body></env:Envelope>
    Kind Regards
    -Yatsea

Maybe you are looking for

  • Error in JDBC receiver Communication Channel

    Hi, I am facing a problem at receiver communication channel of JDBC adapter. I am gettting the error as, "com.sap.aii.af.ra.ms.api.RecoverableException: Channel has reached maximum concurrency(5,000 concurrent Messages) and no free resourse found wit

  • How can I manipulate a parameter value after user input

    Post Author: fsu304 CA Forum: Crystal Reports I have a parameter that is used in my sql command and I want to be able to change the value of it if it reach a certian criteria.  For example the user enters the string "FDT" i want to change the paramet

  • How to select, with a SUD DIALOG, the range and the trace data to import from citadel

    Hello, I use DIAdem to generate reports from Citadel and I would like to create a script which asks the user to select data and it's corresponding range to import it from citadel. The script should display a dialog box (sud dialog), the user will cho

  • Can i play dota 2 on macbook pro 13 inch?

    Hi im just wondering if i could play dota 2 on macbook pro 13 inch? Specs : ( my specs is just the default specs when i bought the laptop. Nothing has been chaged) 2.5 GHz Dual core i5 4gb ram 500 gb sata Another side question: What products at the a

  • Satellite E45t won't start for few hours after shut down

    I have a brand new Satellite E45t-4100. After shutting down, I am not able to start the laptop for few hours. Upon pressing the power button, say after 15 minutes, power button LED lights up but nothing is displayed on the screen. I have disabled the