cancel
Showing results for 
Search instead for 
Did you mean: 

Exclude one storage location from recurring inspection

former_member184737
Active Contributor
0 Kudos

Hi All,

      Is it possible to exclude one storage location from recurring inspection? As i have already referred the below post for the same.

     If it's not possible in standard then, Is there any other user exit or enhancement to meet this requirement? Any other possible work around to achieve the same? Please share your suggestion.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member207800
Active Contributor
0 Kudos

Option 1)

Remove the next inspection date from batch master which is you don't want to create an insp. lot.

Then execute the transaction QA07.

I think you can develop new report program for background job for all above.

Option 2)

Use the BAdI 'INSPECTIONLOT_UPDATE' - method 'CREATE_AT_SAVE'.

For example...

IF INSPLOT-ART = '09'.

   IF INSPLOT-LAGORTCHRG = '1110'.

      MESSAGE I001(ZQM) RAISING ERROR_WITH_MESSAGE.

   ENDIF.

ENDIF.

Regards

former_member184737
Active Contributor
0 Kudos

Hi All,

      By using implicit enhancement, we have excluded the specific storage location from recurring inspection and for other storage location, it's created inspection lot and moved the stock from 'unrestricted' to 'quality'. But, we are facing with an issue, we dont know whether its standard or not.

example

mat1 having 100 stock in sloc A with batc1 and 50 stock with batc11,

200 stock in sloc B with batc1,

300 stock in sloc C with batc3

We want to exclude sloc B, by using the enhancement we excluded and when we run QA07, insp lot generated for batc1 with sloc A.

if we transfer the stock 150 from sloc C to Sloc A and run QA07, inspect lot generated for batc3 with loc sloc A and sloc C. (lets assume next inspection date meet the recurring inspection requirement)

But, if we move the stock 100 from sloc B to sloc A (which is already having stock under quality inspection) and will run for QA07 then inspection lot not getting generated. But, if we change the next inspection date as current date it will generate insp lot and move the stock to quality. Why so?

Is this standard behavior? if the same batch doesn't have stock under quality inspection then the same batch will be considered for recurring inspection with 'next inspection date' as future. Please share your suggestion in this regards.

Thanks

former_member207800
Active Contributor
0 Kudos

The recurring inspection considers the next inspection date on batch master.

The batch master exists only one record in your plant.

I assume you want to generate new insp. lot based on stock.

It isn't able within SAP standard.

A batch master can have only one next insp. date, manufacturing date, and so on.

Regards

former_member184737
Active Contributor
0 Kudos

Hi DO-Wook Kim,

      Yes, you are right. We used to maintain those details in batch master (msc2n).For example, a material having stock with different storage locations like A and B with same batch no. we want to exclude the sloc B from recurring inspection.

Lets assume recurring inspection requirement is meet with 'next inspection date' as 21.10.2014

case1:

If i run QA07, inspection lot has been created and moved the stock from 'unrestricted' to 'quality' from sloc B

I transfer some stock from sloc B to sloc A with same batch (which is already having stock under qual inspec) and make sure that the 'next inspection date' value as '21.10.2014'.

If i run the QA07, inspection lot dint get generated for this moved stock until unless i change the 'next inspection date' for this batch with current date. The same will be work with 21.10.2014 if i complete the UD and moved the all QI stock into unrestricted.

Is this standard?

Thanks

former_member207800
Active Contributor
0 Kudos

Sorry. It is standard SAP behavior.

As I mentioned already, the next inspection date can be defined at plant level or client level, not storage location level.

Regards

former_member42743
Active Contributor
0 Kudos

This issue is becasue the next inspection date in the batch record is in the past. I've found that once the next insepction date is in the past, the program does not select it.  That's standard and is a pain.  I imagine if you copied the QA07 program you could easily fix that in the selection process. I'm assuming it is using a default of the current date, you'd have to hard code that with a date like 1/1/1980 instead.

Answers (4)

Answers (4)

0 Kudos

in my opinion, this requirement is very normal, because maybe some material in the storage location is not belong to QM department, i also met such issue now. i want to make a enhancement for the QA07 and exclude the storage location not generate the inspection lot.

former_member184737
Active Contributor
0 Kudos

Hi All,

       We are facing issue to achieve this requirement. We Have excluded storage location by applying implicit enhancement. The problem is in day to day run, this enhancement is not triggered for some of the material randomly. This list of materials are not constant it may vary. We tried to debug the whole QA07 program to find out the root cause why this enhancement is not triggered for some of the material (not fixed but dynamic)on daily run. Is there any prerequisite/ reason for not triggering this enhancement? I hope that it's not because of any missing config setting. Because, for the same material, it was triggered on one day QA07 run and it wont triggered on another QA07 run.I mainly focus on the field 'next Inspection date' in batch master, is there any other key fields we need to check for this issue? Expecting your valuable suggestion in this regards. Just give me an over all view about the possible reason to not triggering this enhancement.

