Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CP in select option for multiple value

Suryaji26
Participant
9,034

Hi Team,

I am facing issue in CP for multiple value in select option.

my requirement is to fetch al the values between low and high parameter in selection screen with CP.

Please see the below code.


But I am not getting all the values between low and high but value for low and high only,

Please help to get it forward.

1 ACCEPTED SOLUTION
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
7,404

"Yes I am preety good in select options "

Well, then you should be able to derive the logical conditions that are defined in your ranges table (as described in the documentation for IN). From that, the result should be clear. The table lines that you add in the ELSE branch do not make too much sense. They are two single conditions. Also note, that the RHS is concatenated from LOW and HIGH in both conditions.

"but unfortunately here we have to use CP with BT"

And that's the problem. You cannot easily mix such different kinds of concepts, at least not in one go.

  • CP is for string processing. It does a pattern matching. In SELECT it is translated to LIKE.
  • BT is a size comparison. same as < or > or <= or >=. It compares values and is only recommended for numerical values. For character strings, it compares the size of the platform dependent internal representation.

So hold on, think about what you want to achieve and about the technical background and from that you might derive a solution for your task.

PS: Use SQL trace in debugger or ST05 to see the conditions derived from the ranges table.

3 REPLIES 3
Read only

matt
Active Contributor
7,404

Run in debug and examine the contents of your select option, read the ABAP help on select options, and IN as used in a select statement.

Read only

0 Likes
7,404

Thanks Matthew,

Yes I am preety good in select options and gone through the available material,

but unfortunately here we have to use CP with BT as here we are giving both low and high in selection.

Thanks,

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
7,405

"Yes I am preety good in select options "

Well, then you should be able to derive the logical conditions that are defined in your ranges table (as described in the documentation for IN). From that, the result should be clear. The table lines that you add in the ELSE branch do not make too much sense. They are two single conditions. Also note, that the RHS is concatenated from LOW and HIGH in both conditions.

"but unfortunately here we have to use CP with BT"

And that's the problem. You cannot easily mix such different kinds of concepts, at least not in one go.

  • CP is for string processing. It does a pattern matching. In SELECT it is translated to LIKE.
  • BT is a size comparison. same as < or > or <= or >=. It compares values and is only recommended for numerical values. For character strings, it compares the size of the platform dependent internal representation.

So hold on, think about what you want to achieve and about the technical background and from that you might derive a solution for your task.

PS: Use SQL trace in debugger or ST05 to see the conditions derived from the ranges table.