cancel
Showing results for 
Search instead for 
Did you mean: 

Field level Validation in SAP PI

Former Member
0 Kudos

Hi All,

I am integrating with a 3rd Party system (File to Proxy scenario). Source file contains around 30 fields. I was asked to do field level validations for each of this field in PI. Is this a good practice. Do we do field validation in PI Integration development? I think PI should contain more of integration logic than field level validations. Please suggest.

Also out of all the 30 fields few are numeric, some are text and some are dates. While creating data types do I need to created all as string or based on their nature I need to use integer,date etc? Please suggest which is the best practice.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

venkatanarayana_vagu
Active Participant
0 Kudos
Former Member
0 Kudos

Hi,

Thanks every body for your valuble inputs. I was of the Idea that if you define the element in Data Type as integer and pass a Text value then the message will fail in Mapping. But this never happened with any version of the XI or PI.

Answers (2)

Answers (2)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Achuth,

Rahul and Senthil shared valuable inputs, addition to that if your going for field level validation in PI, go for java mapping, i am thinking that field level validation is kind of data validation.

i have done similar req using JAVA mapping few years back.

Regards,

Raj

Former Member
0 Kudos

This is what i feel .

If you sperate the fields as String, Integer ,Date etc . and also specify the minlength maxlength , the validation would get automatically done while parsing the incoming data into structure . If you do this you may get more data parsing errors in XI . So if you want to reduce the number of errors in the middleware you can do these validations in the source or target .

Senthilprakash1
Participant
0 Kudos

I agree with Rahul.

Yes we can perform validation in PI (most of the cases we do by request of the Business team).

But always have a thumb rule for your self.

1. Check first weather the source system is capable of doing the validation at its end.

2. If YES make sure the source system does the validations required. (I am sure most of the app would be able to the validation).

3.If NO then accept the validation process to be done in PI end.

One Important thing:

What kind of validation are you taking about? i assume this is field level validation rite?

and this is a Proxy to file scenario rite.

I will strongly suggest you to do following things at source and receiver Business systems.

1.gather a meeting the with the end business teams (source and receiver).

2.Force them to create data type at their end (sorce and target)with same data type structure- with same field length even.

ie, if source first field is integer with maxlen25 corresponding reciver field is also integer with maxlen25, if source has char field then in reciver also its char.

If you make both the source and reciever business to have same data type at there end, NO VALIDATION would be required to be done in PI

also in this case you can declare all the data type as STRING in PI and pass the data to receiver system. (which has the same data type as sender).

Regards,

Senthilprakash.