5

Click here to load reader

MWMTO013

Embed Size (px)

Citation preview

Page 1: MWMTO013

8/10/2019 MWMTO013

http://slidepdf.com/reader/full/mwmto013 1/5

MWMTO013

User Exits for TO ProcessingUsing this customer exit, you can influence the quants of a material for stock

removal. Here you can set up your own crossstoragetype stock removalstrategy.

General information about transfer order processing

Transfer or!er processing an! confirmation in the "# system are !ivi!e! intothe following programs$

1. SAPML03T %creens, transactions2. SAPLL03A &tem creation 'TO core(3. SAPLL03B )unction mo!ules for external purposes4. SAPLL03T Up!ate tasks

These four programs work together as follows$

SAPML03T contains all the transfer or!er processing screens. *ll relate!transactions are initiate! using screens from this program. *ll correspon!ing!ata is rea!, checke! an! recor!e! here 'transportation requirements intransfer or!er$ transportation requirements, transfer or!er$ confirmation, etc.(

 *ctual creation or confirmation of items occurs via function mo!ules in

SAPLL03A , where the transfer or!ers are first create! an! recor!e! internallyas the putaway an! picking strategies an! several checks are run. +hanges instorage location, storage unit or stock that may arise from in!ivi!ual transferor!er items are simulate! in internal tales.&tem creation an! confirmation occurs in two steps. )irst, the item is generate!internally an! all checks are carrie! out. Then, the internal tales are up!ate!via a secon! function mo!ule an! the transfer or!er items are a!!e! internally.-ou can view this twostep process y running transfer or!er creation in theforegroun! 'screen %*P#/0T 1/2(. )irst, the system generates the transferor!er item, then issues a warning. &f entries are ma!e on the screen, the systemregenerates the transfer or!er item 'inclu!ing all checks( an! the previous one

is !iscar!e!. The internal tales are up!ate! after the warning !isappears.The confirmation process follows a similar proce!ure.

User action 3post3 in SAPML03T is carrie! out after an item is create! orconfirme!, which in turn calls up function mo!ule SAPLL03A , which thenactivates the up!ate function mo!ules in SAPLL03T. These function mo!ulesare normally processe! asynchronously 'supplement &4 UP5*TE T*%6(, utcan also occur synchronously 'see elow(. *ll changes in storage location,storage unit, stock, transportation requirements or transfer or!ers are ma!e inthese function mo!ules.

SAPLL03B contains function mo!ules for creating an! confirming transferor!ers which can e use! instea! of transactions. )irst, the normal screen run

Page 2: MWMTO013

8/10/2019 MWMTO013

http://slidepdf.com/reader/full/mwmto013 2/5

of the parameters transmitte! is reviewe!. 7ea!ing, checking an! recor!ing ofthe !ata an! part of the flow logic occurs via external performs in SAPML03T an! in a common !ata area, to avoi! re!un!ant co!e. &tem creation an!confirmation takes place in function mo!ules foun! in SAPLL03A.)unction mo!ules 8TO8+7E*TE8T7 an! 8TO8+7E*TE854, for example,

are use! in collective processing in the %*P stan!ar! system. Up!ating occurssynchronously in this case.

Transactions in SAPLL03A and SAPML03T

%ome checks within the transfer or!er creation an! confirmation processes!epen! on the transaction concerne!. This transaction 'fiel! 9O7:*( is place!at the !isposal of all user exits so that the system can react as require! for thetransaction involve!.

Relevant values:

1. ;T<; Transfer or!er for transfer requirement2. ;); Transfer or!er for !elivery note0. ;T; Transfer complete storage unit

Homogeneous storage units can also e transferre! explicitly. &n this case, thevalue of the fiel! is T*PHO#9E = 3>3.

1. ;&9; +lear inventory2. ;U1; +reate first item for posting change0. ;U2; +reate secon! item for posting change?. ;@<; +onfirm storage unit for stock removal from %Umanage! lock

storage area

"ithin the %Umanage! lock storage ares, the item type 'PO%T-( of a TO itemis of interest. &t is set when the source !ata is !etermine! an! can have thefollowing values$

1. ; ; 4ormal transfer or!er item2. ;1; @uantneutral stock removal that requires verification of storage units

!uring the confirmation process

0. ;2; %torage unit verifie! !uring confirmation

&tems with item type ;1; are !elete! as soon as confirmation is complete.

all!"p Point and #mportant Re$uirements

The customer exit is calle! on the preparation screen for stock placementefore the first item is create!.

Only * or % messages can e issue!.

Parameters and %ptions

Page 3: MWMTO013

8/10/2019 MWMTO013

http://slidepdf.com/reader/full/mwmto013 3/5

The customer exit in the program is the function mo!ule E>&T8%*P#/0T8/10.To actively use it, you must create the &nclu!e A>TOU1B an! activate theextension using transaction +#O5.

"ithin transfer or!er processing, the customer exit is calle! up if on the screen

for stock removal there is a storage type with the 0 special characters &&& inthe storage type search tale.

The following parameters are availale$

#mport Parameters

1. &8T*6 The respective TO hea!er from which, for example, reference!ocuments such as the TO numer are taken.

2. &8T*P TO item

)or further information on fille! fiel!s in &8T*6 an! &8T*P, refer to theinterface !ocumentation of the function mo!ule 8TO8P7EP*7E8&TE#8&4T.

1. &8#9% #aterial master2. &8#:E) HaCar!ous material master0. &8T000 #ovement type with which the TO is create!?. &8T0?/5 "arehouse numer controlD. &8*4)# 'remaining( requirement quantity in ase unit of measure. This

quantity is relevant if active ingre!ient management has een activate!'&8T*P"&7#E is not set to its initial value(.

