Mapping: Sorting nodes

Hello all,
please see below input document which should be converted to output below in PI.
Nodes //node1/item should be sorted in same order like //node2/item (identified by value of <pid>) and if item does not exist in node2 (like with pid=501 below) it should get a position at the end. //node2 should be copied 1:1.
Any ideas for this mapping in XSLT, Java Mapping or with Graphical Mapping and UDF?
Regards
Markus
Input:
<root>
  <node1>
     <item>
       <pid>201</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
     <item>
       <pid>401</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
     <item>
       <pid>501</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
     <item>
       <pid>101</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
  <node1>
  <node2>
    <item>
       <pid>101</pid>
    </item>
    <item>
       <pid>401</pid>
    </item>
    <item>
       <pid>201</pid>
    </item>
  <node2>
</root>
Output:
<root>
  <node1>
     <item>
       <pid>101</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
     <item>
       <pid>401</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
     <item>
       <pid>201</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
     <item>
       <pid>501</pid>
       <name>MA</name>
       <street>
          <no>123</no>
       </street>
     </item>
  <node1>
  <node2>
    <item>
       <pid>101</pid>
    </item>
    <item>
       <pid>401</pid>
    </item>
    <item>
       <pid>201</pid>
    </item>
  <node2>
</root>

Hi Markus,
This is only achievable by using UDF. Please refer to mapping below:
for node1:
pid(node1) --> mapWithDefault:suppressed --> concat: : --> concat: : --> removeContext --> UDF1 --> node1
name --> mapWithDefault:suppressed ----------> /            /                                /
no --> mapWithDefault:suppressed ------------------------> /                                /
pid(node2) --> removeContext ------------------------------------------------------------> /
UDF1 is of CONTEXT Type, the arguments are:
Arr1
Arr2
Here is the code:
GlobalContainer globalContainer = container.getGlobalContainer();
String sortedArr[] = new String[Arr1.length];
String out = "";
int cnt = 0;
for(int a=0;a<Arr2.length;a++){
   for(int b=0;b<Arr1.length;b++){
      if(Arr1<b>.indexOf(Arr2[a])>-1){
        sortedArr[cnt]=Arr1<b>;
        Arr1<b> = "retrieved";
        cnt++;
for(int a=0;a<Arr1.length;a++){
   if(!Arr1[a].equals("retrieved")){
      sortedArr[cnt]=Arr1[a];
      cnt++;
for(int a=0;a<sortedArr.length;a++){
   out += sortedArr[a] + " ";
   result.addValue(sortedArr[a]);
globalContainer.setParameter("Result",out);
for pid:
Constant:PID --> mapWithDefault --> UDF2 --> SplitByValue:eachValue --> pid
for name:
Constant:NAME --> mapWithDefault --> UDF2 --> SplitByValue:eachValue --> name
for no:
Constant:NUMBER --> mapWithDefault --> UDF2 --> SplitByValue:eachValue --> no
UDF2 is of CONTEXT TYPE, input argument is: param
Here is the code for UDF2:
GlobalContainer globalContainer = container.getGlobalContainer();
String temp  = (String) globalContainer.getParameter("Result");
String arr[] = temp.split(" ");
if(param[0].equals("PID")){
   for(int a=0;a<arr.length;a++){
      result.addValue(arr[a].substring(0,arr[a].indexOf(":")));
else if(param[0].equals("NAME")){
   for(int a=0;a<arr.length;a++){
      result.addValue(arr[a].substring(arr[a].indexOf(":"),arr[a].lastIndexOf(":")));
else
   for(int a=0;a<arr.length;a++){
     result.addValue(arr[a].substring(arr[a].lastIndexOf(":"),arr[a].length()));
Hope this helps,
Mark

Similar Messages

  • External Context Mapping and "The Mapping to Node...Has Not Been Completed"

    Hi there,
    I've got 2 components: A, B where A consumes the data provided by B.
    I'm calling the component B which includes a view provided by A. This view (provided by A) needs data inputted by the user in a view in B.
    The context of B contains a node called MULTIVALUES flagged as Interface + Input Element Ext.
    The component A uses the component B, in the component usage interface controller of the component A I've referenced the component controller of A. I have then created a node in A's component controller and done the mapping from the component usage interface controller of A to A's component controller.
    The manually created component controller node in A is NOT an interface.
    Now when I invoke B I'm getting an error:
    The Mapping to Node COMPONENTCONTROLLER.1.MULTIVALUES Has Not Been Completed.
    What's still missing?
    Thank you!

    it is indeed much more complex and you need lot of understanding about the component instances and their life time.
    What i do normally for such complex cyclic dependency , i try to split the common part which is needed in bot component_a and component_b and create a new super component_s.
    Component_s is used in both components. You can even go further that you create view component which has nothing but the viewContainer UI elements to embed the views from component_a and Component_b.
    The view component has to create all the used components (comp_s,comp_a,comp_b) and after creating call the interface method in comp_a and comp_b to set the component usage of comp_s (use the if_wd_comp_usage=>entering-referencemode).
    In this way the comp_a,comp_b share the same instance of comp_s.
    What i am saying is to look for a solution in application architecture and not with in the exiting components coding.

  • The Mapping to Node &ATTRIBUTE_NAME& Has Not Been Completed.

    Hi All,
    Could anybody tell me when this exception arises.
    we could not track this exception as all the mappings have been done as desired.
    Need help immediately.
    Regards,
    ARti.

    Hi Aarti,
    I encountered the same problem, but could resolve it.
    There are two kinds of context mapping possible:
    1)Cross component context mapping - In this case, the properties of the interface context node of the used component would look like:
    Interface Node: X
    Input Element (Ext.): must not be set
    Then in the COMPONENT CONTROLLER of the using component, map the desired context node on the left hand side (of the component controller) to the interface node of the used component on the right hand side.
    This is done when we need to receive value of the interface context node of the used component in the using component.
    2)External context mapping: In this case, properties of the interface context node of the used component would look like:
    Interface Node: X
    Input Element (Ext.): X
    Next in the CONTROLLER USAGE in the using component(this is a new node added in the hierarchy in SE80 when displaying the WD component, when component usage has been declared in the current component), right click the desired component usage and select 'Create controller usage'. Now it is here where you define mapping between the interface context node and the context node of the current component controller. By doing this, component controller of the using component would act as the data source.
    This is done when we need to pass value to the used component from the using component.
    The important point to remember is that whenever attribute Input Element (Ext.) of the interface node has been marked as X, ensure to define a mapping for this context, else it results in a runtime error "The Mapping to Node COMPONENTCONTROLLER.1.<interface_context_node> Has Not Been Completed" .
    Regards,
    Chitrali

  • 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 one node to many nodes

    How do you map one node in a controller context to many other nodes in another controller context?
    Here's the situation I'd be using this.
    I have an Adaptive RFC model from which I created a Custom Controller. I then used the wizard to map to the model.
    The model corresponds to RFC functions and many of those functions accept the same parameters, LanID for instance. I simply want to have one "LanID" node in a controller that I would set. The change would then propagate to the other LanID context nodes in the Custom Controller mapped to the model.
    What's the best way to handle this?

    If I understand correctly.. B1, B2 and B3 are all in the SAME custom controller?  Even if they are, I don't see a problem of mapping them all to A1 which is in another controller. Let's say that A1 is the "original" node, and B1, B2 and B3 are the "mapped" nodes.
    If you require that B1, B2 and B3 are "original" nodes, and A1 is the "mapped" node, then this is scenario is impossible.
    If you can be more specific, I will try to answer your question better.
    Walter

  • 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

  • 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

  • How to map the node which i have created dynamically into the view

    Hi All,
    Many thanks to all ur answers in advance.
    I have created a node dynamically.I want to display the fields which i have fetched in that node.
    i dont know how to map the node which i have created dynamically into the layout of the view.
    Other than Using ALV is there any other way to do.
    for example usin table control

    Hi,
    use the reference variable of view to access the corresponding UI element and then use the method of that UI element to do data binding with context node.
    for ex:
    Context node = flights
    element = inputfield, ID = inp_name
    data view type ref to if_wd_view.
    data lr_inp type ref to cl_wd_input_field.
    lr_inp ?= view->get_child_element( ' INP_NAME' ).
    use following methods of input field to define the data binding.
    SET__DDIC_BINDING( )
    BOUND__PROPERTY( ).
    BOUND__PRIMARY_PROPERTY( ). " for input field it is value property.
    Get the reference of view from wddomodifyview method as importing parameter(view). Store this parameter as controller attribute.
    Thanks,
    Rahul

  • Is there a standard map sorted by values

    Tree Map is sorted by keys..Is there standard jdk map sorted by values ?

    You can also use a method similar to the following:
    private static final Collator PL_COLLATOR = Collator.getInstance(new Locale("PL"));
         public static <E> Map<E, String> sortMapByValue(Map<E, String> unordered) {
              Map<E, String> ret = new LinkedHashMap<E, String>();
              Set<Entry<E, String>> sort = new TreeSet<Entry<E, String>>(new Comparator<Entry<E, String>>() {
                   public int compare(Entry<E, String> o1, Entry<E, String> o2) {
                        Entry<E, String> e1 = o1;
                        Entry<E, String> e2 = o2;
                        String s1 = e1.getValue();
                        String s2 = e2.getValue();
                        return PL_COLLATOR.compare(s1.toLowerCase(), s2.toLowerCase());
              sort.addAll(unordered.entrySet());
              for (Iterator<Entry<E, String>> iterator = sort.iterator(); iterator.hasNext();) {
                   Entry<E, String> e = iterator.next();
                   ret.put(e.getKey(), e.getValue());
              return ret;
         }

  • SORT NODE Fn. in Mapping

    Hello,
    I am trying to use this node fn sort in my gui mapping and whenever i use this fn and execute my mapping shows error:
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.IllegalArgumentException: Unknown comparator type: Lexicografical] in class com.sap.aii.mappingtool.flib3.NodeFunctions method sort[com.sap.aii.mappingtool.flib3.Plainer@9a64eb0]
    Have any of you experienced such a situation?

    Hi
    check this thread,
    Message Mapping - Dump
    it maybe a different error, but it guides u in the right direction to analyse the problem.
    Sameer

  • Message-mapping: sort  with subnodes

    Hello everybody,
    as far as i know (and tested) the SORT-function sorts just the node. The subnodes are not sorted.
    Sample:
    <B>
    <BField_1>
    <BField_2>
    <A>
    <AField_1>
    <AField_2>
    <u>after using the SORT:</u>
    <A>
    <<b>B</b>Field_1>
    <<b>B</b>Field_2>
    <B>
    <<b>A</b>Field_1>
    <<b>A</b>Field_2>
    <u>what I want:</u>
    <A>
    <AField_1>
    <AField_2>
    <B>
    <BField_1>
    <BField_2>
    Thanks, Regards
    Mario

    Hi Mario
    xml -> xml: take xsl:stylesheet subelement "xsl:output" for control (method="xml")
    xsd -> xsd: not possible. You need a instance for a mapping (should be clear as you dont have field values)
    map all source fields to target fields 1:1: take xsl:copy-of. Use attribute select. Put there a X-Path expression, for example '/', what means everything (but why do you use a mapping at all??)
    The copy-of command is very strong as you can copy well selected parts of your source message with very less code, just a little bit X-Path.
    Regards,
    Udo

  • Mapping first node

    <Empid>
    <ID>
      <No>12</No>
    </ID>
    <Name>
           <FirstName>demo</FirstName>
           <LastName>test</LastName>
    </Name>
    <Empid>
    I have to check if the first occurence of  FirstName in the Name node  as Test1 then map to target element.
    Somebody pelase help me with the mapping for this condition.
    Thanks

    For this input file:
    <Name>
    <FirstName>Demo</FirstName>
    <LastName>lastname</LastName>
    </Name>
    <Name>
    <FirstName>Test</FirstName>
    <LastName>test1</LastName>
    </Name>
    u want ur output something like this:
    <Name>
    <FirstName>Test</FirstName>
    <LastName>test1</LastName>
    </Name>
    if that is the case then do ur mapping like this:
    1)
    FirstName(change its context to EmpId) -> sort-> splitbyvalue(ValueChanged) -> collapsecontext-----
    equals-ifwthoutelse -removeContextName
    Constant(Test)----
    Mapping of "then" part:
    FirstName(change uts context to EmpId) -> sort-> splitbyvalue(ValueChanged) -> collapsecontext---then
    2)
    FirstName(change its context to EmpId) -> sort-> splitbyvalue(ValueChanged) -> collapsecontext-----
    equals---ifwthoutelse -
    FirstName
    Constant(Test)----
    Mapping of "then" part:
    FirstName(change uts context to EmpId) -> sort-> splitbyvalue(ValueChanged) -> collapsecontext---then

  • XSLT mapping sorting against an output field

    Hi, all
    I am testing my XSLT mapping. Here is the output message type defintion:
    I want to sort f2 in my xslt mapping. Here is my mapping:
    <?xml version="1.0" encoding="UTF-8" ?>
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://fileconversion" xmlns:ns1="http://fileconversion">
        <xsl:template match="/">
          <ns1:TESTOUTPUT_MT>
            <Msg>
            <xsl:for-each select="ns0:TESTDATA_MT/Trans/Detail">
            <xsl:sort select="Transaction/Data/f2" />
              <Transaction>
                <Data>
                  <f1>
                    <xsl:value-of select="PERNR" />
                  </f1>
                  <f2>
                    <xsl:value-of select="POSITION" />
                  </f2>
                  <f3>
                    <xsl:value-of select="TEL" />
                  </f3>
                  <f4>
                    <xsl:value-of select="concat(concat(STREET,' '),CITY)" />
                  </f4>
                </Data>
              </Transaction>
                </xsl:for-each>
            </Msg>
          </ns1:TESTOUTPUT_MT>
        </xsl:template>
      </xsl:stylesheet>
    The sorting did not execute on field "f2" and the data is in the same order as the input.
    Note that I can do <xsl:sort select="POSITION " /> instead and it will work. But I am trying to test on sorting against output field as this is the requirement in the real interface.
    What did I do wrong? Please advise.
    Thanks,
    Jonathan.

    Hi Jon - You can sort the source values. If you use "sort select="Transaction/Data/f2" i don't think it has got some effect.
    You can use <xsl:sort select="POSITION " /> Any issues with that?
    Just to add - when you map Position with F2... how does the sorting will be different when you execute it on F2 or Position?
    If you are doing some calculation for F2 then should handle the Sort function accordingly..

  • Error when mapping a node with multiple occurence

    Hi,
    When I try to run my process where I have countries defines in a drop down box in the UI. I get the following error when completing this step. The target in the mapping is a dataobject which should be able to occure multiple times.
    Here is the mapping:
    Source:                                          Target:
    Country(Node)                             Country(Node)
           Country(String)
           Code(String)
    com.sap.glx.adapter.api.AdapterException: com.sap.glx.core.kernel.api.TransitionRollbackException: Exception during prepare, rolling back
    at com.sap.glx.process.adapter.bpmn.impl.BPMNAdapter.startProcesses(BPMNAdapter.java:1444)
    at com.sap.glx.process.adapter.bpmn.impl.BPMNAdapter.startProcesses(BPMNAdapter.java:1540)
    at com.sap.glx.process.impl.ProcessManagerImpl.startProcess(ProcessManagerImpl.java:938)
    at com.sap.glx.process.impl.ProcessManagerBean.startProcess(ProcessManagerBean.java:372)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
    at $Proxy453.startProcess(Unknown Source)
    at com.sap.tc.bpem.wdui.procstarter.procstarter.comp.ProcStarterComp.startProcess(ProcStarterComp.java:377)
    at com.sap.tc.bpem.wdui.procstarter.procstarter.comp.wdp.InternalProcStarterComp.startProcess(InternalProcStarterComp.java:175)
    at com.sap.tc.bpem.wdui.procstarter.procstarter.comp.ProcStarterCompView.onActionStartProcess(ProcStarterCompView.java:626)
    at com.sap.tc.bpem.wdui.procstarter.procstarter.comp.wdp.InternalProcStarterCompView.wdInvokeEventHandler(InternalProcStarterCompView.java:325)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:131)
    at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:72)
    at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.doHandleActionEvent(ProcessingEventPhase.java:156)
    at com.sap.tc.webdynpro.clientserver.phases.ProcessingEventPhase.execute(ProcessingEventPhase.java:91)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequestPartly(WindowPhaseModel.java:162)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doProcessRequest(WindowPhaseModel.java:110)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:97)
    at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:468)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:52)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doExecute(ClientApplication.java:1505)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doProcessing(ClientApplication.java:1319)
    at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToApplicationDoProcessing(AbstractExecutionContextDispatcher.java:154)
    at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForAppProcessing.doService(DispatchHandlerForAppProcessing.java:35)
    at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
    at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:95)
    at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToApplicationDoProcessing(ExecutionContextDispatcher.java:114)
    at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:80)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:571)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.dispatch(ApplicationSession.java:602)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doApplicationProcessingStandalone(ApplicationSession.java:523)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:270)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:729)
    at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:256)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:258)
    at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToRequestManager(AbstractExecutionContextDispatcher.java:202)
    at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.doService(DispatchHandlerForRequestManager.java:38)
    at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.AbstractDispatchHandler.service(AbstractDispatchHandler.java:116)
    at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:95)
    at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToRequestManager(ExecutionContextDispatcher.java:140)
    at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:92)
    at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:104)
    at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
    at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:140)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:37)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:466)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:291)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:396)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:385)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:76)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:240)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:457)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:250)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:109)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
    Caused by: com.sap.glx.core.kernel.api.TransitionRollbackException: Exception during prepare, rolling back
    at com.sap.glx.core.kernel.mmtx.AbstractTransactionBase.rollback(AbstractTransactionBase.java:517)
    at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:174)
    at com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:77)
    at com.sap.glx.process.adapter.bpmn.impl.BPMNAdapter.startProcesses(BPMNAdapter.java:1429)
    ... 100 more
    Caused by: com.sap.glx.core.kernel.api.TransitionRollbackException: Exception during prepare, rolling back
    at com.sap.glx.core.kernel.mmtx.AbstractTransactionBase.rollback(AbstractTransactionBase.java:517)
    at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:174)
    at com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:77)
    at com.sap.glx.core.kernel.mmtx.PrimaryTransaction.inPrepare(PrimaryTransaction.java:88)
    at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:172)
    ... 102 more
    Caused by: com.sap.glx.core.kernel.api.TransitionException: An exception occurred while executing the script "_Create_Customer:START_CONTROL_EVENT_Start_0(
          com.sap.glx.adapter.BPMNAdapter:Request request,
          com.sap.glx.adapter.BPMNAdapter:Event_0_Start_0_be1d130db236787f7569b7e757e720a8 event){
      initiator=request:initiator;
      kicker=request:kicker;
      parent=new com.sap.glx.adapter.BPMNAdapter:Instance_0_prcMido_be1d130db236787f7569b7e757e720a8(initiator, null, kicker, false);
      token=new com.sap.glx.adapter.BPMNAdapter:Token_0_prcMido_be1d130db236787f7569b7e757e720a8(parent, 0);
      exit=new com.sap.glx.adapter.BPMNAdapter:Exit();
      exit:addParameter(request);
      exit:addParameter(event);
      exit:onActivation("48EDB5A6AD6960C095D511DDA4DA0013E88242DB", parent, token);
      delete exit;
      controller=new com.sap.glx.adapter.internal.ExceptionAdapter:ExceptionController();
      controller:setContext(token);
      delete controller;
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_8_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_2=new com.sap.glx.adapter.internal.ContainerAdapter:View_0_Approver_PotentialOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_0_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_3=new com.sap.glx.adapter.internal.ContainerAdapter:View_1_Enhance_PotentialOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_10_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_4=new com.sap.glx.adapter.internal.ContainerAdapter:View_2_Administrators_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_1_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_5=new com.sap.glx.adapter.internal.ContainerAdapter:View_3_Creator_ExcludedOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_3_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_6=new com.sap.glx.adapter.internal.ContainerAdapter:View_4_Approver_ExcludedOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_2_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      context_0=new com.sap.glx.adapter.internal.ContainerAdapter:Context_0_DO_Customer2_be1d130db236787f7569b7e757e720a8(parent, scope, 0, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_4_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_7=new com.sap.glx.adapter.internal.ContainerAdapter:View_5_Create_Customer_In_MDM_PotentialOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_5_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_9=new com.sap.glx.adapter.internal.ContainerAdapter:View_7_Enhance_ExcludedOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_12_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_8=new com.sap.glx.adapter.internal.ContainerAdapter:View_6_Creator_PotentialOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_7_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      view_11=new com.sap.glx.adapter.internal.ContainerAdapter:View_9_TextVariables_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_14_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      role_10=new com.sap.glx.adapter.internal.ContainerAdapter:View_8_Create_Customer_In_MDM_ExcludedOwners_be1d130db236787f7569b7e757e720a8(parent, scope, -1, false);
      scope=new com.sap.glx.adapter.internal.TypeRegistry:Scope_6_Create_Customer_be1d130db236787f7569b7e757e720a8(parent);
      context_1=new com.sap.glx.adapter.internal.ContainerAdapter:Context_1_DO_Customer_be1d130db236787f7569b7e757e720a8(parent, scope, 0, false);
      message=request:getData();
      mapper=new com.sap.glx.adapter.internal.Transformer:DataMapper();
      yves_in=new com.sap.glx.adapter.internal.Transformer:Data();
      yves_out=new com.sap.glx.adapter.internal.Transformer:Data();
      yves_in:setData("http://mido.se/", "$http://mido.se/:StartProcess2", message, "61302BDB06E4BB8B9F557FC1D1D2ACC9");
      data=context_1:getData();
      scope=new com.sap.glx.adapter.internal.TypeRegistry:GenericScope(null, "872ED00C5EA0B74AE6F92027833B9366");
      copy=scope:copy(data);
      delete scope;
      yves_out:setData("sap.com/glx/", "$sap.com/glx/:DO_Customer", copy, "872ED00C5EA0B74AE6F92027833B9366");
      mapper:map("48EDB5A6AD6960C395D511DD84C80013E88242DB_be1d130db236787f7569b7e757e720a8", yves_in, yves_out);
      data=yves_out:getData("sap.com/glx/", "$sap.com/glx/:DO_Customer", "872ED00C5EA0B74AE6F92027833B9366");
      context_1:setData(data);
      delete yves_in;
      delete yves_out;
      delete mapper;
      delete event;
    at com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:69)
    at com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:241)
    at com.sap.glx.core.kernel.mmtx.DirectNestedTransaction.inPrepare(DirectNestedTransaction.java:57)
    at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:172)
    ... 105 more
    Caused by: com.sap.glx.core.kernel.api.TransitionException: An exception occurred while executing the script command "mapper:map("48EDB5A6AD6960C395D511DD84C80013E88242DB_be1d130db236787f7569b7e757e720a8", yves_in, yves_out)"
    at com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:675)
    at com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:64)
    ... 108 more
    Caused by: java.lang.IllegalStateException: Occurrence violated
    at com.sap.glx.mapping.execution.implementation.node.SdoNode$PrimitiveItemContainer.appendNode(SdoNode.java:372)
    at com.sap.glx.mapping.execution.implementation.assignment.SetAssignment.assign(SetAssignment.java:23)
    at com.sap.glx.mapping.execution.implementation.Interpreter.mapPart(Interpreter.java:145)
    at com.sap.glx.mapping.execution.implementation.Interpreter.mapPart(Interpreter.java:151)
    at com.sap.glx.mapping.execution.implementation.Interpreter.mapPart(Interpreter.java:151)
    at com.sap.glx.mapping.execution.implementation.Interpreter.mapMapping(Interpreter.java:140)
    at com.sap.glx.mapping.execution.implementation.Interpreter.map(Interpreter.java:135)
    at com.sap.glx.core.internaladapter.Transformer$ClassRegistry$MapperClassManager$MapperClassHandler$MapperInvocationHandler.invoke(Transformer.java:1797)
    at com.sap.glx.core.internaladapter.Transformer$TransformerInvocationHandler.invoke(Transformer.java:399)
    at com.sap.glx.core.dock.impl.DockObjectImpl.invokeMethod(DockObjectImpl.java:459)
    at com.sap.glx.core.kernel.trigger.config.Script$MethodInvocation.execute(Script.java:247)
    at com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:670)

    Hi Michael,
    could you provide much more details about the source and target structures and the mappings you need to define?
    Something like :
    Source:
    Country (single or multiple? )
    ..Country (single or multiple? )
    ..Code (single or multiple? )
    Target
    Country (single or multiple? )  --> does it have the same type as the source node?
    In general If you try to assign a list of values to target which accepts single value you are most likely to get exception like the one given in your post.
    In other words let's assume :
    Country[]     Country
    ..Country------>Country
    ..Code
    this will throw exception at runtime in most of the cases.
    The reason is that the result of select Country/Country is a list with all Countries. And then the engine will try to assign this list to the single valued target node.
    Is this what you have described or it si something different?
    BTW for the example above there is a fix in SP1 and such kind of mappings are marked as erroneous.
    Best Regards,
    Boris

  • Problem in mapping model node with cardinality

    Hi,
    I have a requirement where the RFC  which is being called has cradinality 0..n.
    I imported the RFC model in a different DC and then added the model to public part.
    Then, I used that model in the second dc.
    Now, I did context mapping with the component controlller by dragging the model context to the
    component controller. The view is also mapped with the component controller.
    The RFC has input field BUS_PART_NO which is a 12 character input field.
    I passed String in it.
    There is no error while I build the DC. But while I run the application, the input field is coming Read Only.
    I can't changed the component controller to 1..n or 1...1.
    I think I need to create a context node and attribute in the view or component controller and then programmatically add this
    to the model node.
    Please send some SDN links and urls.
    Regards
    Neha Singh

    Hi Neha,
    Please create the custom context node/attribute same structure as RFC model node. then populate the data using below following code :
    - get the size of the RFC model node which you want to populate in the costom node like
    int xxx =  wdContext.node<XXX node>().size;
    - Create onject for custom node like
      I<Custyom Name>Element element = null;
    -  then use for loop for fetching data from Model node and populate in custom node
    for(int i =0; i<xxx; i++)
             element = wdContext.create<Custyom Name>();
             element.set<Attribute Name>(wdContext.node<XXX>().get<XXX>ElementAt(i).get<>Attribute name for model())
             wdContext.<Custyom Name>().addElement(element);
    It will populate in your custom node from model node.
    Hope it will helps you.
    Regards
    Arun

