cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File adapter File Conversion with key fields

Former Member
0 Kudos

Please help me guys, I already spent way too much time on this!

I checked a couple of BLOGs and I think I'm doing the right thing except I'm not getting the result I would expect.

I'm trying to create an IDoc using the from a flat file.

I get the following error:

During the application mapping com/sap/xi/tf/_MM_TEST_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~

The Source file is this:

H

L0015

The file adapter does create the XML below (looks fine):

<ns:MT_SINGLE xmlns:ns="http://PPSC_TO_BO_INVOICE">

<HEADER>

<ID>H</ID>

</HEADER>

<LINE>

<ID>L</ID>

<SITE>0015</SITE>

</LINE>

</ns:MT_SINGLE>

When I test the map in IR, with the XML that this file adapter created (above) it works fine!

Also if I take away the HEADER from the source structure everything works fine and I can create the IDoc, therefore I think something must be wrong in the file conversion, the mapping is so simple there is nothing to fail there.

The file conversion parameters that I have:

Document Name: MT_SINGLE

Document Namespace: http://PPSC_TO_BO_INVOICE

Document Offset:

Recordset Name:

Recordset Namespace:

Recordset Structure: HEADER,1,LINE,*

Recordset Sequence: Ascending

Recordset per Message:

Key Field name: ID

Key Field Type: String (Case-Sensitive)

LINE.fieldNames: ID,SITE

LINE.fieldFixedLengths: 1,4

LINE.keyFieldValue: L

HEADER.fieldNames: ID

HEADER.fieldFixedLengths: 1

HEADER.keyFieldValue: H

What am I doing wrong???

Any help is much appreciated.

Thanks,

Viktor Varga

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Viktor,

Basic rules:

1. Down load XML payload(output From Adapter) and test it in IR mapping program. If it is working there is no reason why it will fail in Runtime. Also Check Cache is up to date.

Generally the problem lies with namespace.

Hope this helps

Regards,

Satish

Former Member
0 Kudos

Thanks Satish,

I added a Recordset level structure to the XML definition under the Message type and this level holds now the 2 substructures the HEADER(1) and the LINE(*).

Then in the file adapter I added this new tag into the "Recordset name" field and I also had to leave the namespace blank. With the the same namespace still there it did not work.

Anyway while you didn't exactly tell me how to solve the problem, with your comment on testing the XML payload in the mapping you steered me to the road that led to the solution.

Thanks a lot,

Viktor

Answers (0)