Skip to Content
0
May 03 at 09:20 AM

AIF Inbound XML file to BAPI call mapping issues

85 Views Last edit May 03 at 02:09 PM 2 rev

Hi AIF experts,

I am attempting to map inbound XML values to a Material Create BAPI but cannot seem to fill the Raw structure with the inbound XML content (so I fail at the first step).

I have tested the overall process using a Flat File and this worked successfully, but when I moved to XML I cannot make it work.

Using a very simple example - can you suggest where I have gone wrong...

XML file is like this;

<item>

<functionalType>Document</functionalType>

<itemType>ext.astrium.newpdm.CADRepresentation</itemType>

<itemName>ASSEMBLY DIAGRAM - BACKEND INPUT PCB (FM)</itemName>

<PDMNumber>PCB-7000025266-ADSP</PDMNumber>

</item>

Interface definition is;

image.png

Raw Structure is defined as;

image.png

I'm testing a very basic single field mapping which I know will work based on my previous Flat File testing;

image.png

File Adaptor Config is defined as;

image.png

And the XSL Transform is this (essentially a full copy of the inbound XML but into a valid ABAP structure);

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

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<asx:abap

xmlns:asx="http://www.sap.com/abapxml" version="1.0">

<asx:values>

<xsl:copy-of select="*"/>

</asx:values>

</asx:abap>

</xsl:template>

</xsl:stylesheet>

Testing with /AIF/IFTEST using this 'New File' setting;

image.png

I get this result;

image.png

So no data is loaded into the expected ITEM structure from the XML file.

I have tried various combinations of editing the XML structure in the source file (removing or adding surrounding Elements, changing the Structure definition and mapping within SAP but nothing I do results in the expected output.

What am I doing wrong for the inbound XML process?

Many thanks, Scott.

Attachments

image.png (17.6 kB)
image.png (17.0 kB)
image.png (17.9 kB)
image.png (18.2 kB)
image.png (24.8 kB)
image.png (33.7 kB)
image.png (18.8 kB)