‎2006 Oct 06 9:00 AM
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.
‎2006 Oct 06 9:06 AM
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
‎2006 Oct 06 9:05 AM
hi,
please goto table DD04T to find the data element texts.
Regards,
Preema
‎2006 Oct 06 9:06 AM
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
‎2006 Oct 06 9:07 AM
using transaction SE84 or SE11 u also got the all info regarding data element.
‎2006 Oct 06 9:08 AM
HEllo,
U can make use of the Fm HR_BEN_GET_TEXT_DATA_ELEMENT
If useful reward.
Vasanth