cancel
Showing results for 
Search instead for 
Did you mean: 

file to idoc scenario query

Former Member
0 Kudos

Hi,

I am relatively new to XI , i have file to idoc scenario , where the xml file is placed on ftp server i need to pick that create idoc and post it in R/3, these are Purchase orders.

Now the xml file has couple of feilds like status and trailer record count which i need to validate on PI side before creating idoc, suppose if the status feild has value "U" i neednot create idoc for this file , similarly there are some other check that i need to do.

So what i need to know is where and how to do these checks and also how to i send mail alert back if the file fails the checks.

Edited by: Sudhakar Gongloor on May 20, 2010 11:51 AM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Dear All,

For file to idoc scenario is there any possibility to get line items details or xml details i.e the segments and its related field details using reference id, transaction id or interface name or message id in SAP PI 7.0. I know we need to click each and every message in sxi_monitor and look for details.

For SAP(R3 System) I can create a report and set the job for specific time period so automatically it throws the details(like reference no, document date, invoice no from) in ftp path as .csv file. The same ftp path is maintained in program.

I wanted to check FTP--->PI postings and I have set the job at r3 system it is working fine and Im monitoring it too.

Now the end to end scenario is FTP--->PI--->ECC(R3 system). Please help.Many Thanks.

former_member1009864
Participant
0 Kudos

hi

for that you can use multiple mapping in XI or BPM is also good for that kind of scenario.

Thanks & Regards

Diwakar Chaube

madhusudana_reddy2
Contributor
0 Kudos

Hi Sudhakar,

All these validations can be done in SAP PI Mapping, but you need to use multimapping for this. As we can not use IDoc directly in multimapping, import XSD and make external definition to use it in Multimapping. Now do validation like

If Status = U then by using createIf node function create the Idoc node.

so if status is not equals to U then it will not create the target idoc. In this way you proceed.

thanks,

madhu

Former Member
0 Kudos

Hi Madhu,

I have imported the xsd as external defination and suppose i check for required validation of file in mapping then i have to create multiple idoc from this file because this file will have all purchase orders but i need to create one idoc per purchase order, how do i do this, secondly how to i send mail if the validation fails from this point.

former_member200962
Active Contributor
0 Kudos

Validate in Receiver Determination and select the option Terminate with Error.....then have a proper Alert Category created in ALRTCATDEF tcode and a valid Alert Rule in RWB for Integration Engine.....so once the file fails validation alert will be raised and you will get the message......and also the IDOC wont be created.

Regards,

Abhishek.

Shabarish_Nair
Active Contributor
0 Kudos

there are many ways you can achieve this;

1. Do the validations in a mapping and then set a flag and based on the flag do the required action - /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

2. Do the validation in a module - this might be a bit tricky for starters

Former Member
0 Kudos

Hi shabarish,

The link you sent speaks of routing the file if it fails a check, what i need is to send email to some reciepiant.

former_member200962
Active Contributor
0 Kudos

There is a blog available on how to send alert as an Email message to "Fixed Recipients"......you have to do settings in tcode SCOT...

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi shabarish,

> The link you sent speaks of routing the file if it fails a check, what i need is to send email to some reciepiant.

The link speaks of routing the file so you can modify the logic to have a receiver email adapter-

http://www.sdn.sap.com/irj/scn/advancedsearch?query=email+receiver#sdn_content_category_value_blogs