cancel
Showing results for 
Search instead for 
Did you mean: 

File with CC not matching Mapping scehma

former_member187587
Contributor
0 Kudos

I have this very simple flat file. contains a single line.

I need to parse it into XI.

I am using file with Content conversion.

Issue is that the result XML in SXMB_MONI doesn't match to the mapping source Schema (causing the nodes to presented in Red) and the mapping to not perform as expected.

The thing is that the following minimum values are required in the Adapter configuration:

Document Name - inserted in the message as the main XML tag. This is mandatory for the mapping.

Document Namespace - The namespace is added to the name of the document. This is mandatory for the mapping.

Recordset Structure - mandatory in FCC setup

Recordset Sequence - mandatory in FCC setup

This setup results with the following XML:

<?xml version="1.0" encoding="utf-8" ?>

- <ns:MT_ElectricInvoice xmlns:ns="urn:com.xxx:xxxxx:services:p10">

- <MT_ElectricInvoice>

<FileName>invhtd.xxxxxxx.2012-08-22_10-09-48.xxxxx.0822407734.05592903.1.pdf</FileName>

</MT_ElectricInvoice>

</ns:MT_ElectricInvoice>

My mapping source XML (when running test map with manual entered value in the fileName field) requires the following XML:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_ElectricInvoice xmlns:ns0="urn:com.zim:agenteam:services:p10">

  <FileName>invhtd.il513569780.2012-08-22_10-09-48.hf.0822407734.05592903.1.pdf</FileName>

</ns0:MT_ElectricInvoice>

(I have a simple  xs:string Type which is used inside the MT_ElectricInvoice MessageType)

I have also attached the FCC setup.

This thing is it is quit frustrating when a more complex structures are much simpler to achieve then this single line

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member187587
Contributor
0 Kudos

Ok Guys,

I am closign this "Stupid thread".

I resolved the issue by adding another subelement to the DT structure named FileName..I guess I expected too much from XI in this specific issue.... (In BizTalk this issue wouldnt even occur...offcourse thousands of other issues will ...were the hell is the monitorign here... ha ha ha ) Love that SAP PI..

thank you all for your answers.

Former Member
0 Kudos

Hi.

Try to change on Recordset Structure : FileName ,1

Regards

Lucho.

former_member187587
Contributor
0 Kudos

Close Lucho, but not enought.

the result is still not valid against scehma:

XML Result after change (not Valid):

<?xml version="1.0" encoding="utf-8"?>

<ns:MT_ElectricInvoice xmlns:ns="urn:com.xxx:xxxxxxxxxx:services:p10">

   <FileName>

      <FileName>invhtd.il513569780.2012-08-22_10-09-48.hf.0822407734.05592903.1.pdf</FileName>

   </FileName>

</ns:MT_ElectricInvoice>

Valid XML generated from XI Schema:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_ElectricInvoice xmlns:ns0="urn:com.zim:agenteam:services:p10">

   <FileName>invhtd.il513569780.2012-08-22_10-09-48.hf.0822407734.05592903.1.pdf</FileName>

</ns0:MT_ElectricInvoice>

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

Change existing schema in PI and add File as a root node. this solves your problem.

File cc paramter :  Recordset Structure : FileName ,1

Regards,

Raj

former_member184681
Active Contributor
0 Kudos

Hi,

Most probably one trivial change should be enough: remove the ignoreRecordsetName from the FCC configuration and everything should work fine.

Regards,

Greg

former_member187587
Contributor
0 Kudos

Hi Greg,

This is not the right answer as the

<Recordset> tag will be added to the message (causing the XML to be not valid against the Schema)

former_member184681
Active Contributor
0 Kudos

You're right, it looks like I mixed the current and the expected structure. Sorry for confusion.

Now, after all, I would say your required structure is not possible with FCC. See SAP Help for FCC for more details:

http://help.sap.com/saphelp_nwpi71/helpdata/en/44/682bcd7f2a6d12e10000000a1553f6/frameset.htm

It clearly defines a four level structure:

<document>

     <recordset>

          <structure>

               <field>

You can only skip one of these levels, which is the <recordset> node (which you've already done, using the FCC ignoreRecordsetName attribute). So, your only choices are to adjust the sender structure in ESR, or use own adapter module instead of FCC. Or use some pre-mapping, which I generally wouldn't recommend in this case (unless you have some specific reasons for that).

Regards,

Greg