cancel
Showing results for 
Search instead for 
Did you mean: 

PICKLIST with Domain values

Former Member
0 Kudos

Hi I am trying to create a picklist with Domain values in the dropdown.

i crated picklist,but not able to populate the domain values in the picklist..

i wrote this code , not sure what else is missing.. i dont want to create any search help.. but want to show in dropdown the domain avalues.

DATA:

ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,

lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,

lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.

ls_map-context_attr = 'STRUCT.ZZBOOKS'. This is my context node attribute.

ls_map-f4_attr = 'KEY'.

APPEND ls_map TO: lt_outmap.

CREATE OBJECT rv_valuehelp_descriptor

TYPE

cl_bsp_wd_valuehelp_f4descr

EXPORTING

iv_help_id = 'ZBOOKS' This is Data element

iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_dtel

iv_input_mapping = lt_inmap

iv_output_mapping = lt_outmap

iv_object_ref = me.

is there anything missing.

thanks

Niraja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Implement the below logic in the GET_V_attribute

DATA:st_ddlb TYPE bsp_wd_dropdown_line,

i_ddlb TYPE bsp_wd_dropdown_table,

st_val TYPE vrm_value,

itab_val TYPE TABLE OF vrm_value.

CALL FUNCTION 'FICO_DOMAIN_VALUES_GET'

EXPORTING

i_table_name = 'X'----


X-Table Name

i_field_name = 'Y''----


Y-Field Name

i_langu = sy-langu

IMPORTING

e_t_list = itab_val.

LOOP AT itab_val INTO st_val.

st_ddlb-key = st_val-key.

st_ddlb-value = st_val-text.

APPEND st_ddlb TO i_ddlb.

ENDLOOP.

IF NOT gr_ddlb IS BOUND.

CREATE OBJECT gr_ddlb----


>DECLARE in the node class as gr_ddlb type ref to CL_CRM_UIU_DDLB.

EXPORTING

iv_source_type = IF_BSP_WD_VALUEHELP_PLDESCR=>SOURCE_TYPE_TABLE.

ENDIF.

gr_ddlb->set_selection_table( it_selection_table = i_ddlb ).

rv_valuehelp_descriptor = gr_ddlb.

Regards,

Gangadhar.S

Answers (2)

Answers (2)

nisha_vinod
Advisor
Advisor
0 Kudos

Hi Niraja

In addition, you can take a look at the foll blog that clearly explains step-wise approach for creating DDLB.

/people/tim.back/blog/2009/02/09/learn-how-to-create-drop-down-listboxes-in-crm-70s-web-client-ui

Hope this helps.

Regards

Nisha

former_member214667
Contributor
0 Kudos

HI...

You need to implement the coding as mentioned by Gangadhar. In addition, you need to set the field type to picklist in the corresponding GET_P_* method.