‎2007 Aug 24 5:26 AM
I need a function module where in i can get the data from a value range in a domain.
Message was edited by:
Gurpreet Singh
‎2007 Aug 24 5:29 AM
‎2007 Aug 24 5:30 AM
Write a select statement for the table DD07T and fetch the TEXT of the domain Values. if needed use DD07L table for Domain Values.
You can also use the fun module
GET_DOMAIN_VALUES
Reward points for useful Answers
Regards
‎2007 Aug 24 5:30 AM
Hi,
You can use this code to get the Doman's fixed values.
DATA: lt_fixed_values TYPE ddfixvalues,
CALL METHOD cl_abap_typedescr=>describe_by_name
EXPORTING
p_data = 'Domain_name' " Pass the domain name here
RECEIVING
p_descr_ref = lcl_abap_typedescr.
TRY.
lcl_abap_elemdescr ?= lcl_abap_typedescr.
CATCH cx_sy_move_cast_error.
ENDTRY.
IF lcl_abap_elemdescr IS BOUND.
CALL METHOD lcl_abap_elemdescr->get_ddic_fixed_values
EXPORTING
p_langu = sy-langu " Give the language
RECEIVING
p_fixed_values = lt_fixed_values " This table will have the fixed values
EXCEPTIONS
not_found = 1
no_ddic_type = 2
OTHERS = 3.
ENDIF.
Regards,
Sesh