cancel
Showing results for 
Search instead for 
Did you mean: 

Routing based on header record RECPOR in IDOC File

Former Member
0 Kudos

I am working a flat file (actually, its an IDOC file) that will enter the configuration scenario through a Seebruger SFTP adatper. Since this is a flat file, and not XML, I need to convert this to XML prior to doing content based routing in the receiver/interface determination.

I am most concerned with the RECPOR field.

RCVPOR : Receiver port

internal data type : CHAR

Internal length : 000010 characters

Position in segment : 024, Offset : 0263. external length : 000010

The scneario is a simple passthrough. What I envision doing is converting the IDOC Flat file to an XML structure, then doing content based routing on the one field I am interested in, as mentioned above.

Is there a way to do this without modifying the payload in teh sender/receiver channels, or am I going to be forced to doing content conversion with MessageTransformationBean?

Since all of my routing will be done on 10 characters, I see breaking the file up into 3 fields...characters 1-263, 263-273, 273-EOF does some one have a sample of how to separate this, and how to recombine the values in the receiver?

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

I think without content conversion not possible

Former Member
0 Kudos

If I wanted to break the file up into 3 elements in a simple XML strcuture....

I know its possible to do this using fixed field lengths...is there a method to break that file up int a simple xml structure with, lets say, 3 elements....

Where field 1 contains from the start of the file (1) thorugh say character 31. Filed 2 contains 31-41 then the third field to contain the rest of the file? These 'flat files' could be any one of a dozen or so IDOC files that are being sent to me from an external EDI Translator.

rajasekhar_reddy14
Active Contributor
0 Kudos

Better to read as a one string in PI mapping level you can split by using Substring function.

Former Member
0 Kudos

Thats a great solution, except my payload is not XML...its a plain 'flat file' there is no schema surrounding the payload.

It has been suggested that I use an extended receiver determination and java mappign. I am looking for a good example of how this is might be done as well...