Doubt on Mapping, Context handling/Node functions

Hi Experts...
This is the structure of a sample message that we get from Agile. BOM1 and BOM2 are two BOMs (basically a material) having BOM Items A,B,Cu2026. (basically Material components)
PARTS and DOCUMENTS have the material related information.
Apart from that we have certain segments inside each BOM, called REDLINES, REDLINE BOM CURRENT, REDLINE BOM PREVIOUS (not depicted below) which contains information whether the material item has been added, changed, deleted or unchanged and some more information.
ROOT
     R1
          R2
               BOM1                              
               B-Item A
               B-Item B
                R2
                        BOM2
               B-Item C
               B-Item D
                  B-Item F
       PARTS
             BOM1
       PARTS
             B-Item B
       PARTS
             B-Item D
       DOCUMENT
             B-Item A
       DOCUMENT
             BOM2
       DOCUMENT
             B-Item C
       DOCUMENT
                B-Item F
The target structure has 4 different tables. One of them is a table structure called MATERIALS where we should have 7 records in this case.
For BOM1 and BOM2 we need to pass details from inside the same node + additional info from Parts/Docs
Same applies for B-Items.
Qn:1
How do I link Parts/Doc/R2 nodes  MATERIAL so that I can get 7 records?
When I link ROOT I get one record
When I link R2; I get 2 records (I tried changing the context to ROOT; dint work!)
When I link Parts I get 3 records
When I link Docs I get 4 records
Is there a way to link PARTS nodes + DOCS nodes to MATERIAL?
Qn2:
Do you think that for this case we need to split the entire document to 1: n as shown below? Is there a way without splitting? Coz I have a BPM calling a sync abap proxy to post, process and return data (ya we using BPM + a Sync call!!!!)
ROOT
BOM1                              
     B-Item A
     B-Item B
PARTS
     BOM1
PARTS
     B-Item B
DOCUMENT
     B-Item A
BOM2
     B-Item C
     B-Item D
     B-Item F
PARTS
     B-Item D
DOCUMENT
     BOM2
DOCUMENT
     B-Item C
DOCUMENT
        B-Item F
Qn3.
I read from somewhere that when we use sync call; the BPM as to get a response back within 30 s, else it will fail.. is that true?
Please help!!!!
Thank you.
Regards,
Smitha
Edited by: Smitha Madhavan on Jul 23, 2008 9:35 PM
Edited by: Smitha Madhavan on Jul 23, 2008 9:40 PM
Edited by: Mike Pokraka on Jul 24, 2008 1:42 PM
Edited by: Smitha Madhavan on Jul 24, 2008 6:41 PM
Read the "Rules of Engagement"
Edited by: Juan Reyes on Jul 25, 2008 8:44 AM

Thanks Kishore.
The sample file is very very big and data is distributed and difficult to understand. The one I have provided is therefore a simplified  model of the file. Let me narrow down to one step further:
How can we perform: if A_NUM = B_NUM; pass NAME
to the target field from the below structure:
ROOT
            NODE1
                        NODE2
                                    A_NUM
            NODE3
                        B_NUM
                        NAME
            NODE4
                        B_NUM
                        NAME
Thanks in advance!

