How to send a flat file with various field lengths and variable substructures to XI 3.0


SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

How to send a flat file with various field lengths and variable substructures to XI 3.0

Suppose we have a flat file that looks like this:

“V00″,01,”VEN”,999000,272727,09
“A11″,”VR”,13245,20050
“A11″,”VR”,12345,90090
“A27″,”VR00027”

With various field lengths and have a variable number of substructures for Recordset Structure, then the substructures can occur multiple times,must be identified by the parser from their content. This means that a key field must be set with different constants for the substructures. You must specify a key field and the key fields are H1,sub1 and sub2 and the constant values V00,A11 AND A27.

In the configuration part

1) Specify the adapter type as sender

2) Message protocol to file content conversion

image

3) Set the Content conversion parameters

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

a) Document Name-Message Type (mi_test) inserted in the message as the main XML tag

b) Document Namespace-http://wipro/venksworkshop, namespace is added to the name of the document

c) Recordset Name- Root, Specify the name of the structure.

d) Recordset Structure-specify the sequence and the number of substructures H1,1, sub1,*, sub2,*

e) Key Field Name – KF

f) Key Field Type – String

image

4) Define the additional parameters

-H1.fieldNames:F1,F2,F3,F4,F5,F6

-H1.fieldSeparator: ,

-H1.endSeparator:’nl’

-H1.processFieldNames: fromConfiguration because in our example the flat file does not contain any header
Add similar Parameters for sub1 and sub2

image

Add key field value parameters to identify the substructures in the recordset

-H1.keyFieldValue: “V00”

-sub1.keyFieldValue: “A11”

-sub2.keyFieldValue: “A27”

image

This configuration should convert the flat file into an XML message like this:

image

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter
PDF24    Send article as PDF   
This entry was posted in sap pi training, sap pi tutorials, sap xi training, SAP XI Tutorials. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *