Fcc In Sap Pi

2021年2月4日
Download here: http://gg.gg/o6rdg
SAP PI/PO provides out-of-the-box functionality to handle file content conversion from Flat file to XML and vice versa in File Adapter. This function can only be used if the file isn’t encrypted. Hi All, My requirement is Proxy to File(File Content Conversion). As i dont hv the access to view the files in SFTP specified path so for testing I used File adapter for receiver and used ’File ’ as message protocol not file content.
*Complex Fcc In Sap Pi
*Fcc In Sap Pick
*Fcc In Sap PiSkip to end of metadataGo to start of metadata
R.O
Introduction
This is intended for all those who are familiar with the basics of “SAP PI” and File/FTP adapter. In receiver channel, File Content Conversion not only helps in converting the file formats from XML which records in the same layer, but also the hierarchical ones.
In this article one can understand how to use FCC parameter in receiver adapter to handling hierarchical structure. And we can use it to get some complex format in output file.
Sample Scenario with Multiple Layers of data:
Let us consider a case in which the target structure is shown below.
Figure1:Hierarchical structure in target side
And the required file format is shown below.
HField1 HField2 HField3 | IField1 IField2 ‘nl
| IField1 IField2 ‘nl’
| IField1 IField2 ‘nl’
| …... ‘nl’
HField1 HField2 HField3 | IField1 IField2 ‘nl’
| IField1 IField2 ‘nl’
| …... ‘nl’
1.1 Test1 for FCC parameter
Test1 used to test how some separators work in FCC for Hierarchical Structure.
Figure2:Test data for test1
Content Conversion Parameter:
Recordset Structure: Header, Item
Header.fieldSeparator : ++++
Header.endSeparator : <HeaderEnd>
Item.beginSeparator : |
Item.fieldSeparator :
Item.endSeparator : <@ItemEnd>n Figure3:Result for test1
From this result we can get 3 points:
*The last field of Head and the first field of Item is separated by the Item.fieldSeparator ()
*The first record of Item doesn’t contain beginSeparator.
*Header.endSeparator doesn’t work in this structure.
Note: ’nl’ only works in the endSeparator, but n can work in everywhere.
1.2 Test2 for FCC parameter
Since we know how these separators work, we can modify the configuration to get the format we want. Now in order to align the Headers and Items, we should use fieldFixedLengths.
According to the result of test1, I changed the value of HField3.
Figure4:Test data for test2
Content Conversion Parameter:
Recordset Stucture: Header, Item
Header.fieldSeparator : (2spaces)
Header.fieldFixedLengths : 7,7,10
Item.fieldFixedLengths : ?????????
Item.beginSeparator : (spaces) | (2spaces)
Item.fieldSeparator : (2spaces)
Item.endSeparator : n
The illustration below shows two simple testing of the parameter configuration fieldFixedLengths, and explains how the fieldFixedLengths works in this hierarchical structure.
1. How many parameter should be specified in fieldFixedLengths:
Item.fieldFixedLengths: 7,7
Error: more fields found in XML structure than specified in conversion parameters! (Value ’IField1’)’, probably configuration error in file adapter (XML parser error)’
Resolution: as the error description, we need to add one more field to test again.
Item.fieldFixedLengths: 7,7,7
Error: more fields found in XML structure than specified in conversion parameters! (Value ’IField1’)’, probably configuration error in file adapter (XML parser error)’
Resolution: as the error description, we need to add one more field to test again.
Item.fieldFixedLengths: 7,7,7,7
Error: more fields found in XML structure than specified in conversion parameters! (Value ’IField2’)’, probably configuration error in file adapter (XML parser error)’Complex Fcc In Sap Pi
Resolution: as the error description, we need to add one more field to test again.
Item.fieldFixedLengths: 7,7,7,7,7
Successful.
Result Format:
HField1 HField2 HField3 | IField1 IField2
| IField1 IField2
HField1 HField2 HField3 | IField1 IField2
| IField1 IField2
| IField1 IField2
| IField1 IField2
*Note: Here we can see the number of fields we specified in fieldFixedLengths (5) should be equals the number of fields in Header(3) plus the number of fields in Item(2). Although with specifying the extra Header fields in Item.fieldFixedLengths, it will not affect the configuration of Header segment.
2. How to specified the length of fields:
Item.fieldFixedLengths: 6,6,6,7,7
Error: Column value ’IField1’ too long (>6 for 0. column) - must stop’, probably configuration error in file adapter (XML parser error)’
Resolution: As there has three fields has the length of 6, we should modified to test the first field’s length to 7 and make it same with IField1.
Item.fieldFixedLengths: 7,6,6,7,7
Error: Column value ’IField2’ too long (>6 for 0. column) - must stop’, probably configuration error in file adapter (XML parser error)’Fcc In Sap Pick
Resolution: As there has three fields has the length of 6, we should modified to test the first field’s length to 7 and make it same with IField2.
Item.fieldFixedLengths: 7,7,6,7,7
Successful
*Note: As the HField1 and HField2 have the same length with the IField1 and IField2,so it would not pops up error and the third field in Header segment will not affect the fields in Item segment when configuration.
Item.fieldFixedLengths: 10,10,10,7,7
Successful
*Conclusion: Here we specified the length of 10, which is used to find out where will the added spaces placed.
Result format and principle:
Figure 5: Result format and principle
*Note: The result above shows principle of the fieldFixedLengths when configure the hierarchical structure.
It seems that casually appearance for this sample of hierarchical structure to use FCC. It’s not recommended to use fieldFixedLengths in this structure directly. fieldFixedLengths can only used when in Item fields less or equals the Header fields.
ConclusionFcc In Sap Pi
Sometimes we should use hierarchical structure to handle the scenario in which includes multiply Headers and each Header contains multiply Items. And FCC can help us generate the format what we want.
Reference(s)
www.help.sap.com
Download here: http://gg.gg/o6rdg

https://diarynote-jp.indered.space

コメント

お気に入り日記の更新

テーマ別日記一覧

まだテーマがありません

この日記について

日記内を検索