Target Node Creation
Hi,
I have to check a condition of a filed in a particular node and if it satisfied need to create the a node in the target with respect to the source node.
I tried various combination but ended up in error,
please help.
Thanks
Hi ,
in my input i have,
<Name>
<FirstName>demo</FirstName>
<LastName>test</LastName>
</Name
<Name>
<FirstName>Testdemo</FirstName>
<LastName>test</LastName>
</Name
<Name>
<FirstName>Test</FirstName>
<LastName>test</LastName>
</Name
<Name>
<FirstName>demo data</FirstName>
<LastName>test</LastName>
</Name
So i have to create Name node in target whenever FirstName is starts with demo with other values in the corrspoinding Name node.
So my target will be
<Name>
<FirstName>demo</FirstName>
<LastName>test</LastName>
</Name>
<Name>
<FirstName>demo data</FirstName>
<LastName>test</LastName>
</Name
Please tell me how to get this
Thanks
Archanaa
Similar Messages
-
Target node creation on condition
Hi I have a requirement where i have to create a target node based on a requiremnt.
the source is The target is
Line Tar
a1 C1
b1 C2
c1
Line
a1
b1
c2
Line Tar
a2 C3
b2
c3
I have achieved creating Tar based on a b values . now i have to map the C target so that it is created for every c value . but if a,b values are same then C has to be in the same Tar element.
How can i achieve this . Any help is greatly appriciated.
Note: i just need the mapping for C node. not the Tar node.
Thank youHi ,
in my input i have,
<Name>
<FirstName>demo</FirstName>
<LastName>test</LastName>
</Name
<Name>
<FirstName>Testdemo</FirstName>
<LastName>test</LastName>
</Name
<Name>
<FirstName>Test</FirstName>
<LastName>test</LastName>
</Name
<Name>
<FirstName>demo data</FirstName>
<LastName>test</LastName>
</Name
So i have to create Name node in target whenever FirstName is starts with demo with other values in the corrspoinding Name node.
So my target will be
<Name>
<FirstName>demo</FirstName>
<LastName>test</LastName>
</Name>
<Name>
<FirstName>demo data</FirstName>
<LastName>test</LastName>
</Name
Please tell me how to get this
Thanks
Archanaa -
Regarding Target Node creation in Target message
Hi,
I am trying to dynamically control the appearence of a node(occurence 0..1) in the target structure using the graphical mapping.
Source structure looks like.
Source(occurence 1..1)
Node1(occurence 0..1)
Rec1(occurence 0..1)
Rec2(occurence 0..1)
here source is the root node under which Node1 is a sub node and Rec1 and Rec2 are two elements of type string under Node1.
The target structure is also same as that of source. My requirement is to create Rec1 in the target side if Rec1 has value(A), else Rec1 will not be created at the target side, but Rec2 will be created.
I have used the Createif function to achieve this but it won't worked.
Createif is working fine, if the assigned condition to it is true else it throws a mapping exception.
Please suggest me how to achieve this.Hi Nitin,
Give Rec1 and Constant(with value A) as input to function equalsS.Give output from equalsS and Rec 1 to if and then inputs of ifWithoutElse function and give to Rec1 in the target.
Rec1->equalsS(ConstantA)->ifWithoutElse->Rec1.
Give Rec1 as input to then and output of equalsS(Constant A) as input to if of ifWithoutElse function.
For Rec2 give a not function after equalsS function in the above mapping for Rec1 and give Rec2 as input to then of ifWithoutElse function.
Rec1->equalsS(ConstantA)->not->ifWithoutElse->Rec2
Give Rec2 as input to then and output of not function as input to if of ifWithoutElse function
This should solve your issue.
Rgds,
Lekshmi. -
Automatic Profile Set / Target Group Creation in SAP CRM
Hi,
Need some help on the listed process.
Is there any procedure to create Profile Ser/Target group automatically based on certain criteria? We want to reduce the manual work of Profile/Target group creation for the users.
We are currently using SAP CRM 5.0 and looking at options of creating Target Groups automatically based on infoset. The criteria used to model is below mentioned.
- New Customers & Head Office (They are the customer specific Z-fields in BP Master Data)
- Relationship Data: Has contact person Relationship. This is based on the assignment of Contact person to the BP (i.e. Day when the Relationship assignment done to the respective BP Master Data --> under Relationship tab page.
We are not using Attribute Set (that we assign to Marketing Attribute tab page of BP Master), for your information.
Appreciate, if you could let us know whethe this is possible by Standard feature/ any work around on this.
Kindly do the needful.
Thanks,
RahulHello Rahul,
it is possible to create a target group from an external list as far as i am aware. Maybe have a look at
http://help.sap.com/saphelp_crm50/helpdata/en/57/d7de42777c2978e10000000a155106/frameset.htm
Regards
Mark -
Screen become blank during the Manual Target Group creation
Hi SAP,
In the Marketing Segmentation, there is an option to allow the manual Target Group creation. I have a list of 5000 BP and I upload it via "Import Business Partner". It is just 5krecords and the screen goes blank. We have tried several times and encountering the same thing which there is no enhancement applied. Any idea if there is limit on BP to be uploaded?Hi Subhashish,
High Volume Segmentation is recommended for segmentation activities for more than 500.000 BPs. In your case Classic Segmentation fits perfectly.
Please read the SAP documentation for more information:
Segmentation - SAP Library
Furthermore since the Import Business Partner functionality is not Java based this cannot be a Java problem.
Do you receive a dump in transaction "st22" after trying the import?
Regards,
Markus -
Child to Parent Node Creation, Mapping Help required
Hi Guys,
I need some suggestions on the following mapping problem, kindly suggest some solution if possible:
I have a sender structure as:
ParentNode
..........RecordSet (0 to 1)
................ SValue1 (0 to 1)
................ SValue2 (0 to 1)
.................SValue3 (0 to 1)
For the receiver Structure I have following:
ParentNode
..........RSet (0 to unbounded)
............. RValue (0 to 1)
..............RField (0 to 1)
Now my mapping conditions requires for every SValue1, SValue2, SValue3 source fields, I should generate at receiver side a new RSet and the value of SValue1/SValue2/SValue3 field(s) should be Provided into RValue, and RField should have the respective field name.
I am trying this with PI Graphical mapping, is there any better solution for it?Hi,
As source structure occurence is 0..1 in this case duplicate the target structure and use create if function with source as SValue1 ...so that for each of Svalues...a corresponding target node will get generated...
With graphical mapping you should be able to do this...else need to go for UDF...
HTH
Rajesh -
Generating target nodes dynamically in message mapping
Hi XI GURUS
I am trying to generate target node using using more then source node. Is it possible to do this.
I need this as in source I have 2 different nodes (0 to unbounded) and in target I want to create corresponding number of target nodes. For e.g if I have 2 + 1 nodes in source then I want to create 3 nodes in target
Source as below
<FIRSTNAME>
<Raj>
<Kum>
</FIRSTNAME>
<FIRSTNAME>
<Naveen>
<Kumar>
</FIRSTNAME>
<CITY>
<bANGALORE>
</CITY>
Desired output in target as below
<ADDRESS>
<qwerty1>
<ADDRESS>
<ADDRESS>
<qwerty2>
<ADDRESS>
<ADDRESS>
<qwerty2>
<ADDRESS>
Can i follow an alternative approach (using java function) of counting the total number of occurences of source nodes and generating as many number of the target node
ThanxIf you have a condition check for each of the source node to be mapped to the target node,
use "create if" standard function and pass the boolean result of your Condition check as an input to this standard function. For each "true" a value would be added to the output queue. If you have a simple condition check on some source field value for each correspoding node, use "if without else" or depending on the complexity of the condition you may use a udf to get the boolean outcome.
And for mapping from more than on type of source node, you may duplicate subtree for target node.
Regards,
Suddha -
ABAP MAPPING Querry - How to create Different Target NODE NAME as of Source
Hi,
In abap Mapping
<b>DATA READ FROM SOURCE XML NODE into <u>incode</u></b> ******
data: incode type ref to if_ixml_node_collection.
incode = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
<b>CREATE OUTPUT XML NODE WITH SAME NAME AS <u>'BUSINESS_DAY'</u></b> **
data: outcode type ref to if_ixml_node.
outcode = incode->get_item( index = 0 ).
data irc type i.
irc = msgtype->append_child( outcode ).
*<b>BUT TO CREATE OUTPUT XML NODE WITH <u>DIFFERENT NAME AS 'BUSS_DAY'</u></b>*
data: ws_val type string VALUE 'xyz'.
data: elementsender type ref to if_ixml_element.
elementsender = odocument->create_simple_element(
name = 'BUSS_DAY'
value = ws_val
parent = msgtype ).
<b>Please guide me how I can assign <u>incode</u> value to ws_val.
So that I can generate <u>OUTPUT XML NODE with different name as of SOURCE XML NODE</u></b>
i.e. How to create Different Target NODE NAME as of
Source with same Data
<Note>: I am using "How to... Use ABAP Mapping in XI 3.0 ver.1.00" and to create different NODE name as of source
is not given in it.
Thanks & Regards.Hi ABAPers,
Please Guide Me .....
<u>This is ABAP Mapping problem in XI.</u>
<b>How can I read data from incode into ws_val.</b>
data: <b>ws_val</b> type string
data: <b>incode</b> type ref to if_ixml_node_collection.
<b>incode</b> = idocument->get_elements_by_tag_name( 'BUSINESS_DAY' ).
Best Regards -
How to remove target node if source field value is empty SAP PI Mapping
Hello,
how to remove target node if source field value is empty in graphical Mapping.
Like if
MIddle name in source filed is empty, I would like to eliminate target field from out put XML.
Thank you
JohnHi Jhon,
If you want to remove all empty tags and you dont to complicate your message mapping, you can use a XSL, after the message mapping, to remove all the empty tags:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[not(@*|*|comment()|processing-instruction())
and normalize-space()='' ]"/>
</xsl:stylesheet>
Regards -
Child element of target node in message mapping getting suppressed
Hello All,
I am having mapping where i am trying to generate the target node based on some condition of the source structure ,this is working fine ,I am able to generate the target node once the condition gets satisfied ,but the problem is one of the child elements of the same node is not getting populated,its getting suppressed,i have some condition for the same
I checked the queues its showing value as
SUPPRESS
Value
Value ( in grey )
But still element is not getting generated..
I have added a condition used at the node function and apart from other condition of element..
If some body have the solution for the same,please help me out
Thanks in advance
RajeshHi Rajesh,
The Error is mostly cause of that the node and your child are in same context.
You got to remember that the parent node creates the context, and then the child element puts the value in it.
Try putting your child element to a higher context then mapwithdefault for your supress and then removecontext.
This Issue, you got to work it out with the node functions,
I had the same kind of issue in my mapping, it was rectified with the help of node functions as mapwithdefault, removecontext.
Further unless one sees the mapping of your issue it is a bit difficult to imagine it and answer it.
For more clarifications please give the full hierarchy, and the condition. As of now try with the node functions.
Thanks
Ashmi -
PI Message Mapping One Source to create two of the same Target Nodes.
Hi,
I have a source node that contacts the following.
"1234-5678".
When there is a "-" in the source node then I need to create two target nodes.
When there is no "-" in the source node then only create one node.
Since the source structure is a flat structure by on the target side as you can see I am trying to achieve a diep structure.
Please can you assist in how to do this with PI message mapping.
Regards
Willie HugoHi,
"1234-5678" only occurs once in the source. There is no source xml node that will occur more that once. The whole structure only occurs once. But on the target side I need one of the node to occur more than once if a hyphen is found in the source field.
Source Message - Always only one data node.
==============
<root>
<OnceOnlyNode>1234-5678</OnceOnlyNode> [1..1]
</root>
Target Message - Only two text node when "-" in source, else only one text node.
=============
<msg>
<text>1234</text>
<text>6789</text>
</msg>
How can this be done using standard PI message mapping functions. Can it be done?
Regards
Willie Hugo -
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!
OlianHi 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. -
Biztalk Map create duplicate target node
Using biztalk mapper, I need a target node to be duplicated.. I have created a simplified version of my issue. Please see below map
link for source and destination schema.
I need the target Option node to be duplicated for each OptionNotes. The value of OptionNotes is to be split by a pipe ("|"),
then map to target Code and Description.
The input is as below:
<ns0:Source xmlns:ns0="http://Test.SOAP.Source1">
<Option>
<OptionID>ID0_NoNotes</OptionID>
<OptionName>OptionName_0</OptionName>
</Option>
<Option>
<OptionID>ID1_NoNotes</OptionID>
<OptionName>OptionName_1</OptionName>
<OptionNotes>NOTE1|BLAH1</OptionNotes>
<OptionNotes>NOTE2|BLAH2</OptionNotes>
</Option>
</ns0:Source>
The output should be as below:
<Destination>
<Options>
<Option>
<Code>ID0_NoNotes</Code>
<Description>OptionName_0</Description>
</Option>
<Option>
<Code>ID1_NoNotes</Code>
<Description>OptionName_1</Description>
</Option>
<Option>
<Code>NOTE1</Code>
<Description>BLAH1</Description>
</Option>
<Option>
<Code>NOTE2</Code>
<Description>BLAH2</Description>
</Option>
</Options>
</Destination>
Tried to use Looping and combination with Value Mapping, but to no avail. Do I have to resort to inline xslt?
Thanks.Thanks for all your answers.
@Pi_xel_xar Your suggestion requires a change in the message schema.
@Nadeem We have already tried the solution on the blog, but it's not quite the scenario we face. The issue is the OptionNote is in the same layer as OptionID and OptionName.
We have used another tool, which has done this easily. We then get the XSLT and import it as part of Inline XSLT scripting functoid.
The XSLT produced was as below:
<xsl:for-each select="ns0:Source/Option">
<Option>
<xsl:for-each select="OptionID">
<Code>
<xsl:value-of select="string(.)"/>
</Code>
</xsl:for-each>
<xsl:for-each select="OptionName">
<Description>
<xsl:value-of select="string(.)"/>
</Description>
</xsl:for-each>
</Option>
</xsl:for-each>
<xsl:for-each select="ns0:Source/Option/OptionNotes">
<xsl:variable name="var1_resultof_cast" select="string(.)"/>
<Option>
<Code>
<xsl:value-of select="substring-before($var1_resultof_cast, '|')"/>
</Code>
<Description>
<xsl:value-of select="substring-after($var1_resultof_cast, '|')"/>
</Description>
</Option>
</xsl:for-each>
Thanks everyone. -
Single source to create multiple target nodes
Hi Guys,
I need to create multiple target node as many occurrence of source node. how should i achieve it?
Source node (1...999999) to Target node(1..1)
please suggest.
Regards
SwapnilHi Nutan,
Sorry formatting got messed up so posting again.
Sorry for the confusion. Target structure is 0..unbounded.
Source structure ...................................... Target structure
Message 1 ...................................................Message 1
ZHRMD_A07 (1...1)..........................................MT_EMPLOYEE (0....unbounded)
E1PLOG1(1...unbounded)................................ Field1
I need to create MT_EMPLOYEE multiple times depend upon occurences of E1PLOG1.
Regards
Swapnil
Edited by: Swapnil Bhalerao on Mar 3, 2010 12:41 PM
Edited by: Swapnil Bhalerao on Mar 3, 2010 12:47 PM -
Hi All,
What is the difference in creating a node in Webdynpro ABAP and mapping them onto ABODE form TO
creating the tables and nodes in Aodbe form and mapping them to WDA.
In which cases we follow which apporach..
When I need to work both with WDA and Adobe...where to create/handle the data first....when a user enters the data into a form that is run from WDA...In this case do the nodes to be created first in WDA and map them to FORM...or viceversa...
Please share more info..
Regards,
Lekha.Hi,
Since the number of times you want to create the target node is fixed i.e. 5, you can right-click on the target node in the message mapping and then select the option of "Duplicate".....Do this 4 times (1original + 4duplicates)...this will cause the addition of the node desired number (5) of times....now once the node has been duplicated apply an If condition on each of these nodes (original and duplicate)....This condition will check the existence of the source node and if the source node is present then your target will repeat 5 times...
Repeatition of the target node is possible only if the occurence is set to 0/1...unbounded
Make sure that you set the context of the source node properly.
Regards,
Abhishek.
Maybe you are looking for
-
Gmail fonts too small, hard to read but are fine using Chrome
I recently downloaded Firefox 4 because Chrome has been really slow and crashing a lot. But when I opened Gmail, all the fonts display very small (too small for comfortable viewing) and after trying to tweak preferences, clear cache and cookies, noth
-
Appraisal documents with Webdynpro application
Hi All, in my system i can see some of the webdynpro application for appraisals e.g. HAP_START_PAGE_UI with application hap_a_ess_start_page HAP_DOCUMENT_LINK with application hap_document_link etc.. but when i am trying to run the application i am
-
Is there a way to preserve the existing configuration when migrating from Solaris 9 (SPARC platform) to Solaris 10? I have never done it before, therefore; I am a little weary of it. If any one can lend a hand or a few tips and pointers, that would b
-
I have a very simple question: Is it possible for applescript to sample the color of a specific pixel on my screen and store it in a variable? (or three variables as the case may be) Thanks
-
Tried to upload a gallery on Wednesday and while it works fine on my machine, it seems no one else can access it. All they get is the spinning circle even after d/l the latest version of Flash. Any ideas? http://www.petemorey.com/ecuador-flash Thanks