Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3017

Re: Checks during completion of maintenance order

$
0
0

Hello Marcos,

The subject line clearly indicates that you need to use user-exit IWO10004. I am herewith giving you the code which you need to put in the include ZXWO1U03 of this include. This performs your requirement.

FIELD-SYMBOLS: <fs_resb> TYPE ANY,
                <fs_resb1> TYPE ANY.
DATA: BEGIN OF i_resb OCCURS 100.
         INCLUDE STRUCTURE resb.
DATA:END OF i_resb.

ASSIGN ('(SAPLCOBC)resb_bt[]') TO <fs_resb>.
i_resb[] = <fs_resb>.

IF i_resb[] IS NOT INITIAL.
   DELETE i_resb[] WHERE xloek = 'X'.
   LOOP AT i_resb.
     IF i_resb-kzear <> 'X'.
       MESSAGE: 'Open Reservations Exist, TECO not possible' TYPE 'E' DISPLAY LIKE 'I'.
     ENDIF.
   ENDLOOP.
ENDIF.

UNASSIGN: <fs_resb> .


About what does this code do:

When any Open reservations are there this code throws the following error pop-up, whenever there is an attempt to TECO.

error.JPG

 

  • This code checks any component reservation is pending for Goods issue. If yes then throws the above error.
  • If Goods Issue of all items is done then it allows the TECO to happen
  • This code takes into account the deleted component lines also. If you delete the Components pending for Goods Issue and then click on TECO it would allow you to TECO.

 

Test well in Dev client and see the results. If necessary take your ABAPer's help to fine-tune. I have tested and it is working fine.

 

Regards

KJogeswaraRao


Viewing all articles
Browse latest Browse all 3017

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>