What is Context Change

Hi
experts plz tell me what is context change

Hi
Context : Context of an element is nothing but just the level, where
the XML tag appears in the given XML
document. Level of any element is set to the immediate parent node by
default.
Context Change : Context change is just changing the level of XML
tag(element level in XSD) in the XML document.
This means when we map one source field to one target field then that
both field segments should be at same
level.
Example
The reason that context changes can occur in mapping is because sometimes you want to manipulate the structure of the message that's being transferred between systems. For example, lets say you have a message being sent from one system as an XML file, and the structure looks similar to the following:
code
<header>
<field1></field1>
<field2></field2>
</header>
[/code]
However, the system that the message is being sent to has a requirement that each field be split into individual <header> format (I know, this is not a real world example), then you want to use context changes to make the format look something like this instead:
code
<header>
<field1></field1>
</header>
<header>
<field2><field2>
</header>
[/code]
Essentially, you use context mapping when your requirements ask you to change the structure of the XML message, not just strictly apply transformations to each field. You can also check this blog that incorporates user-defined functions for advanced context changes: Mapping Context Changes in XI
Message Mapping Simplified - Part I
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Hope this info is useful to you..
Thanks
Saiyog
Edited by: Saiyog Gonsalves on Aug 1, 2008 10:00 AM

Similar Messages

  • Context change

    Hi,
    what is context change?? where it is implemented?
    thanks in advance.

    Hi!
    Context changes take place in Message Mapping when the source structure is processed. for more details about mapping and context change see sap online help - e.g. here http://help.sap.com/saphelp_nwpi71/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/content.htm
    Regards,
    Volker
    Additionally:
    More detailed information about contexts and context changes see here: http://help.sap.com/saphelp_nwpi71/helpdata/en/3d/24e15bf9d79243b45d49b13b03de8f/content.htm
    Edited by: Volker Kolberg on May 25, 2009 10:10 AM

  • Context Changes got impact on what?

    Context Changes got impact on what?.

    Hi Ash,
    Context changes have impact on:
    &#56256;&#56452; User-Defined Functions
    &#56256;&#56452; Breaking and inserting of hierarchy levels
    For more see below PPT of SAP:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd</a>
    Regards,
    Subhasha Ranjan

  • Context change not working during test

    Hi all,
    I've made a mapping. With several context changes. They all work fine when testing them in the message mapping and the operation mapping. But when I'm testing the actual scenrio all the target fields where a context change is used the target value is missing.
    What is going wrong?

    HI, thanks for the quick post. But the missing parts are already in the sxmb_moni. A download will not help in my situation. I thnk

  • I am trying to fill in a PDF online- there should be a submit button but it isn't showing. My partner has an identical Mac and can see the button- what do I change in system preferences to resolve?

    I am trying to fill in a PDF form online- there should be a submit button but it isn't showing. My partner has an identical Mac and can see the button when he opens the same page- what do I change in my systen system preferences to resolve this?

    You and your partner might have different browsers, different versions of the same browser, or most likely a fervent version of the PDF plug-in.
    See if just clicking on the Enter key sends the form in.

  • Satellite A500 - What are the changes in BIOS 1.90

    Hi,
    I own a Satellite A500 PSAR3A-026002. It has BIOS version 1.50, on the Toshiba website it shows the latest version as 1.90. I'd like to know what has been changed from 1.50 to 1.90 but can't find the information anywhere. Just wondering if anyone could tell me the changes or point me to a website that has them.
    Not planning on updating BIOS at this stage as everything is running fine, just curious as to what they updated, fixed or added.

    Hi Triker,
    Which cool features you mean?
    BIOS updates means only bug fixing and thats all. Its not known to me that new cool features will be added because features like Virtualization are depending on CPU and chipset. If the hardware doesnt support certain features, they are not supported and BIOS update will not help you.
    Of course we can discuss a long time about this but fact is that Toshiba doesnt provide this changelog file and we can do nothing.
    If you think its so important, maybe an authorized service provider can help you an answer your question because they have access to Toshiba databases.

  • I can no longer edit song and album information in iTunes. I right click on the album, the window opens with "get info", "rating", etc., but none of it operates. What did I change to make it stop working?

    I can no longer edit album or song information in iTunes. I right-click on the album (or song), and the window opens with "get info", "rating", etc., but none of it operates. It won't get or save album art, anything. What have I changed to make it all stop working?

    You are describing an iTunes problem, not an iPod touch problem. Try posing in the iTunes forum.

  • Context change by DOM parsing Java Mapping in XI

    Hi Team,
    I would like to know that how can I handle Context Change by DOM Parser Java Mapping in XI.?
    Suppose  the source XML structure I have like below:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Header xmlns:ns0="urn:bp:xi:hr:edm:test:100">
       <FileName>
          <filesub>
             <subname>a</subname>
             <subname>b</subname>
             <subname>c</subname>
          </filesub>
       </FileName>
       <FileName>
          <filesub>
             <subname>d</subname>
             <subname>e</subname>
             <subname>f</subname>
          </filesub>
       </FileName>
    </ns0:Header>
    Where the field FileName can occur maximum thrice(0...3) but the subname field is (0....unbounded) but in the target source I would like to have as given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test4 xmlns="urn:bp:xi:hr:edm:test:100">
    - <Header>
      <FileName>a</FileName>
      <FileName1>d</FileName1>
        </Header>
    - <Header>
      <FileName>b</FileName>
      <FileName1>e</FileName1>
       </Header>
    Header>
      <FileName>c</FileName>
      <FileName1>f</FileName1>
       </Header>
    </MT_Test4>
    That means the first value from every context of the source field is forming my first and second value in my target first context.Thensecond value from every context is forming my 1st and 2nd value of my target 2nd context and finally 3rd value of every context is forming my 1st and 2nd value of my target 3rd context.Is this possible to done through DOM parsing or we have to do it by UDF only?

    Hi Atanu,
        In my last post I gave an alogorithm to solve the mapping problem. Here is the complete program for the mapping.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class DOMParser1  implements StreamTransformation{
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              try
                   DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
                   DocumentBuilder builderel=factory.newDocumentBuilder();
                   /input document in form of XML/
                   Document docIn=builderel.parse(in);
                   /document after parsing/
                   Document docOut=builderel.newDocument();
                   TransformerFactory tf=TransformerFactory.newInstance();
                   Transformer transform=tf.newTransformer();
                   Element root,child,child1=null;
                   Node textChild;
                   NodeList l;
                   int i,n1,j,div,k;
                   String s[];
                   root=docOut.createElement("MT_Test4");
                   root.setAttribute("xmlns","urn:bp:xi:hr:edm:test:100");
                   l=docIn.getElementsByTagName("subname");
                   n1=l.getLength();
                   s=new String[n1];
                   for(i=0;i<n1;++i)
                             s<i>=l.item(i).getFirstChild().getNodeValue();
                   l=docIn.getElementsByTagName("filesub");
                   div=l.getLength();
                   j=n1/div;
                   for(i=0,k=0;i<j;++i)
                        child1=docOut.createElement("Header");
                        root.appendChild(child1);
                        child=docOut.createElement("FileName");
                        textChild=docOut.createTextNode(s[k]);
                        child.appendChild(textChild);
                        child1.appendChild(child);
                        child=docOut.createElement("FileName1");
                        textChild=docOut.createTextNode(s [ k + j ]);
                        child.appendChild(textChild);
                        child1.appendChild(child);
                        ++k;
                   docOut.appendChild(root);
                   transform.transform(new DOMSource(docOut), new StreamResult(out));     
              catch(Exception e)
                   e.printStackTrace();
         public void setParameter(Map arg0) {
         public static void main(String[] args) {
              try{
                   DOMParser1 genFormat=new DOMParser1();
                   FileInputStream in=new FileInputStream("C:/Apps/my dw/sdnq/apps.xml");
                   FileOutputStream out=new FileOutputStream("C:/Apps/my dw/sdnq/tgt1.xml");
                   genFormat.execute(in,out);
              catch(Exception e)
                   e.printStackTrace();
    source ->  apps.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Header xmlns:ns0="urn:bp:xi:hr:edm:test:100">
    - <FileName>
    - <filesub>
      <subname>a</subname>
      <subname>b</subname>
      <subname>c</subname>
      </filesub>
      </FileName>
    - <FileName>
    - <filesub>
      <subname>d</subname>
      <subname>e</subname>
      <subname>f</subname>
      </filesub>
      </FileName>
      </ns0:Header>
    target structure ->  tgt1.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    - <MT_Test4 xmlns="urn:bp:xi:hr:edm:test:100">
    - <Header>
      <FileName>a</FileName>
      <FileName1>d</FileName1>
      </Header>
    - <Header>
      <FileName>b</FileName>
      <FileName1>e</FileName1>
      </Header>
    - <Header>
      <FileName>c</FileName>
      <FileName1>f</FileName1>
      </Header>
      </MT_Test4>
    Hope this helps
    one more thing  in this line "textChild=docOut.createTextNode(s k + j );"   somehow the the third braces one opening  before k and one closing after j is missing for unknown reasons. Please correct it when you actually run this code.
    regards
    Anupam
    Edited by: anupamsap on Mar 7, 2011 12:47 PM

  • Context change explicitly

    How to apply context change explicitly?

    Hi,
    Refer the section context handling page No 19: Explicit Context selection.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f7d3b
    /people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping
    Also u can achieve it by writing the code in UDF.Already provided by experts
    Thnx
    Chirag

  • Context changes

    wat is context and how it changes?

    Hi,
      Assume u have message type as follows.
    i.e MTO_Sample-
           -Data1
              - filed1
              - filed2
              - filed3
          -Data2
              - filed1
              - filed2
              -filed3
        -Data N
              - filed1
              - filed2
             - filed3
    where Data1, Data2 and Date3 are context..
    assume u have Data1 with 2 records, then start of second record nothing but context change.
    please chk the following link.
    http://help.sap.com/saphelp_nw04s/helpdata/en/48/444941db42f423e10000000a155106/frameset.htm
    /people/yukai.shi/blog/2006/06/02/b2b-mapping-techniques-using-the-graphical-mapping-tool
    /people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi
    regards
    mahesh.

  • User changes in tab strip ui element are not recorded in context change log

    Hi All,
    We are using a tab strip ui element in webdynpro component. But user changes inside tab strip ui element are not getting recorded to the context change log. I have an input field on the same view besides  tab strip ui element. User changes to this input field are getting recorded to the context change log.
    Is there any restriction on context change log usage with tab strip ui element?
    Could you please suggest If there is any way to record changes inside tab strip ui element.
    Thanks,
    Sudheer.

    I think there are some limitations exists, context change logs are not complete when you do value help , i am not sure about tab strip.
    [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a8e5d273b12fe2e10000000a42189d/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a8e5d273b12fe2e10000000a42189d/content.htm]

  • What can I change to gain access to my work vpn.  I can access with my MacBook Air and other routers.  Can use my ipad and this time capsule to successfully access the VPN.

    What can I change to gain access to my work vpn.  I can access with my MacBook Air and other routers.  Can use my ipad and this time capsule to successfully access the VPN.

    You need to give us a lot more info.
    I presume the MBA and the TC are the combo that doesn't work, although you don't clearly state that.
    If the ipad and TC work.. are you sure the ipad is connected via the TC and not 3G network?
    If it is then the TC itself is fine and the issue might be setup on the MBA.. although if the MBA works with other routers.. that rather confuses the matter.
    You need to actually tell us how the TC is setup in the network. What kind of broadband modem you have and what kind of vpn you are using.

  • My imac screen display is unfocussed, odd coloured and blurred (caused by rogue cate walking over keyboard).  I have no idea what settings have changed or what to check.  Any ideas?!

    My imac screen display is unfocussed, odd coloured and blurred (caused by rogue cate walking over keyboard).  I have no idea what settings have changed or what to check.  Any ideas?!

    It could be a number of keyboard shortcuts, here's a few.
    If the screen is zoomed,  hold CNTL and scroll down with mouse or trackpad.
    If screen looks like a negative,  hold down CNTL OPT CMD and click 8.
    Let us know how what other symptoms are shown.
    Regards,
    Captfred

  • What were the changes to the recent iPhoto update?

    Anybody have the thread/website that shows what the recent UPDATE to iPhoto was?
    What were the changes?
    thanks.

    The usual place to start looking for "what was changed" in a particular new version release is the Release Notes for that version. <br />
    https://www.mozilla.org/en-US/firefox/28.0/releasenotes/
    From that page you can use the hyperlink for the [https://bugzilla.mozilla.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&f1=target_milestone&f2=cf_status_firefox28&f3=target_milestone&j_top=OR&o1=anywords&o2=anywords&o3=equals&query_format=advanced&resolution=FIXED&v1=mozilla28&v2=fixed%2Cverified&v3=Firefox%2028&order=bug_id&limit=0&list_id=9960032 complete list of changes in this release], which displays the '''RESOLVED, VERIFIED, CLOSED''' Bugs reports for that version. 3934 Bugs are listed there for the Firefox 28.0 Release version.

  • Add a context change after a set of values in a context

    Dear experts,
    My requirement is as follows:
    Scenario: Idoc to Idoc. I need to check if there are line items > 5- I need to do a split. The split is happening properly via my mapping but I have a problem at the header record level on the target- I do not get the values populated correctly. I need to add a context change after 5 values in the queue.
    eg:
    Say there are 2 Idocs at the source with following unique IDs: called Journal ID:
    My source:
    Idoc 1: Journal ID 123
    Line Itme 1
    Line Item 2
    Idoc 2: Journal ID 124
    Line item 1
    Line item 2
    Line item 3
    Line item 4
    Line item 5
    Line item 6
    Line item 7
    So I need to get total of three Idocs in my target:
    Idoc 1: Journal Entry 123
    Line Item 1
    Line Item 2
    Idoc2: Journal Entry 124
    Line item 1
    Line item 2
    Line item 3
    Line item 4
    Line item 5
    Idoc3: Journal entry 124
    Line item 6(new 1)
    Line item 7(new 2)
    The split in the target Idoc is working perfectly. But inside the header record the journal ID field(taken from Item record level) is not populating correctly. I am getting this output:
    Idoc 1: Journal Entry 123
    Header Record-->JournalID Field value= '123'
    Line Item 1
    Line Item 2
    Idoc2: Journal Entry 124
    Header Record-->JournalID Field value= '124'
    Line item 1
    Line item 2
    Line item 3
    Line item 4
    Line item 5
    Idoc3: Journal entry 124
    Header Record-->JournalID Field value= Null
    Line item 6(new 1)
    Line item 7(new 2)
    So please suggest a UDF/standard function to populate the right values inside header record--->Journal ID field.Something like the below...
    public void calculate(String[] var1, ResultList result, Container container) throws StreamTransformationException{
      for ( int i = 0; i < var1.length; i++ )
         if( var1[i].length() > 5) //here var1 I am passing the Journal ID
           result.addContextChange();
    Apparently this doesnt work.

    The first Idoc has two line items and the second idoc has 7 line items. As the split is per 5 line item- the target has 3 Idocs.
    Now the problem is that the header value in the target: REF_DOC_NO has to be created as per the number of line items and doesnt come from header record directly.

Maybe you are looking for

  • Not Capturing When Recording Mainframe

    I have recently upgraded to version 4 - and I now find that trying to record a 3270 emulator command/key-board driven window impossible. Only the first window is captured - subsequent key strokes are not signalling C4 to grab a new slide. I had done

  • DBMS_SQL.PARSE + CLOB

    Hi, I am using: DBMS_SQL.PARSE ( c IN INTEGER, statement IN VARCHAR2, language_flag IN INTEGER); I have to parse very very big pl/sql blocks. So I have to put into statement, paremeter which has CLOB type. When my statement is not too big everything

  • Where to find application support folder?

    Just upgraded from Snow Leopard to Mountain Lion and I'm unable to locate my application support folder. I remember having to go to library then application support folder was in it but now its gone missing. Just need a step by step tutorial to locat

  • BASIC web authentication against Oracle database?

    Hello, Here's what I want in a nutshell. When someone goes to one of my webpages under WLS 8.1, I want them to be presented with a BASIC authentication dialog. That part is configured between web.xml and weblogic.xml and I think I'm OK with doing tha

  • Problem for Function RSPO_RGET_PAGE_NUMBER

    Hi, I've to call the function RSPO_RGET_PAGE_NUMBER to get the no. of pages. I know I have to export the parameter X of type TSP01SYS to this function, i.e. CALL FUNCTION 'RSPO_RGET_PAGE_NUMBER'      EXPORTING RQ = IRQ      IMPORTING PAGES = ITLOG-NO