MESSAGE MAPPING PROBLEM PLS HELP
hi forum i have a problem in message mapping...
i have a file to file scenario...with a BPM..
the components are:
1. one outbound async MI:-> MI_OA_fileSender
2. one abstract async MI:-> MI_AA_fileSender
the above two has messsage structure as:
<ns0:MT_sourceFile xmlns:ns0="http://zpoc.com.test/rana3">
<recordset> 1...1
<record> 1..unbound
<batch_num/> 1..1
<quantity/> 1..1
</record>
</recordset>
</ns0:MT_sourceFile>
3. one abstract async MI: -> MI_AA_fileDestination
4. one inbound async MI:-> MI_IA_fileDestination..
the above two has messsage structure as:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
<recordset> 1..1
<record> 1..unbound
<rec_number/> 1...1
<qty/> 1...1
</record>
</recordset>
</ns0:MT_rana3_destinationFile>
inside the BPM i m doing a simple one to one interface mapping between MI_AA_fileSender and MI_AA_fileDestination AND then use a send step to send it to receiver service. But inside the graphical editor, for the message maaping in the interface mapping, i change the target structure a bit by duplicating <rec_number> making it:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_destinationFile xmlns:ns0="http://zpoc.com.test/rana3">
<recordset> 1..1
<record> 1.. unbound
<rec_number/> 0..1
<rec_number/> 0..1 //did right click and "duplicate sub-tree, so it becomes 0...0"
<qty/>
</record>
</recordset>
</ns0:MT_destinationFile>
But i dont change the original structure of MT_destinationFile.
Now in the resultant file in the receiver side i recive two <rec_number> tags....
but since i didnt change the original structure of MT_destinationFile.....but i only made a change in the mapping by duplicating the node <rec
_number>(right click and done "duplicate sub tree").............SHOULD IT NOT THROW AN ERROR
Message was edited by:
sudeep dhar
Message was edited by:
sudeep dhar
>.............SHOULD IT NOT THROW AN ERROR
Not necessarily.
See, XI won't realize, by default, a schema validation in your messages. If you want a validation, you'll have to implement one, as described in
http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm
However, for some particular steps in BPM, I have observed that an invalid XML will some times result in a error in BPM execution. In particular, if you have switch steps, container operation steps and/or correlations where you use a particular field of that message, it may throw some exception when you have an invalid xml. Also, I have observed some errors with conditional receiver determination for invalid messages.
As a best practice, if you have any kind of dependency on a particular message inside your system (like switches, container operations, correlations, condition in receiver or interface determination etc), it is a good idea to implement a schema validation.
Also, if you do want to create a thrustable scenario, you might want to perform schema validation for all your output messages.
Regards,
Henrique.
Similar Messages
-
Urgent: Sessions problem pls help me
Hi all,
Its already late to post this problem.pls help me urgently.
I have a servlet & two jsp's. first i request servlet, it processes something and forwards request to my first jsp. In that jsp on a button click, i'm displaying a new popup by calling showModalDialog. this dialog gets data from the same servlet but it forwards to my second jsp.(second jsp can be seen in dialog)
Now if i submit form from my second(dialog) jsp, the servlet reports that session has expired. I tried a lot but invain. any one who helps me is appreciated well by all of our forum.
waiting 4 u r reply,It could be that you have cookies turned off and you're not using URL Rewriting.
In J2EE, the first time your browser makes a request to the server, the server responds and appends a SESSION_ID parameter to the request as well as storing a cookie with the SESSION_ID.
The second time your browser makes a request, the server checks for the cookie. If it doesn't exist it checks for the parameter. If neither exist the server assumes its the first time your browser has made a request and behaves as describe in the previous paragraph.
In your case when you submit the form if you have disabled cookies and the action attribute doesn't have the SESSION_ID paramter appended to the url, the browser will assume it's a first request. The user will not be logged in, hence your session has expired error.
To fix this you need to encode the URL in your JSP. You can use the struts html:rewrite tag or the HttpServletReponse.encodeURL method, or if you're using JSP 2.0 the JSTL c:url tag. -
Boot problem == pls HELP
I have use the utility disk and format the machintos drive , and use Extended (Journaled , Encrypted) , it ask me for a password (typed the password, confirmed the password - done) , after that i tried to install a fresh copy of Lion (i waited to be downloded from apple.com - done) after that it said that the fresh copy it will be installed and it will reboot by itself -> done ... from here the problem it's starting .... now my macbook air , it dosent start anymore it keep showming me, instaid of the apple sign from the start , a sign like the one from ghost busters (but without the ghost in it ) , i have tried to boot from cd , from usb , nothing dosent seams to be working.
If anyone know a solution to this problem, pls HELP! Thank you in advance...
p.s. before i had 2 hard drives that show up when i press the ALT button (machintos hd and utility drive, or something like that) now.. the only thing that it's showing me is : mac os base system , and if i try to use partition magic or something else, from a usb, it will tell me something about a bootguard , but i don't know how to insert the password.Glad your issue is fixed. Thanks for the update!
Click if you want to Thank someone. If Problem is resolved, so that others can make use of it. -
How to solve this problem, pls help when, I try to see remote camera system(spec dvr) from home. The Error I get is "Dual streaming is required for HTML viewing"
I had the same probelm and found that the problem lies with 64bit programs such as safari and microsoft internet explorer. I have resolved the issue on my PC based server by using a 32 bit ie and same on my mac by using the same running windows under parallels.
So far the problem with the 64 bit side of it is still to be resolved.
Hope this helps and gets you guys up and running until suchtime a 64 bit solution is found.
Craig -
Mapping Problem . or help in UDF
Hi...
I am having problem in mapping.
I am having 3 messages in the source structure and 1 message in the target structure. 3:1 mapping.
Source Messages:
Message1: Warehouse Details(plant name,warehouselocation)
Message2:Supplier Details(suppid,suppname,leadtime,matname,cost)
Message3:Input(matname,plant,unit,item,itemname,ReqQty,OrderQty,Cost,suppid,suppname,leadtime,date,warehouseloc)
Target Message:
Output
If the Availability field in Message3 !=0, then it should map warehouseloc of message 1 to the Output mesage. or else it should map 0 to the warehouse and map message 2 items to the output message.
Source messages are 0:unbounded.
Could you please help me out in this issue. or else can you please tell how to write the userdefined function for that.
Below is the structure.
Source Message:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:getWareHouseDetailsResponse xmlns:ns1="http://DefaultNamespace">
<getWareHouseDetailsReturn>
<Plant>
<plantName/>
<wareHouseLocation>W001</wareHouseLocation>
</Plant>
</getWareHouseDetailsReturn>
</ns1:getWareHouseDetailsResponse>
</ns0:Message1>
<ns0:Message2>
<ns2:GetPreferredSuppliersResponse xmlns:ns2="http://tempuri.org/">
<ns2:GetPreferredSuppliersResult>
<ns2:Supplier>
<ns2:SupplierId>S001</ns2:SupplierId>
<ns2:SupplierName>TRW</ns2:SupplierName>
<ns2:LeadTime>1111</ns2:LeadTime>
<ns2:MaterialName>M001</ns2:MaterialName>
<ns2:Cost>1000</ns2:Cost>
</ns2:Supplier>
</ns2:GetPreferredSuppliersResult>
</ns2:GetPreferredSuppliersResponse>
</ns0:Message2>
<ns0:Message3>
<ns3:MT_Output xmlns:ns3="http://BlockTest">
<Material>
<Matname>M001</Matname>
<Plant>P001</Plant>
<Unit>KG</Unit>
<Item/>
<Itemname/>
<ReqQty>5</ReqQty>
<AvailQty>0</AvailQty>
<Cost/>
<Suppid/>
<Supname/>
<LeadTime/>
<Date>12.05.2008</Date>
<OrderQty>0</OrderQty>
<WarehouseLoc/>
</Material>
<Material>
<Matname>M002</Matname>
<Plant>P002</Plant>
<Unit>PC</Unit>
<Item/>
<Itemname/>
<ReqQty>5</ReqQty>
<AvailQty>5000</AvailQty>
<Cost/>
<Suppid/>
<Supname/>
<LeadTime/>
<Date>12.05.2008</Date>
<OrderQty>0</OrderQty>
<WarehouseLoc/>
</Material>
<Pcost/>
<Tcost/>
<Ocost/>
</ns3:MT_Output>
</ns0:Message3>
</ns0:Messages>
Target Message:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns3:MT_Output xmlns:ns3="http://BlockTest">
<Material>M001</Material>
<Plant>P001</Plant>
<Unit>KG</Unit>
<Item></Item>
<Itemname></Itemname>
<ReqQty>5</ReqQty>
<AvailQty>0</AvailQty>
<Cost>1000</Cost>
<Suppid>S001</Suppid>
<Supname>TRW</Supname>
<LeadTime>1111</LeadTime>
<Date>12.05.2008</Date>
<OrderQty>0</OrderQty>
<WarehouseLoc>0</WarehouseLoc>
</Material>
<Material>M002</Material>
<Plant>P002</Plant>
<Unit>KG</Unit>
<Item></Item>
<Itemname></Itemname>
<ReqQty>5</ReqQty>
<AvailQty>0</AvailQty>
<Cost>1000</Cost>
<Suppid/>
<Supname/>
<LeadTime/>
<Date>12.05.2008</Date>
<OrderQty>0</OrderQty>
<WarehouseLoc>W001</WarehouseLoc>
</Material>
</ns3:MT_Output>
</ns0:Message1>
</ns0:Messages>
Edited by: leelaratnam morampudi on Oct 14, 2008 1:13 PMI think there is no need to use UDF, you can achive this by using IF function.
to make your mapping simple, in your message mapping on MT_Output, right click your mouse and click on duplicate subtree. you will now have two structure in your target.
first one is for if AvailQty != 0 then warehouseloc of message 1 to the Output mesage
and second one is for if AvailQty = 0 now map 0 to the warehouse and map message 2 items to the output message.
try this and let us know if you face any issues. -
Message Mapping Problem with UTF-16LE Encoded XML
Hello,
we have the following scenario:
IDoc > BPM > HTTP Sync Call > BPM > IDoc
Resonse message of the HTTP call is a XML file with UTF-16LE processing instruction. This response should then be mapped to a SYSTAT IDoc. However the message mapping fails "...XML Parser: No data allowed here ...".
So obviously the XML is not considered as well-formed.
When taking a look at SXMB_MONI the following message appears: "Switch from current encoding to specific encoding not supported.....".
Strange thing however is if I save the response file as XML and use the same XML file in the test tab message mapping is executed successfully.
I also tried to use a Java Mapping to switch encodings before executing message mapping, but the error remains.
Could the problem be, that the codepage UTF-16LE is not installed on the PI system ? Any idea on that ?
Thank you!
Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PM
Edited by: Florian Guppenberger on Feb 2, 2010 2:29 PMHi,
thank your for your answer.
This is what I have tried to achieve. I apply the java conversion mapping when receiving the response message - i tried to convert the response to UTF-16, UTF-8 but none of them has helped to solve the problem.
I guess that using adapter modules is not an option either as it would modify the request message, but not the response, right? -
Request Message Mapping Problem
Hello friends,
I am working in XI 2.0 and
my senario is sap R/3->XI->File Adapter
I take an idoc from the SAP R/3 system. and that comes properly to XI. I already created Data type, Message Type,
Interface Type, Message Mapping and Interface Mapping in Desing. and all the configuration part.
but when i send an idoc to XI system and check in SXMB_MONI at that time it shows me a green flag. means Inbound is Proper but It does not execute further steps.
like Request Message Mapping, Call Adapter, Response.
Can any one help me to solve this situation..
Thanks in Advance.hi Shankar,
I am able to solve the previous problem. by restarting my m/c.
Now if any one know that how to configure RFC adapter.
it always give me error like.
<b>Attempt to start RFC adapter failed: com/sap/mw/jco/JCO$Record</b>
And this is due to I am not able to connect to other R/3 system.
In SM59 transaction
<b>AI_RFCADAPTER_JCOSERVER</b> - TCP/IP connection
when i register my program id to <b>Xmb2RfcService</b>
then it gives me error when i am testing my connection.
<b>program Xmb2RfcService not registered / CPI-C error CM_ALLOCATE_FAILURE_RETRY</b>.
so, can any one help me out to solve this problem.
how to register Service in XI.
Thanks,
Gaurav Jain
Message was edited by: Gaurav Jain -
Message mapping problem: BAPI with range table parameters
A kind hello to all,
I try to call the BAPI_ALM_ORDERHEAD_GET_LIST in a 4.70 system via RFC connector. The configuration already works with another BAPI. With this here I get message mapping exception:
Trace level="1" type="T">com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Zielelement /ns1:BAPI_ALM_ORDERHEAD_GET_LIST kann nicht angelegt werden. Prüfen Sie, ob die XML-Instanz für die Ausgangs-XSD und die Zielfeldzuordnung die Anforderungen der Ziel-XSD erfüllt. at com.sap.aii.mappingtool.tf3.AMappingProgram.start
(How can I switch the trace language to English easily? I try to translate:
"BAPI_ALM_ORDERHEAD_GET_LIST cannot be created. Check if the XML instance meets the requirements for the output XSD and the destination field mapping meets the requirements of the destination XSD.")
But the mapping test tool in the Integration Builder Design does not report any warning or error.
My guess is that the problem lies in the parameter structure of the BAPI_ALM_ORDERHEAD_GET_LIST: I have to fill the IT_RANGES selection range table, so it looks as if I need several instances of the item in the corresponding XML. Can I use "Duplicate tree" in the mapping editor? Here I got another exception?
Many thanks for any help!
Regards,
CarstenHi Udo,
you gave the final hint, indeed I used a XML file that was not evidently not compliant to the message type I created (even though it had been validated by Altova XMLspy).
From now onwards I only use the "Create instance" function of the test tool to create the XML body of my test messages...
Thanks a lot,
and best regards,
Carsten -
Hi,
Question:
1. What is java mapping.
2. How I use java mapping/UDF in message mapping
for my below scenario
In my Request XML there are 2 fields.
In my Response XML there are 2 fields.
Field 1 of Request XML needs to be mapped directly to
Field 1 of Response XML.
Field 2 needs to be passed as paramter to java class and
java class will be give response that will be mapped to
Field 2 of Response XML.
Pls advice . It is urgent.
RegardsHi Rac,
Java mapping can be used when you have complex mapping structures.
We can do most of the times for our requirements through Graphical mapping.
When the structures are very complex to build you can go for SAX (Simple API for XML) or DOM (Document Object Model) parsers.
Message mapping internally generates DOM parser.
Java Mapping in XI
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rnd_rankvalue#
SAP Network Blog: Implementing a Java Mapping in SAP PI
/people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
Java Mapping (SAP Library - Partner Connectivity Kit)
http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
SAP Network Blog: XI Java Mapping Helper (DOM)
/people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
SAP Network Blog: Testing and Debugging Java Mapping
/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
Binary Conversion in XI - Java Mapping - Code Gallery - Wiki
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava%2bmapping
SAP Network Blog: "JAVA MAPPING", an alternate way of reading a CSV file
/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
Thanks,
Satya Kumar.
Reward points if it is useful.. -
I imported my oracle 8.1.5 database dump in oracle 8.1.7 but when I want to connect to my instance thru a client machine one error message comes as "
problem in connecting to the database, check whether it is started or contact sys admin" whereas the database is in open state.
Then when I connected to sqlplus at the server, it gets connected but some messages also come as below"
ORA-06553: PLS-213: package STANDARD not accessible
Error accessing package DBMS_APPLICATION_INFO
ERROR:
ORA-06553: PLS-213: package STANDARD not accessible
Could anyone pls help..What is the result of
SQL> show parameter PLSQL_V2_COMPATIBILITY
? -
How to Alert RFC connection failure via message mapping? Kindly Help!
Hi Experts,
I have a JMS - XI - RFC scenario.
JMS receives the Rosattenet PIP contents and sends it to RFC function module in remote SAP R/3 system.
I have a requirement where I have to monitor RFC connection failure because of the remote R/3 system being down. I have to send a email alert where the subject contains the PIP number to understand for which PIP the connection failed.
The PIP number exists in the PIP content at the interface.
If I use the Alert configuration in the runtime workbench for monitoring then I cannot dynamically pass the PIP number.
Only way I think of triggering alert is in the message mapping via a Java UDF.
But I am not sure how can I do this? How do I check in the UDF if RFC connection has failed? Is this the correct approach?
How to acheive my requirement? Note that my email subject content is dynamic bacause if PIP number.
Please help!
Thanks
Gopal
Message was edited by:
gopalkrishna baligaHi Gopal,
what version/sps of XI are u running?
The easiest way to do what u want inside a UDF is to
1. use JCo to try estabilish a connection to the remote SAP System
2. if that fails, use JavaMail to send an email message
Let your UDF work on the PIP number, accepting it as input, and (maybe) returning it as output if everything goes ok. Otherwise break the mapping execution as described by Michal in one of his last weblog (using Dynamic Configuration).
Note that the above method doesn't guarantee that the message will be actually delivered, as some seconds could last between your check and the real RFC delivery operated by the Adapter Engine...
I am evaluating a way to do the same with Alert Framework. I will let you know the result!
Cheers,
Alex -
Message mapping problem / experts needed / UDF?
Hello experts,
I have the following problem in a message mapping:
Source structure is as follows:
- Node a (min 1, max 999)
- Subnode b (min 0, max 999)
- Each Subnode b has the element "number" (1,1)
This structure must be mapped to the following target structure:
- Node c (1,999)
- Subnode d (0,999)
- Each subnode d has the following elements:
- e1
- e2
- e3
- e11
1 Source node a should create 1 target node c.
All numbers in all subnodes b of one source node a should be mapped to the e1, e2,...e11 elements of the target structure. As one target node d can only contain up to eleven numbers, there must be several d nodes.
I have already tried to create a UDF, but it does not work.
Any experts who would like to share their knowledge?
Thanks in advance.
CHRISTOPH
Edited by: Christoph G. on Apr 23, 2008 10:46 PMHello again,
meanwhile I have worked hard on it and I have found the solution (just one UDF (queue function) which gets the article numbers as well as constant(targetField). So the UDF covers the creation of the "groups" as well as the mapping of the article numbers.
It was really interesting and it made me ambitious to find the solution myself I do not have access to the system today, but I will post my solution as far as I have access again. Maybe you still want to search for a solution? It really may be fun, just like some kind of a puzzle game.
In order to make it more clear, here comes the source and target structure with an example. Let me once more explain it: In the source, there are positions, each with unlimited article numbers. Each position will create a targetPosition. The node "targetPosition" has the subNode "articlenrs" (unbounded). Articlenrs has 11 differnet elements, calles a1, a2, a3, ..., a11. That means, all article numbers from a source postion should be mapped to "groups of 11 target article numbers". Please be aware the there are 11 differnet target fields for article numbers: a1, a2, ... a11.
I think that' why the solution of Liang Ji and Rohit Kalugade will not work...
SOURCE
<position>
<articlenr> 123 </articlenr>
<articlenr> 456 </articlenr>
<articlenr> 4783 </articlenr>
<articlenr> 123 </articlenr>
<articlenr> 456 </articlenr>
<articlenr> 4783 </articlenr>
<articlenr> 123 </articlenr>
<articlenr> 456 </articlenr>
<articlenr> 4783 </articlenr>
<articlenr> 123 </articlenr>
<articlenr> 496 </articlenr>
<articlenr> 4783 </articlenr>
. (unbounded)
</positon>
<position>
<articlenr> 543 </articlenr>
<articlenr> 865 </articlenr>
<articlenr> 643 </articlenr>
</positon>
TARGET
<targetPosition>
<articlenrs>
<a1> 123 </a1>
<a2> 456 </a2>
<a3> 4783 </a3>
<a11> 496 </a11>
<articlenrs>
<articlenrs>
<a1>4783 </a1>
</articlenrs>
</targetPosition>
<targetPosition>
<articlenrs>
<a1> 543 </a1>
<a2> 865 </a2>
<a3> 643 </a3>
</articlenrs>
</targetPosition>
Thanks,
Christoph
Edited by: Christoph G. on Apr 30, 2008 10:20 AM -
Sync Message Error. Pls help very urgent.
Hi,
When I ma sending sync messages in XI I am getting error
<SAP:Code area="PERSIST">MSG_NOT_FOUND</SAP:Code>
<SAP:P1>4871E583B6C24C3CE1000000AC140A3B</SAP:P1>
<SAP:P2>PE_ADAPTER</SAP:P2>
Pls help.Http sender and Http Receiver so no adapter is used..
-
Message mapping problem when testing
Hi guys,
I'm having a tiny little problem with a message mapping.
When I'm testing a message mapping I'm getting the following error:
12:28:35 Start of test
Cannot produce target element /ns1:MT_Encomenda/Num_doc. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
12:28:36 End of test
I'm importing a xml file for testing, but if I fill in the files at hand using the xml instance i get no problems.
Any ideas?hi,
make sure the target field /ns1:MT_Encomenda/Num_doc is getting populated from the source message.
you would see this error if a required field in the target structure is not populated.
cheers,
naveen -
Hello,
I have hp pavilion dv4 lap,in this lap has some hard disk problem,when i am turn on the lap that screen shows this message "The smart hard disk check has detected an imminent failure.To ensure not data loss,please backup the content immediately and run the hard disk test in system diagnostics".
After that i was diagnostics the system but no changes in the lap,,again again lap shows hard disk error(301).
Then i am chosen the enter option to start up the lap it take long time for openning the windows,after enter the windows that also shows about the hard disk error in within few minitues,
What can i do?
This lap bought at 12-oct-2012 from malasiya,now im in tamil nadu,how to solve the problem please help me.Hello srhk. Thank you for posting on the HP Forums.
I understand the hard disk is experiencing issues. Error 301 indicates the hard disk possesses a hardware defect. I would contact HP Phone Support for assistance, or purchase an equivalent hard disk.
If you choose to contact HP, their options will be based on the warranty status of the computer. If you do not have this information, you can locate it at this website: http://h20566.www2.hp.com/portal/site/hpsc/public/wc/home?ac.admitted=1384280905804.876444892.199480...
You can utilize this website to learn how to contact HP appropriately, based on your region: http://www8.hp.com/us/en/contact-hp/ww-contact-us.html
Please let me know if you have any other questions or concerns.
Mario
I worked on behalf of HP.
Maybe you are looking for
-
How do I get a text file from Photoshop to work in the main sequence in pp?
How do I get a text file to work properly in the master sequence. I moved it from Photoshop, which I learned to do from a tutorial, but when I move the animated text sequence to the master, it either isnt running, or it is scaled way too big. How do
-
This happens only in Firefox w/o addons; under Mac OS X 10.6.7
-
May I delete the other three or must I keep PSE 13 to utilize PSE Premier 13?
-
How to a ssign the iViews & Workset of the Role
Hello gurus, Listed below are the procedures for organizing the reports within the Role: a. Create a workset for each of these folders in the role b. Assign the iViews/Pages currently present in the folders of the role to the newly created workset c.
-
How do I get rid of this Skype p
There was a horrible Skype update and now Skype sucks.... I want to downgrade to a previous version (6.21). How do I do this? Solved! Go to Solution.