Code: Alles auswählen.
lr_edescr ?=
cl_abap_typedescr=>describe_by_data( <ls_field> ).
lv_fieldcat-outputlen = lr_edescr->output_length.
* description fields
if not lr_edescr->help_id is initial.
* from data elements
lv_fieldcat-rollname = lr_edescr->help_id.
select single reptext scrtext_s scrtext_m scrtext_l
into (lv_fieldcat-reptext_ddic,
lv_fieldcat-seltext_s,lv_fieldcat-seltext_m,
lv_fieldcat-seltext_l)
from dd04t
where rollname = lr_edescr->help_id
and ddlanguage = sy-langu
and as4local = 'A' "only activated
* as4vers not used (written at 2005-08-08 by SAP)
and as4vers = '0000'.
endif.
if not sy-subrc is initial or lr_edescr->help_id is initial.
* if the data element is not active
* or there is no reference to a data element
* we use the field name as description
lv_fieldcat-seltext_s = lv_fieldcat-seltext_m =
lv_fieldcat-seltext_l = lv_fieldcat-reptext_ddic =
lv_fieldcat-fieldname.
endif.
Code: Alles auswählen.
call Function DDIF_FIELDINFO_GET.....
Code: Alles auswählen.
select scrtext_s scrtext_m scrtext_l
from dd04t ....