cancel
Showing results for 
Search instead for 
Did you mean: 

File to IDOC- Message validation

Former Member
0 Kudos

Hi,

I have a scenario..File to IDOC

A file in CSV format is having GL data(1...unbounded) which consists of GL document header (exactly once) and GL Line items (1...unbounded), the issues are..

1. I have defined Data type in IR. But if there the data in the file does not match the message type, i want to route the file to a different directory(Schema_error). How to do it?

2. How can we check the master information before sending to IDOC?

3. If the master data does not exist in SAP then route the file to a directory(MasterData_error), otherwise send to SAP system through IDOC. How to do it?

suggest me the solution..

looking for prompt reply.

Thanks in advance.

Regards,

Vishal Gupta

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>>1. I have defined Data type in IR. But if there the data in the file does not match the message type, i want to route the file to a different directory(Schema_error). How to do it?

you need to implement it yourself as XI 3.0/7.0 does not support validations

(you can do it in java mapping, xslt mapping etc)

>>>>2. How can we check the master information before sending to IDOC?

you can use RFC lookup (or do a lookup from a BPM)

>>>>3. If the master data does not exist in SAP then route the file to a directory(MasterData_error), otherwise send to SAP system through IDOC. How to do it?

for this you need a BPM

Regards,

michal

Former Member
0 Kudos

Hi Michal,

Thanks for prompt reply..

Could you please explain in detail (specially the second one)..also for 1st question some sample code?

Regards,

Vishal

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

RFC lookups:

/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

Regards,

michal

Former Member
0 Kudos

Vishal,

>>Could you please explain in detail (specially the second one)..

Write a RFC program in R/3 to check if the master data exists(do all the valiation here) using the input field from the 3rd part application. You can call this RFC from mapping in XI. Just pass the fields from the sender here and get the result and map to the target.

Ref:https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439

Michal's article for implementing this lookup.

>>also for 1st question some sample code?

Just search for JAVA mapping, you will get good docs and blogs in SDN.

And a last thought, BPM can be avoided here if you go for Enhanced Receiver Determination. Some unused field in Target IDOC can be used for this validation. Michal, pls correct me if I am wrong.

Regards,

Jai Shankar

Answers (0)