L_TO_PREPARE_ITEM_INT
Hi Experts,
Has anyone used this FM before: L_TO_PREPARE_ITEM_INT
Can you please post your sample code on how to use this FM?
Points will be given!
Thanks a lot,
Jay
Hi
you need to have following
I_LTAK = LTAK
I_LTAP = LTAP
I_MGEF = MGEF
I_MLVS = MLVS
I_RL03A = RL03A
I_T333 = T333
I_T334T = T334T
I_T340D = T340D
1) You will get SU details from LEIN table for SU(LENUM), using the same u can
fetch data from LQUA with condition WHERE LGNUM = I_LEIN-LGNUM
AND LGTYP = I_LEIN-LGTYP
AND LGPLA = I_LEIN-LGPLA
AND LENUM = I_LEIN-LENUM.
2) Fil LTAk with I_LQUA-LGNUM TO LTAK-LGNUM,
'999' TO LTAK-BWLVS,.
3) Copy the LQUA details to LTAP
4) Fill MVS with below code :
MOVE: 'MLVS' TO MTCOM-KENNG,
'MMSTA' TO MTCOM-T141_FELD,
I_LQUA-MATNR TO MTCOM-MATNR,
V_WERKS TO MTCOM-WERKS, " Plant user assigned
i_lein-LGNUM TO MTCOM-LGNUM,
SY-LANGU TO MTCOM-SPRAS.
CALL FUNCTION 'MATERIAL_READ'
EXPORTING
SCHLUESSEL = MTCOM
IMPORTING
MATDATEN = MLVS
RETURN = MTCOR
EXCEPTIONS
MATERIAL_NOT_FOUND = 1.
5) Data for MGEF:
Select region code from T300
SELECT SINGLE REGKZ FROM T300 INTO T300-REGKZ
WHERE LGNUM = i_lein-LGNUM.
Select single * statement is required here as whole structure is
passed to function module
SELECT SINGLE * FROM MGEF INTO MGEF
WHERE STOFF = MLVS-STOFF AND REGKZ = T300-REGKZ.
6) * passed to function module
SELECT SINGLE * FROM T333 WHERE LGNUM = i_lein-LGNUM
AND BWLVS = 999.
*Select single * statement is required here as whole structure is passed
*to function module
SELECT SINGLE * FROM T340D WHERE LGNUM = i_lein-LGNUM.
This FM generates TO and also a proposed bin (NLTYP)
Thanks
Sandeep
Similar Messages
-
L_TO_PREPARE_ITEM_INT batch split for the same material
Hello Gurus,
I use L_TO_CREATE_MULTIPLE to create TO.
if I leave empty charg number for one material line in FN VB_BATCH_DETERMINATION that is triggeredc in L_TO_CREATE_MULTIPLE batches are determined (without quantities) but I thought it is prepared for eventual batch split
But I suppose not as I have a problem when I put quantity greater that quantity on one batch the functionality L_TO_PREPARE_ITEM_INT does not split material into batches, does it mean that I need to split this quantity on batches before calling L_TO_CREATE_MULTIPLE or maybe something in customizing is missing?
Bests BogumilaHi,
I had a also used this FM.
When you pass the total quantity it will only return the batch which should be used first to fulfill your requirement.
So you have to keep this FM in a Loop and keep subtracting the proposed quantity and store it in a Internal table till it is zero.
Thanks
Ajay -
Help with FM 'L_TO_PREPARE_ITEM_INT' in WM
Hi Experts.
I have a problem with this FM. My problem is I have to use this FM to determine the locations of some bins, but this FM only can be executed in on line mode, nad i need that this FM ( or another similar ) can be excuted in Background mode because it is going to be called since a RFC.
Do you know some FM that can give me de ubications of the bin inside a warehouse??
Thanks very muchThanks Sudheer, I tried it but this FM try to create a Order and I don´t want this, I want to simulate it, I need to knoe the locations of the bins, and after the user could modified it.
Thanks. -
User-Exit or BADI for creating TO using TR in WM
Dear Experts,
I am preparing Transfer Order using Transfer Request through transaction code LT04.
Now when I am doing Putaway (either background or foreground), system itself evaluates and suggests destination bins as per SAP standard logic. For me the destination bins suggested by system is correct, but what I want is to get complete list of destination bins suggested by system, since I want destination bins to be selected based on my logic from that list and not as per standard system logic.Hi Ashish,
Are you able to see the list of destination bins suggested by the system in TO creation transaction?
I think system will show only one destination bin. You can check it in debugging mode while creating TO.
FM L_TO_PREPARE_ITEM_INT will propose the destination bin , after execution of this FM you will get the destination
bin in e_ltap-nlpla parameter of this FM.
Regards,
Pawan -
L_to_create_int causes update termination
Hello,
I programmed a TO creation for a list of transfer requirements with the 3 function modules
l_to_prepare_item_int
l_to_add_item_int and finally
l_to_create_int.
Now, when I process several TRs for one batch material I have the following problem:
Either I call l_to_create_int only once after I have processed all TRs. In that case only one TO is created and one TR gets the total of all TR quantities whereas the other TRs remain open.(The TR number is on header level of the TO).
Or I call l_to_create_int each time the TR number changes, but then I get an update termination.
Has anybody an idea, what I am doing wrong here?
Thanks in advance for your help!
FrankOK,
I found it on my own now. In the above described case it is necessary to delete the global variables of function group L03A before calling l_to_create_int. It looks like this:
CALL FUNCTION 'L_SAPLL03A_INIT_INT'.
No parameters required.
To whom it may concern. -
Field LTAP-NLQNR in transaction LT03
Hello,
I'm trying to call transaction LT03 in such a way that the TO created is automatically confirmed.
The manual process is:
T LT03
SAPML03T 0151 X
BDC_CURSOR VBLKK-VBELN
BDC_OKCODE /00
LTAK-LGNUM <lgnum>
VBLKK-VBELN <vbeln>
RL03T-ALAKT X
SAPML03T 0105 X
BDC_CURSOR T334T-LGTY0
BDC_OKCODE =TAH2
T334T-LGTY0 ***
SAPML03T 0102 X
BDC_CURSOR LTAP-VLQNR
BDC_OKCODE /00
RL03T-ANFME <lqua-verme>
LTAP-ALTME <lqua-meins>
RL03T-SQUIT X
LTAP-WDATU sy-datum
LTAP-VLENR <lqua-lenum>
LTAP-VLQNR <lqua-lqnum>
LTAP-NLENR <lqua-lenum>
LTAP-NLQNR ¿?
SAPML03T 0105 X
BDC_CURSOR T334T-LGTY0
BDC_OKCODE =BU
T334T-LGTY0 ***
The problem is that when I push enter after populating:
LTAP-VLENR, LTAP-VLQNR and LTAP-NLENR
the transaction calculates
LTAP-NLQNR
by itself. I need to provide that number to be able to run my report without it stopping and waiting for the user to press enter.
I guess there is some FM implied, but I haven't managed to find it so far...
How can I find that datum?
Thanks++Well, it's L_TO_PREPARE_ITEM_INT.
I've been searching the forum and I've found a hint:
<i>you need to have following
I_LTAK = LTAK
I_LTAP = LTAP
I_MGEF = MGEF
I_MLVS = MLVS
I_RL03A = RL03A
I_T333 = T333
I_T334T = T334T
I_T340D = T340D
</i>
<b>I guess this means:
DATA: i_ltap type ltap, and so on</b>
<i>1) You will get SU details from LEIN table for SU(LENUM), using the same u can
fetch data from LQUA with condition WHERE LGNUM = I_LEIN-LGNUM
AND LGTYP = I_LEIN-LGTYP
AND LGPLA = I_LEIN-LGPLA
AND LENUM = I_LEIN-LENUM.</i>
<b>What is SU?</b>
<i>2) Fil LTAk with I_LQUA-LGNUM TO LTAK-LGNUM,
'999' TO LTAK-BWLVS,.</i>
<b>Which line of LTAK should I choose to copy those to? The one with the same VBELN?</b>
<i>3) Copy the LQUA details to LTAP</i>
<b>Same problem. Copy where?</b>
<i>4) Fill MVS with below code :
MOVE: 'MLVS' TO MTCOM-KENNG,
'MMSTA' TO MTCOM-T141_FELD,
I_LQUA-MATNR TO MTCOM-MATNR,
V_WERKS TO MTCOM-WERKS, " Plant user assigned
i_lein-LGNUM TO MTCOM-LGNUM,</i> <b>Guess LQUA-LGNUM would do...</b>
<i>SY-LANGU TO MTCOM-SPRAS.
CALL FUNCTION 'MATERIAL_READ'
EXPORTING
SCHLUESSEL = MTCOM
IMPORTING
MATDATEN = MLVS
RETURN = MTCOR
EXCEPTIONS
MATERIAL_NOT_FOUND = 1.
5) Data for MGEF:
Select region code from T300
SELECT SINGLE REGKZ FROM T300 INTO T300-REGKZ
WHERE LGNUM = i_lein-LGNUM.
Select single * statement is required here as whole structure is
passed to function module
SELECT SINGLE * FROM MGEF INTO MGEF
WHERE STOFF = MLVS-STOFF AND REGKZ = T300-REGKZ.
6) * passed to function module
SELECT SINGLE * FROM T333 WHERE LGNUM = i_lein-LGNUM
AND BWLVS = 999.
*Select single * statement is required here as whole structure is passed
*to function module
SELECT SINGLE * FROM T340D WHERE LGNUM = i_lein-LGNUM.
This FM generates TO and also a proposed bin (NLTYP)</i>
<b>Please, give me a hand.
Sorry to ask silly things, but I've been working with this just for some weeks so far.</b> -
About FM to propose storage bin
Hi Experts,
My scenario is: Given source storage unit #, Material #, quantity, try to use 'L_TO_PREPARE_ITEM_INT' to propose destination storage unit # and bin. This is to simulate transaction LT01. The problem is when I tested this FM, I got error message: "Storage Unit ... is not consistent with other transfer order data". However, with same test data, running transaction LT01 can propose destination storage unit# and bin.
Could you please see below codes and find if there is any problems of parameters filled before calling L_TO_PREPARE_ITEM_INT ?
Thanks.
data: I_LTAK type LTAK,
I_LTAP type LTAP,
I_MLVS type MLVS,
I_MGEF type MGEF,
I_RL03A type RL03A,
I_T333 type T333,
I_T334T type T334T,
I_T340D type T340D,
E_LTAP type LTAP,
E_REDUZ like RL03T-REDUZ,
T_LPROT type standard table of LPROT,
T_LMESS type standard table of LMESS.
i_ltak-lgnum = 'CLK'.
i_ltak-bwlvs = '999'.
i_ltap-matnr = w_matnr. "Material#
i_ltap-werks = '1000'.
i_ltap-lgort = '0001'.
i_ltap-charg = w_charg. "Batch
i_ltap-letyp = 'F1'.
i_rl03a-anfme = w_gesme. "quantity
i_ltap-vlenr = w_vlenr. "Source Storage Unit#
call function 'L_TO_PREPARE_ITEM_INT'
EXPORTING
I_LTAK = I_LTAK
I_LTAP = I_LTAP
I_MLVS = I_MLVS
I_MGEF = I_MGEF
I_RL03A = I_RL03A
I_T333 = I_T333
I_T334T = I_T334T
I_T340D = I_T340D
IMPORTING
E_LTAP = E_LTAP
E_REDUZ = E_REDUZ
TABLES
T_LPROT = T_LPROT
T_LMESS = T_LMESS
EXCEPTIONS
CALL_FORBIDDEN = 1
others = 9.
if sy-subrc <> 0.
endif.Hi,
The first thing you can do is to search this forum using the keywords.. you will get a solution most of the times (80%)..
Else you can try in the Transaction BAPI...
Even if that does not work out
Go to SE37 give some keywords and search for a FM yourself.
Eg: BAPI * STOR * and press F4 it will give you possible FMs... Now you need to check the documentation for that BAPI..
Hope it is of some help.
Regards,
Pramod -
WM: Suggest Bin (Like in LT09)
Hi Experts,
I have a requirement to Suggest a Bin (in a custom program) similar to LT09 (which automatically assigns a Bin). I've read several threads and it says to use the FM L_TO_PREPARE_ITEM_INT. Unfortunately, I cannot make this FM work. There are too many parameters to pass and I don't know which parameters and specific fields are important.
I need to know if there are other FM's / techniques / logic that can help me to solve my problem. If L_TO_PREPARE_ITEM_INT is the only way to determine the suggested bin, I need someone to help me identify the parameters that are really required to run this FM properly. It would be better if someone can copy & paste their sample code.
Points will be rewarded ASAP.
Thanks and Best Regards,
ArmanHi
you need to have following
I_LTAK = LTAK
I_LTAP = LTAP
I_MGEF = MGEF
I_MLVS = MLVS
I_RL03A = RL03A
I_T333 = T333
I_T334T = T334T
I_T340D = T340D
1) You will get SU details from LEIN table for SU(LENUM), using the same u can
fetch data from LQUA with condition WHERE LGNUM = I_LEIN-LGNUM
AND LGTYP = I_LEIN-LGTYP
AND LGPLA = I_LEIN-LGPLA
AND LENUM = I_LEIN-LENUM.
2) Fil LTAk with I_LQUA-LGNUM TO LTAK-LGNUM,
'999' TO LTAK-BWLVS,.
3) Copy the LQUA details to LTAP
4) Fill MVS with below code :
MOVE: 'MLVS' TO MTCOM-KENNG,
'MMSTA' TO MTCOM-T141_FELD,
I_LQUA-MATNR TO MTCOM-MATNR,
V_WERKS TO MTCOM-WERKS, " Plant user assigned
i_lein-LGNUM TO MTCOM-LGNUM,
SY-LANGU TO MTCOM-SPRAS.
CALL FUNCTION 'MATERIAL_READ'
EXPORTING
SCHLUESSEL = MTCOM
IMPORTING
MATDATEN = MLVS
RETURN = MTCOR
EXCEPTIONS
MATERIAL_NOT_FOUND = 1.
5) Data for MGEF:
Select region code from T300
SELECT SINGLE REGKZ FROM T300 INTO T300-REGKZ
WHERE LGNUM = i_lein-LGNUM.
Select single * statement is required here as whole structure is
passed to function module
SELECT SINGLE * FROM MGEF INTO MGEF
WHERE STOFF = MLVS-STOFF AND REGKZ = T300-REGKZ.
6) * passed to function module
SELECT SINGLE * FROM T333 WHERE LGNUM = i_lein-LGNUM
AND BWLVS = 999.
*Select single * statement is required here as whole structure is passed
*to function module
SELECT SINGLE * FROM T340D WHERE LGNUM = i_lein-LGNUM.
7) Keep T334T blank
This FM generates TO and also a proposed bin (NLTYP)
Thanks
Sandeep -
Proposal of same destination storage bin as source storage bin
I am using the function module: 'L_TO_PREPARE_ITEM_INT' for finding out the destination bin. But I am getting the same storage bin of source bin for destination bin proposed thru this FM. It doesn't make any sense. How can I avoid proposal of same storage bin. Is there anything to do in configuration or any userexits can be used to avoid this problem.
Hello,
I suspect the issue is from because of Capacity Check Method. Try removing Capacity check Method. If it works fine, then, build the right capacity check method based on your need.
This should solve your problem.
Regards,
Sathish -
Get proposed Storage bin before do Transfer Order
Hi all,
Do you know any FM to get the storage bin proposed by standard in LT06 when you do the Transfer order manually?
I am using L_TO_PREPARE_ITEM_INT but I think I don't have to use that. The case is that:
1- we are proposing to the user the storage bin recovered from L_TO_PREPARE_ITEM_INT
2- when user press a button TO is created like LT06. It is failing with "Available storage bin is 0". But if we go out from our Z screen and we do that by standard LT06 it is working fine so I think our call to L_TO_PREPARE_ITEM_INT is changing maybe some global variables which are doing that when the TO is going to be created it fails.
Do you have any idea how to get the storage bin? (MARD-LGBPE is not valid because it will not be informed there)
Regards,
ManelWe are still using this FM to get the storage bin. The problem is that LQUAY structure is blocked after the call so we need to dequeue LQUAY before to create the TO
Maybe you are looking for
-
I will try not to rant here that much. I have been a happy mac user since september of 2006. I have been a very unhappy frustrated mac user since last week. I bragged about how great the mac is. how it is for everyone. I have converted 2 families ove
-
Flex + cairngorm problem with 2 webservice
hi i want to retrive data from 2 webservices using cairngorm. flex can get data from the firsone and from the second is telling that doesn't see method, for me it is cos service it trying to find method from second webservice in this firstone. so wh
-
Can I map iwtUser-role to an attribute in external LDAP???
Hi, I am using external LDAP for authentication. In the Ext. LDAP I am using there is an attribute named title in every user cn. I want to use this attribute for portal to decide which role the user belongs to. I mapped iwtUser-role to title in
-
can i get the screen fixed at a verizon store or thru apple
-
Best practice to Deployment Oracle WebCenter Suite for enterpsie
I have a lead with enterprise client; and we need to proposed to this client best practice to deploy high availability on cluster environment contains the following components: - oracle web center content: it will used for WebCenter portal (spaces) r