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

Similar Messages

  • 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

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • 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

  • I can't remove event handler functions

    Hi guys!
    Please help to remove event handler functions of a
    FLVPlaback. I add some functions for an FLVPlaback instance and
    that's why doesn't work the control panel (play button, pause
    button and so on) Here is a link:
    http://sexaid.fw.hu/vg/vg.html
    to understand simply the problem. thx every ideas!

    I would prefer not to announce the URL to the world on this forum, but I can say the old website still starts with the standard .Mac URL http://web.mac.com/username/iWeb and the new one until I set up to use my own domain was the same I believe.
    Empty the Cache has no effect I can still go to the URL and explore the various pages.
    I do not think that the .Mac websites are hosted from the iDisk location as I have defiantly deleted them from my iDisk and I have rechecked every file in the iDisk for any sign of them also my new iWeb '08 website never appeared in the iDisk. I would presume that the .Mac websites are hosted from a particular location on the Apple servers and I need to some how pull them off separately because publishing another new site with iWeb '08 has just left me with two sites and the old one remains and does not exist in iWeb '08 so I can unpublish it.

  • Use movie clip event handler function, but not via an event

    Let's say I have the following code:
    var initObj = new Object();
    initObj.mood = "happy";
    mc = attachMovie("mcBox","instBox",100,initObj);
    mc.onPress = boxPress;
    function boxPress() {
    trace("Box mood: " + this.mood);
    Now, let's say there are times that I want to call boxPress()
    other than when the onPress event happens. In other words, I want
    to call boxPress() for a movie clip via my AS code, but not when an
    onPress event has occurred for that movie clip. Is this possible?
    Or is it possible to simulate or force an onPress event for a movie
    clip so that the handler function gets called for that movie clip?

    addEventListener only works with components in ActionScript 2
    "workingonasite" <[email protected]> wrote
    in message
    news:f1vu8r$92i$[email protected]..
    > So I am trying to get my head around event Listeners.
    When I use this
    > example
    > on a button it works fine:
    >
    > but when I add the same listener to a movie Clip on the
    stage with an
    > instance
    > name of "box", it does not work. Is there something
    basic I am missing?
    >
    >
    >
    > var buttonListener:Object = new Object();
    > buttonListener.click = function(eventObj:Object) {
    > trace("click");
    > };
    > mybutton.addEventListener("click", buttonListener);
    >

  • Can anybody suggest a site which gives me example for context handling ?

    Can anybody suggest a site which gives me example for context handling ? and also some exersices for handson?

    Hi Anil,
    check the follwing links:
    /people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping
    /people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1f/ea0fb12403844bbb6c4cbc8a00cda9/frameset.htm)
    http://help.sap.com/saphelp_nw70/helpdata/en/bd/ca1105c81c6742a0f8c8d49f8834bf/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/40/7b8e40496f6f1de10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/35/fb8c4057d5701de10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/42/f7293b2dbe1a71e10000000a422035/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/79/2835b7848c458bb42cf8de0bcc1ace/frameset.htm
    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
    Thanks,
    Soumya.

  • Passing data to event handler function

    I am trying to pass value to the event handler function but I
    am getting the following error. Can someone please tell me what I
    am doing wrong?
    1067: Implicit coercion of a value of type void to an
    unrelated type function
    here is the code
    private function myClickListener(myid:int):void{
    Alert.show("The button was clicked");
    public function handleStringResult(event:ResultEvent):void{
    catInfo = event.result as ArrayCollection;
    for each(var o:Object in catInfo){
    var b:Button = new Button();
    b.label = o.FILLCOLOR;
    b.id=o.CATID;
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    b.setStyle("color","#FFFFFF");
    b.setStyle("fontFamily","Arial");
    b.setStyle("fontSize",8);
    b.setStyle("textRollOverColor", "red");
    b.addEventListener(MouseEvent.CLICK,
    myClickListener(o.CATID));
    myvbox.addChild(b);
    ]]>

    "Merlyn MM" <[email protected]> wrote in
    message
    news:[email protected]...
    > Sure, Here is the code. I am very new to flex and if my
    code doesn't make
    > sense
    > then please let me know the correct way to do this. I
    really appreciate
    > you
    > taking time!
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute"
    > backgroundColor="#FFFFFF"
    > initialize="myService.getcategories.send()">
    > <mx:WebService id="myService"
    > useProxy="false"
    > wsdl="
    http://devsite/rc/category.cfc?wsdl"
    > showBusyCursor="true">
    > <mx:operation name="getcategories"
    > result="handleStringResult(event)"
    > fault="Alert.show(event.fault.message)"/>
    > <mx:operation name="getsubcounties"
    result="handleStringResult(event)"
    > fault="Alert.show(event.fault.message)"/>
    > <mx:request>CATID</mx:request> //need to
    pass category ID here
    > </mx:operation>
    > </mx:WebService>
    >
    > <mx:Script>
    > <![CDATA[
    > import mx.collections.ArrayCollection;
    > import mx.rpc.events.ResultEvent;
    > import mx.rpc.events.FaultEvent;
    > import mx.controls.Alert;
    > import mx.controls.Button;
    >
    > [Bindable]
    > private var catInfo:ArrayCollection;
    >
    > private function myClickListener(myId:String):void{
    >
    > myService.getcounties.send() // I need to send catid
    here to the
    > webservice
    > }
    >
    >
    > public function
    handleStringResult(event:ResultEvent):void{
    > catInfo = event.result as ArrayCollection;
    > for each(var o:Object in catInfo){
    > var b:Button = new Button();
    > b.label = o.FILLCOLOR;
    > b.id='btn'+o.CATID;
    >
    >
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    > b.setStyle("color","#FFFFFF");
    > b.setStyle("fontFamily","Arial");
    > b.setStyle("fontSize",8);
    > b.setStyle("textRollOverColor", "red");
    > b.addEventListener("click", myClickListener);
    > myvbox.addChild(b);
    > }
    > }
    > ]]>
    > </mx:Script>
    I'd change it to this:
    private function myClickListener(e:Event):void{
    //I don't see where you're using the ID, but to get it,
    //use this code:
    var myID = e.currentTarget.data;
    myService.getcounties.send() // I need to send catid here to
    the
    webservice
    public function handleStringResult(event:ResultEvent):void{
    catInfo = event.result as ArrayCollection;
    for each(var o:Object in catInfo){
    var b:Button = new Button();
    b.label = o.FILLCOLOR;
    //note that you couldn't have used your ID
    //as a "handle" to anything, so I replaced
    //that logic with something you _could_ use
    b.data=o.CATID;
    b.setStyle("fillColors",['#'+o.FILLCOLOR,'#'+o.FILLCOLOR]);
    b.setStyle("color","#FFFFFF");
    b.setStyle("fontFamily","Arial");
    b.setStyle("fontSize",8);
    b.setStyle("textRollOverColor", "red");
    b.addEventListener("click", myClickListener);
    myvbox.addChild(b);
    You could also use a Repeater and set this up in MXML.
    HTH;
    Amy

  • Func_exec reports:  no handler function given for directive  in iPlanet webserver 4.1

    Hi,
    I am trying to run servlets on iPlanet webserver fasttrach edition 4.1 on Windows NT,The web server starts ok as well, but when I try to connect to it I receive a server error and the following messages are in the error log:
    for host 124.163.117.31 trying to GET /servlet/sample, func_exec reports: no handler function given for directive.
    could you please give me some solution for this.
    Thanks&Regards,
    Anne.

    means there is an issue with the the Init Loadmodules line. Normally, check the syntax, make sure the shared objects are where the web server thinks they are.
    If all is good, in unix, check to make sure the init line is all ONE LINE with no line breaks.

  • Context Handling problem

    Hi all,
    I have a problem with a context handling requirement. I think UDF is needed in this case but I don't know where to start. Please see below for the scenario:
    I have an input structure like this:
    segment1
         field1
    segment2
         field2
    segment3
         field3
    node2
         field2
    node3
         field3
    node3
         field3
    the fields will corelate the segment and the node. so for this structure, segment2 and node2 are corelated. Actually, node2 is under segment2.
    here's my desired output to make things clearer:
    segment1
         field1
    segment2
         field2
         node2
              field2
    segment3
         field3
         node3
              field3
         node3
              field3
    field1 sample value. ex. 0000000001
    all field2 have the same value. Value from both segment2 and node2 of field2 is the same. ex. 0000000002
    all field3 have the same value. Value from both segment3 and the 2 node3s of field3 is the same. ex. 0000000003
    In my current mapping, I'm getting this erroneous output:
    segment1
         field1
         node2
              field2
    segment2
         field2
         node3
              field3
    segment3
         field3
         node3
              field3
    The nodes are not in their correct segments. node2 is one level higher because there was no node1.
    Occurrence of segments are 1..unbounded. nodes are 0..unbounded.
    Thanks all.
    Regards,
    SAPenthusiast

    Hello,
    You need to use UDF for this:
    UDF type is Context
    Arguments:
    input1
    input2
    HashMap map = new HashMap();
    for(int a=0;a<input2.length;a++){
         if(!map.containsKey(input2[a])){
              map.put(input2[a],"");
    for(int a=0;a<input1.length;a++){
         if(map.containsKey(input1[a])){
              result.addValue("true");
         else{
              result.addValue("false");
    mapping is something like this:
    input1 -> removeContext -> UDF -> target
    input2 -> removeContext -> /
    Hope this helps,
    Mark

  • How to update the ztable by using table handling function

    how to update the ztable by using table handling function
    It is very urgent ...............................
    thanks in advance

    see the  below code for the direct   ztable update
    Report  ZUPDATE_PRPS.
    tables: zprps.
    parameter: p_wbs like zprps-pspnr,
               p_value like zprps-fakkz default 'X'.
    data: wa_fakkz type zprps-fakkz.
    *START-OF_SELECTION
    start-of-selection.
    call function 'CONVERSION_EXIT_ABPSP_INPUT'
         exporting
             input     = p_wbs
        importing
             output    = p_wbs
        exceptions
             not_found = 1
             others    = 2.
    select single fakkz
      into wa_fakkz
      from zprps
    where pspnr eq p_wbs.
    if sy-subrc eq 0.
       update zprps set fakkz = p_value where PSPNR eq p_wbs.
       if p_value is initial.
         message i999(za) with 'Billing element field has been unchecked'.
       else.
         message i999(za) with 'Billing element field has been checked'.
       endif.
    else.
      message i999(za) with 'WBS element not found'.
    endif.
    reward  points if it is usefull .....
    Girish

  • 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

  • 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!

  • Idoc Segment - Context Handling.

    Hi All,
    Can anyone suggest me a solution as  how to handle the below idoc context problem.. its a file to idoc scenario
    I have an Debmas idoc, in which It is possible for a customer to have more than one E1KNBKM segment, so we only want to map the first segment for that customer and then also we only want the information from the /GLB/XGT_EXTRA_17 segments that are child segments of E1KNBKM.
    -Anu

    What Ravi suggested was:
    SourceNode --> Index -->
                                --> equalS --> ifWithoutElse (Then SourceNode) --> TargetNode
    Constant(1) -->
    Index is similar to Count function (just that it is more reliabel when counting multiple node occurences)...the above will check if the occurence of SourceNode isthe first or not.
    Regards,
    Abhishek.

  • Open iviews in new window from detailed navigation context menu function

    hello,
    when we click in the detail navigation menu and in the context menu (because many of ours users are used to right click to open a link in a new window on the internet) on the functionnality "open in new window", the start page is always display instead of the corresponding iview ...
    could you tell me if there is a configuration into the portal to :
    1- suppress the function "open in new window" from the context menu in the detailed navigation !
    2- make the iview displayed into the new window really the iview desired !
    best regards,
    Olivier.

    Hi Olivier,
    The frist part is very precise. Not possible. Period. The reason is that the links are calling JS and not directly calling a http target.
    About the second part: Within the Light Framework, you create a Light Detailed Navigation. And in this case, the links are direct http links. So with that, you have what you want.
    For the Light Framework see http://help.sap.com/saphelp_nwce10/helpdata/en/43/0174a642406db7e10000000a422035/frameset.htm and around.
    Hope it helps
    Detlev

Maybe you are looking for