ZCMM01-5

*&--------------------------------------------------------------
*&      Module  modify_item_screen_attrib  OUTPUT
*&--------------------------------------------------------------
MODULE MODIFY_ITEM_SCREEN_ATTRIB OUTPUT.
*DATA:L_CNT TYPE I.
  DATA:C_WOCNT LIKE ZMM048-VALUE.
  LOOP AT SCREEN.
*"Ariel add 100208 start
    IF SCREEN-NAME = 'ZCM04-ERFME'.
      IF ZCM04TAB-WERKS CS 'PP'.
        SCREEN-INPUT = 0.
      ENDIF.
    ENDIF.
*Ariel add 100208 end
    IF SCREEN-NAME = 'ZCM04-PLFMG'.
      IF SCREEN-GROUP2 EQ 'PLA'.
        IF ZCM03-DOCTYPE = '9' OR ZCM03-DOCTYPE = '1'
         OR ZCM03-DOCTYPE = '2' OR ZCM03-DOCTYPE = 'H'
         OR ZCM03-DOCTYPE = 'K' .
          SCREEN-INVISIBLE = 0.
        ELSE.
          SCREEN-INVISIBLE = 0.
        ENDIF.
      ENDIF.
    ENDIF.
    IF TRANSACTION EQ 'D' .
      SCREEN-INPUT = 0.
    ELSE.
      IF SCREEN-GROUP1 EQ 'MAT'.
        IF TRANSACTION NE SPACE AND NOT ZCM04-MATNR IS INITIAL.
          SCREEN-INPUT = 0.
        ENDIF.
      ENDIF.
      IF SCREEN-GROUP1 EQ 'TRF'.
        IF '48' CS ZCM03-DOCTYPE.
          SCREEN-INPUT = 1.
        ENDIF.
      ENDIF.

** rena modify 12302009
      IF 'I' CS ZCM03-DOCTYPE.
        SCREEN-INPUT = 1.
      ENDIF.
      IF 'J' CS ZCM03-DOCTYPE.
        SCREEN-INPUT = 1.
      ENDIF.
**
      IF SCREEN-GROUP1 EQ 'TRP'.   "Elven 20070104 add
        IF '4' CS ZCM03-DOCTYPE.
          SCREEN-INPUT = 1.
        ENDIF.
      ENDIF.                       "Elven 20070104 add end

      IF SCREEN-GROUP1 EQ 'TRM'.
        IF '8' CS ZCM03-DOCTYPE.
          SCREEN-INPUT = 1.
        ENDIF.
      ENDIF.
*Ting 090715 begin
      IF SCREEN-GROUP1 EQ 'TRM'.
        IF 'B' CS ZCM03-DOCTYPE.
          SCREEN-INPUT = 1.
        ENDIF.
      ENDIF.
*Ting 090715 end

***lbg200903141615.edit.sn******************
      IF SCREEN-GROUP4 EQ 'DSP'.
        IF ZCM04TAB-MARKDELETION EQ 'X'.
          SCREEN-INPUT = 0.
        ENDIF.
      ENDIF.
***Rena modify charg and lgort for zcmm02 20090609
      IF SCREEN-NAME = 'ZCM04-CHARG' OR SCREEN-NAME = 'ZCM04-LGORT'.
        IF ZCM03-DOCTYPE = '5' OR ZCM03-DOCTYPE = '6'
         OR ZCM03-DOCTYPE = 'E'.
          IF ZCM03-MBLNR <> '' OR ZCM04-MARKDELETION <> ''.
            SCREEN-INPUT = 0.
          ENDIF.
        ENDIF.
      ENDIF.
*** END RENA MODFIY
***Echo 20090812.Add.SN
      IF SCREEN-NAME = 'ZCM04-CHARG' OR SCREEN-NAME = 'ZCM04-LGORT'.
        IF ZCM03-DOCTYPE = 'C' OR ZCM03-DOCTYPE = 'D'.
          IF ZCM03-MBLNR <> '' OR ZCM04-MARKDELETION <> ''.
            SCREEN-INPUT = 0.
          ENDIF.
        ENDIF.
      ENDIF.
***Echo 20090812.Add.EN
*Ting modify erfmg lgort umlgo ummat umark werks for zcmm02 20090717
      IF SCREEN-NAME = 'ZCM04-ERFMG' OR SCREEN-NAME = 'ZCM04-LGORT' OR
 SCREEN-NAME = 'ZCM04-UMLGO' OR SCREEN-NAME = 'ZCM04-UMMAT'
 OR SCREEN-NAME = 'ZCM04-UMWRK' OR SCREEN-NAME = 'ZCM04-WERKS'.
        IF ZCM03-DOCTYPE = 'B'.
          IF ZCM03-MBLNR <> '' OR ZCM04-MARKDELETION <> ''.
            SCREEN-INPUT = 0.
          ENDIF.
        ENDIF.
      ENDIF.
*Ting modify end
    ENDIF.
****LBG20080401.ADD.SN
    SELECT SINGLE VALUE INTO C_WOCNT FROM ZMM048
     WHERE WERKS = P_WERKS  AND BJECT = 'OPENWO'.
    IF SY-SUBRC = 0.
      IF P_WERKS NE SPACE AND ZCM03-DOCTYPE = '4'.
        SCREEN-INPUT = 0.
      ENDIF.
    ENDIF.
***LBG20080401.ADD.EN
***LBG20080411.ADD.SN

***Rena modify DELETE ITEM for zcmm02 20090609

*  Allow delete item
    IF TRANSACTION EQ 'U' .
*-------------JL100127.O  mark the hardcode
*      ( zcm04-werks = 'TW11' OR zcm04-werks = 'TW12' ) AND
*      ( zcm03-doctype = '5' OR zcm03-doctype = '6' ).
*      IF screen-group1 NE 'MAT' AND screen-group4 EQ 'DSP'.
*        screen-input = 0.
*      ENDIF.
*    ENDIF.
      IF G_OBJECT EQ SPACE.
        CONCATENATE 'DOCTYPE' ZCM03-DOCTYPE INTO G_OBJECT.
        CONDENSE G_OBJECT.
      ENDIF.
      L_CNT = 0.
      SELECT COUNT(*) INTO L_CNT FROM ZMM048
      WHERE WERKS = ZCM04TAB-WERKS AND BJECT = G_OBJECT
        AND VALUE = 'ACTIVE'.
      IF L_CNT > 0 AND ZCM03-RELSTATUS NE SPACE
         AND ZCM03-RELSTATUS NE 'R'.
        "lbg20090314.edit
        IF SCREEN-GROUP1 NE 'MAT' AND SCREEN-GROUP4 EQ 'DSP'.
          SCREEN-INPUT = 0.
*          MESSAGE s000 WITH 'Document number' zcm03-docnumber
*          'Has realeased or is realeasing,can notmodify!'.
        ENDIF.
      ENDIF.
    ENDIF.

***Rena End modify

***LBG20080411.ADD.EN
    MODIFY SCREEN.
  ENDLOOP.
ENDMODULE.                 " modify_item_screen_attrib  OUTPUT

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

转载于:http://blog.itpub.net/14397246/viewspace-666152/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值