cancel
Showing results for 
Search instead for 
Did you mean: 

Automate Usage Decision of Inspection Lot when material is moved out of one Storage Location to another

Former Member
0 Kudos

Hi guys,

I have a business scenario. We receive a production material from a different location into plant via trucks and immediately move the stock into a storage location A in the plant. Once the stock is moved to this storage location, we need to create a Inspection lot (Material/batch specific) and have an inspection for 72 hours. Further when this stocks moves from storage location A to storage location B the stock in the inspection lot needs to be decremented and  move from Quality to unrestricted. Further we want to close the inspection lot by doing a Auto UD when the inspection lot Qty becomes '0".

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Guys,

Sorry I was not able to explain well in the earlier post.

We are moving the produced stock from some other storage locations WMS(legacy system) into SAP location "X" via trucks(pallets). When the stock is transferred to location "X" with movement type 311. the inspection lot should be triggered with inspection type "08-stock transfer". Quality Stock, Material/Batch managed, Inspection end date 72 hrs. More stock will be coming into location "X" with the same material/batch into SAP and the inspection lot Qty should be incremented for the same inspection lot without creating a new one.

Further, when the Q-stock in location "X" is partially released to other storage location "Y" i.e. Q-stock to unrestricted the Qty. in the inspection lot should be decremented accordingly. When the inspection lot Qty. becomes "0" then we want to do an Automatic UD for that inspection lot (Status:SPCO) immediately.

The questions I have are:

1. How can we make sure we don't create multiple inspection lots if more stock is coming into location "X" for the same material/batch and increment the Qty in the same lot ?

(Control inspection lot in inspection type = 2 For each material batch and storage location) - will this option work. What happens If the stock with same material/batch comes on a different date?

2. How can we do stock posting for releasing partial quantities i.e. from storage location "X" to storage location "Y" . Is there any standard BAPI or F.M that can be used. Also have the interface to call that BAPI

3. Finally some stocks can be moved out of inspection lot before 72 hrs. So should I have a scheduling job (QA17) to run every 72 hrs or will I have to schedule a background job to clear inspection lot when the Qty becomes "0".

Note : For this inspection lot, we have no inspection plan, No MIC's etc... We are creating a inspection lot to just hold the stock and make sure it is not available.

Thanks

anand_rao3
Active Contributor
0 Kudos

When you perform 311 movement to bring the stock in to location X, system will generate an inspection lot of 08 origin, posting stock in to quality inspection.

You mentioned - there is possibility that you can do 311 several times for the same combination of material code, batch number and storage location. A the same time you want the stock should get posted in to QI against the same inspection lot and should not create new ones

The solution approach you specified must work here for this! In material master under detailed view of inspection type if you specify 2 - For each material, batch and storage location then system will go on updating the quantity against the same inspection lot only.

You need to maintain average inspection duration as 3 days (72 hours) in material master against 08 inspection type to calculate inspection end date after 3 days from the lot creation date!

You can always post the stock partially from QI of X in to unrestricted of other locations. For this you need to change the location in QA32 in inspection lot stock tab. Save it for each time with partial quantity but do not proceed for UD. You can do this manually and hence no BAPI is required.

I however, doubt whether QA16 or QA17 will work for auto UD as the lots do not contain any MICs. Perhaps custom ABAP BDC for TCode QA12 may work for this and which you can schedule in background also with certain controls that UD should only be given if entire stock posting is done or it has crossed 72 hours.

Anand

former_member221025
Active Contributor
0 Kudos

Hi Sandeep,

I would like to put another thought here,

As you said in the Note, you are creating inspection lot to just hold the stock and make sure it is not available then you should also consider achieving this using authorization check on Storage locations.

User with authorization for X Storage location will be able to do goods movement in this Storage location.

Prerequisite: You need to Activate authorization check for storage location using SPRO path shown below

IMG> Materials Management>Inventory Mangement and Physical inventory>Authorization management> Authorization check for storage location.

Amol.

former_member42743
Active Contributor
0 Kudos

You do have to be careful wen doing parital stock postings while still recieving in stock.

IF you post all the stock out, thus causing the Stock posting complete status to be set, then I believe the next receipt will act as if the UD was made.  I.e. depending on inspection lot control, the stock will either go directly to UR or wil create a new inspection lot.

Craig

Former Member
0 Kudos

