Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7118158
  • 博文数量: 655
  • 博客积分: 10264
  • 博客等级: 上将
  • 技术积分: 8278
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-04 17:47
个人简介

ABAP顾问

文章分类

全部博文(655)

文章存档

2017年(2)

2014年(8)

2013年(3)

2012年(2)

2011年(18)

2010年(102)

2009年(137)

2008年(274)

2007年(134)

分类:

2007-07-09 14:44:22

REPORT z_barry_server_list .

DATA: hosts LIKE msxxlist OCCURS 0 WITH HEADER LINE .
DATA: rfcsi_export LIKE rfcsi.
DATA: hex TYPE x,
      dec TYPE i,
      dec_char(3) TYPE c,
      n TYPE i,
      ip(16)  .

CALL FUNCTION 'RFC_GET_LOCAL_SERVERS'
     TABLES
          hosts         = hosts
     EXCEPTIONS
          not_available = 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.

LOOP AT hosts.
  DO 4 TIMES.
    n = sy-index - 1.
    hex = hosts-hostadr+n(1).
    dec = hex .
    dec_char = dec.
    CONCATENATE ip '.' dec_char INTO ip.
  ENDDO.
  SHIFT ip.
  WRITE: / hosts-name,
           hosts-host,
           hosts-serv,
       (2) hosts-msgtypes,
       (8) hosts-hostadr,
           ip,
       (4) hosts-servno.
  HIDE: hosts-name,hosts-host.
ENDLOOP.

AT LINE-SELECTION.
  CALL FUNCTION 'RFC_SYSTEM_INFO' DESTINATION hosts-name
   IMPORTING
     rfcsi_export             = rfcsi_export  .

  WRITE / : rfcsi_export-rfcproto,
            rfcsi_export-rfcchartyp,
            rfcsi_export-rfcinttyp,
            rfcsi_export-rfcflotyp,
            rfcsi_export-rfcdest,
            rfcsi_export-rfchost,
            rfcsi_export-rfcsysid,
            rfcsi_export-rfcdatabs,
            rfcsi_export-rfcdbhost,
            rfcsi_export-rfcdbsys,
            rfcsi_export-rfcsaprl,
            rfcsi_export-rfcmach,
            rfcsi_export-rfcopsys,
            rfcsi_export-rfctzone,
            rfcsi_export-rfcdayst,
            rfcsi_export-rfcipaddr,
            rfcsi_export-rfckernrl,
            rfcsi_export-rfchost2,
            rfcsi_export-rfcsi_resv.

阅读(4016) | 评论(0) | 转发(0) |
0

上一篇:ABAP的随机数

下一篇:四舍五入与小数截断

给主人留下些什么吧!~~