Remove context and split by value.

Hi Friends,
                        the SAP Library  seems to bge a bit tough for me. Any url where I can find easy definition to Remove context and split by value , with exampl!!
Thanks in advance!!
Arnab .

Hi,
Remove Context Simply remove the Context. SplitByValue inserts  Context.
Case 1: Remove Context is not Used.
Source Message:
<Test_Out_Remove>
<header name=u201CA">
<item>A.one</item>
<item>A.two</item>
<item>A.three</item>
</header>
<header name="B">
<item>B.one</item>
<item>B.two</item>
</header>
</Test_Out_Remove>
TargetMessage:
<Test_In_Remove>
<item>A.one</item>
<item>A.two</item>
<item>A.three</item>
</Test_In_Remove>
Case 2: Using Remove Context.
Source Message:     
<Test_Out_Remove>
<header name=u201CA">
<item>A.one</item>    
<item>A.two</item>    
<item>A.three</item>
</header>
<header name="B">
<item>B.one</item>
<item>B.two</item>
</header>
</Test_Out_Remove>
TargetMessage:
<Test_In_Remove>
<item>A.one</item>
<item>A.two</item>
<item>A.three</item>
<item>B.one</item>
<item>B.two</item>
</Test_In_Remove>
Case 3: Without SplitByValue
Source Message :
<Test_Out_Split>
<header>
<item>one</item>
<item>two</item>
<item>three</item>
<item>four</item>
</header>
</Test_Out_Split>
Target Message :
<Test_In_Split>
<new_context>
<item>one</item>
<item>two</item>
<item>three</item>
<item>four</item>
</new_context>
<new_context />
<new_context />
<new_context />
</Test_In_Split>
Case4: Using SplitBYValue
Source Message :
<Test_Out_Split>
<header>
<item>one</item>
<item>two</item>
<item>three</item>
<item>four</item>
</header>
</Test_Out_Split>
Target Message :
<Test_In_Split>
<new_context>
<item>one</item>
</new_context>
<new_context>
<item>two</item>
</new_context>
<new_context>
<item>three</item>
</new_context>
<new_context>
<item>four</item>
</new_context>
</Test_In_Split>
Reward points if needful.
Thanks,
RamuV

