cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP - How to read and process files.

Former Member
0 Kudos

Hi all, how goes all?

Iu2019m trying to process 3 files using XI/PI. Well, the process is: An enterprise put in a system 3 type of different files. The problem is that they can be Invoice, Orders and DesAdv, and all of them has the same name always.

The solution could be easy if the file name changes, but itu2019s something impossible now. Then i should read and process these files according with the data inside, in 3 differents interfaces.

The main process is:

"Sterling" give us 3 files (same name or consecutive number named)--we read and process with PI (ABAP class?)--Send to R3 split: Invoice/Desadv/Orders

How can i differentiate them? how can i take the file, read an process without renaming the file?

Someone knows something about this kind of inte

Thanks a lot mates.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

I think it's possible...

If you create a generic message type which can contain all kind of fields.

If source file contains a invoic information then orders and desadv must be optionals.

If source file contains a desadv information then invoic and orders must be optionals.

If source file contains a orders information then invoic and desadv must be optionals.

After that, split each message in the corresponding interface (invoic/desadv/orders) in your interface determination.

Use key fields to verify if generic message can be a invoic or desadv or order in target side.

Regards,

Carme

Former Member
0 Kudos

Thanks a lot!!

Then, should i use 3 differents interfaces after read the format?

How XI can understand what kind of format is going to process?

I mean that the Messge Type should have all the fields of the 3 files. The files are a flat file with the data of a XML.

Cheers.

0 Kudos

Hi,

As i don't know the format of target files, i have assumed you need 3 interfaces to mapping out in a idoc format.

You must differentiate each different format, from some key field. For example, if you have a NumberInvoic in your source file, you must put that in your interface determination :

inbound interface --> invoic.invoic02

Inbound namespace --> urn:sap-com:document:sap:idoc:messages

condition --> field NumberInvoic EX

Interface mapping --> your interface mapping, if needed.

And with the other one formats, you must choose another key field and another condition.

Regards,

Carme.

Former Member
0 Kudos

Ok, i have now the 3 idocs, but if i join all structures, the Data Type file is going to be gigant. Do u know if only reading the header it could run?

The first or second line of any idoc-XML has the most important data, the idocType field, but i don't know if it's going to be possible doing a split before the mapping.

Thanks in advance.