Hi Anand,

thanks for the reply.

When we partially move the stock from QI of  X into unrestricted of other locations. Can we do the partial stock posting automatically through a BAPI rather than manually.

Today they have RF guns scanned when they move the stock.

Thanks

anand_rao3
Active Contributor
0 Kudos

Hi Sandeep,

BAPIs would be there but how can system will come to know how much quantity should be posted automatically in case of partial stock posting?

But, as you are mentioning -you are using RF guns for scanning (hopefully barcode which reads the quantity and other details like storage location, material document or inspection lot; which are required to execute movement in background)_ possibly you can automate it if you have separate identifiers for unrestricted stock and block stock in this scanning system.

You can explore BAPI_INSPLOT_SETUSAGEDECISION for stock data export parameter. Else simply you can pass the details using RFC as to execute QA11 or QA12 transactions in background. Needs intervention of ABAP consultant!

Anand

Former Member
0 Kudos

Thanks a lot Anand,if I have any questions in the process  I will get back to you.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello

I think your problem is not related to QM. Why you want to keep the stock 72 hours if you're not performing any analysis? If you want to make stock not available for any reason, you could use other mechanisms such as use stock category (blocked), change customization for storage locations in order to exclude some from availability check or use transfer between storage locations in 2 steps so your stock is in transit until you receive it.

nitin_jinagal
Active Contributor
0 Kudos

Hi,

As I understand your process,

GR at A> Inspection lot required at A> (Stock transfer to B, Unrestricted + closure of Inspection lot) via Auto UD.

If this is what you are looking for then I'll suggest you to do following customizations,

  • You first need to create a UD code that'll trigger the closure of Inspection lot. For this UD code, you must define a follow up action and into this follow up action, assign a FM which can post the stock to Sto Loc B (Consult ABAP team for this)
  • Second, Do as Mr Craig has suggested to achieve Auto UD.

So in this manner, you can do Auto UD along with Stock posting to a different storage location.

BUT, before that. One of your statement is bothering me

Further we want to close the inspection lot by doing a Auto UD when the inspection lot Qty becomes '0".

What does that mean?

Are you looking for a provision where system can release the Inspection lot quantity to ZERO first and then trigger Auto UD?? How would this become Zero? Will you do this Stock posting to B and then system should do Auto UD?

ntn

anand_rao3
Active Contributor
0 Kudos

I am also slightly not clear about the requirement. You mentioned that once the stock is moved to location A, you want to create inspection lots. On the contrary inspection lots are generated as soon as you inward something in to A. You can have limitation of time here that the lots should be cleared between 72 hours. And once it crosses 72 hours or before that you can post the stock from QI of A to unrestricted of B. But for auto UD to happen you should have completed result recording up to status 5.

Anand

Former Member
0 Kudos

Hello,

You mean to say,

Material received and after GRN it is posted into storage location A. now, there is 72 hrs inspection time after this auto UD and stock posting and material moved from A to B.

Is this your requirement ?

Regards

former_member42743
Active Contributor
0 Kudos

How is the stock moved from storage location A to storage location B?  It can't happen while the stock is in QI.  Since I'm not completely sure for your business and some of the details I'm making some guesses here.

Are you doing an actual inspection in QM or are you just quaranting the material?  I'm gathering that you want the move to be done based on time and not quality results.  So I would create one optional MIC in the inspection plan.  Maybe a qualitative one called "Materail Rejected" where the selected set is Y/N and the Y is set up with a reject valuation.

Set your Auto UD wait period to 72 hours in the plant.  (Potential downside here if you use Auto UD for other processes or materials).

Set your Auto UD to run every 30 minutes or so.

Develop a new program to run just before the Auto UD job.  (You could schedule these in the same job as two different steps).  The program would identify the inspection lots related to this incoming process and use the transaction QAC2 to move the inspection lot from the incoming storage location to the outgoing storage location.  It should be a relatively easy development.

Once the inspection lot has aged 72 hours, the next time the job runs, the auto UD will process the lot since the MIC is optional.  Siince the inspection lot was already transferred to the new storage location, the material should wind up in the outgoing storage location.

If during the 72 hours, if anyone goes to resutls recording for the inspection lot and records a Y on the MIC "Material Rejected", the auto UD will not be able to process the lot and someone will have to manually process the UD.

Craig