cancel
Showing results for 
Search instead for 
Did you mean: 

Restriction of lot creation process in MIGO

Former Member
0 Kudos

Hi All,

We have a requirement where inspection lot should not get created when a particular condition occurs. So there will be a condition in place if that satisfies then inspection lot should not get created and if that condition fails then lot should be created as per normal process.

Please let me know how we can implement this.

Thanks in advance for the help!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member42743
Active Contributor
0 Kudos

Use user exit QPL10001 for this.

There is an parameter you can set in there to not create the lot.

Craig

FYI - your note was reported for not searching while I was writing the reply.  I was going to rejectit myself but it takes me longer to report it and delete it and explain it then it does to answer it.  So I left it go.

Former Member
0 Kudos

Thanks for the reply craig.. can you explain in more detail about parameter in QPL10001.

I tried implementing QAAT0001, in this i have set "E_NO_INSPECTION (create lot or not) = X" for my condition and also it is restricting the lot creation process but for the positive condition system is throwing error

- Change the inspection stock of material AAAA in QM only.

former_member42743
Active Contributor
0 Kudos

I beleive that first you'll have to change the stock posting to unrestricted in the QALS work area provided.

Since your are trying to post the stock to QI that has to be set to unrestrcited stock first.

Craig

Former Member
0 Kudos

After activating exit QAAT001 we are facing issues in 03 (in- process inspection as well).

Also lot is not being created at the time of GR and throwing error. Can you please elaborate what needs to done from our end.

former_member42743
Active Contributor
0 Kudos

honestly.. how would I know that?

The exit gets called for every inspection type.  I have no idea what coding you put in to the exit and what you are doing in it.  You need to make sure your code only executes for the lots you want it to.  This includes lots of ALL the other inspection types and whether or not they manually created or system created.

This would be something you and your developer need to step through in debug.  put a breakpoint in the code and figure out why your 03 are having problems. (which you don't even mention the type of issue, are they not creating? Are the in CRTD state?  Are they in REL state but unable to record resutls?).

You say its throwing an errror.  What error?  Is there an SAP message number? What's it actually SAY?  Did you double-click on the message and see if there is additional info?

Any screen shots?  Have you debugged it yet?  Did you test other lots? I certainly hope this was all done in a sandbox.

I've typed more in this one posting then you have in all your posts combined in this thread.

Please consider reading this:

https://wiki.scn.sap.com/wiki/pages/viewpage.action?title=Asking+Good+Questions+in+the+Forums+to+get...

Craig

Former Member
0 Kudos

Yes i understand less details were provided in earlier thread, but what i was trying to mention is after implementing QAAT0001, 03 inspection lot was generating at all (No errors).

Also at the time of MIGO for (101 Mvt type) i was getting error "Change the inspection stock of material AAAA in QM only".

We tried debugging and found error was coming from standard FM "QPWE_QSTOCK_CHANGE_ALLOWED"

When we deactivated this exit, standard functionality was working fine (Creation of lot 03 origin, creation of lot 01 origin)

hence i am wondering if there are any certain conditions to implement this enhancement?

former_member42743
Active Contributor
0 Kudos

First.. a disclaimer.. I am not a programmer!  🙂

Second, I gave you the wrong user exit but you might want to utilize it anyway at some point. So see the following notes below:

I would think that the very first thing you would have checked would be the inspection origin (and/or inspection type),   But you imbeded this in the If statement after doing a search in MCH1.
Why?

I would normally have an inspection lot origin check right in the very begining before doing anything else.  IF ORIGIN <> 01 then EXIT.  That way you don't waste any processing time or risk updating or changnig anything in the structures.

I'd use inspection lot origin and then possibly the inspection type.  As a system grows I find we often add new inspection types for various purposes, but the origins are SAP delivered and don't change.  That way, if other inspection types are added, the program doesn't need to be updated.

Also, you are checking in MCH1 table.  That simply denotes a batch was created. While you should normally be fine doing this 99% of the time, it doesn't guarante that the batch was actually receipted into the plant.  So you may want to check for an MCHB record first.  The MCHB segment is not usually created until the GR is completed. Then go retreive the vendor batch info from MCH1.

You might even want to see if the vendor batch is found assoicated with an inspection lot in the QALS table instead.  Just becasue the vendor batch exists in MCH1 isn't actually any guarantee it was inspected. Any batch can be manually updated with a vendor batch.

Now.. the exit I SHOULD have given you the first time around is QAAT0001.  There is a Wiki paper on it it here:

https://wiki.scn.sap.com/wiki/display/PLM/QAAT0001+Do's+and+Don'ts

Sorry for the mixup.

Craig

Former Member
0 Kudos

Thanks Craig for your help and suggestions