cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for Quantity

Former Member
0 Kudos

Hello Gurus,

I am new to XI.....

Currently, I am creating a Web Service that invokes the RFC...RFC posts the Document...

Now, my question :

Is there any means in XI by which we can validate a quantity field ??

I mean if user supplies 'ASDFGGH' in quantity field, it should either give an exception or it should pass as a null value to RFC...

Can I do that in XI??

I know, with custom functions, one can do that...But, it would be great if somebody could explain it...

Accepted Solutions (0)

Answers (2)

Answers (2)

VijayKonam
Active Contributor
0 Kudos

In defining the data type, use positive integer as the type of the element. This way, XI would take care that if strings like assdadad come, it would throw a mapping exception.

VJ

Former Member
0 Kudos

>>I mean if user supplies 'ASDFGGH' in quantity field, it should either give an exception or it should pass as a null value to RFC...

you can do both(exception as well as Null value),which one do u want?

also if your earlier question has been answered,then please close it

Thanx

Aamir

Former Member
0 Kudos

Hey Aamir,

Question is still unanswered!!! :(((((

Lemme try with this new approach....

If value is other than normal Quantity, i.e., ASEFGG.DSD then I should stop there itself in XI and should not pass that incorrect value to RFC.

If it is correct value, then I shall pass it onto RFC.

Former Member
0 Kudos

simply use If-else function of message mapping,if the condition is satisfied then pass the correct value else pass blank.

and i guess you can also use createIf function too.

Thanx

Aamir

Message was edited by:

Aamir Suhail