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

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.

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.

The below screen will appear

In this document we are creating a new Inner Set.

We enter the following value to the fields

The Inner Set IDNUBI is created under the Set MATCON

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.

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:

https://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.

Contents of Table B2B_PLA_CTRL_IF is shown below

Contents of Table B2B_PLA_CTRL_SETID is shown below

Contents of Table B2B_PLA_CTRL_MSG is shown below

 

  Contents of Table B2B_PLA_CTRL_FIELD is shown below

  

  

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

 

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

  

   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.

  

  

      Output CSV file:

     

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.

 

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

   

   

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.

      

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 : https://scn.sap.com/docs/DOC-64511

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !