on 06-12-2015 3:35 PM
Hello.
I have a program that creates transfer order with multiple items for putaway using FM L_TO_CREATE_MULTIPLE.
The program needs to transfer the stocks to one storage bin per TO, therefore I need to determine the next empty bin for a given storage type before the call to L_TO_CREATE_MULTIPLE. Do you have a suggestion on what function module to use? If there is no function, any table or logic you can recommend to look for the next empty bin for a given storage type?
Thanks in advance.
Finding an empty bin in a storage tye is easy to implement by a few queries.
1. step, select entries from table LAGP into intrnal table IT_LAPG, where LGTYP is your storage type.
2. sort internal table IT_LAGP by storage bin ascending
3. loop at IT_LAGP into WA_LAGP
4. select single from LQUA where LGPLA eq WA_LAGP-LGPLA
5. if sy-subrc NE 0 => you found your bin, it's WA_LAGP-LGPLA
Make sure you exit the loop after finding the bin so you don't waste CPU time.
That's it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply, Mihailo.
May I add that in the selection from LAGP you have to add WHERE LAGP-KZLER = 'X' to get the empty bins.
I wanted a function module so that it will replicate how the system selects the next empty bin, because I might miss out a strategy defined in the system or how about the blocking indicators, etc.
Anyhow, only if there is an existing function module. Otherwise, I have to stick to this selection from LAGP.
Hi Giancaria,
I have similar requirement, We are enhancing Putaway task and I want a standard FM which determines next empty bin.
I could have queries /SCWM/LAGP but I think there should be some way to do it. How system sort I am not sure.
So do you get answer of your question, can you tell me how you achieved it?
Thanks in advance
Regards ,
Khushbu
Hello Khushbu.
We used FM L_TO_PREPARE_ITEM_INT and derived the returned storage type and bin from export parameter structure E_LTAP. The import parameters were from the material master, customizing and transfer requirement (since our solution eventually is in reference of a TR). Here is an example call:
I am not very much clear on your requirement however as an alternate of L_TO_CREATE_MULTIPLE you can useL_TO_CREATE_Single
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply.
But I need to create 1 TO for mutiple items/SUs that is why I used L_TO_CREATE_MULTIPLE.
Using these function modules, the system will assign the destination storage bin automatically.
My requirement is how to determine the next empty storage bin for putaway, before creating the TO, so that that derived storage bin will be used as the destination bin for all of the items in the TO to be created. please note the storage type is given.
SAP uses the customized putaway strategy,
Why is it important to know the next empty bin milliseconds earlier?
There shouldn't be any difference between what a function module (if any) would determine if it is called right before L_TO_CREATE_MULTIPLE, than this FM does by itself.
Can it be that you want to do something different than you do in manual transactions? That you want overrule your customizing?
I think I already understand what you want.
Just to be certain:
if you create the TO manually is it then the same bin for all items, or is it just equal to the FM behavior?
What happens if you overwrite the determined bin of the second item with the bin that is used in the first item? does SAP then issue a warning or error?
What is actually your putaway strategy and how is the storage type defined, is it just next empty bin? is addition to existing stock allowed? what indicator is used for mixed storage?
If I create the TO through LT06 and assign the same destination bin to all items, it saves it perfectly and no warning (except for "Check you entries") or error is displayed. For your 3rd question, I really can't say because I am not a WM functional and I am not familiar with the settings they did. As far as I know, the storage type is determined by the storage type indicator from the material master and I just need the next empty bin of this S. type.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.