cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a "less than" condition in the condition editor

Former Member
0 Kudos

Hi there,

I'm designing a BPM with a loop which needs to run while a counter is less than a determined value.

I've defined the counter as a simple type container and I've used a container operator to increment this counter. But in the condition editor for the loop, I've not found a simple way to create this "less than" condition, other than creating a huge OR statement with all the possible values that the counter can assume (1, 2, ..., max_value), which I would really rather not to use.

I've read about using a XPath expression to create this less than condition, but I need to use it in a simple variable, not a message.

I've also searched through SDN about this, but I didn't manage to find anything on the topic (except for the XPath thing).

Is there any way of doing this?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

just try using the NOT EQUAL TO in your condition editor.

Initalize the variable to the maximum value and then decrement it. Once it reaches the minimum value for which NOT EQUAL TO is defined, it will stop processing and get out of the SWITCH and so on.

regards,

Bhavesh

Message was edited by: Bhavesh Kantilal

henrique_pinto
Active Contributor
0 Kudos

> hi,

>

> just try using the NOT EQUAL TO in your condition

> editor.

>

> regards,

> Bhavesh

Thanks for the answer!

I had thought of that too, but I wanted to know if it was possible to perform this less than condition, for any other situation that not a loop end (meaning, a situation where the variable will not necessarily assume the value max_value).

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

the condition editor is used in your BPM only for LOOP ( SWITCH STEP ). AM not sure of any other way of doin this.

as the online help says, the only available operators are equal to , not equal to, i am not sure if what you want is possible.

http://help.sap.com/saphelp_nw04/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm

Check this link, and see the options available.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

hi henrique,

also check this link,

http://help.sap.com/saphelp_nw04/helpdata/en/ab/13bf7191e73a4fb3560e767a2525fd/content.htm

And the topic, Notes Regarding the Use of XPath Expressions. A work around has been suggested for your problem. Though I have not tried it, it should be possible.

Regards,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

> hi,

>

> the condition editor is used in your BPM only for

> LOOP ( SWITCH STEP ). AM not sure of any other way of

> doin this.

Exactly,

like you said, there are 2 ways of using the condition editor, in a loop end statement or in a switch case. In the loop, the "not equal to" compare may solve the problem, because the variable will necessarily assume the max_value. But in the switch case, that is not necessarily true.

Thanks anyway!

I'll mark this topic as answered.

henrique_pinto
Active Contributor
0 Kudos

> hi henrique,

> also check this link,

>

> http://help.sap.com/saphelp_nw04/helpdata/en/ab/13bf71

> 91e73a4fb3560e767a2525fd/content.htm

>

> And the topic, Notes Regarding the Use of XPath

> Expressions. A work around has been suggested for

> your problem. Though I have not tried it, it should

> be possible.

>

> Regards,

> Bhavesh

That's exactly what I had said on the first post of the topic! I did read hat XPath thing, but it's useful only when the variable to be compared is within a message. When it's a simple variable (as in the counter scenario), you can't use XPath to reference it.