on 05-06-2013 8:30 AM
Hello friends, I am getting a problem on structure mismatch in PI.I am generating an xml file from an IDOC in PI.But the client is saying the xml structure they want is different from the structure what I am generating in PI. So, the structure I am generating is like this :
353. . . But the client want it in this way :
353. . . Thanks in advance !! Regards, Sambaran
use namespace name as NemProjectAttributesNamespace
as rohan said use message type name as "ProjectAttributeSet" and use ABAP/XSLT/Java mapping if you want XML node/element prefix as "pan:". you will get this XML very easily.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, I have replaced my message type name with "ProjectAttributeSet" and now I am getting a structure like but I also need to change the prefix "ns0" to "pan",need to add "pan:xsi:=" tag and also for each attribute need to add "pan:ordernumber" I wrote a XSLT mapping like this :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/2001/XSL/Transform" xmlns:fo="http://www.w3.org/2001/XSL/Format">
<xsl:template match="/">
<pan:ProjectAttributeSet xmlns:pan="NemProjectAttributesNamespace" xsi:schemaLocation="NemProjectAttributesNamespace NemPrjAttr_V2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:copy-of select="//pan:OrderNumber"/>
<xsl:copy-of select="//pan:BuildingLocation"/>
</pan:ProjectAttributeSet>
</xsl:template>
</xsl:stylesheet>
But I am getting mapping error. Could you please on XSLT mapping? Thanks & regards,
Sambaran
Hello the target structure should be : 32 35 33 18 22 19 21 20 28 23 24 26 25 1 31 30 17 13 14 16 15 8 9 10 12 11 2 3 4 6 5 7 27 34 but What i am generating is in this format :
09396ADAMI COMPLEXE SPORTIF HEILLECOURTRUE DE LANEUVEVILLE5418006284755596 RUE CAMILLE FLAMMARION543000383732248EST CONTROLE NANCY16 AVENUE MARECHAL JUIN540000383411663EST CONTROLE NANCY16 AVENUE MARECHAL JUIN5400003834116630000000000ARCHITECTE & OPC11 RUE D'EGERSHEIM6700003882723330388272323 Please suggest a solution ! Thanks !!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
from what you say you need to provide a non-XML file in some special structure. Have you really understood how that file should look like? Do you have an example? I assume the numbers describe the input fields in some order and not the real content. What is the separator?
I think you should get the requirements clear (get an example) and then learn about content conversion of the file adapter.
Regards,
Jörg
Hi,
first you need to get a technical description of the target format, may be to requested by the owner of the system. Then define the conversion rules, may be in a excel table. Which source value should be mapped to which target field? You might need support from source system owner and target system owner. Finally create the mapping, perferable standard Message Mapping, but there are alternatives.
It looks for me that you overtook a task for which you are not educated. You should consider to book a PI basics course.
/Udo
The structure I get :
09396ADAMI COMPLEXE SPORTIF HEILLECOURTRUE DE LANEUVEVILLE5418006284755596 RUE CAMILLE FLAMMARION543000383732248EST CONTROLE NANCY16 AVENUE MARECHAL JUIN540000383411663EST CONTROLE NANCY16 AVENUE MARECHAL JUIN5400003834116630000000000ARCHITECTE & OPC11 RUE D'EGERSHEIM6700003882723330388272323 The structure I want :
32 35 33 18 22 19 21 20 28 23 24 26 25 1 31 30 17 13 14 16 15 8 9 10 12 11 2 3 4 6 5 7 27 34 Thanks for the help in advance ! Regards, Sambaran
The structure I have generated in PI :
09396ADAMI COMPLEXE SPORTIF HEILLECOURTRUE DE LANEUVEVILLE5418006284755596 RUE CAMILLE FLAMMARION543000383732248EST CONTROLE NANCY16 AVENUE MARECHAL JUIN540000383411663EST CONTROLE NANCY16 AVENUE MARECHAL JUIN5400003834116630000000000ARCHITECTE & OPC11 RUE D'EGERSHEIM6700003882723330388272323 Desired structure:
32 35 33 18 22 19 21 20 28 23 24 26 25 1 31 30 17 13 14 16 15 8 9 10 12 11 2 3 4 6 5 7 27 34 Please help !! Thanks, Sambaran
Hello Sambaran,
you have to XML structures and need to map one from the other. This is very basic PI functionality. Where is your problem? If you don't know which field to map where, ask the functional colleague (although the mapping looks very obvious to me, even field names are exactly the same). If you don't know how to do the mapping, ask someone who knows PI. This would be so basic knowledge that you better acquire it in some SAP course or some internal training.
Regards,
Jörg
Hello,
The structure I would like to generate in PI is as below :
<?xml version="1.0" encoding="utf-8"?>
<pan:ProjectAttributeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pan="NemProjectAttributesNamespace" xmlns="NemProjectAttributesNamespace"
xsi:schemaLocation="NemProjectAttributesNamespace NemPrjAttr_V2.xsd">
<pan:OrderNumber>32</pan:OrderNumber>
<pan:BuildingLocation>35</pan:BuildingLocation>
<pan:ProjectNumber>33</pan:ProjectNumber>
<pan:BuildingInvestment>18</pan:BuildingInvestment>
<pan:BuildingInvestmentStreet>22</pan:BuildingInvestmentStreet>
<pan:BuildingInvestment_PostalTown>19</pan:BuildingInvestment_PostalTown>
<pan:ConstructionsitePhonenumber>21</pan:ConstructionsitePhonenumber>
<pan:ConstructionsiteFaxnumber>20</pan:ConstructionsiteFaxnumber>
<pan:Contractor>28</pan:Contractor>
<pan:CustomerStreet>23</pan:CustomerStreet>
<pan:Customer_PostalTown>24</pan:Customer_PostalTown>
<pan:CustomerPhonenumber>26</pan:CustomerPhonenumber>
<pan:CustomerFaxnumber>25</pan:CustomerFaxnumber>
<pan:DeliveryAdress>1</pan:DeliveryAdress>
<pan:DeliveryStreet>31</pan:DeliveryStreet>
<pan:DeliveryPostalTown>30</pan:DeliveryPostalTown>
<pan:StructuralEngineerName>17</pan:StructuralEngineerName>
<pan:StructuralEngineerAdress>13</pan:StructuralEngineerAdress>
<pan:StructuralEngineer_PostalTown>14</pan:StructuralEngineer_PostalTown>
<pan:StructuralEngineerPhonenumber>16</pan:StructuralEngineerPhonenumber>
<pan:StructuralEngineerFaxnumber>15</pan:StructuralEngineerFaxnumber>
<pan:InspectingStructuralEngineerAdress>8</pan:InspectingStructuralEngineerAdress>
<pan:InspectingStructuralEngineerStreet>9</pan:InspectingStructuralEngineerStreet>
<pan:InspectingStructuralEngineer_PostalTown>10</pan:InspectingStructuralEngineer_PostalTown>
<pan:InspectingStructuralEngineerPhonenumber>12</pan:InspectingStructuralEngineerPhonenumber>
<pan:InspectingStructuralEngineerFaxnumber>11</pan:InspectingStructuralEngineerFaxnumber>
<pan:Architect>2</pan:Architect>
<pan:ArchitectAdress>3</pan:ArchitectAdress>
<pan:Architect_PostalTown>4</pan:Architect_PostalTown>
<pan:ArchitectPhonenumber>6</pan:ArchitectPhonenumber>
<pan:ArchitectFaxnumber>5</pan:ArchitectFaxnumber>
<pan:Adaptor>7</pan:Adaptor>
<pan:Inspector>27</pan:Inspector>
<pan:PlanningPhase>34</pan:PlanningPhase>
</pan:ProjectAttributeSet>
and the structure I have generated in PI is :
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_ORDERtoFile xmlns:ns0="http://Allplan.com/QAF/300/ORDERtoFILE">
<OrderNumber>09396</OrderNumber><BuildingInvestment>ADAMI COMPLEXE SPORTIF HEILLECOURT</BuildingInvestment><BuildingInvestmentStreet>RUE DE LANEUVEVILLE</BuildingInvestmentStreet><BuildingInvest_PostalTown>54180</BuildingInvest_PostalTown><ConstructionsitePhonenumber>0628475559</ConstructionsitePhonenumber><CustomerStreet>6 RUE CAMILLE FLAMMARION</CustomerStreet><Customer_PostalTown>54300</Customer_PostalTown><CustomerFaxnumber>0383732248</CustomerFaxnumber><StructuralEngineerName>EST CONTROLE NANCY</StructuralEngineerName><StructuralEngineerAddress>16 AVENUE MARECHAL JUIN</StructuralEngineerAddress><StructuralEngineer_PostalTown>54000</StructuralEngineer_PostalTown><StructuralEngineerPhonenumber>0383411663</StructuralEngineerPhonenumber><InspectingStructuralEngineerAddress>EST CONTROLE NANCY</InspectingStructuralEngineerAddress><InspectingStructuralEngineerStreet>16 AVENUE MARECHAL JUIN</InspectingStructuralEngineerStreet><InspectingStructuralEngineer_Postaltown>54000</InspectingStructuralEngineer_Postaltown><InspectingStructuralEngineerPhonenumber>0383411663</InspectingStructuralEngineerPhonenumber><InspectingStructuralEngineerFaxnumber>0000000000</InspectingStructuralEngineerFaxnumber><Architect>ARCHITECTE & OPC</Architect><ArchitectAddress>11 RUE D'EGERSHEIM</ArchitectAddress><Architect_Postaltown>67000</Architect_Postaltown><Architect_Phonenumber>0388272333</Architect_Phonenumber><ArchitectFaxnumber>0388272323</ArchitectFaxnumber></ns0:MT_ORDERtoFile>
Could you please let me know,is it possible to transform my xml structure into the desired format? if possible then how?
Thanks in advance !
Regards,
Sambaran
Hi Sambaran,
if you observe the xml file which is generated by you. some of the fields are missing, like building location, project number, construction site fax number etc.
so check once, whether you have all the fields required to map the target fields. if not take help of ABAP team to get the required fields in the IDOC.
you have to create the data type with all the fields required you to generate the file.
For ex: mapping should be like this
i think, you Dont have sufficient fields in IDOC to generate the desired target structure.
or else some times client wants to map the same fields to different fields at the target structure.
Do the mapping as above and include FCC parameters in file communication channel as i mentioned in my previous reply. you should get the desired output.
As the other folks said, it is the basic requirement of PI consultant to know, to which field we should map the source fields. i you are not aware take the help of functional team to give the required output fields and do the mapping accordingly.
Hope it will helpful..
Regards
Bhargava Krishna
Hi Sambaran,
let the client specify what structure they want, best would be an XSD. This you import to PI and then you define a mapping from IDOC to that XSD. As Udo said, that's what PI is for!
Regards,
Jörg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this is actually what PI was made for
You need to map the IDoc xml structure to the client expected structure.
/Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.