Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

How to delete entire delivery in SAPMV50A/USEREXIT_SAVE_DOC_BEFORE_PREP

$
0
0

Hi all,

 

I'm implementing a certain logic in SAPMV50A / USEREXIT_SAVE_DOC_BEFORE_PREP during delivery creation (VL01N) to check if delivery items really can be delivered or not. According to note 415716 (example_3)  I've implemented the logic to delete delivery items by calling xlips_loeschen(sapfv50p), that works fine.

 

In special cases the item deletion can cause the situation that a all items are deleted from the delivery. In that case SAP creates a 'empty' delivery document without any item lines.

 

Question: How can I delete or flag the delivery header for deletion (or non-creation), so that no empty delivery will be created? In dialog mode I guess I could raise a error message but I need also a logic for the delivery creation in batch mode where only some of the deliveries in table XLIKP should not be created. Setting the update flag (XLIKP-UPDKZ) directly in XLIKP or using XLIKP_LOESCHEN/LIKP_LOESCHEN(SAPFV50k) did not help.

 

Thanks for your thoughts on this in advance!

 

Oliver


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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