cancel
Showing results for 
Search instead for 
Did you mean: 

Validation format fields

Former Member
0 Kudos

Hi experts,

I want to do the mobile format validation in mapping using the UDF. If validation fails i wanna throw the response with the error.

He implemented this with BPM. The BPM runs a transformation (mapping validation) and if that fails, responds with error.

But, is there an alternative to BPM? As runs validating fields of an interface message like the following pattern defined for the mobile field?

<xsd:element name="phoneNumber">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/TextID">

7e797b8220d011dd8254e4d9ac100873

</xsd:appinfo>

</xsd:annotation>

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:pattern value="\d" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

Thanks,

Jose.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks Aashish,

But the exception to the system has to go home without sending the message to the destination system.

Currently, my solution is with BPM, but this solution is slower than without BPM.

Edited by: Jose Mª Mudarra Lara on Jun 2, 2008 3:30 PM

Former Member
0 Kudos

Here's some more information about validation: /people/morten.wittrock/blog/2006/03/21/validating-messages-in-xi-using-xml-schema

Former Member
0 Kudos

Hello Iddo,

Now I'm working on another topic. For now, the solution I have done with BPM.

Thank you all for the help,

Jose.

aashish_sinha
Active Contributor
0 Kudos

Hi,

If i am not mistaken, you just want to validate the mobile number field and want to raise exception if it is not in the correct format or length or else you want.

I think for this purpose, you need to write an UDF will also help. In this UDF you can check about the mobile number format and everything and later if any of the given case fails just add the value to resulting string and send this as exception to the target system / or the system you want to send or at the same place where exception occured or you can also get out from the mapping.

Regards

Aashish Sinha

PS : reward points if helpful

Edited by: Aashish Sinha on Jun 2, 2008 3:35 PM

Former Member
0 Kudos

Thanks Iddo,

Does the LookUp I can serve to respond to a message synchronous?

I will investigate if it can be done. In this case it said.

Former Member
0 Kudos

I'm not sure it can. I suppose not, but maybe you figure out a way how to manage it.

Using an integration process for this is far easier though.

Former Member
0 Kudos

You can indeed validate the correctness of a message using a UDF, but I'm not sure about sending out a response with an error. Maybe this can be of some use to you:

/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups

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