ZXCO1U18

<< Click to Display Table of Contents >>

Navigation:  All About ABAP Technique > English > ABAP Tutorial > ABAP Workbench Tools > Enhancement > Customer Exits > Customer Exits Examples > Project ZPPWS001 > Funtions Exits  > EXIT_SAPLCOKO1_004  >

ZXCO1U18

**&---------------------------------------------------------------------*
**&  Include           ZXCO1U18                                         *
**&---------------------------------------------------------------------*
 
break sol_bintang.
 
IF is_header_old-STTXT cs 'TECO'.
IF not is_header_new-STTXT cs 'TECO'.
   is_header_new-AUTERM = ''.
endif.
ENDIF.
 
***Check authorization during prod order change
*
*data: s_message_text(20) type c.
*
*DATA : begin of zmbew occurs 0.
*        include structure mbew.
*DATA : end of zmbew.
*
*
*concatenate IS_HEADER_OLD-werks 'Scheduler' into s_message_text
*separated
*by space.
*concatenate s_message_text IS_HEADER_OLD-fevor into s_message_text
*separated by space.
*
*      AUTHORITY-CHECK OBJECT 'Z_AFKO_FEV'
*               ID 'ACTVT'  FIELD '02'
*               ID 'ZFEVOR'  FIELD IS_HEADER_OLD-FEVOR
*               ID 'WERKS'  FIELD IS_HEADER_OLD-werks.
*      if not sy-subrc is initial.
*       message e004(CO) with s_message_text.
*      endif.
*
***Check product cost collector during prod order create
****Avoid using order types
**data: s_material(18) type c.
*
**if IS_HEADER_OLD-KDAUF_AUFK = ''.
**
**  if IS_HEADER_OLD-PKOSA = ''.
**     s_material = IS_HEADER_OLD-MATNR.
***    message e796(CO) with s_material.
**  endif.
**
**endif.
*
*** Validation standard cost estimate
**select * from mbew into corresponding fields of zmbew
**                                 where matnr = IS_HEADER_OLD-matnr and
**                                 bwkey = IS_HEADER_OLD-werks and
**                                 kalkl = 'X'.
**endselect.
**if sy-subrc ne 0.
***   message e155(CK).
**endif.