on 10-07-2008 11:11 PM
I am thinking of doing basic validation of date and amount fields for the input file so that the file errors out at the adapter module itself instead of waiting to do this at mapping time. Is it possible to access the field names in the file (as defined by content conversion perhaps or even as offsets) in adapter module code?
Hi James
What kind of validation you are looking in date and amount fields
Is it against some constant value, or from some database?
While reading the file only basic Data type validation is possible. Content validation you have to do at mapping level.
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi James
If you have created the DT in PI then you can add these to that DT. Go to your data type and then go to details you can use the Facets provided by PI
http://help.sap.com/saphelp_nw70/helpdata/EN/b2/439347ce019848bf3ad9c000d414c3/content.htm
Else if you are using an external definition. Edit the XSD and you can incorporate these facets
Hope this solves your basic data type validation problem
Thanks
Gaurav
I have tried using facet with pattern="[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" for date, but if I send the field as "xxxxxxxx", it does not fail anywhere. How are facets useful? If I define the facet above, should I be expectng the file pick up to fail at the adapter level because the incoming data does not match the type/facet defined for that field? It does not seem to be working that way.
>>It does not seem to be working that way
Its not meant to work that way either,the facets provided in data type is just for mere documentation/clarity and are not considered at the time of message mapping .
You need to handle the validation in Message mapping.
Payload validation is available from PI 7.1 though.
Thanx
Aamir
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.