Continuation from Part1—> B2B Integration Cockpit-XML to Plain Conversion Step by Step Guide–Part1

Now we can see one field under the Set HEADER

Pic31.png

If we want to add a field above or below RecordID field then we have to choose the following option Add Field Below or Add Field Above accordingly. Remaining process for creating the field is same as given above.

Pic32.png

In the similar fashion we will add:

  • Fields MaterialNumber and MaterialType under the Set HEADER.
  • We will create Set MATCON and add fields RecordID, WeightLimit and UOM under it.
  • We will create Set MATERIAL and add fields RecordID, QTY and DOP under it.


Step 8: Creation of Inner Set

We will now create an Inner Set under the Set MATCON


Select the Set MATCON and then Go to Update->Inner Set and Click Inner Set.

Pic33.png

The below screen will appear

Pic34.png

In this document we are creating a new Inner Set.

We enter the following value to the fields

Pic35.png

The Inner Set IDNUBI is created under the Set MATCON

Pic36.png

We can now add fields to it in the similar way as discussed before in this document.

Also we can add Inner Set under IDNUBI in the same way. For that we have to select IDNUBI and then go to Update->Add Inner Set.


Our entire message structure is now available.

Pic37.png

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.

Pic38.png

Contents of Table B2B_PLA_CTRL_IF is shown below

Pic39.png

Contents of Table B2B_PLA_CTRL_SETID is shown below

Pic40.png

Contents of Table B2B_PLA_CTRL_MSG is shown below

  Pic41.png

  Contents of Table B2B_PLA_CTRL_FIELD is shown below

   Pic42.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.


2. Write Document Start from B2b_PLA_CTRL_IF table.


3. 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.


4. For XML-To-Plain conversion repeat the Step 3 for all Sets.

 
5. Write Document End 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->XML-Plain-Converter->XML to Plain

  Pic43.png

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

   Pic44(1).png

   The source XML file that has been used for testing is also attached.


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


   The target plain file will be generated.

   Pic44.png

   Pic45.png

      Output CSV file:

      Pic46.png

If we do not want the top line MATERIALDETAILS in the output CSV file then update the Message Type with Hexadecimal code of CarriageReturn i.e; #0D as Document Start value . Refer the screenshot attached.

Pic47.png

  Pic48.png

    Test it locally and the output CSV file is as given below:

    Pic49.png

   

End to End Testing involving PI/PO

  1. In ESR, referring the XML file attached , we configured the Source and Target Message Structure.
  2. Configured one simple File to File scenario (ICO) without mapping.
  3. As it is a XML to Plain File conversion scenario that is why we need to use one module PlainConverterModule in the Receiver Communication Channel as given in the below screenshot.

       Pic50.png

We triggered the interface with the source XML file attached and the CSV file is generated(the CSV file is attached).


For Plain to XML follow the Link : http://scn.sap.com/docs/DOC-64511

To report this post you need to login first.

3 Comments

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

  1. Appala Naidu Uppada

    Hi,

    Thanks for this wonderful blog.

    In the update message, you have mentioned starts with as “.*MATERIALDETAILS.*” .

    There is no need of adding .*  to this as prefix and suffix. You can simply use

    “MATERIALDETAILS”.

    Thanks,

    Appala

    (0) 

Leave a Reply