Similar Messages

  • Followup Question: Removing a character in a value from the internal table

    Hi guys!
    example: i_table-field = "10,20"
    I want to remove " " because creating csv creates this automatically because it has a value that includes comma. I am also using comma separator for my program so if I would remove the " " before splitting the values there will also be an effect on my program... can anyone can help me with this?
    thanks in advance! good day guys!
    Follow-up:
    I have resolved with my problem regarding " " but I found out that splitting the file with comma splits the "10,20" which is a single value for a field.
    it was also split into two values: (before removing the " ")
    "10
    20"
    can anyone can help me with this? thanks in advance! good day guys!

    Hi Atish,
    1. Format the XLS file properly before converting it to CSV. here If you convert the quantity, currency columns to the text columns then you will not get " into CSV file.
    What do you mean convert the quantity, currency columns to the text columns? Does this mean by changing the cell format into currency? when I made this the format change other values ie: 150000000772 turned to 150,000,000,772. Which I think will also split to values:
    150
    000
    000
    772
    But converting from xls to csv really removed the " ".
    So I resolved removing the " " with your answers before.. my problem now is that in a single field value 10,20. they are also separated. I need them to be in a singe value. thanks!

  • Removing a character in a value from the internal table

    Hi guys!
    <b>example: i_table-field = "10,20"</b>
    I want to remove " " because creating csv creates this automatically because it has a value that includes comma. I am also using comma separator for my program so if I would remove the " " before splitting the values there will also be an effect on my program... can anyone can help me with this?
    thanks in advance! good day guys!

    Hi Michael,
    In the scenario of yours, you are left with two options.
    1. Format the XLS file properly before converting it to CSV. here If you convert the quantity, currency columns to the text columns then you will not get " into CSV file.
    2. Define the quantity, currency fields in your internal table as of type char. For eg. Curr of length 18, should be defined as fields of CHAR20 (two characters for " "), then once you separate all the fields based on comma, just repalce all the occurances of " using REPLACE.
    But what I suggest is better use option 1. The decision is totally depend on the number of time you want to use the program.
    Reward points if useful.
    Regards,
    Atish

  • Split By Value and Collapse context

    Please give me the business requirement in your project that leads to work on split by value and collapse context?
    I read so many documents but i am still confusing with above mentioned node functions?

    Hi praveen,
    Check these links
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    Message Mapping Simplified - Part I
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    New functions in the Graphical Mapping Tool XI 3.0 SP13
    http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/b9af5e71-0701-0010-d0b8-f612fb6593dd
    regards
    srinivas

  • Split By Value   -  Context

    Hi Experts,
    I am learing about Split By Value and Context  in Mapping Node Functions,
    What is Split By Value ?
    What is Context ?
    Can anyone give some light on this topic  WITH REAL TIME EXAMPLE.
    Regards,
    Study SAP

    Hi,
    What is Split By Value ?
    -->
    suppose you have an XML Like
    code<root>
    <node>1</node>
    <node>2</node>
    </root>[/code]
    split by value(node) returns:
    code<root>
    <node>1</node>
    </root>
    <root>
    <node>2</node>
    </root>[/code]
    Instead remove context does the opposite.
    What is Context ?
    -->
    refer
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Here is a scenario where context objects were used for BPM
    Technical Context Object in ccBPM
    Get the details here:
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    Technical Context Objects :
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/frameset.htm
    A list of the Technical Context Objects names can be found here:
    http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/content.htm
    Thanks
    Swarup

  • I get the following message when i try to open ALL my documents : frozen panes and split panes are not supported and were removed. my documents are blank

    i get the following message when i try to open any of my documents : frozen panes and split panes are not supported and were removed. All my documents open blanc!

    Hi Louisa,
    louisa_16_za wrote:
    i work with Numbers on my MiniMac and then save the files as Excel because the university only works with Windows.
    Numbers is not an Excel clone. Importing and exporting between Numbers and Excel will eventually build up glitches.
    If the university only works with 'Windoze' it might be better if you use Excel or a free version of Office (for example, Libre Office or Open Office).
    If your marks depend upon a professor who uses Excel, go with the flow.
    http://www.howtogeek.com/187663/openoffice-vs.-libreoffice-whats-the-difference- and-which-should-you-use/
    Regards,
    Ian

  • Remove Batch Management and Split Valuation Dependencies

    Hi,
    I need to remove Batch Management Indicator and Split Valuation for a material. Which one should I do first? Are these dependent on one another?
    Thanks,
    Jograd

    You are correct. It did cause lots of error when i tried to do it in test client.
    I am trying to remove the valuation category of one right now. It has zero stock and no open documents.
    I saw in note Note 155874 - Change valuation category in material master that you need to do this:
    2. If you change from split to joint valuation, no valuation data must
    exist for a valuation type.
    I dont know where to start doing that? Because there is not data for the material. However i noticed that there is valuation for previous period. do i need to delete that too? But there are no stocks for the previous period.
    Please help.
    Thanks,
    Jograd

  • Value and context and queue diff

    Hi people
              In UDF editor cache, what is the use and diff between value and context queue radio buttons
    Thanks
    Shekar

    Refer
    http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
    Value - returns string..
    Context/Queue  - returns array of values

  • OMB*Plus Command for Maintain/Add/Remove Experts in Context and Tools Menue

    Hi there,
    does anybody know how to maintain Experts in the Context- and Tools-Menue by OMB-Commands?
    The problem ist, that I transfer Experts into another workspace via OMBEXPORT/OMBIMPORT,
    and I would like to maintain the menues in my batch-script.
    Can't find anything in the docu about this.
    Thanks in advance.
    Andreas

    Hi David,
    thank you very much for the quick and correct answer.
    Just a few more questions about this.
    Now, as I know the answer, I found it in the documentation as well.
    But I allways find it very hard to find anything in the OMB*Plus Command Reference . And also with the description of the OMBMENU command: Why is there no description about the parameters in the reference? Where is the list of valid object types, and where is the description of the "QUOTED_STRING" (NEW, OPEN)?
    This command is just an example for the, in my opinion, really poor quality of the OWB*Plus Command Reference.
    Is there any underlaying reason for this that I do not understand, or is there a special strategy to work with this document, or do I just need more practice?
    The answers to this questions would be very helpfull for me, but also for my customer, where we start to implement a quite big DWH on OWB basis.
    Thanks again.
    Andreas

  • Concatinate and splitting error

    hai friends
    iam doing idoc to file senario in that iam geeting multiple tdline (long text) in multiple segments
    iam doing first conctinating and then splitting in to 4 parts.
    when concatinating to concatinate iam using remove context for concatinating at that time all the segmaents text will comming into one segment
    what can i do to avoid this .
    pls help me
    my in put file is like this :
    <root>
    <seg1>
    <tdname>abc</tdname>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
    </seg1>
    <seg1>
    <tdname>urt</tdname>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
    </seg1>
    <seg1>
    <tdname>xyz</tdname>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
         <seg2>
             <tdline>kdjfkdjfhkj</tdline>
           </seg2>
    </seg1>
    </root>
    target shoud like this.
    <root>
    <seg1>
    <tdname>abc</tdname>
         <seg2>
             <tdline>kdjfkdjfhkjdfhdjkfhkdfjhgfj</tdline>
           </seg2>
        </seg1>
    <seg1>
    <tdname>xyz</tdname>
         <seg2>
             <tdline>kdjfkdjfhkjdfhdjkfhkdfjhgfj</tdline>
           </seg2>
        </seg1>
    <seg1>
    <tdname>urt</tdname>
         <seg2>
             <tdline>kdjfkdjfhkjdfhdjkfhkdfjhgfj</tdline>
           </seg2>
        </seg1>
    <./root>
    but iam getting
    <seg1>
    <tdname>abc</tdname>
         <seg2>
             <tdline>kdjfkdjfhkjdfhdjkfhkdfjhgfj
    jghkjghkfjghkfj
    fghkfjghjkf
    fjghfjg</tdline>
           </seg2>
        </seg1>
    what can idoo pls help me
    iam writing one udf for this
    but it is not working proparly
    pls help me
    with regards
    srikanth vipparla
    Edited by: srikanth vipparla on May 29, 2008 5:04 AM

    Hi Srikanth,
      If you have  IDOC Structure Like bellow,
       <Root>                      1-1 occurrence
       <Seg1>                      0-Unbounded
        <TDName>                1-1
        <Seg2>                     0-Unbounded
         <TDLine>                  0-Unbounded
    Then
       You Must create a File structure Like bellow,
       <Root>                      1-1 occurrence
       <Seg1>                      0-Unbounded
        <TDName>                1-1
        <Seg2>                     0-1
         <TDLine>                  1-1
    Do the Mapping ,
    TDNameRemove ContextexitsSplitbyValue(ValueChange)-Createif--Seg1
    TDNameRemove ContextSplitbyValue(ValueChange)---TDName
    TDNameRemove ContextexitsSplitbyValue(Each Value)-Createif--Seg2
    TDlineRemove Context(UDF for concatinate Multiple TDLine)--TDLine
    *Reward Points If Helpful*
    Regards,
    Prakasu

  • Mapping split by value

    Hello friends,
    I have the following scenario where i get data from SQL table via JDBC and map it to an IDOC.
    <Row>
      <Header Ind>1111<Hearer Ind>
      <Det1>5<Det1>
      <Det1>5<Det1>
       <Det1>5<Det1>
    <Row>
      <Header Ind>2222<Hearer Ind>
      <Det1>6<Det1>
      <Det1>6<Det1>
      <Det1>6<Det1>
    The above is the source Payload. In the Mapping I have taken the Header Ind node and done the below for all the target segments.
    Header Ind  --- Split by Value [value change] -
    collapse context --- IDOC
    Header Ind  --- Split by Value [value change] -
    collapse context --- EDIDC40
    Header Ind  --- Split by Value [value change] -
    collapse context --- EIBPACH08
    Header Ind  --- Split by Value [value change] -
    collapse context --- EIBACGL08
    My question is where do I map the <row> node too ?? I am still getting an error below
    Cannot create target element /ACC_GL_POSTING01/IDOC[2]/EDI_DC40. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
    Thank you,
    Teresa

    If i map <row context to destination IDOC then split by value and collapse context is not required?? I would like to genereate a new IDOC every time the header Ind changes.
    Thanks,
    Teresa

  • Generic UDF to handle empty contexts and contexts with missing fields

    Hi,
    I have been trying to get my head around a UDF for this for a while, but cannot find the solution. I''l start by showing input structure, and expected target structure (subset of an invoice IDoc with 4 line items):
    SOURCE:
    E1EDK01 (0..1)
    E1EDP01
    ---POSEX = 1
    ---E1EDP05
    KOTXT (qualifier) = Z1
    BETRG (amount) = 200,00
    ---E1EDP05
    KOTXT = Z2
    BETRG = 300,00
    ---E1EDP19...
    E1EDP01
    ---POSEX = 2
    ---E1EDP05
    KOTXT = Z1
    ---E1EDP05
    KOTXT = Z2
    BETRG = 400,00
    ---E1EDP19...
    E1EDP01
    ---POSEX = 3
    ---E1EDP05
    KOTXT = Z2
    BETRG = 500,00
    ---E1EDP19...
    E1EDP01
    ---POSEX = 4
    ---E1EDP19...
    TARGET:
    Line
    ---PosId = 1
    ---Price = 200.00
    Line
    ---PosId = 2
    ---Price = N/A
    Line
    ---PosId = 3
    ---Price = N/A
    Line
    ---PosId = 4
    ---Price = N/A
    I want the price from E1EDP05/BETRG where KOTXT = Z1to be set for each line. As you can see the source structure can be split in 4 cases:
    1. for some line items there exist multiple E1EDP05-segments with one of them qualifier Z1 and one corresponding amount field. This is the "perfect" structure and easy to handle.
    2. some line items contains E1EDP05 with qualifier Z1 with no BETRG. Problem-case
    3. some line items contains no E1EDP05-segments with qualifier Z1, but contains other E1EDP05-segments. Can be solved.
    4. some line items contains no E1EDP05-segments at all. Can be solved.
    I need to (I believe) set the context of the KOTXT and BETRG to E1EDP01 since I want one value per line item, irrespective of how many E1EDP05-segments exist per line item. In cases where no value can be found for relevant qualifier (Z1) or no E1EDP05-segments exist for a line item I want a default value to be set (N/A).
    My problem is that all these different cases might occur in the same file, and they mess up the values in each context, leading to wrong BETRG to be picked in some cases (where case 2 exist) since mapWithDefault cannot be used (context contains value for other qualifier).
    Do you know how to handle all these cases?
    Any pseudo-code for an UDF?
    Many thanks for your help!
    Br,
    Kenneth

    Hi Shweta!
    Thanks a lot, your idea didn't completely solve my problem, but pointed me in the right direction and gave me some valuable ideas:)
    For anyone wondering how it is done, I solved it by using your suggested two inputs, along with a third input (constant) which functions as default value for contexts where value-field is missing for a specific qualifier, or in case no segments with desired qualifier exists for a context.
    My mapping now looks like the following (where KOTXT is qualifier and KRATE is value field) for the 3 inputs:
    KOTXT(Context = E1EDP01) \
                                equalsS -->
    Constant(qualifier value) /
    KOTXT(Context = E1EDP05) \
                                equalsS  \
    Constant(qualifier value) /            ifWithoutElse --> removeContexts -->
               KRATE (Context = E1EDP05) /
    Constant(default value) -->
    Then these 3 inputs goes into the following UDF (queue function):
    int j=0;
    boolean contextDone = false;
    for(int i=0;i<a.length;i++)
         if(a<i>.equals("true"))
              if(b[j].equals(ResultList.SUPPRESS))
                   result.addValue(c[0]);
              else
                   result.addValue(b[j]);
              contextDone = true;
              j=j+1;
         if(a<i>.equals(ResultList.CC))
              if (contextDone)
                   contextDone = false;
                   result.addValue(ResultList.CC);
              else
                   result.addValue(c[0]);
                   result.addValue(ResultList.CC);
    This results in a target node created for each context, where context relates to each line item in this case, where each value is either a default value or the value corresponding to the qualifier. This works in all cases where:
    1. there are no segments containing relevant qualifier
    2. there are segments with relevant qualifier, but missing value field
    3. there are segments with relevant qualifier and value field
    Thanks a lot again, Shweta, for guiding me!
    Br,
    Kenneth

  • Importance of split by value function options

    In split by value function, we have Each value, value changed and emply value options. What are the functions of these options? ( I know split by value function will generate a field in the target, under a different target node, for every value of that in the source sturcture.). Please help me with the answer.
    Regards,
    Suresh.

    Hi,
    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 this link for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm
    Regards,
    Nithiyanandam

  • 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

  • SSL VPN Full and Split Tunnel Config Question

    I am Beta testing SSLVPN on an IOS router. The question I have is this:
    Is it possiable to have slit and full tunnel configs. It seems that once you create your context and default profile that is all you have either split or full. The books say you can use Radius and assign different profiles but, I would like to give the users a choice (like in the VPN3000 .pcf) of either split or full depending on where they are working from.

    The below is an example using the ASA - but the principle remains the same:-
    http://www.cisco.com/en/US/customer/products/ps6120/products_configuration_example09186a0080975e83.shtml
    HTH>

