Page tree
Skip to end of metadata
Go to start of metadata

XML File on local PC

Run Mode: DIALOG Aggregation: GENERIC AFTER EXTRACTION Iteration: NOT SUPPORTED Duplicate Check: NOT SUPPORTED 

Metadata retrieval: NOT SUPPORTED Extraction Strategy: INDUVIDUAL SELECTION AND KEY BASED SELECTION Special Permissions: NONE

 

You choose this for data that is stored in an XML file on the local PC. 

Parameters

The following data must be entered:

Parameter
Description
File NameName and path of the XML file on the local system

Requirements

The CDC source type FIXL for XML files on local PC requires XML files in asXML format.

asXML is the format that you get if you use transformation ID for an internal ABAP table. The following is an example for one item with columns PARTNER, NAME_LAST and NAME_FIRST. (For a table with multiple items, you would see multiple <item> tags.)

The XML declaration at the beginning of the file is optional, whereas the namespace definition needs to refer to ABAP XML. The part of the XML file containing the data to be compared needs to be included in tag <asx:values> (and </asx:values> respectively).

Beyond this level a tag <TABLE> marks the start of the data table, whereas several tags opening and closing with <item> (and </item> respectively) mark the beginning and the end of a line item in the table to be compared.

Within the <item> tags the names of the respective table fields need to be used as tag names. These tags contain the actual item data.

Furthermore it is important that the tags in the XML file in asXML format must correspond to the tags in the mapping connection of the CDC data model.

Example

ABAP Table:

FIRST_NAME

LAST_NAME

CITY

Jason

Li

Shanghai

Peter

Meier

Berlin

Michael

Smith

Washington

Converted into asXML this table would look like this:

<?xml version="1.0" encoding="UTF-8"?>
<asx:abap xmlns:asx=" http://www.sap.com/abapxml" version="1.0">
<asx:values>
<TABLE>
<ITEM>
 <FIRST_NAME>Jason</FIRST_NAME>
 <LAST_NAME>Li</LAST_NAME>
 <CITY>Shanghai</CITY>
</ITEM>
<ITEM>
 <FIRST_NAME>Peter</FIRST_NAME>
 <LAST_NAME>Meier</LAST_NAME>
 <CITY>Berlin</CITY>
</ITEM>
<ITEM>
 <FIRST_NAME>Michael</FIRST_NAME>
 <LAST_NAME>Smith</LAST_NAME>
 <CITY>Washington</CITY>
</ITEM>
</TABLE>
</asx:values>
</asx:abap>

In the definition of the data model it should like this:

(Here “TEST_TABLE” is used as table name.)

  • No labels