Skip to Content

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:

  • B2B_PLA_CTRL_IF
  • B2B_PLA_CTRL_SETID
  • B2B_PLA_CTRL_MSG
  • B2B_PLA_CTRL_FIELD

Details of each tables are documented in the below link:

http://help.sap.com/saphelp_nw-b2b-addon103/helpdata/en/f7/841b9351844d67ae2ace9a02c94884/content.htm


Go to Plain->Tables and you can choose one from list of four to see the contents.


Pic40.png


After Configuration Contents of Table B2B_PLA_CTRL_IF is shown below

Pic41.png



After Configuration Contents of Table B2B_PLA_CTRL_SETID is shown below


Pic42.png



After Configuration Contents of Table B2B_PLA_CTRL_MSG is shown below

Pic43.png




After Configuration Contents of Table B2B_PLA_CTRL_FIELD is shown below

Pic44.png


How the converter module process the message with help of four above mentioned tables:


    1. Determine corresponding message type for a particular Control Key with the help of B2b_PLA_CTRL_IF table for matching starting pattern.
    2. Write Document Start taking the value from B2b_PLA_CTRL_IF table.
    3. 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).
    4. 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.
    5. 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.
    6. 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


Pic45.png

The data that we have prepared for testing is as below:

Source file is attached for ready reference.

Pic46.png


We upload this file in the Plain to XML Converter and click the option Convert.

The target XML file will be generated.


Pic47.png

Pic48.png


Target XML generated. Target attachment is attached in attachment section


Pic49.png

Pic50.png


XSD Generation


We can generate the Converted XML xsd file from B2B Cockpit.


Go to Plain->XSD Generator


Pic51.png


Enter the following values to the fields and click Generate XSD

Pic52.png


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.


Pic53.png


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


Pic54.png


For XML to Plain Conversion follow the document: http://scn.sap.com/docs/DOC-64483

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. Matteo Fusi

    Hi Arindam

    I read you blog!! very good.

    I have configured my message structures and I have tried to generate the xsd.

    All nodes of the xsd generated are without cardinality. So when I import the xsd in ESR nodes have always 1..1 cardinality. I have to change cardinality on ESR.

    Is it correct?

    Thanks in advance

    Matteo

    (0) 
  2. Rene Pilz

    Hi Arindam,

    I have done it exaclty as you have written, also compaired my table-Content with yours, but our System does the following:

    Each repeat of a node generates a _2 and a _3 node,

    for example:

    My XML does have:

    <DEVICE> … </DEVICE>

    <PPCON> … </PPCON>

    <DEVICE_2> … </DEVICE_2>

    <PPCON_2> … </PPCON_2>

    [..]

    We do have PO 7.5.

    I have attached the full XML our System creates.

    Does anyone have a glue?

    (0) 

Leave a Reply