Posted: Sat Sep 15, 2007 9:05 pm Post subject: Display actual information about system fields
Code:
report z_display_system_fields.
* ----------------------------------------------------------------------
* This report prints current values of the system fields.
* ----------------------------------------------------------------------
types t_itab like dfies occurs 0.
parameters: availabl as checkbox default 'X',
obsolete as checkbox default 'X',
internal as checkbox default 'X'.
perform print_sy_values.
* ----------------------------------------------------------------------
form print_sy_values.
data: it_dfies like dfies occurs 0 with header line,
it_obsolete like dfies occurs 0 with header line,
it_internal like dfies occurs 0 with header line.
call function 'DDIF_FIELDINFO_GET'
exporting tabname = 'SYST'
tables dfies_tab = it_dfies
exceptions others = 1.
if sy-subrc <> 0.
message id sy-msgid type 'I' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
it_obsolete[] = it_dfies[].
it_internal[] = it_dfies[].
delete it_dfies where fieldtext = 'Internal'
or fieldtext = 'Obsolete'.
delete it_obsolete where fieldtext <> 'Obsolete'.
delete it_internal where fieldtext <> 'Internal'.
sort it_dfies by fieldtext.
if not availabl is initial.
perform write_values tables it_dfies.
endif.
if not obsolete is initial.
perform write_values tables it_obsolete.
endif.
if not internal is initial.
perform write_values tables it_internal.
endif.
endform.
* ----------------------------------------------------------------------
form write_values tables itab type t_itab.
data: w_name(10) type c,
w_info(80) type c,
w_pos like sy-fdpos.
uline.
loop at itab.
concatenate 'SY-' itab-fieldname into w_name.
write (w_name) to w_info.
shift w_info left deleting leading space.
w_pos = strlen( w_info ).
write: / w_name color col_key intensified off,
itab-fieldtext, itab-inttype,itab-datatype no-gap,
'(' no-gap, itab-leng no-gap no-zero, ')'.
if w_pos > 0.
write w_info(w_pos) color col_positive.
endif.
endloop.
uline.
endform.
* ----------------------------------------------------------------------
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.