Mapping help required - extension
Hi,
I 've done the mapping based on the below conditions
Let say 3 fields called : a,b,c
if a = RAM then
b = b/c
here b field is in one segment and a & c fields are in child segment of above segment.
Note : all the above fields occurance : 0 to 1
But, i need to display the target including with the above condition also i need the value of the field "b" should display at target side where the condition doesn't satisfy .. ie., a # RAM.
Here i 've tried with if then else condition...but that doesn't work.
Please help me out how can i get the output.
Thanks in advance for your help
Regards,
Y.Raj
Hi Yeshwant,
IF you have the source structure as:
segment
--b
---subsegment
a
c
then you may need these changes in Raj's mapping image
b-----------------------------------|
c (context changed to parent of c)--| useoneasmany -- divide
c ----------------------------------|
b-----------------------------------|
c (context changed to parent of c)--| useoneasmany -- else
c ----------------------------------|
Regards
Suraj
Similar Messages
-
XSLT mapping Help Required.
XSLT mapping Help Required.
Hi Experts,
I am New to XSLT Mapping. I am practising the below Example:
InputXML File:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
<ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
<Person>
<FirstName>Anshul</FirstName>
<LastName>Chowdhary</LastName>
<Gender>Male</Gender>
<Address>
<Street>2nd Main</Street>
<Houseno>83/b</Houseno>
<City>Mysore</City>
</Address> </Person>
</ns0:MT_XSLT_Source>
XSL StyleSheet File:
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen"
Xmlns:ns1=”http://XYZ.com/Test”>
<xsl:template match="/">
<ns1:MT_XSLT_Target>
<Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
<Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
</Name>
<Street> <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '),
ns0:Mt_XSLT_Source/Person/Address/Street)"/> </Street>
<City> <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City"/> </City>
</ns1:MT_XSLT_Target>
</xsl:template>
</xsl:stylesheet>
The Desired Output shuold be:
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_XSLT_Target xmlns:ns1="http://XYZ.com/Test">
<Title>Male</Title>
<Name>Anshul Chowdhary</Name>
<Street>83/b 2nd Main</Street>
<City>Mysore</City>
</ns1:MT_XSLT_Target>
I have refered the xsl in xml and i am getting the below Oupt in a Single line like this:
Anshul Chowdhary Male 2nd Main 83/b Mysore
I am Unable to display in Target XML Fomrat as shown above. Please check and do the needful.
Regards,
GIRIDHARHi,
I have used below for testing.
Input xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Persons111.xsl"?>
<ns0:MT_XSLT_Source xmlns:ns0="http://XYZ.com/gen">
<Person>
<FirstName>Anshul</FirstName>
<LastName>Chowdhary</LastName>
<Gender>Male</Gender>
<Address>
<Street>2nd Main</Street>
<Houseno>83/b</Houseno>
<City>Mysore</City>
</Address> </Person>
</ns0:MT_XSLT_Source>
xsl code:
<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/gen"
xmlns:ns1="http://XYZ.com/Test">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns1:MT_XSLT_Target>
<Title> <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender"/> </Title>
<Name> <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)"/>
</Name>
<Street> <xsl:value-of select="concat(concat(/ns0:MT_XSLT_Source/Person/Address/Houseno,' '),
/ns0:MT_XSLT_Source/Person/Address/Street)"/> </Street>
<City> <xsl:value-of select="/ns0:MT_XSLT_Source/Person/Address/City"/> </City>
</ns1:MT_XSLT_Target>
</xsl:template>
</xsl:stylesheet>
For testing in PI ,change the extension from .txt to .xsl and zip it and upload into PI as an imported archive .
Regards
Venkat -
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 -
Scenario mapping - help required
Scenario:
A Customer sends a material (for e.g., SUGARCANE) to the company (SAP Implementing). It processes it and send back as SUGAR.
The customer is charged for the services rendered.
The stock of sugarcane/sugar should be visible in the system.
Please guide me how to map this scenario.
I will be very much grateful.
Regards,
AnbuThis sales process is referred as Job Work in SAP.
Refer following SDN thread that can be helpful to you in understanding / reference:
- Sales Process of JOB WORK
If in case you have any concern or doubt about the process, do revert back.
But don't forget to put a effort search more information on JOB WORK for reference/understanding. So that you can specific to your requirement.
Regards
JP -
Dear Experts,
We are working in PI 7.1 Source and target structure are like:
Node1
F1
F2
F3
F4
Node2
F1
F2
F3
F4
Node2
F1
F2
F3
F4
The requirement like if F2's value is X then we have to pass only that field of that Node in the target side and if F2 is '0' then all the fields would be passed. Target structure is same as source.
Please advise how can I achieve this.
Regards,
KamiHi Kami,
refer the mapping concept wiki
Mapping Concepts in SAP XI - Process Integration - SCN Wiki
regards,
Harish -
Complex Mapping :-Help Required
Hi All,
I have a scenario XI--IDoc.
Sender structure is having one field as Description which will carry some informatiom.I have to read the Summary Field and if I get XAA1:686,XAA2:767 or XAA3:876 like this inside this inside this field than I have substring and take those value individually than we have to map it accordingly.
You can consider all these value will come separated by ,(comma) and based of the sbustring we have to map it.
Thanks,
Rakhi1) Pattern p = Pattern.compile("\\b([X][A-Z]{2}[0-9][:][0-9]{3})\\b");
we made a regular expression here and compiled it and then we make a object of class Matcher to match this compiled regex with our string
Matcher m = p.matcher(str);
//then we traverse through the results given to us my this matcher in an array form that is a array constituted by the different values that match this regex.....we traverse this array (m.find()) until this condition is true.....
then we add the result into the display queue.
while (m.find())
String s = m.group(1);
result.addValue(s);
(\\b is actually \b to include this \(escape character) i had used two \\
this is the real regex
\b([X][A-Z]{2}[0-9][:][0-9]{3})\b
\b means a seprator between words it can be anything tab or whitespace or new line
() we use these brackets to mark a word or a unit here this XAA8:456 is a unit so we put the reg ex for this inside braces
[X] single value mentioned means that it searches for only the single X character
the very next [A-Z]{2} means that it searches for any character in range A-Z and this rule searches for combination of two letters that follow this rule it means that it searches for two characters together following this i.e adjacent like DF, GY if you think that you want to further drill down your pattern and you will always have AA you can replace this [A-Z]{2} by [A]{2} so it searches for XAA
now the next thing should be a digit so we have 0-9 if you dont specify {3} or any number in curly braces it assumes that you are searching for a single character
then [0-9]{3} digits in the end.....
use this site if you want to learn regex you can test your regex here
http://regexr.com/#
working on your next req -
Mapping Help required for ORDER Idoc to EDI file
Hi
My source strcture is as follows
E1EDP01
E1EDP01
E1EDPT1 (TDID=0001)
E1EDPT2
TDLINE = abcd
E1EDPT1 (TDID=0001)
E1EDPT2
TDLINE = XYZ
and my target line item is mapped with TDLINE(Context E1EDP01)-exist then createif LineItem(This is working fine but item filed is failing)
The logic to populate itemFIELD1 is if E1EDT1(TDID==0001) then pass TDLINE to ItemFIELD1, how to map this
(Sometimes E1EDPT2 populate multiple times for one E1EDPT1)>and my target line item is mapped with TDLINE(Context E1EDP01)-exist then createif LineItem(This is working fine but item filed is failing)
Why don't you create the LineItems only when TDID = 0001 because this will ensure to populate item fields with correct value.
The mapping logic to produce the LineItems should be like this..
IF (TDID = 0001) THEN (TDLINE set context to E1EDPT1)---RemoveContext---LineItem.
>The logic to populate itemFIELD1 is if E1EDT1(TDID==0001) then pass TDLINE to ItemFIELD1, how to map this
In this mapping make sure the context of TDLINE is set to E1EDPT1 and then use RemoveContext ---SplitByValue to the output of "IF" function. e.g.
IF (TDID = 0001) THEN (TDLINE set context to E1EDPT1)---RemoveContext---SplitByValue---FIELD1. -
Mapping Help required in Node count
Hi Friends,
i need to count the number of occurences of source node. i'm able to count the occurences.
but i have some problem with this node. Source node happens only some times.
Source node.
<Event>
type- attribute
<Date>20092509</Date>
</Event>
Sometimes Event tag comes as </Event> without any type value then i need to pass " 0 " value.
Cases :
1. if empty Event tag happens then need to Pass "0"
2. <Event>
type
<Date></Date> in this case also need to pass 0.
3. <Event>
type "Order"
<Date>20092509</Date>
</Event>
<Event>
type "Delivery"
<Date>20092509</Date>
</Event>
in this case need to pass node count as "2"
please suggest me on this;
Regards,
DeepsHi sandeep,
Map like this..
Date--\
then
Date---->NotEquals---->if -----\
Constant[]/ \
else \
Constant[0]/ \
then
Date----->Exisists---->if-------- ----->Output
else
Constant[0]/
I tested this...
Working Fine...
Thanks. -
Inbound Delivery Idoc- Create ... help required
Hi,
I'm using DELVRY01 idoc to create deliveries. when i execute using test tool, the idoc gets created with error status 51 with following errors:
Field EXIDV empty
Message no. VL243
Diagnosis
A required field in the intermediate document (IDoc) is not filled. This is the field EXIDV in segment 000042.
Field VHILM empty
Message no. VL243
Diagnosis
A required field in the intermediate document (IDoc) is not filled. This is the field VHILM in segment 000039
But these errors reflect to handling unit from segment E1EDL37 and its sub nodes which are really NOT required in my case.
Now confused if i'm using a wrong reference of creating inbound delivery. Pls shre some thoughts on it on troubleshooting this issue.Hi Prabhu
these two fields are mandatory .. fill below details
E1EDL37-Handling unit header
EXIDV <XXXXXXXXXXXXX> External Handling Unit Identification
GWEIT <LB> Weight Unit Tare
BRGEW <000XX> Total Weight of Handling Unit
VHILM <Dummy Packing Material> Packaging Materials
E1EDL44-IDoc: Handling Unit Item (Delivery)
VBELN <Delivery nO> Sales and Distribution Document Number
POSNR <900004> Item number of the SD document
EXIDV <XXXXXXXXXXXXX> External Handling Unit Identification
VEMNG <00001> Base Quantity Packed in the Handling Unit Item
Dont forget to create Dummy packing material no...
i think above mapping helps you...
Thanks
Ramesh -
XSLT Mapping - user defined Extension function
Hi to all,
can somebody helps me, please?
I need an own function, that can be used by the XSL Mapper. First I have only tried the sample given in Path <BPELPM>\integration\orabpel\samples\demos\XSLMapper\ExtensionFunctions
There is a java file with the defined functions and a xml file with the definition of this function for the mapper and last but not least a jar-file with the java class.
I have copied the jar to <JDEV_HOME>\jdev\lib\ext directory and in JDeveloper I have added SampleExtensionFunctions.xml to Tools->Preferences->XSL Map -> "User Defined Extension Functions Config File" field. After a restart of JDeveloper I find 2 new functions in the "User Defined Extension Functions" component palette page when a XSL Map is open. That's fine.
But if I test the mapping I get an error: "Failed to transform source XML.
java.lang.NoSuchMethodException: For extension function, could not find method org.apache.xpath.objects.XNodeSet.replaceChar([ExpressionCotext,]#STRING, #STRING)."
What is wrong?
Thanks in advance of your answer
best regard,
unoOracle XML support Extension function.
For example:
If we would like to import FAQDBUri.class with user-defined java functions, like TranslateDBUri(), we can write XSL file like this:
<xsl:template match="/" xmlns:dburig="http://www.oracle.com/XSL/Transform/java/FAQDBuri">
<xsl:variable name="urladd" select="dburig:TranslateDBUri($url)"/> -
Help required on Execution of Surveys through E-mail Campaigns
Dear all,
Our Client wants to execute the Customer Satisfaction Survey through an E-mail Campaign and wants to receive the customer feedback to evaluate the customer response.
I have the following concerns to map this requirement in SAP CRM
1. as per some SAP documentation we have to create an URL link for our Survey, here how can we insert this link in to an E-mail? Should we need to create a personalized E-mail form to insert this link?
2. Upon customer clicks on this URL link, and enters the feedback form, how the responses are getting back to CRM server and where the Questions and answers are storing in SAP?
3. What configuration do we need to do in SAP CRM to achieve this requirement?
4. How can we evaluate the Customer answers and responses without integrating BIW system?
5. What standard reports available in SAP CRM to evaluate the customer response based on ratings given to the each answer?
6. How to track whether customer review the mail or not, in case if customer doesn't want to give the feedback?
I believe that, in SAP CRM a standard solution and reports will be available to address this requirement. I request you to help me in resolving the problem.
it would be helpful if you can refere andy step by step configuration manual for this requirement.
Your suggestions and help will be highly appreciated.
Thank you
Raghu ramThere are quite a few threads with these questions answered in this forum:
SAP CRM: Marketing -
Mapping Help for replacing source value
Mapping Help for replacing source value
Posted: Mar 14, 2006 1:06 AM Reply
Hi all,
I am unable to do transform the source value to required target value,
From Source ADDRESS_TYPE = 'HOME' should be replaced with 03 to target field ANSSA, and 'MAIL' to be replaced with 05, I am trying to do it but i am unable to handle it, please give u r valuable suggestions,
The source structure is like this,
- <Event ID="239" TRANS_TYPE="ADR">
<PersAddr GEO_LOC_CD="US" EMPLID="29" ADDRESS_TYPE="HOME" EFFDT="02/15/2006" ADDRESS1="92nd Floor" ADDRESS2="812backstreet" ADDRESS3="" ADDRESS4="" CITY="London" COUNTY="" STATE="AN" POSTAL="EC2N 4AG1" COUNTRY="GBR" KEY1="29" KEY2="HOME" KEY3="02/10/2006" />
<PersAddr GEO_LOC_CD="US" EMPLID="29" ADDRESS_TYPE="MAIL" EFFDT="02/15/2006" ADDRESS1="92nd Floor" ADDRESS2="812backstreet" ADDRESS3="" ADDRESS4="" CITY="London" COUNTY="" STATE="AN" POSTAL="EC2N 4AG1" COUNTRY="GBR" KEY1="29" KEY2="MAIL" KEY3="02/10/2006" />
</Event>
REGARDS,
sridharHi,
This can be done using user-defined function as well.
Code the function as...
if(Addr_Type.equals("HOME"))
return "03";
else if(Addr_Type.equals("MAIL"))
return "05";
else
return "Invalid Address Type";
Here, Addr_Type is Input String Argument for this function.
Map this function between ADDRESS_TYPE and ANSSA.
Regards,
Uma -
Need Mapping Help: Generate index if value comes
Hi Experts,
I need mapping help to generate index if value comes form source. we have 4 fields in item level of source and target side we have to pass the these filed values and sequence number.
below given the structures:
Source: Target:
Item Item
A1 Text
A2 Seq_No
A3
A4
my requirement is if A1 filed values comes from source we should pass to text and pass seq_no to constant-1, same as A2,A3 and A4 filed values also we should pass to text and seq_no for A2 is 2 and A3 is 3 and A4 is 4. suppose if A1 value is not coming from source we should pass seq_no for A2 is 1. if A1 and A3 filed values are not coming from source then we should pass seq_no for A2 and A3 are 1 and 2.
can you please help me how to achieve this. appreciate for your support.
Regards,
Sanjay.Hi Sanjay,
you can try this mapping
1. Generate the target 4 ITEM's by duplicating the subtree as shown below 3 times.
Now create the each target item starting from first by mapping them to A1,A2,A3 and A4 respectively. I have shown the first ITEM mapping above. similarly you can map A2 to ITEM[1],
A3 to ITEM[2] and A4 to ITEM[3].
2. Now you can map the A* fields to Text one to one as shown below
Please repeat the same for A2,A3 and A4 to respective Text fields.
3.
First seq_no field as shown
and similarly others as shown
Regards
Anupam -
KPI Reports in BI - Help required
Hi,
I am having a requirement - KPI Report needs to show KPI target values. These data are neither stored in any transactional documents (such as Notification or Work Order) nor in any additional fields that can be used via customizing. This data is coming from Legacy system only which require lot of conditions & customizations to arrive in to final KPI target values.
Can you please help me to anser to following questions?
1. Is there any possibility to map this requirement with Business Content in BI? (I believe No)
2. What is the best possible solution to implement this scenario - I mean first load this Legacy data in to ECC side tables and extract the same using Generic Extractor OR Load the data in to BI system and utilize for reporting?
Thanks!
Best regards,
Venkata ChalapathiYes, it takes bit more time for calculations.
For that only BW system is there. for complicated calculations. Do calculations or derivation at extraction level(from ODS to cube) then at reporting side.
Or if you are planning to do at R/3 side again it takes same amount of time. Main drawback is we dont have any control on data calculations. For any adjustment we need to depend on source side. for any change also. Very tidious process to control.
So i suggest, avoid R/3, load directly to BW and do calculations, so we have complete access and control over it.
Srini -
Java Mail,SMTP server not starting,help required urgently
Hi i have been working on java mail .Yesterday it was working ok but today suddenely i am getting this thing.its not starting the smtp server i guess,just exiting and get the command prompt ..dont know what to do.help required how to go about this error
am pasting the debug information.please check and let me know
the compilation ,smtp server and others are all valid
thanks
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Pavan>cd C:\Program Files\Java\jdk1.5.0_07\bin
C:\Program Files\Java\jdk1.5.0_07\bin>javac jdbcExample3.java
C:\Program Files\Java\jdk1.5.0_07\bin>java jdbcExample3 smtpserver address
DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_07\jre\lib\
javamail.providers (The system cannot find the file specified)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax
.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsyste
ms, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com
.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLSt
ore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsyst
ems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.su
n.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=jav
ax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP
3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.
sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STOR
E,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Prov
ider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems
, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.S
MTPTransport,Sun Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: C:\Program Files\Java\jdk1.5.0_07\jre\lib\
javamail.address.map (The system cannot find the file specified)
C:\Program Files\Java\jdk1.5.0_07\bin>The debug output doesn't show an obvious problem. You're
going to have to actually debug your program. A debugger
might be helpful.
Maybe you are looking for
-
Can I create a system disk on one machine, and swap it into another?
I just reinstalled the Win 7 Pro operating system, using lenovo install disks, on my 3820/K1000m W530. I may end up getting a 3840QM/K2000M W530, and wanted to know if I can just swap the disk I just made into the new machine, this avoiding the issu
-
My MacBook Air is not allowing me to see myself and others during gchat. The little light beside the camera goes green, so it's working but I still cannot view anything. I have used the camera and computer for gchatting with no problems previously. T
-
Can't See Camera Connected via USB in CS2 Bridge
I've connected a Canon PowerShot (as previously) via a USB port. When I open "My PC' in WinXP, I see the Canon along with my other drives and can view the jpeg image files. When I navigate to "My PC" in CS2 Bridge, I can see all drives except the Can
-
Multiple account assignment and copy of po line item quantity to x lines
Hi, I am wandering if it is possible to automate the copy of the first line presented for 10pc in multiple account assignment screen on PO line item level to 10 lines with quantity 1 in the same multiple account assignment screen. This is of course
-
Error in Excise Invoice for Export
Dear All, I am making excise invoice for Export. I have different series group for export and domestic. When I make a excise invoice from billing document for export which has different billing document type than domestic, the excise duty ( 16%, 2% a