Maybe you are looking for

  • Page Processing with multiple tables

    Hello to all sql experts! I have been successful in inserting a row into a table and creating the PK using Page Processing. The parent table is called Facility. I used the following sql to insert a row into the table and now need to add data to the c

  • Multiple value variable - not showing Multiple values in the report

    Hi, I have careated a Multiple value variable for one of the characteristics in my Query. however, When i run the Query and select multiple values for the same, the report displays values for only the first selection. Could you help me resolve this ?

  • Consuming WS from XI

    Hello, I'm trying to consume an XI web service. I've received a WSDL file from my administrator. Using the wizard on my Netweaver Developer Studio I've created a standalone proxy and received the following structure: Logical Ports:    SystemMsg_OBPor

  • Correlation Problem: unable to Use Correlation and Activate correlation

    Hello, i have created correlation name in correlation list and assigned involved messages and assigned proper field in correlaton in properties .i am able to view my correlation name in the properties of both receive steps ,but when i assign it to us

  • Images attached do not resize properly to S,M,L

    On my IMac, with Snow Leopard, when I attempt to attach a jpeg file (for instance, a 1.6 MB file), the following sizes are what I get: S - 38 KB, M - 58 KB, L - 58 KB, Actual - 2.0 MB (as you can see, NO difference in size between the Medium and Larg


HashFlare