Skip to end of metadata
Go to start of metadata

File Content Conversion:

Steps to be followed for file content conversion:

STEP1:

Go to System Landscape->System Landscape Directory.
In software -> click on software catalog in order to create new product and software component*.*

 Click on New Product button in order to create a new product.


New Product.....

Specify Vendor, Name and Version and click on create button as shown.

Vendor:

Satyam

Name:

FILETOFILE

Version:

1.0

Click on Create.

  Define software Component by giving  Name (uppercase) and version. Then click on create

Product:

FILETOFILE,1.0 of satyam

Vendor(lower case)

satyam

Name(upper case)

FILETOFILE

version

1.0



  Once product and a software component is created the next step is Design part.

 STEP2:

 Maintain IR (Integration Repository)

ü  Go to INTEGRATION BUILDER: DESIGN. Click on the Integration Repository.
ü  Go to Tools->Transfer from System Landscape Directory->Import Software Component Versions in order to Import the product and software component into the IR which we created earlier in the system Landscape Directory.
ü  Check the software component version which we created earlier in the SLD. Then click on IMPORT
ü  After successful importing we will get the imported successfully message. Click on Exit.
ü  Create the Namespace in the software Component Version. Specify the namespace name which you want to create.
ü  Under the Namespace we have
       Integration Scenarios and Integration Processes
       Interface Objects
       Mapping Objects
       Adapter Objects
 ü  Under the Interface Objects create a new Data Types (sender/receiver) as per requirement, Insert the row and provide the type of each filed .For creating data types right click on data types->click on new. Then we will get one pop up. Give the data type name and then create. Then we will get the following.
ü  In order to build the structure, Right click on the structure name insert rows as per the requirement.
ü  Create Data Types namely FILETOFILE_IP_DT(Input Data Type)  and FILETOFILE_OP_DT(Output Data Type) of type String as follows.

ü  For Input data type the structure should be as follows:

Structure

Category

Type

Occurrence

▼Company

Element

 

0 unbounded

-----▼ Header

Element

 

0...1

            key1

Element

xsd:string

1

        RecordID

Element

xsd:string

1

        PlantName

Element

xsd:string

0..1

------▼Item

Element

 

0 unbounded

             key2

Element

xsd:string

1

           MaterialID

Element

xsd:string

1

             Quantity

Element

xsd:string

0..1

ü  For Output data type the structure should be as follows:

Structure

Category

Type

Occurrence

▼Company

Element

 

0 unbounded

--------▼ Header

Element

 

0...1

              Data1

Element

xsd:string

1

----------▼Item

Element

 

0 unbounded

              Data2

Element

xsd:string

1




ü  Create Message Types namely FILETOFILE_IP_MT and FILETOFILE_OP_MT.Specify the Name and Namespace for the corresponding Data Type. 
ü  Create Message Interface namely FILETOFILE_IP_MI (specify category as outbound and message type as FILETOFILE_IP_MT) and FILETOFILE_OP_MI (specify category as inbound and message type as FILETOFILE_OP_MT).

 Specify Category (Inbound/Outbound/Abstract) Mode (Synchronous/Asynchronous) and Message Types. 
ü  Click on Mapping Objects.
 
ü  Create Interface mapping namely FILETOFILE_IM Specify the source (FILETOFILE_IP_MI) and target (FILETOFILE_OP_MI) Interfaces and then click on Read Interfaces and specify the mapping program as FILETOFILE_MM. ü  Activate the namespace. 

STEP3:

 Integration Directory 
ü  Create a new scenario say FILETOFILE. 
Go to service without party (since no party is involved) and create a sender and receiver service (one service is created since the same service is the sender as well as the receiver).
Specify receiver as FILETOFILE_OP_MI(Inbound Interfaces) and sender as FILETOFILE_IP_MI(Outbound Interfaces).
ü  Under the service create the sender and receiver communication channels.

Choose the adapter type and specify the necessary file content conversion parameters and choose File Content Conversion as the Message Protocol. 

Sender Communication channel FILETOFILE_SENDER_CC.

Specify the following in the sender cc.
Adapter Type :FILE
Transport Protocol : FILE SYSTEM(NFS)
Message Protocol : File content conversion
specify the source directory and the file name from where you have to pick the file.
Processing mode should be DELETE.
Document Name : filecontent_ip_mt
Document Namespace:
Recordset name : Company 
Recordset Structure : Header,1,Item,*
Recordsets per message : *
Key Field Name : kz
Key Field Type :String

Name

Value

Header.keyFieldValue

H

Item.keyFieldValue

I

Header.fieldFixedLengths

1,3,3

Item.fieldFixedLengths

1,3,3

Header.fieldNames

key1,RecordID,PlantName

Item.fieldNames

key2,MaterialID,Quantity

Header.endSeparator

'nl'

Item.endSeparator

'nl'

ignoreRecordSet

true



Sender Communication channel FILETOFILE_RECEIVER_CC.

Specify the following in the sender cc.
Adapter Type :FILE
Transport Protocol : FILE SYSTEM(NFS)
Message Protocol : File content conversion
Adapter Engine : Integration Server

Specify the target directory and the file name and file construction mode : add time stamp.

Content Conversion Parameters:

Record Structure : Header,Item

Name

Value

Header.beginSeparator

Header

Item.beginSeparator

Item

Header.fieldFixedLengths

10

Item.fieldFixedLengths

10

Header.endSeparator

'nl' 

Item.endSeparator

'nl'

Create a new sender agreement and specify the outbound interface, service and sender communication channel.

 Create a new Receiver determination and specify the receiver service and interface.

Create a new Interface determination and specify the name of the Interface mapping.
Create a new Receiver agreement and specify the receiver communication channel.

Note: After each step save and activate it.
Some time we need to add the text line in the File content conversion.

Let's see the sample scenario.

Consider the above txt file is the source file of xi.

Now we fill the File content Conversion parameter such as Document name, Namespace, record set Structure, Key field name.
Now we need to specify the FCC parameters.

Header_Record.fieldSeparator  :  ,

Header_Record.fieldNames       : Record_Type,Sender_Id,Recipient_Id,Date_of_preparation,Time_of_preparation, Unique_Reference_number,File_Type

Header_Record.keyFieldValue  : "H"

Header_Record.enclosureSign  :  "

Header_Record.enclosureSignEnd           : "

Same like specify the Detail and Trailer_Record fields.

 Result :

 
If you see the result the text line contains field separator .But the whole line transferred in a single field with the help of enclosureSign,enclosureSignEnd parameter.

2 Comments

  1. Unknown User (v40b931)

    Hi Vijayasree,

     Nice post..... this now gives me a good idea about File Content Conversion. Guess there has been a typo error in the post, where instead of "Receiver communication channel", you have mentioned "Sender Communication Channel". ( in the part where u first define the Receiver CC ).

     Request you to check and edit the same and expecting more posts from you in this format citing examples of scenarios.

     Cheers,

     Krishna

  2. Former Member

    Hi,

    Nice step by step guide and very helpful.

    THX