Maybe you are looking for

  • Faulty Devices - Blackberry Z10

    Our company recently renewed the corporate mobile phone contract with Maxis and we received Blackberry Z10 Smart Phones as free device for the plan that we signed up. We received 58 units of Blackberry Z10 in June 2014, out of which to-date, several

  • Problem in Idoc to JDBC scenario(uses BPM)

    Hi I have a IDoc to JDBC scenario which also uses BPM. The JDBC adapter has to execute a Stored procedure on Sybase database. I work on XI3.0 SP14. When I am sending IDoc to XI it is failing in CALL adapter step. The error message is "Unable to conve

  • I downloaded Lion on my MacBookPro and on my MacMini.  I have Air Drop on the mini, but not on the laptop. What am I missing?

    I downloaded Lion on my MacBook Pro and on my MacMini.  AirDrop showed up immediately on the MacMini, but is invisible on my MacBook Pro.  What am I missing?

  • Files on a web server read/write

    I want to make a high score board for a game I wrote I have used java.io when working with files on my own computer before but how do I read and write files from a webserver... I want the applet to run the game and when the game is done it writes the

  • SELECT DISTINCT with JOIN

    Hi, how Do I write this select in rigth way in ABAP SELECT ska1ktopl AS ktopl ska1saknr AS saknr     t370k_t~eartx AS eartx     INTO  TABLE lt_ska1 FROM ska1     JOIN (SELECT DISTINCT damage_gl FROM  zzpm_cost_elem )  ON ska1saknr = zzpm_cost_elemdam