Similar Messages

  • Help in mapping with 'createIf' node function

    Hi gurus !
    I am using a 'createIf' node function to create a node in the target if a source field equates to a particular value. Normally, it would mean that only those fields in the source node that satisfies the condition of the 'createIf' would be available to be mapped to the target node's fields. However, I would like a field from another node in the source to be mapped onto the same target node's fields.
    Source (IDoc - DELVRY03)-
    <E1EDL20>
             <E1EDL22>
                <VSBED_BEZ>Trial testing</VSBED_BEZ>
             </E1EDL22>
             <E1ADRM1>
                <PARTNER_Q>WE</PARTNER_Q>
                <NAME1>xxxx</NAME1>
                <NAME2>xxxx</NAME2>
             </E1ADRM1>
    /TargetNode = createIf(equalsS(/partner_q), Constant('WE')))
    /TargetNode/name1=/E1ADRM1/NAME1 - working
    /TargetNode/name2=/E1ADRM1/NAME2 - working
    /TargetNode/vsbed=/E1EDL22/VSBED_BEZ - field not displayed in output at all
    Currently '/TargetNode/vsbed' is not being output at all, leave alone a blank entry, though the test shows the value appearing correctly under 'Display Queue'. Is there any trick that I could try ?
    Cheers,
    Ashok.

    Hi Matias,
    The relevant bits of the source IDoc - DELVRY03 is as below -
    <?xml version="1.0" encoding="UTF-8"?>
    <DELVRY03>
       <IDOC BEGIN="1">
          <EDI_DC40 SEGMENT="1">      </EDI_DC40>
          <E1EDL20 SEGMENT="1">
             <E1EDL22 SEGMENT="1">
                <VSTEL_BEZ>xxxx</VSTEL_BEZ>
                <VKORG_BEZ>yyyy</VKORG_BEZ>
                <INCO1_BEZ>zzzz</INCO1_BEZ>
                <VSBED_BEZ>Pre 1200 hours Satur</VSBED_BEZ>
             </E1EDL22>
             <E1EDL21 SEGMENT="1">
                <E1EDL23 SEGMENT="1">            </E1EDL23>
             </E1EDL21>
             <E1EDL18 SEGMENT="1">         </E1EDL18>
             <E1ADRM1 SEGMENT="1">         </E1ADRM1>
             <E1ADRM1 SEGMENT="1">
                <PARTNER_Q>WE</PARTNER_Q>
                <PARTNER_ID>0000000010</PARTNER_ID>
                <LANGUAGE>EN</LANGUAGE>
                <NAME1>aaaa</NAME1>
                <STREET1>bbbb</STREET1>
                <POSTL_COD1>ccc cccc</POSTL_COD1>
                <CITY1>dddd</CITY1>
                <COUNTRY1>gg</COUNTRY1>
             </E1ADRM1>
             <E1ADRM1 SEGMENT="1">          </E1ADRM1>
             <E1ADRM1 SEGMENT="1">         </E1ADRM1>
             <E1EDT13 SEGMENT="1">         </E1EDT13>
             <E1EDL33 SEGMENT="1">            <ALAND>IE</ALAND>
             </E1EDL33>
             <E1EDL24 SEGMENT="1">
                <E1EDL25 SEGMENT="1">            </E1EDL25>
                <E1EDL26 SEGMENT="1">              
                   <E1EDL27 SEGMENT="1">               </E1EDL27>
                </E1EDL26>
                <E1EDL35 SEGMENT="1">
                   <E1EDL36 SEGMENT="1">               </E1EDL36>
                </E1EDL35>
                <E1EDL43 SEGMENT="1">            </E1EDL43>
                <E1EDL43 SEGMENT="1">            </E1EDL43>
                <E1EDL41 SEGMENT="1">            </E1EDL41>
             </E1EDL24>
             <E1EDL24 SEGMENT="1">
                <E1EDL25 SEGMENT="1">            </E1EDL25>
                <E1EDL26 SEGMENT="1">
                   <E1EDL27 SEGMENT="1">               </E1EDL27>
                </E1EDL26>
                <E1EDL15 SEGMENT="1">            </E1EDL15>
                <E1EDL35 SEGMENT="1">
                   <E1EDL36 SEGMENT="1">               </E1EDL36>
                </E1EDL35>
                <E1EDL43 SEGMENT="1">            </E1EDL43>
                <E1EDL43 SEGMENT="1">            </E1EDL43>
                <E1EDL41 SEGMENT="1">            </E1EDL41>
             </E1EDL24>
          </E1EDL20>
       </IDOC>
    </DELVRY03>
    The mappings are as under -
    /Rec005 = createIf(equalsS(/PARTNER_Q), Constant('WE')))
    /Rec005/F01=Constant('R005')
    /Rec005/F03=/E1ADRM1/POSTL_COD1 - context as E1ADRM1
    /Rec005/F12=removeContext(/E1EDL22/VSBED_BEZ) - context as E1EDL20
    The relevant target node is as below -
          <R005>
             <R005F01>R005</R005F01>
             <R005F02></R005F02>
             <R005F03>ccc cccc</R005F03>
             <R005F04></R005F04>
             <R005F05></R005F05>
             <R005F06></R005F06>
             <R005F07></R005F07>
             <R005F08></R005F08>
             <R005F09></R005F09>
             <R005F10></R005F10>
             <R005F11></R005F11>
             <R005F13></R005F13>
             <R005F14></R005F14>
          </R005>
    Cheers,
    Ashok.

  • Node function

    Hi
    I want to pass a string (say length of 10) always to the target field in my message mapping. Which node function should I use for this ?? I believe constants function is used to pass number. How abt strings ??
    Thanks
    Kumar

    Kumar,
    You can use Constants itself. Constant function is used to send everything as String only.
    raj.

  • Mapping problem in context handling

    Hi experts,
                   I am doing a file to file scenario in which i have to change the queue context is it possible? for simple context change we use ResultList.CC in advance UDF but what to do if we want to add a queue cahnge .To dig more deep into the problem i am explaining my scenario.
    my output structure is <GROUP> .....(1 to unbounded)           
                                        <Records>....(1 to unbounded)
                                           field1
                                           field2
                                             field13 
       In one group there can be many records and there will be multiple Groups.Suppose in my udf i want to add a queue change to add some field in other group then how will i achive it ? please guide me with ur inputs 
    Regards,
    Saurabh

    Hi,
    context object is a generic term used to make a reference to message heder fileds in the XML file (also vth XPATH). Context of an element is nothing but just the level (with reference to its parent node) where the XML tag appears in the given XML document.
    Check this links for more info:
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f7d3b
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
    /people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio
    /people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
    /people/venkataramanan.parameswaran/blog/2007/02/06/is-there-a-possibility-to-access-xi-standard-functions-in-user-defined-functions-yes
    Reward points if this helps
    Regards
    Pragathi.

  • IDOC to FILE(xml) graphical mapping using node function createIf

    Greetings All,
                My Scenario is Idoc to File(XML)
    Target Structure is 
                           MO_MAT_LAN....................(0: unbound)
                                LAN_KEY.......................(0 :1)
                                DESCRIPTION.................(0 : 1)
    Source MATMAS Idoc
                           E1MAKTM.........................(0 : 99)
                                SPRAS_ISO..................(0 :1) 
                                MAKTX..........................(0 :1)
    initially i had mapped E1MAKTM----->MO_MAT_LAN but i dont want target node MO_MAT_LAN to be created when the SPRAS_ISO is equal to EN
    I have tried using node function createIf but the node is geting created only once although the input stucture is having occurance more than 5.
    Can anyone please help me to achive this.
    Many thanks,
    Rohit

    U have to use:-
    SPRAS_ISO mak the context to E1MAKTM compare (Use equals) it with Constant function EN out put to be given to If without else and in then Give E1MAKTM and map out put of If node to MO_MAT_LAN.
    chirag

  • Context handling during message mapping

    Hi,
    I'm working on a mapping and it almost works. There is just 1 thing to solve. I use the fixvalues funtion with as input a field A in a segment of my Idoc. This function is used to map a field B in another segment. However as this segment has multiple occurences, I have problems with the context handling: the first timle works ok but then it fails (as the filed A is in another segment/context). How could I fix this?  I would like to avoid UDF as I don't know much java.
    Kind regards,
    Ulrich

    Hi Ulrich,
    <b>Mapping A_source-Fixvalue-B_target</b>
    In the above case What are the elements exist in A_Source same thing will be transfered to B_target . If it is not find any value in Fixvalue table then it will pass the default value. So provde the default value.
    If there is not element in context then it won't create b_target not at all for that context. So use the Mapwithdefault() nodefunction before passing the value B_target. so in that case it will generate the empty value instead of none.
    Warm Regards,
    Vijay

  • Context Handling functions

    Hi,
       Can someone point me to a blog or article which shows real life scenarios for Context handling functions as I want to practice what I have read. I have already read some articles on these functions(removecontext, usoneasmany etc) and I understand contexts and also context change etc

    Hi Sonia,
    Check out this blog and SAP contribution files on Context Handling:
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f7d3b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd
    Regards,
    Subhasha Ranjan

  • Remove context node function

    Hi
    I know the use of remove context node function. Even I have gone through couple of weblogs that are available on the sdn. But I would like to know.........whether remove context node function is mandatory in any case ?? I believe even we can directly map the source and target fields which are in different contexts. If it is the case ......if we can do it without remove context node function.......what is the importance of remove context node function ?? Is there any performance issue ......to use this node function ??
    thanks
    kumar

    Hi palnati
    <i>if we can do it without remove context node</i>
    ---> Yes you can avoid remove context. This can be done by changing the context of source field to one parent above. This will collect all the source values in same context.
    for example, consider following mapping
    Amount -
    > (removeContext)--> sum--
    > target field
    will be same as
    Amount(change context to parent of parent)-->sum-----> target field.
    Hope this helps.
    Regards

  • Context handling in message mapping  for an IDoc to File Scenario

    Hi,
    Can somebody help me with this issue. I have an Idoc to file scenario. heres my idoc structure. Its a custom Idoc
    Header (1..1)
    Detail (0..Unbounded)
             DependentDetail (0...Unbounded)              Note: This dependentdetail is a subelement of Detail
    Trailer(1...1)
    I  created my target structrure the same way as the Idoc structure.
    My output is a simple text file. I need the output in this format
    Header
    Detail1
       Dependentdetail1
       DependentDetail2
       DependentDetail3
    Detail2
       DependentDetail1
       Dependentdetail2
    Detail3
    Detail4
    Trailer
    Since the Detail and Dependent Detail records are unbounded .
    But right now i m getting my output like this:
    Header
    Detail1
    Detail2
    Detail3
    Detail4
    Trailer
    But the DependentDetail record in not showing up in the output file. I didnot do any context change in my mapping. So do I need to do any context handling??...If so can somebody explain me with this.
    Thanks,
    Adam
    Edited by: hymanroth on Apr 29, 2011 11:11 PM

    Thanks Kenneth foryour quick reply,
    Yes, I see the payload for Dependent detail in SXMB_MONI. So as you said earlier there's a problem with my content conversion.
    my content conversion is as follows:
    Header.fieldNames                             
    Header.fieldFixedLengths                
    Header.endSeparator                        
    Detail.fieldNames                               
    Detail.fieldFixedLengths                    
    Detail.endSeparator
    DependentDetail.fieldNames
    DependentDetail.fieldFixedLengths                   
    DependentDetail.endSeparator
    Trailer.fieldNames                             
    Trailer.fieldFixedLengths                
    Trailer.endSeparator  
    So As I told  earlier. With the above content conversion. I am not able to get the Dependent detail record in my output file. So If there is a change in my content conversion can u check it and tell me where I went wrong.
    Thanks,
    Harsh
    Edited by: hymanroth on May 2, 2011 7:03 PM

  • 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

  • Is Multi Mapping will work with  node function useAsMany with SP10 ?

    Hi friends,
                    I  am  working some sample Multi Mapping scenario . My XI 3.0   SP is  10 .
                    I am getting the following error , while i am testing the Mapping with <b>useAsMany Node function </b> it  is giving the Following Error
    <b>
      Cannot produce target element /ns0:Messages/ns0:Message1/ns1:MT_MSG_IB[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd</b>
                     Will Multi Mapping work with this SP 10 ?
    Best Regards.,
    V.Rangarajan

    Hi ,
           I have just taken the Model as the following link
            /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
            I have designed the Objects  as same as which is specified  in that link  . But my Service pack is 10.
            It is showing the above specified error
    Regards.,
    V.Rangarajan

  • Doubt in external context mapping

    Hi,
    whiel practicing the external context mapping exmaple i read the following lines in the PDF file
    "At design time, a Web Dynpro component does not know the context structures of its
    embedding Web Dynpro component. Therefore, it is not possible at design time to map
    context elements in the component interface controller of Web Dynpro component A to
    context elements that belong to a controller context of Web Dynpro component B, which has
    declared a usage of A. However, if Web Dynpro component A itself uses another Web Dynpro
    component within itself, this is possible (general context mapping)."
    I could not understand the difference between the second and the third lines Can any one let me know if at all there is any difference? Also i would want to know the reason behind such restriction as to y the parent cant red the context of the child component?
    Also can any one let me know the reason y cant we do the external context mapping for the attributes of the root node?

    Hi P K,
    What the lines you mentioned is trying to say is that -
    The Context of an Controller in WD Development Component can only be mapped to Component Controller/View Controller/Custom Controller/Interface Controller of its own WD DC as general context mapping but it wound not be possible for the Controller of DC 1 (other than Interface Controller) to be mapped in design time to the Component Controller/View Controller/Custom Controller of some other DC 2 which has DC 1 as used component (which is known as external mapping). DC 1 can interact with some other DC 2 only through interfaces. So, if DC 1 is put as Used DC for DC 2 then, you can only map and use methods (i mean access) of the DC 1 in DC 2 through Interface Controllers. Rest of the Controller contexts/methods of DC 1 is not readable by DC 2.
    Regards,
    Tushar Sinha

  • Query on Context Handling ( File to IDOC mapping )

    Hi All,
       I've a scenario from file to IDOC. The structure of file is as follows.
    Struct ( occurs unbounded times )
    |
    - Name
    Str. of IDOC
    Node
    |
    - name1
    - name2
    - name3
    - name4
    The problem is that the name in file can occur many times.
    So if say name occurs 2 times in the file then it has to be mapped to name1 and name2 in IDOC.
    If Name in file occurs 3 times it'll be mapped to name1, name2 and name3 in IDOC.
    Am looking for some help.
    Thanks,
    Joe.

    Hi Joe,
    For every name in the file, you will have to map the value to the name field in the IDoc. Use SplitByValue node function available in the graphical editor. You will be able to achieve this mapping. For more about the usage, here's the documenation and a blog(where an example has been given):-
    http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/frameset.htm
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Regards,
    Sushumna

  • Node functions in Message Mapping

    Hi,
    Could someone help me with some good exercises for node functions such as splitbyvalue, collapsecontents, removecontexts.
    I am a newbie to these functions and have absolutely no idea on how to use them. Would appreciate if someone could give very detailed examples to these functions in a step by step manner, so that I can create them just by following your instructions.
    Any links to video presentations are welcome too.
    Cheers,
    S

    Hi ,
    For a fresher, the informationa and examples given in the help.com would be more helpful and it will help you in building string fundamentals. Once your basics and funcdamentals concepts becomes strong then you can go for more complex exmples. Here is help.sap link where you can leran Node functions of MM of PI.
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
    Thanks,
    RK

  • Mapping debug - target node not being created

    Hi Gurus,
    I have an issue in my mapping. Let's say I have a source structure:
    ><body>
    >  <maintag>
    >    <value>1</value>
    >  </maintag>
    >  <maintag>
    >    <value>2</value>
    >  </maintag>
    ><body>
    I need to map maintag->target node but only in case if value eq 2. I used a Ifw/oElse function which creates target queue
    SUPPRESS(grey)
    SUPPRESS(cyan)
    SUPPRESS(grey)
    [] (dark grey)
    which is fine, because only 2nd context matches the condition. But no target node is being created!
    Why? How to resolve this?
    Thnak you!
    Olian

    Hi Olian,
    Changing the context to one level up is working for me.
    Please refer to the following links:
    http://farm4.static.flickr.com/3055/2828227942_e71da4a823_o.jpg
    http://farm4.static.flickr.com/3134/2828228398_92f5ba41e0_o.jpg
    Here the context of value was set to body in the sample DT i created.
    regards,
    venkat.

Maybe you are looking for