Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module

Former Member
0 Likes
464

Hi all,

Is there any function module which returns the field name (as viewed in data type )when a field name like 'LIFNR','WRBTR' is passed to it ?

Appreciate ur ideas.

Thanks,

Stock.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
428

Hi,

Then Use Function Module <b>DDIF_FIELDINFO_GET</b>

The sample program will look like this::-

REPORT ZTABLEFIELDNAME.

TABLES: DFIES,
        X030L.

DATA: BEGIN OF INTTAB OCCURS 100.
        INCLUDE STRUCTURE DFIES.
DATA: END OF INTTAB.

PARAMETERS: TABLENM TYPE DDOBJNAME       DEFAULT 'MSEG',
            FIELDNM TYPE DFIES-FIELDNAME DEFAULT 'MENGE'.

      call function 'DDIF_FIELDINFO_GET'
        exporting
          tabname              = TABLENM
          FIELDNAME            = FIELDNM
          LANGU                = SY-LANGU
*         LFIELDNAME           = ' '
*         ALL_TYPES            = ' '
*       IMPORTING
*         X030L_WA             = WATAB
*         DDOBJTYPE            =
*         DFIES_WA             =
*         LINES_DESCR          =
        TABLES
          DFIES_TAB            = INTTAB
*         FIXED_VALUES         =
        EXCEPTIONS
          NOT_FOUND            = 1
          INTERNAL_ERROR       = 2
          OTHERS               = 3.

      if sy-subrc <> 0.
         WRITE:/ 'Field name not found'.
      endif.

      LOOP AT INTTAB.
         WRITE:/ INTTAB-TABNAME, INTTAB-FIELDNAME, INTTAB-FIELDTEXT.
      ENDLOOP.

Regards

Sudheer

4 REPLIES 4
Read only

Former Member
0 Likes
428

hi,

please goto table DD04T to find the data element texts.

Regards,

Preema

Read only

Former Member
0 Likes
429

Hi,

Then Use Function Module <b>DDIF_FIELDINFO_GET</b>

The sample program will look like this::-

REPORT ZTABLEFIELDNAME.

TABLES: DFIES,
        X030L.

DATA: BEGIN OF INTTAB OCCURS 100.
        INCLUDE STRUCTURE DFIES.
DATA: END OF INTTAB.

PARAMETERS: TABLENM TYPE DDOBJNAME       DEFAULT 'MSEG',
            FIELDNM TYPE DFIES-FIELDNAME DEFAULT 'MENGE'.

      call function 'DDIF_FIELDINFO_GET'
        exporting
          tabname              = TABLENM
          FIELDNAME            = FIELDNM
          LANGU                = SY-LANGU
*         LFIELDNAME           = ' '
*         ALL_TYPES            = ' '
*       IMPORTING
*         X030L_WA             = WATAB
*         DDOBJTYPE            =
*         DFIES_WA             =
*         LINES_DESCR          =
        TABLES
          DFIES_TAB            = INTTAB
*         FIXED_VALUES         =
        EXCEPTIONS
          NOT_FOUND            = 1
          INTERNAL_ERROR       = 2
          OTHERS               = 3.

      if sy-subrc <> 0.
         WRITE:/ 'Field name not found'.
      endif.

      LOOP AT INTTAB.
         WRITE:/ INTTAB-TABNAME, INTTAB-FIELDNAME, INTTAB-FIELDTEXT.
      ENDLOOP.

Regards

Sudheer

Read only

0 Likes
428

using transaction SE84 or SE11 u also got the all info regarding data element.

Read only

Former Member
0 Likes
428

HEllo,

U can make use of the Fm HR_BEN_GET_TEXT_DATA_ELEMENT

If useful reward.

Vasanth