Skip to Content
Author's profile photo Former Member

SAP WM batch search per customer/material using delivery groups (LT0E)

My previous blog post deals with implementing batch search by customer/material in WM.
It should work while creating TOs in LT03, LT0S… but when you use LT0E, you can have many different customers in a delivery group, and customer number doesn’t get populated at all during the batch determination processing.

For this reason the previous user exit is not sufficient to make this work.
You don’t have at all a cusatomer number to start with!

Now, what is the idea… We want to find out for which delivery group we are creating a TO for.
Then, we will find at least one delivery from it, take a customer number and fill our batch determination key fields with it.

Limit: while this is a simple solution, it has some limitations.

In order for this to be accurate, you need to create delivery groups only for the customer with same requirements during batch search.
E.g. both customers need to have the same remaining shelf life reqirements (in days or percent).
Or whatever your strategy uses, whichever characteristics, they should be the same for these customers you group into delivery group.
Otherwise, it will still work but will select one customer characteristics values and will use it for all the customers.

OK, onto solution.
You need to read my previous post, do all that before this one.
You can find the post here: SAP WM batch search per customer/material

Then you can continue further:
In our user exit (include ZXVBZU11) we should write some more code…

field-symbols: <zt311> like t311.
data: value(40),
        v_t311 like t311.
value = ‘(SAPML03T)T311’.
assign (value) to <zt311>.
v_t311 = <zt311>.
if c_komkhkunnr EQ space OR c_komkhkunnr IS INITIAL.
   tables: likp, vbsk, vbss.
   select single * from vbss where sammg EQ v_t311refnr.
   select single * from likp where vbeln EQ vbssvbeln.
   c_komkhkunnr = likpkunnr.
c_komkhkndnr = c_komkhkunnr.
c_komkhknrze = c_komkhkunnr.
c_komkhkunre = c_komkhkunnr.
c_komkhkunwe = c_komkhkunnr.
c_bdcomkunnr = c_komkhkunnr.
c_bdcomkund1 = c_komkhkunnr.

After activation, user exit does it’s job and enables batch determination per customer/material even for delivery groups using LT0E!

Very handy for companies that have a lot of customers using same or nearly same requirements (like minimal remaining shelf life etc.).

We’re done with this one, seems easy but what here seems like a dozen of lines of code, transferred to quite a bit research and trial/errors in user exits and other aspects of SAP DEV.

Hopefully someone will make use of this.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.