Nodes and attributes

Hi,
I want to know that is there any restrictions to declare nodes and attributes that come under these nodes?
For Eg, the requirement is to create a miscellaneos invoice through a ABAP web dynpro screen.There are many fields like Vendor name , Invoice number, VAT  etc.How i can group these in to nodes and attributes? It is as we like or is there any standards to group?
Regards,
Charumathi.B

hi charumathi.......
           the attributes can be combined into any node you wish..
but if you are going to represent a table or need to have a set of values for a single attribute then put it under a node and mention the cardinality as 0...n. its always better to create an attribute under a node rather directly under a context, for attributes canoot be mapped directly from comonent controller. only nodes can be mapped. so it is always bettter to have attributes under nodes.
---regards,
   alex b justin

Similar Messages

  • Dynamic Table control with context nodes and attributes?

    Hi all
    I have node and attributes in context. i want to create table dynamically using this node and attributes, can anyone give code how to do this???
    Thanks
    Madhan.

    Hi
    Go through this [link|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80a3de18-ee00-2d10-bfb3-946d7e00fd91?quicklink=index&overridelayout=true].
    Regards
    Arun.P

  • Mapping Node and Attributes

    Hello all,
                I am using Process Composer for a process design.
    I have a human activity and an automated acitivity.
    Human Activity                                                 Automated Activity
    + Type Code (node)----
    Type Code (node)
       - TypeCode (attribute)----
    text() (attirbute)
    Above shows the mapping. Now I map the node and then i map the attribute. I save it.
    The above mapping is for input mapping of the automated activity. Suppose if leave the mapping screen and come back, the mapping is automatically gone. Though i saved it. The TypeCode (node) is mapped to text() with an error (after i change screen. That will be error of course).
    Have any of you faced any similar issue before?

    Problem solved.
    1. The cardinality of the nodes was not matching.
    2. Attributes were matched instead of matching nodes.
    Thnks

  • Create dinamic nodes and attributes

    Hi Forum!
    I have created a WDA with 2 views. On the START_VIEW, the user can input details from an installation.  I want to display an error on the START_VIEW when a condition is false.
    How I can create a node with an attribute dinamically to display this error if the message Text View is not defined on the view?
    Could you give me a any sample of code, please?
    Thank you very mucha and regards,
    Manuel.

    Hi Manuel,
    Pleaes try this out. This is how to create an attribute dynamically.
    DATA: attribute      TYPE wdr_context_attribute_info.
    DATA: main_node  TYPE REF TO if_wd_context_node_info.
      "get main node
      main_node = wd_context->get_node_info( ).
      "set name for this attribute
      attribute-name = 'SOME_NAME_4_ATTR'.
      "set data type for this attribute
      attribute-type_name = 'SOME_DATA_TYPE'.
      "add attribute into context node
      main_node->add_attribute( attribute_info = attribute ).
    Thanks.
    Regards,
    Georgy Norkin

  • How to access parent, child nodes and attributes in XML?

    EXAMPLE CODING:
    [Embed("assets/Try.xml", mimeType="application/octet-stream")]
    private static consTTest:Class;
    public static function getTestXML() : XML
    var baTest:ByteArrayAsset = ByteArrayAsset( new test() );
    var xmlTest:XML = new XML( baTest.readUTFBytes( baTest.length ) );
    return xmlTest;   
    public function SetTest():void
         var xml:XML = XMLResource.getTestXML();
         var XMLDoc:XMLDocument = parseXML(xml);
         var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
         var resultObj:Object = decoder.decodeXML(XMLDoc);
         trace(resultObj.Roots.Child[0].ChildTitle); //Output: ChildTesting  -> CAN GET IT, NO PROBLEM.
    QUESTIONS:
    (1) How to get the output for
    trace(resultObj.Roots.Child[0].Child1.Inside[0].InsideTitle); //GOT ERROR, THE OUTPUT I NEED IS InsideTesting1.
    (2) How to get the output for
    trace(resultObj.Roots.Child[0].Child1.Inside[0].Tasks.Task[0].TaskTitle); //GOT ERROR, THE OUTPUT I NEED IS TaskTesting1.
    Anyone can help me to solve this problem? Thanks.
    Regards,
    Jessie

    Hi.
    You have error in Try.xml in row 2:
    <Child ... "/>
    Delete '/', its end of this child.
    This is problem...

  • How to preserve encoded characters at text and attributes node?

    <greeting>hello, <World> </greeting>
    When I run a SAX parser, it automatically decodes the characters
    and make the document ill-formed after the round trip.
    <greeting>hello, <world> </greeting> --- ERROR
    Q: How do I preserve those special characters at text node and attribute nodes?
    Thanks

    Thanks for you guys' help.
    It's great to get a real-time help from this online community.
    Yue,
    What I attempted to do was
    0. I have 6G <database> document having 1.4 M <entry>s.
    1. Read one <entry> at a time using SAX
    2. Save each <entry> to a buffer
    3. Pass the buffer to a Unmarshaller ( JAXB ) and create a JavaObject
    Repeat above moving to next <entry> until reaches to the end.
    At step 1, unescape happens
    becomes >< becomes <
    and & &
    making my doc malformed (which is legal) :(
    At step 2, I did the following to perserve <, >, and &
    str = str.replaceAll( ">", "&gt;");
    str = str.replaceAll( "<", "&lt;");
    str = str.replaceAll( "&", "&amp;");At step 3, JAXB is now happy to get a healthy XML input
    <greeting>hello, <World></greeting>
    It turned out to be nobody's fault but myself.
    It was a good lesson, though.
    Thanks, buddies

  • How to get nodes and its attributes of an XML file usiong DOM parsing?

    how to get nodes and its attributes of an XML file usiong DOM parsing?
    i am new to XML parsing.......
    Thanking you........

    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;      ...
    //Setup the document
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
         Document doc = docBuilder.parse (new File("MY_XML_FILE.xml"));
    //get elemets by name
         String elementValue = doc.getElementsByTagName("MY_ELEMENT").item(0).getTextContent();
    //This method can return multiple nodes, in this instance I get item(0) , first nodeRead the api for other methods of getting data.

  • How To Display  attributes of Child Node and Parent Node in same view

    Suppose I have two view Carview and CarDetail View...IN Component context I have Parent Node Called Cars and It have its attribute as Price,Warranty,Year and also One Child Node Called as Brand Name Whose attribute are PrimaryBrand and SecondaryBrand..Now If I do Mapping of My First View i.e CarView with Child node of BrandName..and then I Have To Show Whole Detail of Car in CarDetailView.......How Can I Achieve it..

    Hi Vinay,
    You can map the child node and even the paren tnode to the same view if u want to display in the same window..
    If not if ur requirment is to dispaly in the sme view but should not map the child and parent to the Same view then you can take another new view.. and insert 2 view containers and then add the Child view and parent view in that view containers and then Diaplay the newly created view.
    Regards,
    Raju Bonagiri

  • Oracle NDM node$ and link$ extra attributes

    Hello,
    is there any way to create the network with extra attribute columns in node and link tables? I like to store other attributes in node table - without keeping them on a different table, and on link table I would like mustiple costs, etc.
    Also I noticed there is a userData method in node. is it possible to save this userData to somewhere per node?
    Best Regards,

    Hi,
    There are a few ways to have multiple cost columns. You could actually create a network on a view, and redefine the view to use the cost column you want before doing the analysis. The other way is just to create a new network, using the exising node and link tables but different cost columns. I assume this is the example you are looking for, so here is an example that adds a network called MY_NEW_NETWORK, selecting all the information from MY_OLD_NETWORK, and changing the node and link cost columns to NEW_NODE_COST_COLUMN and NEW_LINK_COST_COLUMN.
    Hope this helps.
    insert into user_sdo_network_metadata (
    select 'MY_NEW_NETWORK',NETWORK_ID, NETWORK_CATEGORY,
    GEOMETRY_TYPE, NETWORK_TYPE, NO_OF_HIERARCHY_LEVELS, NO_OF_PARTITIONS, LRS_TABLE_NAME,
    LRS_GEOM_COLUMN, NODE_TABLE_NAME, NODE_GEOM_COLUMN, 'NEW_NODE_COST_COLUMN', LINK_TABLE_NAME,
    LINK_GEOM_COLUMN, LINK_DIRECTION, 'NEW_LINK_COST_COLUMN', PATH_TABLE_NAME, PATH_GEOM_COLUMN,
    PATH_LINK_TABLE_NAME, PARTITION_TABLE_NAME
    from user_sdo_network_metadata
    where network = 'MY_OLD_NETWORK');

  • How to create a node with attributes at runtime in webdynpro for ABAP?

    Hi Experts,
             How to create a node with attributes at runtime in webdynpro for ABAP? What classes or interfaces I should use? Please provide some sample code.
    I have checked IF_WD_CONTEXT_NODE_INFO and there is ADD_NEW_CHILD_NODE method. But this is not creating any node. I this this creates only a "node info" object.
    I even check IF_WD_CONTEXT_NODE but i could not find any method that creates a node with attribute.
    Please help!
    Thanks
    Gopal

    Hi
       I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
    Note
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    My code is like the following:
    TYPES: BEGIN OF t_type,
                CARRID TYPE sflight-carrid,
                CONNID TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
      dyn_node   type ref to if_wd_context_node,
      rootnode_info   type ref to if_wd_context_node_info,
      i_node_att type wdr_context_attr_info_map,
      wa_node_att type line of wdr_context_attr_info_map.
          wa_node_att-name = 'CARRID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
          insert wa_node_att into table i_node_att.
          wa_node_att-name = 'CONNID'.
          wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
          insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
                                       attributes = i_node_att
                                       is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    Message was edited by: gopalkrishna baliga

  • Dynamic creation of context nodes and ui elements

    Hi,
    I have created context nodes dynamically. And i also want to create UI elements dynamically wherein i want to bind the attribute from the context node to it. For example i want to create a drop down by index and bind one of the attributes in the context nodes that i have earlier created dynamically to it.  I do not know how to get the path to the attribute as i get IF_WD_CONTEXTNODE_INFO when i say get_child_node(). And the IF_WD_CONTEXTNODE_INFO does not have any method where in i can get IF_WD_CONTEXT_NODE from where i can get the path by get_meta_path( )
    Here is the code. The problem is to get the path which is the i/p to cl_wd_dropdown_by_idx=>new_dropdown_by_idx( ) method.
    DATA:
            lo_root_ui_elmnt              TYPE REF TO cl_wd_uielement_container,
            lo_drpdwn_by_idx              TYPE REF TO cl_wd_dropdown_by_idx,
            lo_txt_vw                     TYPE REF TO cl_wd_text_view,
            lo_qstn_node                  TYPE REF TO if_wd_context_node,
            lo_optn_node_info             TYPE REF TO if_wd_context_node_info,
            lv_optn_data_source_name      TYPE string,
            lt_child_nodes                TYPE wdr_context_child_map,
            lo_qstn_el                    TYPE REF TO if_wd_context_element,
            lo_optn_el                    TYPE REF TO if_wd_context_element,
            lv_text                       TYPE string,
            lo_qstn_node_info             TYPE REF TO if_wd_context_node_info.
      FIELD-SYMBOLS:
    *                 <ls_qstn>    LIKE LINE OF wd_this->mt_questions.
                    <ls_child_node>         LIKE LINE OF lt_child_nodes.
      lo_root_ui_elmnt ?= io_view->get_root_element( ).
      lt_child_nodes = wd_context->get_child_nodes( ).
    LOOP AT lt_child_nodes ASSIGNING <ls_child_node>.
       lo_qstn_node = <ls_child_node>-node.
        lo_qstn_el = lo_qstn_node->get_element( index = 1 ).
        lo_qstn_el->get_attribute(
              EXPORTING
                name = 'QUESTION_TEXT'
               IMPORTING
                 value = lv_text ).
        lo_txt_vw =   cl_wd_text_view=>new_text_view( view = io_view ).
        lo_txt_vw->set_text( value = lv_text  ).
        lo_qstn_node_info = lo_qstn_node->get_node_info( ).
        lo_optn_node_info = lo_qstn_node_info->get_child_node( 'OPTIONS' ).
    *    lv_optn_data_source_name = lo_optn_node_info->get_meta_path( withoutcontroller = abap_true ).
    *    CONCATENATE lv_optn_data_source_name '.' 'OPTION_TEXT' INTO lv_optn_data_source_name.
        lo_drpdwn_by_idx = cl_wd_dropdown_by_idx=>new_dropdown_by_idx(
                              bind_texts = lv_optn_data_source_name
                              view       = io_view ).
        lo_root_ui_elmnt->add_child( lo_txt_vw ).
        lo_root_ui_elmnt->add_child( lo_drpdwn_by_idx ).
      ENDLOOP.
    Regards,
    Madhura Lobo
    Edited by: Suhas Saha on Aug 2, 2011 11:04 AM

    Hi Madhura,
    Please check this thread and find Baskaran answer...
    create new child-node in supply-function
    Re: Creating Dynamic Node and Table
    Cheers,
    Kris.

  • Not able to display the Node context attributes to table

    Hi Friends,
    Issue: Currently i am reading the Node parameters and assigning the parameters to the Context of the mainView.
    Then displaying the attributes into table here i am using a iterator to fetch the attributes.
    But its reading only one record to the table not all the attributes.
    Here i am attaching the code:
    Node is EvaluationDimensions and attributes are Dimension and Selected_values.
    Line: -
    public void wdDoInit()
       //@@begin wdDoInit()
    try
    IBONodeElement test = null;
    test = (IBONodeElement)wdThis.wdGetDefinedimensiongafController().wdGetContext().nodeEvaluationDimensions().currentEvaluationDimensionsElement().model();
    IBONode testNode = test.getBONode();
    Iterator it = testNode.iterator();
    IBONodeElement itElement = null;
    while(it.hasNext())
    itElement = (IBONodeElement)it.next();
    //wdContext.nodeEvaluationDimensions().createAndAddEvaluationDimensionsElement();
    wdContext.createAndAddEvaluationDimensionsElement();
    wdContext.currentEvaluationDimensionsElement().setDimension(itElement.getAttributeValue("KPIParameterDefinitionName").toString());
    wdContext.currentEvaluationDimensionsElement().setSelected_Values(itElement.getAttributeValue("ParameterSelectedValuesText").toString());
    } catch (RuntimeException e) {
    e.printStackTrace();
    wdThis.wdGetDefinedimensiongafController().wdGetAPI().getComponent().getMessageManager().reportSuccess(e.toString());
        //@@end
    Line: -
    Could you suggest me some alternatives to show all records into table??
    Thanks & Best Regards, Prabhu(9886855725)
    Edited by: Armin Reichert on Apr 24, 2008 12:57 PM

    Hi Prabhu
    IBONodeElement test = null;
    test = (IBONodeElement)wdThis.wdGetDefinedimensiongafController().wdGetContext().nodeEvaluationDimensions().currentEvaluationDimensionsElement().model();
    What is this model() .
    You remove the try catch method once and test it to trace the error.Why cant you use typed AccessAPI to fetch the values from the node element.Is your node have more elements test it.By getting the size of the node.
    That too you are setting values to only current context element .Not for other elements.Everytime you are setting the values to current context element,thats why you are getting only one element values at a time.Iterate properly and try to set the values for each element
    wdContext.currentEvaluationDimensionsElement().setDimension(itElement.getAttributeValue("KPIParameterDefinitionName").toString());
    See the above code every time you are setting to currentNode lement notforother elements.
    Regards
    kalyan

  • Read a XML node value/attribute value from a CLOB

    Hello,
    I can write SQL/ - PL/SQL "straightforward" but now I have a problem what is to big for me.  I hop that someone can help.
    We create by code a xml structure and write these into the oracle database CLOB field. I'm sorry to say that a xml text structure is written into a clob in stead of a xmltype field. (it's a design failure?) It's a large xml structure. I believe I can't attach a file so I put at the end of this discussion a light example of the xml structure.
    It's a xml with quartervalue's, so there are 35040 detail rows (24h * 4 * 365days). I want to accumulate the the attribute Amount value 9. The amount value is in the Detail node a attribute but at the end you can see that for the DST are also 4 value's, but these are not attribute value's but node value's. (In this case it are four value's in some cases there is one DST amount value.
    Can somebody help me how to accumulate all the detail attribute value Amount with the node value Amount of the DST tag?
    XML structure:
    <?xml version="1.0"?>
    <Message xmlns:ns1="http://automaticdealcapture/">
        <BusinessDocument messageDateTime="2013-10-25T13:59:31+02:00" ediReference="LO-461967" messageName="New" businessSector="Z" documentFunction="Original">
            <DocumentData>
                <ns1:Adcs>
                    <ns1:Package>
                        <ns1:Deal>
                            <ns1:ProductCode>PWCODE</ns1:ProductCode>
                            <ns1:Action>NEW</ns1:Action>
                            <ns1:Memo1>MemoField</ns1:Memo1>
                            <ns1:Details>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="00:00:00" Timee="01:00:00" Amount="0.0153" Price="11.111"/>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="01:00:00" Timee="02:00:00" Amount="0.015" Price="22.222"/>
                                etc. 350040 detail rows.
                            </ns1:Details>
                            <ns1:DSTS>
                                <ns1:Year Val="2014">
                                    <ns1:DST Period="1">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="2">
                                        <ns1:Amount>0.0222</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="3">
                                        <ns1:Amount>0.0444</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="4">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                </ns1:Year>
                            </ns1:DSTS>
                        </ns1:Deal>
                    </ns1:Package>
                </ns1:Adcs>
            </DocumentData>
        </BusinessDocument>
    </Message>

    From what I know, extracting the "Amount" values in the Details section and the "Amount" values in the DSTS section would be two different SELECT statements.
    Both of these will use XMLTable() to extract the values.
    BTW - If you need more information on this, post up in the XML/XML DB forum section for more complex help.  (eg getting YEAR with the DSTS Amount values)
    as far as XML size goes, I've seen oracle handle a 100MB XML document without problems.
    (just understand, it will be 'slow')
    This one will give you the Amount values from the DSTS section:
    with xml_data as ( SELECT
    XMLType('<?xml version="1.0"?>
    <Message xmlns:ns1="http://automaticdealcapture/">
        <BusinessDocument messageDateTime="2013-10-25T13:59:31+02:00" ediReference="LO-461967" messageName="New" businessSector="Z" documentFunction="Original">
            <DocumentData>
                <ns1:Adcs>
                    <ns1:Package>
                        <ns1:Deal>
                            <ns1:ProductCode>PWCODE</ns1:ProductCode>
                            <ns1:Action>NEW</ns1:Action>
                            <ns1:Memo1>MemoField</ns1:Memo1>
                            <ns1:Details>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="00:00:00" Timee="01:00:00" Amount="0.0153" Price="11.111"/>
                                <ns1:Detail Dates="2014-01-01" Datee="2014-01-01" Times="01:00:00" Timee="02:00:00" Amount="0.015" Price="22.222"/>
                            </ns1:Details>
                            <ns1:DSTS>
                                <ns1:Year Val="2014">
                                    <ns1:DST Period="1">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="2">
                                        <ns1:Amount>0.0222</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="3">
                                        <ns1:Amount>0.0444</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                    <ns1:DST Period="4">
                                        <ns1:Amount>0.0146</ns1:Amount>
                                        <ns1:Price>33.333</ns1:Price>
                                    </ns1:DST>
                                </ns1:Year>
                            </ns1:DSTS>
                        </ns1:Deal>
                    </ns1:Package>
                </ns1:Adcs>
            </DocumentData>
        </BusinessDocument>
    </Message>') as XMLDATA from dual
    select Y.amount
    from xml_data X,
      XMLTable(  XMLNAMESPACES( 'http://automaticdealcapture/' as "ns1"),
       '/Message/BusinessDocument/DocumentData/ns1:Adcs/ns1:Package/ns1:Deal/ns1:DSTS/ns1:Year/ns1:DST'
        passing X.XMLData
      COLUMNS
        amount Number PATH '/ns1:DST/ns1:Amount'
      ) Y;
    Replace the XMLTable() with the one below to get the Amount from the Details section:
      XMLTable(  XMLNAMESPACES( 'http://automaticdealcapture/' as "ns1"),
       '/Message/BusinessDocument/DocumentData/ns1:Adcs/ns1:Package/ns1:Deal/ns1:Details/ns1:Detail'
        passing X.XMLData
      COLUMNS
        amount number PATH '/ns1:Detail/@Amount'
      ) Y;

  • List of SQL tables and attributes used in SSRS reports

    Hi,
    I have around 450-500 reports deployed in SSRS reporting server.
    All these reports are built on SQL from multiple databases, and these databases are having unnecessary tables and attributes.
    My requirement is to clean the unused tables and attributes from the databases. For this, I need the list of SQL tables and attributes used in these 450-500 SSRS reports.
    Is there any way to get this data?
    Regards,
    RK

    Hi RK,
    According to your description, you want to get a list of the tables and attributes used in all reports.
    In your scenario, you can query the ReportServer.dbo.Catalog table to get Report name, data source name, dataset name, and query used in the dataset with query below:
    WITH XMLNAMESPACES ( DEFAULT 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition', 'http://schemas.microsoft.com/SQLServer/reporting/reportdesigner' AS rd )
    SELECT ReportName = name
    ,DataSetName = x.value('(@Name)[1]', 'VARCHAR(250)')
    ,DataSourceName = x.value('(Query/DataSourceName)[1]','VARCHAR(250)')
    ,CommandText = x.value('(Query/CommandText)[1]','VARCHAR(250)')
    ,Fields = df.value('(@Name)[1]','VARCHAR(250)')
    ,DataField = df.value('(DataField)[1]','VARCHAR(250)')
    ,DataType = df.value('(rd:TypeName)[1]','VARCHAR(250)')
    --,ConnectionString = x.value('(ConnectionProperties/ConnectString)[1]','VARCHAR(250)')
    FROM ( SELECT C.Name,CONVERT(XML,CONVERT(VARBINARY(MAX),C.Content)) AS reportXML
    FROM ReportServer.dbo.Catalog C
    WHERE C.Content is not null
    AND C.Type = 2
    ) a
    CROSS APPLY reportXML.nodes('/Report/DataSets/DataSet') r ( x )
    CROSS APPLY x.nodes('Fields/Field') f(df)
    ORDER BY name
    For more information, please refer to this similar thread:
    Extract metadata from report server database
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Xsl for removing specific nodes and modifying one node.

    Hello,
    i have the urgent need to remove specific nodes
    and modify one node in my XML.
    the xml as input :
    <?xml version="1.0" encoding="utf-8"?>
    <PLOT>
      <REQUEST>
        <GET_LAYOUT>
          <PROPERTIES>
            <MAPNAME name="xxxx" />
           </PROPERTIES>
          <DATAFRAME id="MAIN">
            <LAYERLIST>
              <LAYERDEF id="0" visible="false" query="" />
              <LAYERDEF id="1" visible="false" query="" />
              <LAYERDEF id="2" visible="false" query="" />
              <LAYERDEF id="3" visible="false" query="" />
              <LAYERDEF id="4" visible="false" query="" />
              <LAYERDEF id="5" visible="false" query="" />
              <LAYERDEF id="6" visible="false" query="" />
              <LAYERDEF id="7" visible="false" query="" />
              <LAYERDEF id="8" visible="false" query="" />
              <LAYERDEF id="9" visible="false" query="" />
              <LAYERDEF id="10" visible="false" query="" />     
            </LAYERLIST>
            <MAPSERVICELIST>   
              <MAPSERVICEDEF  service="BASEMAP" >
                <LAYERLIST>
                  <LAYERDEF id="2" visible="True" query="" />
                  <LAYERDEF id="1" visible="False" query="" />
                </LAYERLIST>
              </MAPSERVICEDEF>
              <MAPSERVICEDEF service="MAP1">
                <LAYERLIST>
                  <LAYERDEF id="4" visible="True" query="" />
                  <LAYERDEF id="3" visible="True" query="" />
                  <LAYERDEF id="2" visible="True" query="" />
                  <LAYERDEF id="1" visible="False" query="" />
                </LAYERLIST>
              </MAPSERVICEDEF>
            </MAPSERVICELIST>
          </DATAFRAME>
        </GET_LAYOUT>
      </REQUEST>
    </PLOT>
    what i want to have is:
    <?xml version="1.0" encoding="utf-8"?>
    <PLOT>
      <REQUEST>
        <GET_LAYOUT>
          <PROPERTIES>
            <MAPNAME name="xxxx" />
          </PROPERTIES>
          <DATAFRAME id="MAIN">
            <LAYERLIST>
       <LAYERDEF id="6" visible="True" query="" />
                <LAYERDEF id="5" visible="True" query="" />
                <LAYERDEF id="4" visible="True" query="" />
                <LAYERDEF id="3" visible="False" query="" />
    <LAYERDEF id="2" visible="True" query="" />
    <LAYERDEF id="1" visible="False" query="" />       
            </LAYERLIST>
            <MAPSERVICELIST/>   
          </DATAFRAME>
        </GET_LAYOUT>
      </REQUEST>
    </PLOT>
    as you see, <MAPSERVICELIST/>   is empty and <LAYERLIST> contains all <LAYERDEF> of <MAPSERVICEDEF>/<LAYERLIST> 
     The ones  of BASEMAP  are kept unchanged  but the ones of MAP1 are having a new attribute value for id.
    Thanks four your help.
    Regards.

    You can implement very straightforward map in BizTalk like below:
    If you are interested in XSLT of this map, I copied below which visual studio gave me when i validated the map:
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/PLOT" />
    </xsl:template>
    <xsl:template match="/PLOT">
    <PLOT>
    <REQUEST>
    <GET_LAYOUT>
    <PROPERTIES>
    <MAPNAME>
    <xsl:if test="REQUEST/GET_LAYOUT/PROPERTIES/MAPNAME/@name">
    <xsl:attribute name="name">
    <xsl:value-of select="REQUEST/GET_LAYOUT/PROPERTIES/MAPNAME/@name" />
    </xsl:attribute>
    </xsl:if>
    <xsl:value-of select="REQUEST/GET_LAYOUT/PROPERTIES/MAPNAME/text()" />
    </MAPNAME>
    <xsl:value-of select="REQUEST/GET_LAYOUT/PROPERTIES/text()" />
    </PROPERTIES>
    <DATAFRAME>
    <xsl:if test="REQUEST/GET_LAYOUT/DATAFRAME/@id">
    <xsl:attribute name="id">
    <xsl:value-of select="REQUEST/GET_LAYOUT/DATAFRAME/@id" />
    </xsl:attribute>
    </xsl:if>
    <LAYERLIST>
    <xsl:for-each select="REQUEST/GET_LAYOUT/DATAFRAME/MAPSERVICELIST/MAPSERVICEDEF">
    <xsl:for-each select="LAYERLIST/LAYERDEF">
    <LAYERDEF>
    <xsl:if test="../../../../LAYERLIST/LAYERDEF/@id">
    <xsl:attribute name="id">
    <xsl:value-of select="../../../../LAYERLIST/LAYERDEF/@id" />
    </xsl:attribute>
    </xsl:if>
    <xsl:if test="@id">
    <xsl:attribute name="id">
    <xsl:value-of select="@id" />
    </xsl:attribute>
    </xsl:if>
    <xsl:if test="../../../../LAYERLIST/LAYERDEF/@visible">
    <xsl:attribute name="visible">
    <xsl:value-of select="../../../../LAYERLIST/LAYERDEF/@visible" />
    </xsl:attribute>
    </xsl:if>
    <xsl:if test="@visible">
    <xsl:attribute name="visible">
    <xsl:value-of select="@visible" />
    </xsl:attribute>
    </xsl:if>
    <xsl:if test="../../../../LAYERLIST/LAYERDEF/@query">
    <xsl:attribute name="query">
    <xsl:value-of select="../../../../LAYERLIST/LAYERDEF/@query" />
    </xsl:attribute>
    </xsl:if>
    <xsl:if test="@query">
    <xsl:attribute name="query">
    <xsl:value-of select="@query" />
    </xsl:attribute>
    </xsl:if>
    </LAYERDEF>
    </xsl:for-each>
    </xsl:for-each>
    <xsl:value-of select="REQUEST/GET_LAYOUT/DATAFRAME/LAYERLIST/text()" />
    </LAYERLIST>
    <MAPSERVICELIST>
    <xsl:text> </xsl:text>
    </MAPSERVICELIST>
    <xsl:value-of select="REQUEST/GET_LAYOUT/DATAFRAME/text()" />
    </DATAFRAME>
    <xsl:value-of select="REQUEST/GET_LAYOUT/text()" />
    </GET_LAYOUT>
    <xsl:value-of select="REQUEST/text()" />
    </REQUEST>
    </PLOT>
    </xsl:template>
    </xsl:stylesheet>
    You can highlight the issue if you have any specific one.
    Please mark it as Answer if this answers your question
    Thanks.
    Mo
    The contents I write here is my personal views, not the view of my employer and anyone else.

Maybe you are looking for

  • Sybase Mobile Sales for Window Mobile

    Mateus, antes de ir pra perguntas, só pra alinhar. A SAP está com 2 diferentes estrategias para Mobile: 1) para microapps, backends apenas baseado em stack ABAP e empresas com plataforma móvel única, a recomendacao é o Gateway como plataforma de inte

  • Difference in my catalog file size in backup

    Currently using PSE8 on pc platform. Just out of curiosity, why is the "my catalog file" which PSE references on the local drive  so much smaller a full backup of the catalog to an external drive?

  • Attempting to download the trial version

    I've been attempting unsuccessfully to download the 180day trial version of SharePoint from http://www.microsoft.com/en-us/evalcenter/ I've registered I see it in the evaluation center but it does not allow me to download it. Is there a direct link t

  • Native Installer on Mac - not for App Store

    I am trying to get an Air 3.1 native installer application to work for Mac under Mountain Lion's security model.  The app is not for distribution from the App store but it is downloaded from the web so it triggers Gatekeepers security on both the Ins

  • Not count parargraphs with no printable characters

    This small script below returns the index number of a starting paragraph and the ending paragraph selected within the active Story.  How do we not count paragraphs with no printable characters? Ultimately we are trying to incorporate into a spacing s