Objective of this document is to demonstrate the configuration steps in B2B Integration Cockpit EDI Content Manager for conversion of a XML file  to a CSV file.


References:

  1. http://wiki.scn.sap.com/wiki/display/TechTSG/Troubleshooting+Information+for+EDI-XML+Converters?original_fqdn=wiki.sdn.sap.com
  2. http://help.sap.com/saphelp_nw-b2b-addon103/helpdata/en/f7/841b9351844d67ae2ace9a02c94884/content.htm

   3.  http://scn.sap.com/community/b2b-integration/blog/2014/05

   The B2B Integration Cockpit is a central application that allows us to monitor and access business-to-business add-on from SAP NW PI  environment.

   We can use the B2B Integration Cockpit for the following cases
Pic1.png

This Document is mainly on EDI Content Manager -> XML to Plain conversion

The EDI content manager is an application that Export/Import, Generate XSD, View, Customize and Test conversion of EDI messages.


B2B add-on XML to Plain Conversion


Using conventional File Content Conversion we can’t handle File hierarchy greater than 3.

With B2B add-on XML to Plain conversion functionality, we can easily convert a multi hierarchical XML file to a flat file structure.

The required source XML file “DemoXMLtoPlain.xml” is attached.


We want to convert the XML file to a pipe delimited CSV file.

  Pic2.png

Step1:To log in to the B2B Cockpit use the below link

           http://<host>:<port>/b2bic


       Below screen will appear which will ask your credential to log in.

     Pic3.png

      Once you have logged in, the screen that will appear is given below.

        Pic4.png

   Step 2: From the above list of option click on the EDI Content Manager

       Pic5.png  

     The below screen will appear

         Pic6.png

We can see above that there are various options like Edifact, Eancom, Ansi X.12, Odette, Tradacoms, VDA and Plain. All these are required for conversion  from the message format which is involved in the scenario to XML format or from XML format to the message format required.


In this document we will focus on XML to Plain conversion.


Step 3:  

Go to Plain->Editor->Message Editor, like the screenshot below and then click Message Editor
Pic7.png

On clicking the Message Editor we will get the below screen

Pic8.png

We can see there are three buttons Create, Update and Delete

Create has the following option (as given in below screen shot) and is used to create a new message structure.

Pic9.png

Update has the following option (as given in below screen shot) and is used to update/change any existing message structure, add inner set (sub segments) and add fields in the structure

  Pic10.png

   Delete has the following option (as given in below screen shot) and is used to delete Record Row, Message and Control Key.

   Pic11.png

   

First need to create a new message structure by creating a Control Key, Message and Set and then will update the message by adding fields and inner set. If required we can edit the message also.

Control key represents version and Control Key Association Table provides the information that which Integration Flow should use which Control Key (Version).


All standard content delivered by SAP is delivered under control key name “SAP”.

Pic12.png

We can create our own Control Key (Version) and we need to make an entry into Control Key scenario association table to enable runtime usage of this version corresponding to an integration scenario. By default all the fields are populated with “.* “.

Pic13.png

Step 4: Creation of Control Key

Go to Create->Control Key and click Control Key

Pic14.png

The below screen will appear

  Pic15.png

  Provide Control Key name as DemoXMLtoPlain and Click the Create Button

  Pic16.png

  Control Key is now created and it can be seen in the list of Control Key.

   Pic17.png

Step 5: Creation of Message

Under Control Key you can define multiple message type/message type with versions.

Go to Create->Message and click on Message.

Pic18.png

Below screen will appear.

Pic19.png

Here Name is “Name of the message type/message type with versions”

Starts With is “A pattern that denotes beginning of a message structure (can be filled with a regular expression)”

New Line is “Line Feed (Windows), Line Feed (UNIX), TAB and Space”.

Line Feed (Windows) is generally used when we are picking or dropping files from or to any Windows System. Similarly Line Feed (UNIX) is used when we are picking or dropping files from or to any Unix System.


Pic20.png

Enable Customized New Line is used to enter a customized new line in hexadecimal format.

Pic21.png

Strict Length check box is checked in case of Fixed Length file. For CSV file it will be unchecked.


Char Set is which Character Encoding should be used. e.g. UTF-8 or ISO-8859-15 etc


Document Start is Starting line of the converted document (inserted during conversion).


Document End is End line of the converted document (inserted during conversion).


We enter the following value to the fields and Click on Create Button. We didn’t check the Strict Length option because we will create CSV file in the target.
Pic22 (2).png

Therefore now Control Key and Message is created. So in the message editor screen both the Control Key and the corresponding Message Type will appear.

Pic22.png

Step 6: Creation of Set

One message type version may contain multiple Set (Record)

Go to Create->Set and click on Set.

Pic23.png

  The below screen will appear.

   Pic24.png

      Name is Name of the Set (Record).

     Starts With is a Pattern that will denote the beginning of a set/Record (can be filled with a regular expression).

     Set Type is Type of the record “CS“(character-separated fields) “FF“(field with fixed length).

    Pic25(1).png

     In this document we will create one CSV file.

      If we don’t want to populate any particular set in target XML then check the Check box Comment Set

     We enter the following value to the fields and Click on Create Button.

      Pic25.png

       We can see the set HEADER for the Message Type: MaterialDetails and Control Key: DemoXMLtoPlain.

        Pic26.png

  Step 7: Creation of fields

   Now under this HEADER set we will add required fields.

   Select the set HEADER and then go to Update->Add Field and click Add Field

        Pic27.png

       The below screen will appear

       Pic28.png

       Name is “Name of the field”.

       Length is “Length of the field”.

       Orientation can be Left or Right oriented.

        Pic29(1).png

If we check the Check box for Enable Customized Fill Character, we will get the option “Customized Fill Character” where we  can put Fill Character of our own choice.

Pic29.png

We enter the following value to the fields and Click on Create Button

Pic30.png

   Continue on Part 2 of this document:-

   Link:- B2B Integration Cockpit-XML to Plain Conversion Step by Step Guide–Part2

  

To report this post you need to login first.

2 Comments

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

Leave a Reply