cancel
Showing results for 
Search instead for 
Did you mean: 

Fill Delivery and kill any remaining open items

Former Member
0 Kudos

Hello All - I have a SD Sales order with multiple lines - that auto creates a delivery with the same multiple lines...but I only have stock for one of the lines and want to go ahead and ship - which I do - but I would like the system to automaticlly cancel the remaining un-shipped items from the sales order - as the customer will send me a new SD Sales order for the backordered items....Any clue how I get the system to do this? Thanks - Janet

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Janet,

I suppose you delete unavailable items form your delivery when you ship it.

one of possible ways to achieve auto-rejection is :

- add some code to userexit_save_document_prepare or to userexit_save_document to determine deleted items (xlips, updkz='D'), determine corresponding order items, call FM in update task and pass to this FM your order items to be cancelled.

after that - you have 2 options :

1) from this FM call new FM "starting new task" which will reject order items either using FMs like SD_SALES_DOCUMENT_READ,SD_SALES_ITEM_MAINTAIN or BAPI or call transaction using BDC... "new task" is needed to separate order processing from delivery processing.

2 in the FM build BDC session to set rejection reason to corresponding order items, & submit program to process your BDC session.

Former Member
0 Kudos

Hi,

Good morning and greetings,

I think your requirement can be achieved through usage of USER EXITS for Delivery...The system would do an availability check and for the material those are not available, it would automatically cancel the same in the sale order.

Please reward points if found useful

Thanking you

With kindest regards

Ramesh Padmanabhan