. &8*4)#E 'remainig( requirement quantity in alternative unit of measure.This quantity is relevant if active ingre!ient management has eenactivate! '&8T*P"&7#E is not set to its initial value(.

F. &89O7:* Process within TO processing

Table Parameters

T'(MAT Table of $uants of t)e material

T'B*BAT+ Table of batc)es according to batc) searc) module

There are no export parameters. The tale T8<5<*T+H contains the atches!etermine! y the atch search mo!ule for the current material. This tale ispasse! on y reference an! can therefore e change!. Tale T8@#*T ispasse! on empty an! must e fille! y the user exit. )rom tale T8@#*T,transfer or!er items are create! in the sequence in tale T8@#*T, until therequirement quantity is supplie!. &f the atch search mo!ule is active, onlyT8@#*T entries for which there is an entry in the atch tale T8<5<*T+H areprocesse!. The comparison is not ma!e with the atch tale that was passe!on to the user exit ut with the atch tale that was create! !uring TOprocessing.

 *s a utility for setting up tale T8@#*T within the user exit, function mo!uleL'(MAT'S,#,%'R-AT- is availale. This function mo!ule has no import or

Page 4: MWMTO013

8/10/2019 MWMTO013

http://slidepdf.com/reader/full/mwmto013 4/5

export parameters. )or the current TO item, tale T8@#*T8%)&)O8+U% is setup in accor!ance with the logic in the stock removal strategy Stringent ,#,% ,an! then passe! ack to the caller. &f the atch search mo!ule is active, acomparison of tale T8@#*T8%)&)O8+U% with the !etermine! atches takesplace. These atches are passe! ack to the caller in tale T8<5<*T+H8+U%.

This function mo!ule can only e calle! up from this user exit.

#nformation on t)e status of transfer order processing

Using the function mo!ule L'T%'R-AT-'G-T'#.,% you can otaininformation on the current status of transfer or!er processing. &n a!!ition toTale T*P with the transfer or!er items alrea!y create!, you can use thefollowing tales$ P%PE77, %PE77, @%PE77 an! %%PE77. These talescontain the storage ins, storage units an! quants affecte! y the transferor!er. However, the contents of the more important fiel!s !o not match the

status in the !ataase. &nstea!, they appear as if the transfer or!er itemscreate! up to now have een poste!. The up!ate of the item currently eingposte! is not inclu!e! in the tale.

&f, for example, a in is rea! in the user exit, we recommen! that you have thesystem first check in Tale P%PE77 an! then, only if !ata access isunsuccessful, to rea! the !ataase. &f this is not possile 'for example, the inis rea! y the in!ex for empty ins(, a in that has een rea! shoul! still ecompare! with Tale P%PE77.

The only exception to this rule is a quant affecte! y locking logic <. &n thiscase, @%PE77 has the status that woul! exist on the asis of the currenttransfer or!er. +hanges that arise from parallel transfer or!ers are only partiallyinclu!e!. &f, for example, transfer or!ers 1 an! 2 'in this sequence( access thesame quant an! the respective items have alrea!y een create! internally,@%PE77 contains the stock of transfer or!er 1 minus the current item an! fortransfer or!er 2 the stock is minus oth items. Therefore, to have the currentstock in each case, the !ataase stocks must e compare! with the gloallocking tale 'locking oGect E@U*- via function mo!ule;E4@UEUE87E*5; rea! an! evaluate(. "hether or not this exact stockrea!ing is require! shoul! e !eci!e! in each in!ivi!ual case.

The following example of a stock removal via user exit may e of help in makingthis !ecision$

<in stock !ataase$ 1/ piecesTO 1 removes D pcs an! first creates the item internallyTO 2 wants to have 1/ pcs remove! from stock.

The user exit also !eci!es on this in. The quant is not in the internal taleecause no internal item yet exists. &rrespective of whether the user exitproposes the in with a stock of D pcs or 1/ pcs, transfer or!er 2 'provi!ing

there is a positive stock alance( woul! at most take D pieces an! woul! try tosupply the remaining D pieces y means of a further item. "ithin the user exit,

Page 5: MWMTO013

8/10/2019 MWMTO013

http://slidepdf.com/reader/full/mwmto013 5/5

the correct stock is not important for the stock removal to e ;correct;. &t is onlyimportant if it affects a !ecision, that is, if the user exit proposes another inecause only D pieces coul! e remove! from the first in.

Tale &<5<*T+H is availale for you to create your own stock removal strategy.

This tale is important for atchneutral !ocuments if you want your own stockremoval strategy to e influence! y the stan!ar! atch search function.

 *ll the aove tales are pre!efine! for the user exit. &f the system is to accessone of these tales within the user exit, the current version must e calle! upvia the function mo!ule L'T%'R-AT-'G-T'#.,%. The following exampleshows you how to call up Tales P%PE77, @%PE77 an! T*P. The other twotales are not of importance ecause there is no %U management involve!$

CALL FUNCTION 'L_TO_CREATE_GET_INFO' EXPORTING I_LAGP_COPY ='X' I_LQUA_COPY = 'X' I_LTAP_VB_COPY = 'X' TABLES T_PSPERR =

PSPERR T_LSPERR = LSPERR T_QSPERR = QSPERR T_SSPERR = SSPERR T_TAP = TAP T_BDBATCH = IBDBATCH. 

The tale parameters must always e specifie! only the marke! tales 'with;>;( are copie!.

Tale &<5<*T+H can only e calle! up y user exits from %*P/0*.Otherwise the content is un!efine!.

,unction/Program: E>&T8%*P/0*8/10$ User Exit for Picking$ %trict )&)O