Application Development 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: 

Field Name- Short Description

Former Member
0 Kudos

Hi all,

While I am writing a program for object model listing, I need to get "Short Description" for each fields. I can get Field name, Data Element, Length, Type, Decimal but not Short Description. I thought it is DD03T-DDTEXT. But cannot get the data. Can anyone tell me how can I get the data?

Regards,

Nathan

Will Reward if useful.

4 REPLIES 4

Former Member
0 Kudos

Hi Nathan,

Use table DD04T - this holds the descriptions for the data elements. If fields are based on data elements, then the descriptions aren't stored in DD03T.

Former Member
0 Kudos

Hi,

Fieldname: DDTEXT

Tablename: DD03L/DD04T

Regards

Message was edited by:

skk

0 Kudos

Hi.. Thank you so much for your help..My problem is solved by your solutions. I want to give reward points .But this post is not in my "Your Questions" list. So can't see reward option in the left panel. Besides, my account had been blocked for a while. How can I fix this?

Regards,

Nathan

Former Member
0 Kudos

hi .. here is the program to get the values and text of the domain



report  Z_FIND_DOMAIN_FIXED_VALUES.
tables  : DD03L  .  " txw_c_soex .
type-pools: slis.
TYPES : BEGIN OF ty_tables,
FIELDNAME  LIKE  DD03L-FIELDNAME ,
*        include  structure  DD03L  .  "txw_c_soex.
END OF ty_tables.

TYPES : tt_xdfies TYPE TABLE OF dfies.
TYPES : tt_tables TYPE TABLE OF ty_tables.

DATA : gt_tables      TYPE TABLE OF  dd07v ,
       gt_dart_tables TYPE tt_tables,
       gs_tables      LIKE LINE OF gt_tables,
       gs_dart_tables LIKE LINE OF gt_dart_tables.

DATA  :  lt_values TYPE TABLE OF dd07v,
         ls_values      LIKE LINE OF lt_values ,
         lt_values1 TYPE TABLE OF dd07v,
         ls_values1      LIKE LINE OF lt_values1.


*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid,
      gt_events     type slis_t_event,
      gd_prntparams type slis_print_alv.


*select-options:  s_struct for   txw_c_soex-src_struct.
select-options:  s_FIELD for DD03L-FIELDNAME.

*SELECT src_struct  FROM txw_c_soex  INTO TABLE gt_dart_tables Where
*                                                src_struct  in
*s_struct
  select FIELDNAME  from DD03L  iNTO TABLE gt_dart_tables Where
                                               FIELDNAME  in
s_FIELD

 .


SORT gt_dart_tables BY   FIELDNAME .  "src_struct.
DELETE ADJACENT DUPLICATES FROM gt_dart_tables COMPARING  FIELDNAME .
"src_struct.

LOOP AT gt_dart_tables INTO gs_dart_tables.
*  PERFORM get_checktable USING gs_dart_tables-FIELDNAME .
  CALL FUNCTION 'DD_DOFV_GET'
     EXPORTING
       GET_STATE           = 'M'
       LANGU               =  SY-LANGU
*       PRID                = 0
       WITHTEXT            = 'X'
       DOMAIN_NAME         = gs_dart_tables-fieldname
       "  ls_xdfies-FIELDNAME
*     IMPORTING
*       GOT_STATE           =
      TABLES
        DD07V_TAB_A         =  lt_values
        DD07V_TAB_N         =  lt_values1
*     EXCEPTIONS
*       ILLEGAL_VALUE       = 1
*       OP_FAILURE          = 2
*       OTHERS              = 3
              .
    IF SY-SUBRC <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

SORT  Lt_values  by  DOMNAME   DDLANGUAGE VALPOS  .
    loop  at  lt_values  into  ls_values .
    move-corresponding   ls_values  to   gs_tables .
    append   gs_tables  to  gt_tables .
    endloop .
CLEAR  :  lt_values , ls_values , gs_tables  .

SORT  Lt_values1  by  DOMNAME   DDLANGUAGE VALPOS  .

loop  at  lt_values1  into  ls_values1 .
move-corresponding   ls_values1  to   gs_tables .
append   gs_tables  to  gt_tables .
endloop .
CLEAR  :  lt_values1 , ls_values1 , gs_tables  .

*endloop .


ENDLOOP.

SORT gt_tables BY  DOMNAME   DDLANGUAGE VALPOS .
DELETE ADJACENT DUPLICATES FROM gt_tables COMPARING  DOMNAME  VALPOS
DDLANGUAGE.


PERFORM display_data.
perforM ALV .

FORM display_data.
fieldcatalog-fieldname   = 'DOMNAME'.
  fieldcatalog-seltext_m   = 'Domain name'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-outputlen   = 30.
  fieldcatalog-key         = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'VALPOS'.
  fieldcatalog-seltext_m   = 'Domain value key'.
  fieldcatalog-col_pos     = 1.
  fieldcatalog-outputlen   = 4.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'DDLANGUAGE'.
  fieldcatalog-seltext_m   = 'Language key'.
  fieldcatalog-col_pos     = 2.
  fieldcatalog-outputlen   = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'DOMVALUE_L'.
  fieldcatalog-seltext_m   = 'Values for domains: Single value/upper
limit'.
  fieldcatalog-col_pos     = 3.
  fieldcatalog-outputlen   = 10.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'DOMVALUE_H'.
  fieldcatalog-seltext_m   = 'Values for domains, upper limit'.
  fieldcatalog-col_pos     = 4.
  fieldcatalog-outputlen   = 10.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.

  fieldcatalog-fieldname   = 'DDTEXT'.
  fieldcatalog-seltext_m   = 'Short text for fixed values'.
  fieldcatalog-col_pos     = 5.
  fieldcatalog-outputlen   = 60.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
ENDFORM.                    " display_data
*&---------------------------------------------------------------------*
*&      Form  ALV
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM ALV.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program      = gd_repid
*            i_grid_title           = outtext
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
*            it_special_groups       = gd_tabgroup
            it_events               = gt_events
            is_print                = gd_prntparams
            i_save                  = 'X'
*            is_variant              = z_template
       tables
            t_outtab                =  gt_tables
       exceptions
            program_error           = 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.
  endif.
ENDFORM.                    " ALV

reward points if it is usefull ....

Girish