SAP DDUT_TEXT_FOR_VALUE Function Module for DD: Define Text of a Value for an ABAP Dictionary Field









DDUT_TEXT_FOR_VALUE is a standard ddut text for value SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for DD: Define Text of a Value for an ABAP Dictionary Field processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for ddut text for value FM, simply by entering the name DDUT_TEXT_FOR_VALUE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SDFC
Program Name: SAPLSDFC
Main Program: SAPLSDFC
Appliation area: S
Release date: 17-May-1999
Mode(Normal, Remote etc): Normal Function Module
Update:



Function DDUT_TEXT_FOR_VALUE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'DDUT_TEXT_FOR_VALUE'"DD: Define Text of a Value for an ABAP Dictionary Field
EXPORTING
* TABNAME = "Name of Table (or Data Element)
* FIELDNAME = "Field Name
* CALLING_PROGRAM = "Name of calling program
* STRUCNAME = "Name of Suitable Structure in Calling Program
VALUE = "Value for which Text should be Determined
* VALUE_IS_EXTERNAL = ' ' "Is Value in External Representation
* LANGU = SY-LANGU "Language Key of Current Text Environment

IMPORTING
TEXT = "Text for VALUE
NOT_UNIQUE = "Text is not Unique
VALUE_INTERNAL = "Internal Representation of VALUE
TEXT_FIELDS = "Contents of Data Fields of Text Table

CHANGING
* ADDITIONAL_FIELDS = "Contents of Further (Foreign) Key Fields

EXCEPTIONS
NO_DDIC_FIELD = 1 ILLEGAL_VALUE = 2
.



IMPORTING Parameters details for DDUT_TEXT_FOR_VALUE

TABNAME - Name of Table (or Data Element)

Data type: DFIES-TABNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

FIELDNAME - Field Name

Data type: DFIES-LFIELDNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

CALLING_PROGRAM - Name of calling program

Data type: SY-REPID
Optional: Yes
Call by Reference: No ( called with pass by value option)

STRUCNAME - Name of Suitable Structure in Calling Program

Data type: C
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALUE - Value for which Text should be Determined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VALUE_IS_EXTERNAL - Is Value in External Representation

Data type: DDBOOL_D
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGU - Language Key of Current Text Environment

Data type: SY-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for DDUT_TEXT_FOR_VALUE

TEXT - Text for VALUE

Data type: STRING
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_UNIQUE - Text is not Unique

Data type: DDBOOL_D
Optional: No
Call by Reference: No ( called with pass by value option)

VALUE_INTERNAL - Internal Representation of VALUE

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TEXT_FIELDS - Contents of Data Fields of Text Table

Data type: DCFIELDDATS
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for DDUT_TEXT_FOR_VALUE

ADDITIONAL_FIELDS - Contents of Further (Foreign) Key Fields

Data type: DCFIELDDATS
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_DDIC_FIELD - Specified Field has no DDIC Reference

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ILLEGAL_VALUE - Value Passed is Illegal

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for DDUT_TEXT_FOR_VALUE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_text  TYPE STRING, "   
lv_tabname  TYPE DFIES-TABNAME, "   
lv_no_ddic_field  TYPE DFIES, "   
lv_additional_fields  TYPE DCFIELDDATS, "   
lv_fieldname  TYPE DFIES-LFIELDNAME, "   
lv_not_unique  TYPE DDBOOL_D, "   
lv_illegal_value  TYPE DDBOOL_D, "   
lv_value_internal  TYPE DDBOOL_D, "   
lv_calling_program  TYPE SY-REPID, "   
lv_strucname  TYPE C, "   
lv_text_fields  TYPE DCFIELDDATS, "   
lv_value  TYPE DCFIELDDATS, "   
lv_value_is_external  TYPE DDBOOL_D, "   ' '
lv_langu  TYPE SY-LANGU. "   SY-LANGU

  CALL FUNCTION 'DDUT_TEXT_FOR_VALUE'  "DD: Define Text of a Value for an ABAP Dictionary Field
    EXPORTING
         TABNAME = lv_tabname
         FIELDNAME = lv_fieldname
         CALLING_PROGRAM = lv_calling_program
         STRUCNAME = lv_strucname
         VALUE = lv_value
         VALUE_IS_EXTERNAL = lv_value_is_external
         LANGU = lv_langu
    IMPORTING
         TEXT = lv_text
         NOT_UNIQUE = lv_not_unique
         VALUE_INTERNAL = lv_value_internal
         TEXT_FIELDS = lv_text_fields
    CHANGING
         ADDITIONAL_FIELDS = lv_additional_fields
    EXCEPTIONS
        NO_DDIC_FIELD = 1
        ILLEGAL_VALUE = 2
. " DDUT_TEXT_FOR_VALUE




ABAP code using 7.40 inline data declarations to call FM DDUT_TEXT_FOR_VALUE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single TABNAME FROM DFIES INTO @DATA(ld_tabname).
 
 
 
"SELECT single LFIELDNAME FROM DFIES INTO @DATA(ld_fieldname).
 
 
 
 
"SELECT single REPID FROM SY INTO @DATA(ld_calling_program).
 
 
 
 
DATA(ld_value_is_external) = ' '.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_langu).
DATA(ld_langu) = SY-LANGU.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!