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

Re: No changes should be allowed in Quantity field of Component & Services after the PM Order is released.

$
0
0

Hi J K,

Because there exists no direct RESB structure in the IWO10009 enhancement, the code was a bit difficult. Here is the tested code for you, which prevents the changes in previous Component line Quantities, if the Order is in REL status . Just put this code in the include ZXWOCU07  of this exit.

 

TYPES: BEGIN OF TY_RESB,        RSPOS TYPE RESB-RSPOS,        BDMNG TYPE RESB-BDMNG,   END OF TY_RESB.
 DATA: IT_RESB TYPE TABLE OF TY_RESB,       WA_RESB LIKE LINE OF IT_RESB.
 DATA: V_STAT TYPE J_STEXT.
 FIELD-SYMBOLS: <FS_RESB> 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>.
 SELECT RSPOS BDMNG FROM RESB INTO TABLE IT_RESB 
WHERE AUFNR = CAUFVD_IMP-AUFNR.
 CALL FUNCTION 'STATUS_TEXT_EDIT'   EXPORTING     FLG_USER_STAT = 'X'     OBJNR         = CAUFVD_IMP-OBJNR     ONLY_ACTIVE   = 'X'     SPRAS         = SY-LANGU   IMPORTING     LINE          = V_STAT.
 IF V_STAT+0(3) = 'REL'.   LOOP AT I_RESB.     READ TABLE IT_RESB INTO WA_RESB WITH KEY RSPOS = I_RESB-RSPOS.     IF SY-SUBRC = 0.       IF WA_RESB-BDMNG <> I_RESB-BDMNG.         MESSAGE: 'Component changes not accepted after release of Order' TYPE 'E'.       ENDIF.     ENDIF.   ENDLOOP.
 ENDIF.

 

 

 

Jogeswara Rao K


Viewing all articles
Browse latest Browse all 10473

Trending Articles



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