B2B Integration Cockpit:- How To Convert Plain to XML Step by Step -Part II
In the First B2B Integration Cockpit:- How To Convert Plain to XML Step by Step -Part I Message structure configured in the Message Editor.
During creation of the message structure through message editor all relevant details get stored in below tables.
The Tables are:
Details of each tables are documented in the below link:
Go to Plain->Tables and you can choose one from list of four to see the contents.
After Configuration Contents of Table B2B_PLA_CTRL_IF is shown below
After Configuration Contents of Table B2B_PLA_CTRL_SETID is shown below
After Configuration Contents of Table B2B_PLA_CTRL_MSG is shown below
After Configuration Contents of Table B2B_PLA_CTRL_FIELD is shown below
How the converter module process the message with help of four above mentioned tables:
- Determine corresponding message type for a particular Control Key with the help of B2b_PLA_CTRL_IF table for matching starting pattern.
- Write Document Start taking the value from B2b_PLA_CTRL_IF table.
- Determine Set Name i.e. Record Type Name with the help of B2b_PLA_CTRL_SETID table. (This step is not required for XML to Plain Conversion).
- Determine the nested structure and Field Names and Field structure for a Set with the help of B2b_PLA_CTRL_MSG and B2b_PLA_CTRL_FIELD tables.
- For Plain-To-XML conversion repeat the steps 3 and 4 for all Sets and for XML-To-Plain conversion repeat the step 4 for all Sets.
- Write Document End taking value from B2b_PLA_CTRL_IF table.
Local Test (Test within B2B Integration Cockpit)
You can test the conversion within B2B Integration Cockpit without configuring any End to End Scenario in PI/PO.
Go to Plain->Plain-XML-Converter->Plain to XML
The data that we have prepared for testing is as below:
Source file is attached for ready reference.
We upload this file in the Plain to XML Converter and click the option Convert.
The target XML file will be generated.
Target XML generated. Target attachment is attached in attachment section
We can generate the Converted XML xsd file from B2B Cockpit.
Go to Plain->XSD Generator
Enter the following values to the fields and click Generate XSD
With the help of XSD create the Source structure in ESR.
As it is a Plain to XML conversion scenario that is why we need to use one module PlainConverterModule in the Sender Communication Channel as given in the below screenshot. this module converts the Plain Fixed Length file to XML file with the help of B2B Cockpit Configuration.
Export/Import Custom Control Key content
The Table content for Custom Control Key can be exported and can be imported across other environment as described below
Go to EDI Content Manager->Plain->Tables->Export
For XML to Plain Conversion follow the document: http://scn.sap.com/docs/DOC-64483