Thanks

former_member42743
Active Contributor
0 Kudos

Ok.. I'm not sure why you would use EXIT_SAPMQEVA_003 as that is used to calculate the next inspection date and is usaully only invoked when a new next inspection date is calculated at either an 09 inspection lot UD or on initital calculation at MIGO.  It ahs nothing to do with creating the 09 lots or selecting stocks to process in the QA07 program.

I haven't seen your thread before but it seems to me you only want reinspection if material is sitting, (or not sitting),  in a specifc storage location.  I probably would have suggested you copy the QA07 program to a Z program and simply add storage location to the selection parameters in the begining of the program ad adjust the query accordingly.

This only works if you realize, as mentioned, a batch only has only one next inspection date.  So when you split the batch across different storage locations, and modify your QA07 program as described, you must also have strict business processes around how the storage locations are used.

For a batch to be picked up by QA07 the following conditions must be meet:

1) there MUST be stock in unrestricted inventory

2) there MUST be an inspection interval defined in the material master

3) the 09 inspection type must be set up and active for the material

4) the next inspection date in the batch master must fall within the date window determined by the settings in the QA07 job.

A common problem is that people also run this for expired batches.  If you specify a value for the date "window" in the expiration section, it will block or restrict the batch FIRST.  Before doing the reinspection.  I.e. expiration date program logic is executed before recurring inspection program logic.

So if your interval and shelf life values are both 365 days giviing you a next insepction date and expiration date that are identical, AND you run QA07 with a 30 day window for both the recurring inspection section and the expired batch section, the batch will ALWAYS be blocked or restricted first, and you will never get an 09 inspection lot since the batch is no longer in unrestricted stock.

I don't know if that helps or not.

Craig

former_member184737
Active Contributor
0 Kudos

Hello Craig S,

       Thanks for your reply. First of all thanks for confirming that there is nor more use of EXIT_SAPMQEVA_003 for this requirement. In my case, there is no issue to create a lot with 09 inspection type. Our requirement is, we need to exclude the stock from a specific storage location which stock is not considered for recurring inspection. We implemented implicit enhancement and the same working to exclude specific sloc stock from recurring inspection. In  our case, when ever required the user will move the stock from this specific loc to another normal location, here same batch will be available in more than one location. Even If the next inspection date is fall for reinspection for a batch which is existing in more than one location, system should exclude the stock from specific sloc and will move the stock from unrestricted to QI for normal sloc. We are running this program on day basis, in day to day run there was some few movement entries which are wrongly posted to QI stock for this specific sloc which we want to exclude. This list of materials are not fixed it may vary on day to day run, we tried to find the root cause by debugging this program but couldn't since the incorrect movement may be vary on day to day run. We don't have clue.

   Our real issue here is, there is no problem to create inspection lot with 09 inspection type but wrong movement is posted from the specific sloc if the same batch is exist in more than one sloc.Please note that it was working for the most of the materials even if the batch is existing more than one sloc along with specific sloc., but on day to day QA07 run few wrong movement happened from this specific sloc. even though if we implemented enhancement to exclude this sloc from recurring inspection.

P.S : We are using date value (30 days) for recurring inspection along with the option 'to Insp. stock at lot creation'. We are not maintaining any date value for expiration section and 'Block batch' option also unchecked.

Thanks

former_member42743
Active Contributor
0 Kudos

Ok.. let me see if I get this straight....

You've excluded the creation of lots from one or more storage locations, lets say locations 0030 and 0040.  Anytime stock is located in those storage locations, no 09 lots or material movements should be done.  I'm guessing here is that you used the  BADI 'INSPECTIONLOT_UPDATE' as suggested by Do-Wook Kim to suppress them from being created for these storage locations?

A user moves material from 0030 or 0040 into either 0010 or 0020 where the 09 lots and material movements should be done by QA07.

If they move the whole batch, no issues.

If they move only part of the batch, say half to 0010 and half remains in 0030, then you get inconsistent behavior by QA07?

The behavior is that sometimes it works only on the 0010 storage location, other times it impacts both 0010 and 0030 stock.  I'm assuming this results in an 09 inspection lot with the combined quantitty of stock from the two storage locations.

Did I get it all right??????

Question:  Is all the stock in the excluded storage location blocked stock or unrestricited stock?  Can you check to see if this happening only when stock in the excluded storage location is in unrestrcited stock and is not happenning when it is blocked stock?

The QA07 program is designed to move all stock from all storage locations as far as I know.  But it won't move blocked stocks. So those might remain in the excluded storage location.

