Zzombie Delete Planned Order

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Zzombie Delete Planned Order as PDF for free.

More details

  • Words: 495
  • Pages: 3
*$*$

$*$*

*$ Correction Inst. 0120024545 0000154901 $* *$ Valid for : $* *$ Software Component SAP_APPL SAP Application $* *$ Release 40A To SAPKH40A25 $* *$ Release 40B All Support Package Levels $* *$ Release 45A All Support Package Levels $* *$ Release 45B All Support Package Levels $* *$ Release 46A To SAPKH46A34 $* *$ Release 46B All Support Package Levels $* *$ Release 46C All Support Package Levels $* *$ $* *$ Changes/Objects Not Contained in Standard SAP System $* *$*$ $*$* *& * *& Object REPS ZZZOMBIE *& Object Header PROG ZZZOMBIE *& * *& REPORT ZZZOMBIE *& * *>>>> START OF INSERTION <<<< REPORT zzzombie . * * * consistency check for RESB: * - DEP_REQS: Find and delete 'zombie'-dependent requirements: * + dep. req. for deleted planned orders * + second (inconsistent) set of dep. req. for planned order * * * !!!!!!!!!!!!!!!!!!!!!!!!!! DANGER !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * * * - copy the program EXACTLY as described (cut & paste) * - let the program be checked by 2 different persons * - errors in this program (causing wrong deletion of RESB) * could ruin the system and destroy production and planning data * - do not modify the program * * * USAGE * * * - run the program in TESTMODE ( TESTMODE = 'X' ) first * (in this mode no changes are written on the dababase) * - running the program may impact system performance !! * (full scan on RESB plus reading planned orders) * -> do not execute the program when system load is high * - print and save (system->list->save->..office) the result list * - check the result, try to find a reproducable example * - if inconsistencies are found (and confirmed) * then run the program with TESTMODE = ' ' * *

TABLES: resb, plaf.

"planned orders

SELECT-OPTIONS plant FOR resb-werks. PARAMETERS: testmode DEFAULT 'X' AS CHECKBOX. DATA: count1 TYPE i, count2 TYPE i, found LIKE sy-subrc, resbz LIKE resb OCCURS 0 WITH HEADER LINE, rsnum_old LIKE resb-rsnum. * > consistency check dependent requirements - planned orders CLEAR plaf. WRITE: /1(10) 'RSNUM', 12(4) 'POS', 17(18) 'component', 36(4) 'plant', 41(10) 'pl. order ', 51(18) 'assembly'. FORMAT INTENSIFIED OFF. SELECT * FROM resb WHERE werks IN plant AND plnum NE space AND bdart NE 'AR'. IF resb-plnum NE plaf-plnum. "performance SELECT SINGLE * FROM plaf WHERE plnum = resb-plnum. found = sy-subrc. ENDIF. IF found NE 0. plaf-plnum = resb-plnum. WRITE: / resb-rsnum, resb-rspos, resb-matnr, resb-werks, resb-plnum, resb-baugr. ADD 1 TO count1. IF testmode IS INITIAL. DELETE resb. ENDIF. ELSE. IF plaf-rsnum NE resb-rsnum.

FORMAT INTENSIFIED ON. WRITE: / resb-rsnum, resb-rspos, resb-matnr, resb-werks, resb-plnum, resb-baugr. FORMAT INTENSIFIED OFF. ADD 1 TO count2. IF testmode IS INITIAL. DELETE resb. ENDIF. ENDIF. ENDIF. ENDSELECT. WRITE: / 'Dependent requirements:', sy-dbcnt. WRITE: / 'Dependent req. for non-existing planned order:', count1. FORMAT INTENSIFIED ON. WRITE: / 'Inconsistent (double) dependent req. for planned order:', count2. *>>>> END OF INSERTION <<<<<<

Related Documents

Delete
December 2019 30
Planned Economy
November 2019 11
Dont Delete
May 2020 26
Delete It
November 2019 30