cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BPM Numaric data validation

Former Member
0 Likes
385

Hi,

BPM process getting suspended if user skip to enter data for numaric field in BPM. I would like to know the syntax to validate data in BPM while mapping. I was tried using IF() condition but showing syntax error-

Mapping failed
IndexOutOfBoundsException: Index: 0, Size: 0
at: com.sap.glx.mapping.execution.implementation.function.builtin.generic.GenericGetFunction@36d60850(

I would appreciate your inputs on this.

Thanks in advance,
Dev

Accepted Solutions (1)

Accepted Solutions (1)

junwu
SAP Champion
SAP Champion
0 Likes
why not putting this validation in UI?
Former Member
0 Likes

Hi Jun, thanks for your quick reply.

I do agree with you by putting the validationi on UI, but more over we are looking validation in BPM. I believe we can do it BPM, but not sure correct syntax. I am working on CE7.2.

Thanks in advace,
Dev

Answers (1)

Answers (1)

SB9
Active Participant
0 Likes

Hi Dev,

Using BPM Mapping function for numeric validation is not possible. If you are usign WebDynpro for UI then you can assign the input field to numeic type (integer, float, etc) and it will automatically take care of numeric validation. By default the field will have 0, so even if the user skips it will not be a problem.

Former Member
0 Likes

Hi,

We are passing 0 from UI to BPM process if user skips to enter data from initial screen but while approve the task if user intentionally or accidently clear that value from input box obviously in BPM null value is come which causes process getting suspended. So I want to restrict such scenarios. It helps alot if you can share your ideas.

Thanks in advance,
Dev

junwu
SAP Champion
SAP Champion
0 Likes

if the number is so critical,  you should not allow user to approve if the number is missed

SB9
Active Participant
0 Likes

Let us assume that we capture the field in type String. Then you can use an expression function like this -

integer ( IF( matches(input, "[0-9]+"), input, "0" ) )

We can use regular expression to check if the number is integer. If it is integer then IF block would return the same number otherwise it would return 0. The integer function is used to convert string back to integer. Hope this helps!

Former Member
0 Likes

Thanks Jun & Soujanya for your inputs. controlling data by writing code in UI.

Thanks,
Dev