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

Re: IW41-Restrict confirmation without goods issue

$
0
0

I had already touched upon this aspect, by suggesting to  'add more IFs as per your situation'. It depends on how you distinguish these two Orders within an Order type, and incorporate this into your logic. If you want to distinguish this by entries in Components tab, then the logic can be like:

 

IF CAUFVD_TAB-AUART = 'ZM03'.
 DATA: IT_RESB TYPE TABLE OF RESB,       IT_GM TYPE TABLE OF AUFM.
 SELECT * FROM RESB INTO TABLE IT_RESB   WHERE AUFNR = CAUFVD_TAB-AUFNR AND XLOEK <> 'X'.
 IF IT_RESB[] IS NOT INITIAL.   SELECT * FROM AUFM INTO TABLE IT_GM     WHERE AUFNR = CAUFVD_TAB-AUFNR.   IF IT_GM[] IS INITIAL.     MESSAGE: 'Goods Movement not found for this Order !'     TYPE 'E' DISPLAY LIKE 'I'.   ENDIF.
 ENDIF.
 ENDIF.

 

Means: You are distinguishing these ZM03 Orders by having entries in Components tab or not. The confirmations for the Orders which do not have any entries in Components tab will not be any problem. But those having entries in Components tab,this user-exit will check whether Goods issue was done or not. If not then it would throw the error popup. Lines 5 and 6 of the code check whether this Order has any entries in Components tab. Accordingly an IF has been added in line 8.

 

The above is an example how you differentiate the kinds of Orders to undergo this check during confirmation. You may have a different case.

 

 

KJogeswaraRao


Viewing all articles
Browse latest Browse all 9091

Trending Articles



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