‎2008 Nov 25 9:55 AM
Dear Experts!
Generally how can I use this method correctly?
Interface IF_WD_SELECT_OPTIONS has a method named ADD_SELECTION_FIELD.
Especially the import Parameter I_VALUE_HELP_TYPE is the most interesting one for me.
Because I need a special type : CO_VH_TYPE_CLOCK .
data ztest type ref to IF_WD_SELECT_OPTIONS.
create object ztest.
CALL METHOD ztest->add_selection_field
EXPORTING
i_id = 'BUKRS'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_CLOCK .Please help me I dont know how to solve this requirement.
regards
sa
‎2008 Nov 25 10:34 AM
hi max
1)I get now the message:
if_wd_value_help_handler=>CO_VH_TYPE_CLOCK
is not type compatible with formal parameter i_value_help_type
2) By the way how did you find out that you need CL_WDR_SELECT_OPTIONS ?
regards
ertas
‎2008 Nov 25 10:01 AM
Hi
The interface is just as class without implementation, u should assign the interface to a class and then to implement the method ADD_SELECTION_FIELD or you should say us where this interface is used, a BADI?
That interface is used in the class CL_WDR_SELECT_OPTIONS
Max
‎2008 Nov 25 10:05 AM
Hi
Your code should be like this:
data ztest type ref to CL_WDR_SELECT_OPTIONS.
create object ztest.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
EXPORTING
i_id = 'BUKRS'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_CLOCK .But I don't know the class CL_WDR_SELECT_OPTIONS
Let's know where u need to call the method above
Max
‎2008 Nov 25 10:05 AM
pls can you show me that just in a small code example.
Reagrds
ilhan
‎2008 Nov 25 10:34 AM
hi max
1)I get now the message:
if_wd_value_help_handler=>CO_VH_TYPE_CLOCK
is not type compatible with formal parameter i_value_help_type
2) By the way how did you find out that you need CL_WDR_SELECT_OPTIONS ?
regards
ertas
‎2008 Nov 25 11:02 AM
Hi
I've searched where the interface IF_WD_SELECT_OPTIONS is used.
It should be:
data ztest type ref to CL_WDR_SELECT_OPTIONS.
create object ztest.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
EXPORTING
i_id = 'BUKRS'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE.Anyway the parameter IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE is type string so u can also:
data ztest type ref to CL_WDR_SELECT_OPTIONS.
data: i_value_help_type type string.
create object ztest.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
EXPORTING
i_id = 'BUKRS'
* i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE.
i_value_help_type = i_value_help_type.Max
Edited by: max bianchi on Nov 25, 2008 12:02 PM
‎2008 Nov 25 1:01 PM
max thank you very much for your help but I need CO_VH_TYPE_CLOCK not
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE.
but exactly this is my problem
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_CLOCK
return the error:
if_wd_value_help_handler=>CO_VH_TYPE_CLOCK
is not type compatible with formal parameter i_value_help_type
Or is it not possible to use CO_VH_TYPE_CLOCK ????
regards
ertas
‎2008 Nov 25 1:19 PM
Hi
I don't know what CO_VH_TYPE_CLOCK means, anyway u can transfer it to a variable type string and use it for the method:
data ztest type ref to CL_WDR_SELECT_OPTIONS.
data: i_value_help_type type string.
create object ztest.
move IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_CLOCK to i_value_help_type.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
EXPORTING
i_id = 'BUKRS'
i_value_help_type = i_value_help_type.Max
‎2008 Nov 25 1:35 PM
max,
that means there is no possiblity to use CO_VH_TYPE_CLOCK directly although it
is an attribute of IF_WD_VALUE_HELP_HANDLER.
regards
ertas
‎2008 Nov 25 1:42 PM
Hi Ertas
I'm sorry but I don't the interface IF_WD_SELECT_OPTIONS and the class CL_WDR_SELECT_OPTIONS, if I understand, it seems they are for WebDynpro.
So u should give more information for helping you: I don't understand what and where you need to do?
Max
‎2008 Nov 25 9:12 PM
max it is very easy.
instead
data ztest type ref to CL_WDR_SELECT_OPTIONS.
data: i_value_help_type type string.
create object ztest.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
EXPORTING
i_id = 'BUKRS'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE.this
data ztest type ref to CL_WDR_SELECT_OPTIONS.
data: i_value_help_type type string.
create object ztest.
CALL METHOD ztest->IF_WD_SELECT_OPTIONS~add_selection_field
EXPORTING
i_id = 'BUKRS'
i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_CLOCK
to sum up:
no CO_PREFIX_NONE
but CO_VH_TYPE_CLOCK
OK????