Skip to Content
0
Former Member
Jul 03, 2009 at 01:38 PM

Using conditions on CSV files in Receiver Determination

43 Views

Hi,

We're reading EDI files from a directory and turning them into IDocs. We've got an ABAP class that converts the EDI to XML for us, we're calling that as the first step in the Operation Mapping.

However, several different EDI files are dropped in the same directory, regardless the type and version. Luckily this can be found in the UNB segment in the EDI message. Now we want to make the split in the Interface Determination, but to do he'll need to read the EDI file's first line, determine what exactly it is, and then send it to the correct operation mapping.

Is there a way to read a non-XML file using XPath in the Condition part of the Interface Determination?

What I basically want to do is something like this:

File content :

UNB+93A:ORDERS:etc.

UNH+347843243:etc.

What I want to have my condition on is on the 93a and on ORDERS. So I'll need a double condition with AND (I know how to do that part) but on substrings of the data, which I don't know what to do. I only know that the UNB line will always be the first line.

So IF pos 5-7 EQ '93a' AND pos 9-14 EQ 'ORDERS' THEN Operation Mapping, etc.

Any ideas if this is possible, and how?

Kind regards,

Frederik-Jan.