cancel
Showing results for 
Search instead for 
Did you mean: 

Validation required in File to File scenario

Former Member
0 Kudos

Hi Experts,

I have developed a file to file scenario. PI picks up a .csv file from an FTP server and delivers this file to another FTP server without any conversions. It's a simple passthrough mapping.

I wish to implement a validation to check the content of a particular field in the file. I have used no mapping in this case and cannot write any UDF for this. Please let me know how can I implement validation in this scenario?

Thanks,

Dhawal

Accepted Solutions (0)

Answers (3)

Answers (3)

madhusudana_reddy2
Contributor
0 Kudos

Using adapter modules for validation is not recommended. SAP given mapping feature to validate and transform the message.

If you want to validate simply for deciding receiver, use conditional receiver determination and conditional interface determination.

thanks,

madhu

Former Member
0 Kudos

Hi Madhu,

Thanks for the very helpful answer. However the content that will be used in conditional receiver determination would be a date field. Can I use variable value in the condition. For example, if the date is tomorrow's date then receiver 'A' else receiver 'B'. Is that feasible?

Thanks,

Dhawal.

Shabarish_Nair
Active Contributor
0 Kudos

why dont you try the design of using a flag and then handle your message flow?

/people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

else use the option of enhanced RD - http://help.sap.com/saphelp_nw04/helpdata/EN/43/a5f2066340332de10000000a11466f/frameset.htm

Former Member
0 Kudos

Hi,

The problem here is that the message is not going through the mapping. It's File-PI-File scenario where PI reads the files from source FTP using File Content Conversion and transfers this file to target FTP. So, I have no means to do any validation/check in the message mapping.

- Dhawal

Shabarish_Nair
Active Contributor
0 Kudos

this is what you can do;

1. Code a module that will do the required validation.

2. in the output message put all the incoming file data into one node called DATA and in another node called FLAG set Y or N

3. in the receiver determination check for Y or N in the flag field

4. have a simple java mapping that will extract the file data from the data node and set it to the output stream

Former Member
0 Kudos

Hi,

>>The problem here is that the message is not going through the mapping.It's File-PI-File scenario where PI reads the files from source FTP using File Content Conversion and transfers this file to target FTP.

The best thing is do one to one mapping and bring the input field value then based on that do conditional routing

Regards

stefan_grube
Active Contributor
0 Kudos

> Can I use variable value in the condition. For example, if the date is tomorrow's date then receiver 'A' else receiver 'B'. Is that feasible?

You can use an enhanced receiver determination with a Java mapping.

The Java mapping parses the input file and determines th receive based on the condition you mentioned.

This Java mapping has to provide on XML structure as output corresponding to the receiver determination structure.

The target file structure will not be influenced by this.

Former Member
0 Kudos

Hi Dhaval,

If you want to check the structure then in the PI 7.1 XML validation is there, In sender agreement Integration Engine Validation and Adapter Engine validation are there, so we have to use those things.

Check

http://www.riyaz.net/blog/pi-71-xml-validation-in-integration-engine/

But if it is not related to the structure (if you want to compare the data of input file) then you have to write the custom adapter module.

Regards

Ramesh

Former Member
0 Kudos

Hi,

Thanks for your answers. Could you please throw some light on custom Adapter Modules? I am completely new to this area.

Thanks,

Dhawal

Former Member
0 Kudos

Hi,

Plz refer below links for custom module development:

Where to get the libraries for XI development

http://wiki.sdn.sap.com/wiki/display/XI/Where%20to%20get%20the%20libraries%20for%20XI%20development

Adapter module development:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e674...

Thanks

Amit

Shabarish_Nair
Active Contributor
0 Kudos

write a custom module and attach it to the sender file adapter