SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Display actual information about system fields



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP Dictionary
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Sat Sep 15, 2007 9:05 pm    Post subject: Display actual information about system fields Reply with quote

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.
* ----------------------------------------------------------------------

Source: http://www.geocities.com/victorav15/sapr3/utilities/zvvsyst.txt
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP Dictionary All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.