cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with select options

Former Member
0 Kudos

Hi All.

I use WDR_SELECT_OPTIONS and add a date field with intervalls.

SO for example I enter 01.05.2007 to 05.05.2005.

After that I retrieve the range table of that field and the option is set to EQ instead of BT.

If low and high are set shouln't the option be BT automatically?

Thanks for hints.

Cheers,

Sascha

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Sascha,

You are right, BT should be choosen automatically. In case you don't happen to find an oss note fixing the bug, please open an oss ticket. It doesn't occur in our internal development as well as in our test system. So it must have been fixed.

Best regards,

Thomas

Former Member
0 Kudos

Good morning Thomas.

Thanks ... I will search for a note and open an OSS if I won't have any luck.

Cheers,

Sascha

Former Member
0 Kudos

Hi Thomas.

Just for your info ... This is not a bug in WDR_SELECT_OPTIONS.

The add_selection_field method take the parameter i_as_checkbox which is of

type wdy_boolean. I have a customizing table for select options where I defined a

field as_checkbox with type boolean.

boolean false = '-'

wdy_boolean false = ''

So when i customize a field with boolean '-' it is not displayed as checkbox but the

range table gets the option EQ in any case because wdr_select_option interprets

the - as undefined, I guess.

But this is somehow strange. If you search for the type boolean in the system

you'll find 110 types representing a boolean. And much more funny is that some

of them have 3 states: yes, no, undefinied which is something like yes, no, maybe

for me. But this is a different story. Maybe just hard to understand for someone

who is comming from the java world.

Cheers,

Sascha

thomas_szcs
Active Contributor
0 Kudos

Hi Sascha,

Thanks for the info. Indeed, the handling of "boolean"-like types is different to other programming languages. Usually, it's a c length 1 whereas ' ' (or initial value) means false and 'X' (in uppercase) means true. Using abap_bool (type-pool ABAP) along with constants abap_true and abap_false will keep you on the safe side. Unfortunately, since this type is not a DDIC-type, programmers tend to create their own "boolean" data element if they need to type i.e. a field in a DDIC structure. Quite common is to reuse the existing type XFELD. In Web Dynpro we enforce developers to use WDY_BOOLEAN or a data element based on the domain WDY_BOOLEAN at places where a DDIC-type was required. Otherwise, abap_bool is the way to go.

Best regards,

Thomas

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sascha,

By deafult the option is EQ only, you need to change it to BT(Intervel [ ]) using F4 help from the option field then only you can see the expected result.

Warm Regards,

Vijay.

Former Member
0 Kudos

Hi Vijaya.

Thanks.

But isnt this set automatically when you use a normal dynpro report?

Would be nice if WebDynpro was the same here.

Cheers,

Sascha