So if an inspection lot is called to be generated, it wouldn't surprise me that it moves unrestricted stock from both storage locations into QI stock.  What I can't remember is if you get an inspection lot for each storage location.. I think that you would.   So I could see where if you suppress the inspection lot from being created,  the stock movement still happens.  Does the created inspection lot reflect the full qty or only the qty from the 0010 location.  That could casue "stuck" QI stock.   

Craig.

former_member184737
Active Contributor
0 Kudos

Hello Craig,

      Thanks for your detailed reply and insight on this issue. Yes, you understood the problem well. In our case we never ever move the stock into blocked stock. All qty are stored in unrestricted section only, yes, user generally move the partial stock from the sloc which we need to exclude to normal sloc.Let take the same example what you described in your previous reply. sloc 0010, 0020 are normal sloc, sloc 0030,0040 are need to be exclude. If user move the partial qty of stock from sloc 0030 to 0010 with same batch number and then run QA07, sometime system not exclude the sloc 0030 from recurring inspection.And yes, if system move the from unrestricted to QI from these sloc i got two inspection lot for sloc each with stock movement.So, as you mentioned its bit complicated to exclude the sloc by simply implement the implicit enhancement. Could you please suggest the best method to achieve the same based on your experience? It may help us a lot.

*P.S: I have done testing with different scenario it was working even if i mention 'Next inspection date' as past date. We really don't know why & when for some of the cases material is just skipping to trigger this enhancement.

Thanks

former_member42743
Active Contributor
0 Kudos

My guess is that the issue is with your development and not the QA07 program.  I'd look at the program logic again.  Your program is suppressing inspection lot creation so my thought is that for some reason that your suppression logic is being skipped or is not entirely correct.

What I might try to do is ask the programers to create a log file for a while.   You might have to copy QA07 in order to change it to support getting a log of the info you need.

So each time the enhancement is hit, write the relevant info out to a log file when you enter the enhancement and again when just when it leaves the enhancement.

Maybe by collecting some data, and seeing what gets collected in the log file, versus the inspection lots being created, you'll identify why your enhancement is not suppressing the creation of certain batches and you'll verify that is executing for every applicable batch.

Craig

Former Member
0 Kudos

Hello

Is there any reason to exclude some storage locations? I think you can either block stock you don't want to monitor deadline or you can set batch status as not realesed-blocked. In that way you can exclude stock or batches you don't want to monitor (maybe because that stock is waiting destruction process or is already expired).

Best regards

Carlos Díaz

Former Member
0 Kudos

Hello,

Well in stdn this not possible as there is no such available on stdn screen. Try to use this exit EXIT_SAPMQEVA_003 where you try to put restriction on QALS-LAGORTCHRG.Just take technical help and process it the same. I hope this will help in your requirement.

Regards

former_member184737
Active Contributor
0 Kudos

Hi Shailendra Gaur,

           The mentioned user exit QEVA0003 is not getting triggered while execute QA07. It has function EXIT_SAPMQEVA_003 and it's contains include ZXQEVU03. Could you please give me some more information about this exit?. When it will be exactly triggered in which event/method we have to do code to exclude this storage location? Our requirement is, we have to exclude the specific storage location when we execute(F8) QA07. Please share your view and suggestion

Thanks

Former Member
0 Kudos

Hello,

Basically this user exit is used to exclude the storage location where to call and at which method you need to write a code, this is basically technical concern. Building logic in method according to your requirement is technical concern. Just clear your view to him he will write the code. Don't expect the code here

another thing when you execute QA07 then only exit triggers and exclude the concern strg locations.

Regards

former_member184737
Active Contributor
0 Kudos

Hi Shailendra Gaur,

       Thanks for your reply. Of course, i'm not expecting code, our ABAPer will taking care. Just need to know the key point/prerequisites. Still, the exit is not getting triggered. Client is running this transaction with all the materials and for all batches for an particular plant, initial run in days value along with "to insp. stock at lot creation' option. I tried with single material with batch also, still the exit is not getting triggered in both the cases. Both exit and Functions are active. I had already referred the below thread too.

Is there any other area need to be check to trigger this exit while executing QA07? Your suggestion will be helpful to solve our issue.

Thanks

former_member221025
Active Contributor
0 Kudos

Hi AKS,

This looks difficult, may be Not recommended without knowing its implications. Cant comment on it.

Check if this approach suits you,

There are few batches of a material for which you do not wish to create Recurring Inspection lot. i hope there are certain properties which determines criteria for such bifurcation. In this case rather than moving these batches to another Storage location, i would prefer to transfer these batches to Different Batch using 309 Movement (Transaction Qa11- Stock Posting to New Material or MB1b) and at the same time i would also set Next inspection date for these batches to 31-12-9999. This will make sure that no inspection lot will be created.

I hope, you get the idea.

Amol.