Skip to Content
author's profile photo Former Member
Former Member

Getting a field's title from the ABAP dictionary

Hi All,

I'm learning ABAP and want to include field titles in my program output from the ABAP dictionary, rather than coding them as text elements.

Is there a function module to do this? Can someone provide some sample code?

Cheers,

Steve

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Best Answer
    Posted on Oct 24, 2007 at 02:20 PM

    Try this function.

    
    
    data: label type string.
    
    CALL FUNCTION 'DDIF_FIELDLABEL_GET'
      EXPORTING
        tabname              = 'MARA'
        FIELDNAME            = 'MATNR'
    *   LANGU                = SY-LANGU
    *   LFIELDNAME           = ' '
      IMPORTING
        LABEL                = label.
    
    
    

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 24, 2007 at 02:18 PM

    Hi Steve,

    chk this if this FM AM_FIELD_TEXT_GET works in ur system

    Add comment
    10|10000 characters needed characters exceeded