Mapping child node to ALV .

Hi Dear Friends,
                              Could you please make me clear how to use ALV for more parent node and sub node. . Like VBAK VBAP . . .
Here is my question :
Re: How to assign ALV for parent node and child node that uses supply method.?
Thank you.

Hi Karthik,
Resume two ALV's in your component for ex: VBAK_ALV (SALV_WD_TABLE) and VBAP_ALV(SALV_WD_TABLE),Take 2 View Containers and map them accordingly.
Instantiate both the resued components and use it as per your requirement.
Thanks
KH

Similar Messages

  • Context Mapping: child-nodes of non-mapped parent nodes

    I am somewhat curious about Context Mapping in WebDynpro.
    Which parents nodes need to be mapped in order to map child nodes ? Does a child node has more than one parent node (e.g. grandparent - two steps above) ?
    A.1  -
    MAPPED----
    >    B.1
      - A1.1   NOT MAPPED
      - A1.2   NOT MAPPED
            - A.1.2.1     MAPPED TO>    B.1.2.4
            - A.1.2.2   NOT MAPPED
      - A1.3   NOT MAPPED
    Is it sufficient that only one of these parent nodes (e.g. direct parent node not mapped, but parent node of this parent node is mapped) need to be mapped so that the child node can be mapped ?
    Is this assumption true or not ?
    The SAP library states:
    "Conversely, child nodes of non-mapped parent nodes cannot be mapped, otherwise this would result in irresolvable conflicts at runtime with respect to the parent-child relation in the context and the mapping relation." (http://help.sap.com/saphelp_nw04/helpdata/de/51/a3384162316532e10000000a1550b0/content.htm)
    This statement is not absolutely clear on this issue.

    Let me put it this way
    You have a node vehicle and you have a child node for that the car. The car node have parameters car1, car2.
    Let the vehicle node have parameters veh1 and veh2
    Then if you map vehicle node one to any other node (say in the comp. controller) you have the option of mapping its children i.e veh1,veh2 and carnode.
    You can have that veh1 is mapped and veh2 is not mapped.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car node(may or may not be mapped)
    If instead you try to map only the car node the vehicle node will also get mapped automatically but not it's child parameters like veh1 and veh2.
    vehicle node(mapped)
    veh1(may or may not be mapped)
    veh2(may or may not be mapped)
    car nodemapped)
    car1(may or may not be mapped)
    car2(may or may not be mapped)
    Hope this would help.
    Do revert for further clarification
    Regards
    Noufal

  • Mapping tool: mapping child nodes (level2 hierarchy) to bapi wrapper fields

    Hi,
    I'm new to MI7.1. I'll try the demo on help.sap.com. I have following data object EQUIPMENT with node structure in DOE:
    ROOTNODE (attr: EQUIPMENT_ID/ SERIAL_NO)
       child node level 1 DETAILS (attr: SERIAL_NO/TYPE/BRAND/INSTRUCTIONS)
           child node level 2 LOCATION (attr: SERIAL_NO/ADDRESS_LINE1/
    ADDRESS_LINE2/ZIP_CODE/...)
    In backend my bapi wrapper is build using structures:
      TOP: ZSEQUIPMENT (attr: EQUIPMENT_ID/SERIAL_NO)
      010: ZSEQUIPMENT_DET(attr: SERIAL_NO/TYPE/BRAND/INSTRUCTIONS)
      020: ZSLOCATION(attr: SERIAL_NO/ADDRESS_LINE1/...)
    When i want to use mapping tool in middleware for the backend adapter, after mapping the fields, during activation i get the error:
    Referential integrity between node DETAILS and it's parent is not complete.
    Referential integrity between node LOCATION and it's parent is not complete.
    What does that mean? How can I solve this?
    thanks
    Peter

    Solved it myself with explicit key mapping. thanks anyway

  • How to assign ALV for parent node and child node that uses supply method.?

    HI Dear friends,
        I need to display header details ( VBAK ) and Item details ( VBAP ). I have created two node like HEADER_NODE inside this i have created ITEM_NODE for this item node i use supply function 'GET_ITEMS'  any way it is working only when crete two separate table and binding but when i come to work with ALV i am totally confused .. i have created two 'View Controller UI Elements'   when i try to map HEADER_NODE  it mapped properly but for ITEM_NODE it shows mapping already defined. return status message as 'Action Cancelled' . In result both ViewContainer shows only HEADER_NODE data only.
    How to achive ALV for  Parent, child node that uses supply function ? ?
    Thank you

    Delete Mapping is not enabled, that means there is no mapping done yet.
    I just tried what you are saying and the application works and i am able to map the header table and item table and also again i could map the tables any number of times.. i didn't get any such message, sorry i couldn't recreate the scenario. might be there is something wrong in the context.
    i just did it like this.
    Please also move this to Web DynPro Discussion, Hope that would be helpful.
    Message was edited by: Syed Ghulam Ali

  • Problem with childs nodes and automatic key mapping in a Data Object

    Hi experts!
    I'm doing the service order tutorial from the mobile help at [this link|http://help.sap.com/saphelp_nwmobile71/helpdata/en/21/9b5b924c3b434fba4767731794b029/frameset.htm] and I have a problem...
    In the topic "Modeling the Equipment Data Object", says you have to mark the "Automatic Key Mapping" checkbox. So when I had to create a third child node ( the location node ) the system raised an exception with the message "Deselect automatic key mapping flag for more than two-level nodes". I'm trying deselecting the flag and creating the location node, but when I want mark again the automatic key mapping flag, this is disabled.
    What can I do to solve this and create the three child nodes with the flag marked? It's a configuration thing?
    Any help it's very welcome. Thanks in advance.
    Best regards,
    Simon.

    The thing is: Its not allowed to use automatic keymapping if you have more than two levels. This is why the message showed up, and this is why its been disabled.
    What automatic keymapping does: Figures out automatically which child node belongs to which parent (by guessing from the field name and type, which fields in the child correspond to which key fields of the parent).
    On three levels, this becomes more complicated => Its disabled.
    How to do keymapping yourself instead of having the DOE do it automatically: Do 'Explicit keymapping' from each child to its parent. Explicit keymapping is done by clicking on the corresponding menu button in the child node. Here you need to associate child node fields (they need not be key fields of the child, but they are allowed to be that as well) to each of its parent nodes key fields (so that each child can be associated to its parent).
    Cheers

  • Map context node  web dynpro to context DATA of  interface controller ALV

    Hi Experts,
    I have started creating simple ALV by following the example in the below mentioned link.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d
    I have completed 95% development but stuck with last bit of
    Set data to ALV for display (via reverse context mapping).
    When Click on the Controller Usage button. The component controller of your Web Dynpro component DOES NOT appears on the right side of the screen.
    Therefore I can not  Map context node NODE_FLIGHTTAB of your Web Dynpro component to context DATA of the interface controller of the ALV component.
    Could you please shed me light on this.
    Your time and help much appreciated.
    Best Regards
    CB

    Hi Chandra,
    You need to add component controller first. Just go to the property tab of interface controller of the alv component and click on create button and then add the component controller. After that you'll be able to see the node in the context tab.
    Regards
    Arjun

  • Child node attributes do not appear in ABAP WD

    Hi,
      I have the following context hierarchy (in ABAP WD):
    -Context
    ---Child_Node_A
    Sub_Child_NodeB
    AttributeE_of_Sub_Child_NodeB
    AttributeF_of_Sub_Child_NodeB
    AttributeG_of_Sub_Child_NodeB
    Sub_Child_NodeC
    AttributeH_of_Sub_Child_NodeC
    AttributeI_of_Sub_Child_NodeC
    AttributeJ_of_Sub_Child_NodeC
    AttributeA_of_Child_Node_A
    AttributeB_of_Child_Node_A
    AttributeC_of_Child_Node_A
    The attributes A, B, C of Child_Node_A are displayed in an ALV grid and the idea is that when the user selects a row in the ALV grid and clicks on a button, a popup is to be shown with additional details of the selected row in the ALV.  In this popup, I have some fields which are mapped to the attributes E, F, G of Sub_Child_NodeB and attributes H, I, J of Sub_Child_NodeC.  But when I show the popup the fields are empty.
    I use a supply function in the Component Controller to fill Child_Node_A and its children, so typically when the popup appears I should see the attributes of the Sub_Child_Node B and C which are linked to the lead selection of the ALV grid (i.e.: Child_Node_A), right?
    By the way, I have linked Child_Node_A from the Component Controller Context to the Context of my Main View and Popup View.  Also, I checked in the INIT method of my Main view to see if after the supply function has been called the Sub_Child_Nodes attributes were still there for a given lead selection in the ALV grid and they were.  But in my action handler to show the popup window from my Main view, I checked again to see if the Sub_Child_Nodes attributes were still there and they were not.
    I hope I was clear enough in my explanation.
    Thanks in advance for your help,
    Christian

    Hi Christian,
    We discussed this problem offline, but I would like to give some feedback on what we found out.
    (a) Since Child_Node_A had a supply function that also supplied Sub_Child_NodeB and since Sub_Child_NodeB was a singleton, it was not resupplied. The initial element originated from having Sub_Child_NodeB as 1..1 cardinality. In this case the runtime recreates an initial node element upon invalidation of the node.
    (b) The second problem might be related to the ALV. As the ALV does not support child nodes being present for the data displayed, the assumption is that Sub_Child_NodeB might have been invalidated once the data was copied back from the ALV to Child_Node_A.
    The solution is to have a supply function for Sub_Child_NodeB as well, which will counter any invalidation at any point in time and will restore the original data.
    I am curious if (b) is really the cause of the problem described.
    Best regards,
    Thomas

  • The error is " The Mapping to Node has not been completed

    Hi All,
    I am getting a strange type of error and need help immediately.
    The error is " The Mapping to Node COMPONENTCONTROLLER.1.PLANNING_ENTITY Has Not Been Completed" for the node that exists in the Parent component and is being used in all the child nodes thru reverse mapping.
    I have done mapping in all the child nodes but still the message is coming.
    Could anybody tell me the reason .
    Regards,
    Arti.

    Basically somewhere you have defined a context node 'PLANNING_ENTITY'  to be an Input-Element. At the same time you did not define (through a component usage at design time) where the input to that node is coming from. This means the mapping path to the node is not complete, and the node does not know where it is mapped to.
    Either:
    - You untick the checkbox 'Input-Element (ext.)' inside the controller context, or
    - You find the component that uses the component with the node 'PLANNING_ENTITY' and select Component_Usage->'Name of Usage'->'Add controller usage'. Inside the controller menu you see then, you can now provide a mapping to the context node.
    I realise this now sounds a little confusing, but I'm happy to provide more details should you need them.
    Cheers,
    Robin

  • Mapping Problem with 2 ALV Tables after sorting

    Hi,
    I have a context node INCIDENTS with a sub-node SUB_INCIDENTS.
    The sub-node is filled via a Supply Function.
    Both nodes are displayed in separate ALV Grids on the same view, which works pretty well.
    The only problem I face is when I try to sort one of the ALVs, then I get an error "The node specified in mapping ( SUB_INCIDENTS) could not be found ".
    I have no clue how to solve that, already tried to fill the sub-node with the ALV standard function "ON_STD_FUNCTION_AFTE", no effect.
    Does anybody can imagine what might be the reason?
    Best regards, Steffen
    Edited by: Steffen Weber on Aug 27, 2008 2:55 PM

    In general, having two ALVs for parent and then a sub node is not supported.  Here is a section from the online help that describes what happens when a sort occurs on the parent node in ALV:
    Important Exception: Sorting
    Here ALV has to use the entire dataset so that the data records can be arranged in the new order. For this purpose, the ALV component temporarily takes control of the internal data table and invalidates the corresponding context node of your application during this time. This ensures that the application cannot access the context node while the ALV component is editing the internal data table.
    Once the internal data table has been resorted, ALV rebuilds the context node, releases it again for the application, and displays the data accordingly.
    This ensures that the internal data table is never copied. This is important because large volumes of data would considerably impact performance and memory space.
    When you are planning your application, note the following side-effects of this mechanism:
    ●      When the context node is invalidated, information about current selections, and in particular the lead selection, is lost.
    ●      If your application has created subnodes for the context node, (master-detail scenario), these subnodes are lost as soon as the ALV component invalidates the context node. If the application then tries to access the subnodes, a runtime error occurs.
    Because of the invalidation that is described here, the subnode leadselection is lost and is invalidated as well. This leads to the error you are encountering.

  • Parent node showing in schema when child nodes not present

    I had several folks answer my questions on mapping from a flat file to an EDI 835 schema and I am down to just a couple of issues before I finish up. I have a conditional mapping issue that I have to solve before I can map the rest of the document. I am
    mapping three fields in a single non-repeating line in the flat file to a repeating segment in the 835. Basically I need to create a separate AMT_ClaimSupplementalInformation segment for each field in the flat file line. As you can see in the picture
    below I want to create a AMT_ClaimSupplementalInformation segment for CDISCOUNT, CINELIGIBLE and CALLOWED.
    You can see I have quite a bit of conditional logic attached to the three fields, but I have all three connected via a loop to the AMT_ClaimSupplementalInformation parent. I cannot attach the loop to the parent of the three fields because it only appears
    once in the file. And if I leave the loop out the AMT segments get stacked funny, like this:
    <AMT_ClaimSupplementalInformation>
    AMT1
    AMT1
    AMT2
    AMT2
    </AMT_ClaimSupplementalInformation>
    You can see how they should be stacked in the next pic.
    In some cases however, one of those fields may be blank so I will not need to create a AMT_ClaimSupplementalInformation segment for it. I was able to use some conditional mapping ideas you guys gave me using the Not-Equal and Value Mapping functoids, and
    that works great to keep blank child nodes from being created. However, Since I have a loop attached to the AMT_ClaimSupplementalInformation parent node it still creates an empty parent node even when the child nodes are not created. See the empty parent
    node in the pic below.
    Since looping functoids can only be attached to links I don't know how to make the parent node conditional.
    Any suggestions?
    Thanks.

    Boatseller, thanks for the tip. I did end up going the XSLT direction. It's a bit of a hack, but I'm using the following XSLT to eliminate empty nodes :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="@*|node()">
            <xsl:if test=". != ''">
                <xsl:copy>
                    <xsl:apply-templates select="@*|node()"/>
                </xsl:copy>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    I created a new map with the 835 schema on each side. I then created an XSLT file and pointed to it in the Custom XSLT Path property. It seems to work well. I call this map right after my FlatFile_To_835 map.
    I was hoping to use the scripting functoid with inline XSLT in the map so that I didn't have to worry about deploying the XSLT file(just another thing to keep up with in the future), but when I compile it I get the following error:
    The "Scripting" functoid has 1 input parameter(s), but 2 parameter(s) are expected.
    I'm wondering if I'm connecting the schemas incorrectly in the map:
    In any case, I'm past the empty nodes issue for now, which was a big roadblock. Now I have to deal with the CAS segments which are, as you said, a real pain. 
    Thanks for all of your input.

  • 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

  • Dynamic mapping of function_elements in ALV.

    Hi Experts,
        I need to do a dynamic external mapping of function_elements node in my code. How we can achieve this?
    Any specific method can be used to do the mapping for the function_elements in ALV.
    Thanks & Regards,
    Arun

    I have created a node that has a attribute (check the cardinaltiy what functional elements is expecting use the same cardinaltiy)
    Now, go to the functional elements node map this node to that node.
    I have used this attribute for dropdown.
    to fill that attribute, get node info-> use valuset to fill that.
    For ALV->
    DATA:
        lo_function  TYPE REF TO cl_salv_wd_function,
        lo_drk_year TYPE REF TO cl_salv_wd_fe_dropdown_by_key,
        lo_fe_year   TYPE REF TO cl_salv_wd_fe.
        CREATE OBJECT lo_drk_year
          EXPORTING
            selected_key_elementname = 'YEAR'.  "ATTRIBUTE NAME
        IF lo_drk_year IS BOUND.
          CALL METHOD lo_drk_year->set_label_text
            EXPORTING
              value = 'Select a Year'.
          lo_fe_year ?= lo_drk_year.
        ENDIF.
        CALL METHOD _o_ref_alv_emp_model->if_salv_wd_function_settings~create_function
          EXPORTING
            id    = 'FUNCTION2'
          RECEIVING
            value = lo_fun_year.
        IF lo_fun_year IS BOUND.
          CALL METHOD lo_fun_year->set_editor
            EXPORTING
              value = lo_fe_year.
        ENDIF.
    Edited by: Lekha on Feb 21, 2012 12:26 AM

  • Error after adding Child node

    Hi Experts,
    I have created a Data object by importing as "BAPI Wrapper" . It had a Parent node and a child node. Now i added one more child node.
    But if i am activating this node it is giving below error.
    Object not adequately specifiedError
    Regards,
    Abhishek

    Hi Dhana,
    I have deleted the child node and added these attributes in header so now i can activate this header structure but when i tried to activate BA after mapping , then it says
    Invalid field mapping
    But i have counter checked everything is fine even when i checked my BA with "Error check" button it didn`t give any error. Any idea how to sort it out.
    Regards,
    Abhishek

  • Table with DropDownBox with data from child node

    Hi,
    I have following context:
    Node Parent (0..n)
    -- Node Child (0..n)
    Child Attribute 1
    Child Attribute 2
    -- Parent Attribute 1
    -- Parent Attribute 2
    The parent node has a child node with cardinality 0..n. Now I created a table from the Parent node with several columns. In one column is a
    DropDownBox that should display the data of the Child node, depending on the Parent node element.
    Parent             |  Parent  DropDownBox           |
    Parent 1                       | Parent 1 Child Attribute 1     |
    Parent 1 Child Attribute 2     
    Parent 2            | Parent 2 Child Attribute 1     |
    Parent 2 Child Attribute 2     
    How can I fill the child node with data depending on the parent node element? How is the mapping between both?
    IParentElement parentElement;
    IChildElement childElement;
    while (rs.next()) {
       parentElement = wdContext.createParentElement();
       parentElement.setAttribute1(rs.getLong("ID"));
       parentElement.setAttribute2(rs.getString("SYSTEM"));
       wdContext.nodeParent().addElement(parentElement);
          while (rs2.next()){               
             childElement = wdContext.createChildElement();
             childElement.setAttribute1(rs2.getLong("ID"));
             childElement.setAttribute2(rs2.getString("NAME"));
             wdContext.nodeChild().addElement(childElement);
    If the child node is non-singleton I have the following option
    parentElement.nodeChild.addElement(childElement);
    But this doesn't work for singleton nodes. How can I do something similar for singleton nodes?
    Thanks for your help,
    Andi

    Not quite correct.
    You can add more than one <b>element</b> to a singleton node (if cardinality is *:N).
    But a singleton child node exists only once per parent <b>node </b>and not once per parent <b>element</b>.
    That's an important difference.
    Armin

  • How can I use onLeadSelect to load child nodes in a TreeByNestingTableColum

    Hello,
    Right now a have the mastercolumns onLoadChildren action source mapped to load the children.
    Can I use the tables onLeadSelect method to load the children instead? If so, how?
    The reason I'm trying to do this is because, when the application is launched I'm trying to load the first set of nodes immediately under the root node. The if the user clicks the table lead on one of the root nodes child node, then i want it to load its child nodes. If I dont do it this way, then the child element will be null until the user actually triggers the onLoadChildren method in the masterColumn.
    Please suggest or help how I can achieve this.
    Marshall.

    Solved

Maybe you are looking for

  • How to configure or remove LUN's?

    a set of three OVM servers as 1 manager and two servers using SAN multipathing SAN team assigned 3 new LUN's to my Oracle VM servers release 2.2.2 I went through the bellow in the first server and every thing went fine and I got to view the new added

  • Looking for max o/c e6600, p7n platinum, thermaltake bigwater l/c

    hi guys, just got done pulling my hair out trying to find the magical voltages to get past 375 fsb, and boot. I was wondering if anyone had the same board and cpu setup that has had any luck, for now im back at stock volts running 1400 (375x9). i tri

  • Com.sap.km.cm.docs file corruption error

    Problem Description Within the Portal there are several html files served up to a user through the KM repository. These html files contain links that open up 'pdf' files stored within the KM repository. These links are served to the user via the 'com

  • Dual Nic Load Balancing Solution

    Hi, I have a very peculiar situation. I'm currently a college student with access to an almost unlimited network. But the problem is that the network limits each IP to 30 Mb/s. I have 2 nics at my disposal and have tried two options so far: bonding t

  • Pixi keeps restarting for no reason

    Hello, I noticed a strange behaviour on my Pixi Plus. It keeps restarting after about 2 days running just fine. This happened mainly at night, which it's very annoying because it then asks for the SIM password. Crashing seems unlikely, there were no