cancel
Showing results for 
Search instead for 
Did you mean: 

Structure mismatch in PI

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Bhavani_Baisani
Participant
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

This issue have been resolved ! I did a new XSLT mapping and it's working !

Former Member
0 Kudos

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 !!

Former Member
0 Kudos

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

udo_martens
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

udo_martens
Active Contributor
0 Kudos

Hi Sambaran,

you posted actual and wished structure already. Instead of repeating the same - not very detailed - question it would be more constructive if you describe in which of the steps i posted before you are struggeling.

/Udo

Former Member
0 Kudos

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

udo_martens
Active Contributor
0 Kudos

Hi Sambaran,

i m sorry, from my point of view it seems that you are not seriously interested to solve a technical problem.

/Udo

Former Member
0 Kudos

Hello ,  My generated structure is 09396.xml and the desired structure is thierry.xml.  I hope this time you will be able to understand the problem 🙂  Thanks for your help !  Regards,  Sambaran

Bhargavakrishna
Active Contributor
0 Kudos

Hi Sambaran,

You are generating XML file right?

Use FCC parameters in the Communication channel.

it will give the desired structure...

Hope it will helpful.

Regards

Bhargava krsihna

Former Member
0 Kudos

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

Former Member
0 Kudos

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 &amp; OPC</Architect><ArchitectAddress>11 RUE D&apos;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

Former Member
0 Kudos

make you 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.

Bhargavakrishna
Active Contributor
0 Kudos

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

Bhargavakrishna
Active Contributor
0 Kudos

Hi Sambaran,

Is your issue resolved? if so mark the thread as answered and close it.

Former Member
0 Kudos

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

udo_martens
Active Contributor
0 Kudos

Hi,

this is actually what PI was made for

You need to map the IDoc xml structure to the client expected structure.

/Udo