Skip to Content
avatar image
Former Member


1)can any body pls give the real use of NODE FUNCTIONS in real time scenarios with screen shots (SPLIT BY VALUE,REMOVE CONTEXT,COLLAPSE CONTEXT).

2)how to get the file name of convention,<payload element value>.xml in the receiver side,if the element value changes dynamically? (dont say to use variable substitution)?

answers required urgently

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 04, 2008 at 03:40 AM


    Please find here with you the answers for your queries

    *1)can any body pls give the real use of NODE FUNCTIONS in real time scenarios with screen shots (SPLIT BY* *VALUE,REMOVE CONTEXT,COLLAPSE CONTEXT).*

    The Node functions are used mainly to handle the context Changes as well as for SUPRESS the values in Context or Queue.

    Values of elements or attributes of the XML message (the payload) are, technically speaking, a string. Therefore, all standard functions that operate on field values expect string arguments and return a string value. Nevertheless, the transferred value can of course have a different semantic data type, namely, the one that you specified when you defined the schema for the payload for the field. Standard functions exhibit the following standard behavior:

    &#9679; Depending on the standard function, data type conversions are used to ensure that the values are transferred in a format suitable for the function (using a cast). If the value cannot be interpreted, the mapping runtime triggers a Java exception.

    &#9679; If-clauses evaluate conditions that return Boolean values. Standard functions that return Boolean values return the string true or false. Standard functions that expect Boolean values interpret the values “1” and “true” (not case-sensitive) as true and all other values as false.

    removeContexts - it will remove the gaps between the queue.

    replaceValue - it will replaces the value.

    SplitByValue - inserts the gap in the queue.

    Exists - Like ABAP Table entry we can check whether the entry Exists or not

    Please go through below link


    Check this weblog where claus have mentioned with examples:




    Also check this weblogs:



    For value mapping check this video presentation and weblog:


    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool [original link is broken]

    you can base these as your reference;

    Have a look at this help link -

    Also these weblogs will help you -




    Split by value -

    If you want to remove the context then either you should use this function or you should write a java function. So with the help of this standard function you can achieve this.Also you will not have any performance issue with this function. Check this help with example on this funciton:

    *2)how to get the file name of convention,<payload element value>.xml in the receiver side,if the element value* *changes dynamically? (dont say to use variable substitution)?*

    For this dynmica configuration for getting the filename. you need to imply below UDF in mapping,

    Here you need to pass the ,<payload element value> and concat the extension ".xml" and pass as input parameter.

    It is better to use dynamic folder choose in receiver side , see below code

    1. Take one input string (element value to be passed)

    2. Mapp it to the (Message tpye ) MT_MsgType in Mapping.

    3. In ID, for communication channel pass below values in FCC

    FileName.fieldFixedLengths -- 0

    FileName.fixedLengthTooShortHandling --Cut

    UDF Code

    String newfilename="";

    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

    DynamicConfigurationKey key = DynamicConfigurationKey.create("","FileName");

    // Get Sourcefilename

    String oldfilename=conf.get(key);

    //extract first 3 chars of source filename


    //get the date

    java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat( "yyyyMMdd" );

    dateformat.format( new java.util.Date() );

    //append sourcedateL


    // determine if prod/ dev / qa

    map = container.getTransformationParameters();

    senderService = (String) map.get("SenderService");




    // change to new file name

    conf.put(key, newfilename+".tmp");

    Also see the below links

    Dynamic Directory and File Naming in Receiver Adapter




    Edited by: Swarup Sawant on Feb 4, 2008 4:40 AM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      All these questions are easily available on SDn. use the search option before posting these kind of questions.

      Node function:

      Remove context:


      You can use removeContext() to delete all the top contexts for an element. This deletes all top hierarchy levels, so that all elements of the target queue are assigned to a root element of the source queue.



      SplitByValue() is the counterpart to removeContexts(): Instead of deleting a context, you can insert a context change in the source value queue. You then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccurs must be >0. A maximum of minOccurs top node target fields can be inserted here.

      You can insert a context change in the queue after each value, after each change to the value, or after each tag without a value.

      Refer the below link for more details:




      Go to the below links for dynamic configuration:

      Advance parameter in file adapter dynamic file name

      Problem in dynamic file name in File reciever adapater





  • avatar image
    Former Member
    Feb 04, 2008 at 05:01 AM


    Refer this links for information about nodes and the use of node functions:


    Function formatByExample:


    Split by value, remove context and collapse context:




    Add comment
    10|10000 characters needed characters exceeded