Hi Experts,
i have a table view, in which i need to make one field as drop down with values. The values should be taken from a custom table.
i am trying to follow the following process.
Step 1:
Redefined the method get_v_XXXXX and inserted the code snippet.
CREATE OBJECT rv_valuehelp_descriptor TYPE zclass.
Step2:
In SE24, i am trying to create zclass. In this class i am trying to implement the following method.
IF_BSP_WD_VALUEHELP_PLDESCR~GET_SELECTION_TABLE. and added the following code.
DATA :
lt_sel_table TYPE bsp_wd_dropdown_table,
ls_sel_table TYPE LINE OF bsp_wd_dropdown_table.
CALL FUNCTION 'DD_DOMVALUES_GET'
EXPORTING "Here we pass domain of the field to get possible entries
domname = 'z_domain'
text = 'X'
langu = sy-langu
TABLES
dd07v_tab = lt_domain_entries
EXCEPTIONS
wrong_textflag = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
APPEND INITIAL LINE TO lt_sel_table. LOOP AT lt_domain_entries ASSIGNING <domain>.
ls_sel_table-key = <domain>-valpos.
ls_sel_table-value = <domain>-ddtext.
APPEND ls_sel_table TO lt_sel_table.
CLEAR ls_sel_table.
ENDLOOP. rt_result = lt_sel_table.ENDIF.
Step 3:
Now i have to redefine get_p_XXXXX method.
The problem i am facing is, the function module DD_DOMVALUES_GET is not woking for my z domain.
Please suggest, how to proceed.
Thanks,
BKVS.