Wednesday, December 22, 2010
This post explains how to read domain fixed values using ABAP code. SAP has provided Function modules to read fixed values in the domain.
There are other function modules to get domain values.
  • DDIF_DOMA_GET
  • GET_DOMAIN_VALUES
  • DD_DOMVALUES_GET
REPORT ztest_notepad.
DATA g_domain TYPE dcobjdef-name VALUE 'GESCH'.
DATA it_dd07v TYPE STANDARD TABLE OF dd07v WITH HEADER LINE.

CALL FUNCTION 'DDIF_DOMA_GET'
EXPORTING
name          = g_domain
langu         = sy-langu
TABLES
dd07v_tab     = it_dd07v
EXCEPTIONS
illegal_input = 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.
SORT it_dd07v BY domvalue_l.
LOOP AT it_dd07v.
WRITE:/ it_dd07v-domname,
it_dd07v-valpos,
it_dd07v-ddlanguage,
it_dd07v-domvalue_l,
it_dd07v-domvalue_h,
it_dd07v-ddtext,
it_dd07v-domval_ld,
it_dd07v-domval_hd,
it_dd07v-appval.
ENDLOOP.
ENDIF.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.