显示企业用到的IMG

 
------------------------------------------------------------------*
*& Report  ZMYTEST009
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZMYTEST009.
Tables:TTREE,TTREET .
Data :begin of ZTypeIMG ,
         id like TTREE-ID,
         text like TTREET-TEXT,
       end of ZTypeIMG .
Data:ZitabIMG like ZTypeIMG occurs 0 with header line,
     ZLinIMG  like ZTypeIMG.

Data: ZFLDNAME  like DD01L-DOMNAME,
      ZFLDVALUE like TTREET-TEXT.
*** Read IMG Strucutre ID
Refresh ZitabIMG.
select a~ID b~Text
  into table  ZitabIMG
  from TTREE as a
  LEFT OUTER JOIN TTREET as b on a~ID = b~ID
  and b~SPRAS = SY-LANGU
  Where a~TYPE = 'IMG' .
*** Write Struture ID to Screen
uline at /1(79).
Loop at ZitabIMG.
  write :/1  '|',ZitabIMG-TEXT,'|'.
  uline at /1(79).
endloop.
uline at /1(79).

AT LINE-SELECTION.
  clear:ZlinIMG,ZFLDNAME, ZFLDVALUE .
  GET CURSOR FIELD ZFLDNAME VALUE ZFLDVALUE .
  if ZFLDNAME = 'ZITABIMG-TEXT' .
    Perform. EXEIMG .
  endif.
Form. EXEIMG.
***Display IMG Structure
  READ TABLE ZitabIMG into ZlinIMG WITH KEY TEXT = ZFLDVALUE.
  CALL FUNCTION 'STREE_EXTERNAL_DISPLAY'
       EXPORTING
            STRUCTURE_ID = ZlinIMG-ID
            LANGUAGE     = SY-LANGU.
ENDFORM.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9633129/viewspace-536597/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9633129/viewspace-536597/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值