Fcc In Sap Pi

Posted on by

Converting Text Format in the Sender File/FTP Adapter to XML Use. You can convert a text file with complex structures to an XML source format. The file can contain different row formats in logical structures. If you are developing a module for the sender file/FTP adapter and want to access the file name in the module, see SAP Note819761 Prerequisites You have created a new communication channel or have opened an existing one. By Punit J, YASH PI Competency Team, Yash Technologies Description: File Content Conversion is used to convert non-XML file (flat file) to XML file and vice-versa. In this blog, we will see how to convert flat file to XML file when file structure is bit complex. SAP PI/XI Guidelines and Best Practices. Applies to: SAP Process Integration (screenshots and code examples come from SAP PI 7.1) Summary. A summary of PI's capabilities to dynamically set the file name and file directory in a Receiver File scenario.

Skip to end of metadataGo to start of metadata

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.

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

Office 2003 professional product key. License Key: For your convenience, we embedded the license key with the installer, therefore you do not need any license key to install this software. License and Usage Agreement: By downloading the software from this site, you agree to follow and abide the licensing terms set forth between Kean University and Microsoft Corporation. Microsoft Office 2003 Professional, Microsoft Product Key Card Office & Business Software, Microsoft Office 2007 Key, Microsoft Windows Server 2003 Product Key Card Office & Business Software, Microsoft Mac Product Key Card Office & Business Software, Microsoft Office Software Suites Product Key Card Office & Business Software, Microsoft Office. Microsoft Office 2003 Professional Edition Item Preview download.jpg. Remove-circle Share or Embed This Item. EMBED (for wordpress.com hosted blogs and archive.org item tags) Want more? Advanced embedding details, examples, and help! Office Pro for Win95: 4. Office Pro v4.2 for Windows: 14080-0. Office Pro v4.3c for Windows: 28779-0. Office 10 Retail - Full Package Product: B9GJW-TB7BW-CBRPB-CC887-C8833. MEDIA SET CD Publisher 2002 W32 English NA ProdAct FPP: BRMQP-V8HFF-KKXWF-HKRQ6-FDGVM.

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.

Fcc

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

Fcc In Sap Pi

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.

Step-by-step guide on File-to-IDoc using SAP PI 7.0

By Deepak Shah, L&T Infotech

Brief Overview:

The purpose of this exercise is to implement a simple one way Asynchronous link between a file sender and SAP R/3 system using SAP XI/PI. Custom XML Document Containing Vendor information is picked up from the FTP server by file adapter. The Message is mapped to IDoc –XML format & then routed to the IDoc adapter. The CREMAS IDoc is then posted into the backend R/3 System and vendor will be created by the R/3 system provided that it has authorization to do so.

Prerequisites:

  1. Basic Knowledge of SAP PI / XI 7.0
  2. Business System configuration in SLD is not covered in detail.
  3. FTP configuration should be in place to pick up flat file from specified location
  4. Try creating a vendor in R/3 using transaction XK01 and get list of mandatory fields that are necessary in the source file structure

Implementation Steps:

A.) Maintain XI/PI System (Pick File – Transform into IDoc xml)

A.1) Maintain SLD (System Landscape Directory)

This Document does not contain configuration steps for creating the Business System, Technical system, Product & Software component. It is assumed that the sender and receiver Business Systems are already created along with corresponding Technical System, Product, Software components. Also the Software Component is imported into Integration Repository.

In this Example,

Sender Business System: TBIT40_Legacy_BS_DS

Fcc In Sap Pi

Receiver Business System: CX1_Business_System

Software Component: TBIT40_DS_SWCW, 1.0 of SAP

A.2) Maintain IR (Integration Repository)

A.2.1 Importing IDoc from SAP R/3 System

Double Click on your Software Component in the Integration Repository.

Select the radio Button “Import of RFC and IDoc interfaces from SAP system Permitted

Enter the Connection Data for Import from SAP System

Add a new Namespace “http://sdht1.com”.

Click on SAVE & Activate.

Fcc In Sap Pin

Now right click on Imported Object under your Software Component and click on Import of SAP Objects.

Give the relevant Sender System information

Select the IDoc CREMAS03 and click continue

Click finish to start import. Once the IDoc is successfully imported save & activate it.

Fcc

Note: We don’t need any Data Type, Message Type and Message Interface for Receiver side as IDoc itself will be used for receiver Data Type, Message Type and Message Interface.

A.2.2 Create Data Type for Sender:

Go to Interface Objects tab in your namespace.

Go to Data type and Click on new

Here we will create a data type Address_DT and Vendor_DT.

Address_DT will be referred as type for one of the field in the Vendor_DT.

Enclosuresign In Fcc In Sap Pi

This is called as Nesting of Data types.

This is achieved by Selecting “Search Help” from the Drop down menu. There you will be able to select any existing data type in the SAME Software Component

The Structure of Both data types are as follows

A.2.3 Create Message Type for Sender:

In the Left Frame, Right Click on the Node Message type and select “New”.

The Name of the Message type will be “Vendor”.

Note: Message type forms the root element of the XML business Document.

For section “data type used”, select your data type “Vendor_ DT” from F4 help.

Save & activate.

Click here to continue..