Chinaunix首页 | 论坛 | 博客
  • 博客访问: 481994
  • 博文数量: 199
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1902
  • 用 户 组: 普通用户
  • 注册时间: 2020-05-14 13:25
个人简介

代码5S

文章分类

全部博文(199)

文章存档

2021年(5)

2020年(194)

我的朋友

分类: 其他平台

2020-07-29 10:14:29


点击(此处)折叠或打开

  1. REPORT zdemo01.

  2. TABLES:tstc,tadir,modsapt,modact,trdir,tfdir,enlfdir,sxs_attrt,tstct.
  3. DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
  4. DATA : field1(30).
  5. DATA : v_devclass LIKE tadir-devclass.
  6. PARAMETERS : p_tcode LIKE tstc-tcode,
  7. p_pgmna LIKE tstc-pgmna .
  8. DATA wa_tadir TYPE tadir.

  9. START-OF-SELECTION.
  10.   IF NOT p_tcode IS INITIAL.
  11.     SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
  12.   ELSEIF NOT p_pgmna IS INITIAL.
  13.     tstc-pgmna = p_pgmna.
  14.   ENDIF.
  15.   IF sy-subrc EQ 0.
  16.     SELECT SINGLE * FROM tadir
  17.     WHERE pgmid = 'R3TR'
  18.     AND object = 'PROG'
  19.     AND obj_name = tstc-pgmna.
  20.     MOVE : tadir-devclass TO v_devclass.
  21.     IF sy-subrc NE 0.
  22.       SELECT SINGLE * FROM trdir
  23.       WHERE name = tstc-pgmna.
  24.       IF trdir-subc EQ 'F'.
  25.         SELECT SINGLE * FROM tfdir
  26.         WHERE pname = tstc-pgmna.
  27.         SELECT SINGLE * FROM enlfdir
  28.         WHERE funcname = tfdir-funcname.
  29.         SELECT SINGLE * FROM tadir
  30.         WHERE pgmid = 'R3TR'
  31.         AND object = 'FUGR'
  32.         AND obj_name EQ enlfdir-area.
  33.         MOVE : tadir-devclass TO v_devclass.
  34.       ENDIF.
  35.     ENDIF.

  36.     SELECT * FROM tadir INTO TABLE jtab WHERE pgmid = 'R3TR' AND
  37.     object IN ('SMOD', 'SXSD') AND
  38.     devclass = v_devclass.
  39.     SELECT SINGLE * FROM tstct WHERE sprsl EQ sy-langu AND
  40.     tcode EQ p_tcode.
  41.     FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
  42.     WRITE:/(19) 'Transaction Code - ',
  43.     20(20) p_tcode,
  44.     45(50) tstct-ttext.
  45.     SKIP.
  46.     IF NOT jtab[] IS INITIAL.
  47.       WRITE:/(105) sy-uline.
  48.       FORMAT COLOR COL_HEADING INTENSIFIED ON.
  49.       SORT jtab BY object.
  50.       DATA : wf_txt(60) TYPE c,
  51.       wf_smod TYPE i ,
  52.       wf_badi TYPE i ,
  53.       wf_object2(30) TYPE c.
  54.       CLEAR : wf_smod, wf_badi , wf_object2.
  55.       LOOP AT jtab INTO wa_tadir.
  56.         AT FIRST.
  57.           FORMAT COLOR COL_HEADING INTENSIFIED ON.
  58.           WRITE:/1 sy-vline,
  59.           2 'Enhancement/ Business Add-in',
  60.           41 sy-vline ,
  61.           42 'Description',
  62.           105 sy-vline.
  63.           WRITE:/(105) sy-uline.
  64.         ENDAT.
  65.         CLEAR wf_txt.
  66.         AT NEW object.
  67.           IF wa_tadir-object = 'SMOD'.
  68.             wf_object2 = 'Enhancement' .
  69.           ELSEIF wa_tadir-object = 'SXSD'.
  70.             wf_object2 = ' Business Add-in'.
  71.           ENDIF.
  72.           FORMAT COLOR COL_GROUP INTENSIFIED ON.
  73.           WRITE:/1 sy-vline,
  74.           2 wf_object2,
  75.           105 sy-vline.
  76.         ENDAT.
  77.         CASE wa_tadir-object.
  78.           WHEN 'SMOD'.
  79.             wf_smod = wf_smod + 1.
  80.             SELECT SINGLE modtext INTO wf_txt
  81.             FROM modsapt
  82.             WHERE sprsl = sy-langu
  83.             AND name = wa_tadir-obj_name.
  84.             FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
  85.           WHEN 'SXSD'.
  86. * For BADis
  87.             wf_badi = wf_badi + 1 .
  88.             SELECT SINGLE text INTO wf_txt
  89.             FROM sxs_attrt
  90.             WHERE sprsl = sy-langu
  91.             AND exit_name = wa_tadir-obj_name.
  92.             FORMAT COLOR COL_NORMAL INTENSIFIED ON.
  93.         ENDCASE.
  94.         WRITE:/1 sy-vline,
  95.         2 wa_tadir-obj_name HOTSPOT ON,
  96.         41 sy-vline ,
  97.         42 wf_txt,
  98.         105 sy-vline.
  99.         AT END OF object.
  100.           WRITE : /(105) sy-uline.
  101.         ENDAT.
  102.       ENDLOOP.
  103.       WRITE:/(105) sy-uline.
  104.       SKIP.
  105.       FORMAT COLOR COL_TOTAL INTENSIFIED ON.
  106.       WRITE:/ 'No.of Exits:' , wf_smod.
  107.       WRITE:/ 'No.of BADis:' , wf_badi.
  108.     ELSE.
  109.       FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
  110.       WRITE:/(105) 'No userexits or BADis exist'.
  111.     ENDIF.
  112.   ELSE.
  113.     FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
  114.     WRITE:/(105) 'Transaction does not exist'.
  115.   ENDIF.

  116. AT LINE-SELECTION.
  117.   DATA : wf_object TYPE tadir-object.
  118.   CLEAR wf_object.
  119.   GET CURSOR FIELD field1.
  120.   CHECK field1(8) EQ 'WA_TADIR'.
  121.   READ TABLE jtab WITH KEY obj_name = sy-lisel+1(20).
  122.   MOVE jtab-object TO wf_object.
  123.   CASE wf_object.
  124.     WHEN 'SMOD'.
  125.       SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
  126.       CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
  127.     WHEN 'SXSD'.
  128.       SET PARAMETER ID 'EXN' FIELD sy-lisel+1(20).
  129.       CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
  130.   ENDCASE.

阅读(1425) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~