cancel
Showing results for 
Search instead for 
Did you mean: 

UserExit after Good Receipt and Inspection Lot Creation

Former Member
0 Kudos

Hello QM-Gurus,

I need your help again.


I make a goods receipt (MB1C). In the background, the inspection lot is created and stored.

Now I have to call a program automatically.

Which user exit can I do that?


Thanks,


Ulrike

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I have solved this requirement with SAP workflow.

Thanks to all!


Best Regards

Ulrike

Martin_H
Contributor
0 Kudos

Hello Ulrike,

checking the post (step 8(b) of it) of the link provided you it now would be nice to all the contributors of your post (and to the rest of the community) if you would provide at least a summary of how exactly you solved your problem.

Regards

MH

Former Member
0 Kudos

Hello Martin,

From my perspective, I have done that.


The SAP workflow is a completely separate issue.


I had a problem with the topic of SAP workflow.


My approach is described here


Regards,

Ulrike

nitin_jinagal
Active Contributor
0 Kudos

What exactly you want to call or do automatically? I think an appropriate suggestion can only be given after knowing the exact query !

ntn

Former Member
0 Kudos

After the Inspection Lot is created, the Inspection Lot Structure must be sended to the subsystem.

In the program to be called is this function:

CALL FUNCTION 'QIRF_SEND_INSP_REQUIRMENTS'
     EXPORTING
       I_IND_MULTI_TRANSFER_POSSIBLE = 'X'
       I_IND_SORT_ASCENDING_TO_DATE  = 'X'
       I_IND_SORT_DESCENDING_TO_DATE = ' '
       I_QAILS                       = stQAILS
     TABLES
       T_QIWLTAB                     = itQIWLTAB
     EXCEPTIONS
       NO_ENTRY                      = 1
       NO_SUBSYS_DEFINED             = 2
       NO_AUTHORITY                  = 3
       OTHERS                        = 4.


Ulrike

busyaban7
Active Contributor
0 Kudos

Hi Ulrike,

This is just for your information only. I also have somewhat similar requirement which is open in a discussion thread below -

http://scn.sap.com/thread/3677845

You can keep following it or investigate it further and update us.

Also there is a list of user exits already published by Maheswaran KD . ,

http://scn.sap.com/docs/DOC-45085

http://scn.sap.com/thread/3676972

Thanks,

Arijit

Former Member
0 Kudos

I want to try again to explain what my problem is.

I make a goods receipt and inspection lot is created.

The data of the inspection lot are also properly prepared for the subsystem.

After the inspection lot has been generated is automatically called a program.

The program aims to bring the data to the inspection lot from the external database.

I can not find a matching user exit.

The user exit must be after the goods Receipt and after the creation of the inspection lot work.

I hope I was able to show the problem better.


Best Regards,

Ulrike

john_lutz
Active Participant
0 Kudos

Hi Ulrike,

Do I understand that



After the inspection lot has been generated is automatically called a program.

The program aims to bring the data to the inspection lot from the external database.

means that inspection results already exist for this inspection lot in the external system, and should be transferred to the newly created lot?

anand_rao3
Active Contributor
0 Kudos

I am too assuming like John that you want to transfer the data from external system to this newly created inspection lot!

Honestly, I also need to search if any user exit is available for this. But this has surely put some queries in my mind. Why it is necessary that the program should be triggered immediately after inspection lot creation? Can't you think of running a batch job in background may be with more frequency (if no exit is found or available)?

I believe the inspection lot is created as soon as GRN is posted. And both are created in accordance with number range set for their respective objects. Buffering also plays a role here. In short  one does not know which number the next lot will be created with!

Under such situation, how you would correlate the inspection results in your external system belong to this newly created lot especially when the program runs immediately after lot creation?

Also inspection lot creation may have some problems. e.g. Sometimes lot may get be created in CRTD mode, sometimes you notice that sample size is not calculated properly in the lot. And if this program runs immediately after lot creation then it may fail as there is no chance/time available in rectifying these lots prior to its result recording. - Just my thoughts!!

Anand

Former Member
0 Kudos

Hi John, hi Anand,

Unfortunately they have not understood me correctly.

This is probably due to my poor English.

I would like to address a user exit so I can make changes to the created inspection lot after the creation of the inspection lot.

In the inspection plan I have defined customer limits.

When the goods receipt I have no customers.

So I have to manually assign to the inspection lot created the customer limits.

I hope I could now describe my problem better!

Greetings and thanks

Ulrike

busyaban7
Active Contributor
0 Kudos

Hi Ulrike,

I think you are trying to change the MIC ranges (Upper limit, Lower Limit, Target value, etc) for the inspection lots created, right? Please correct my understanding here.

Are you using DMS linked to Sales order/Material to have the customer ranges? By what logic these values are different during the inspection lot creation? How do you get to know that you need to make changes in the MIC ranges always? Or there is any other control available suggesting for these change?

In case if you need to change the MIC ranges, then you can maintain them in separate inspection plans for each customer, and that value will be picked in Inspection lot. In material assignment tab you can maintain the "Customer" value for each inspection operation, and make some business logic to read these values in the exit.

Form the list of exits I attached above (http://scn.sap.com/docs/DOC-45085), I think you can use the below -

QPMK0001  Modify Master Inspection Characteristic Data at Creation

Please double check with your technical team to check it's usability.

But I have one more idea here - just for your thoughts. Create multiple inspection plans/GrC (one insp plan per customer) and keep ready by assigning the material to these records. Also create one more inspection plan/GrC which has the genuine MIC range As-Is and extend the material to it. During automatic inspection plan assignment, due to availability of many inspection plans, your program will not assign any inspection plan to the inspection lot, and so it will have "CRTD" status. Now if you know for which customer you are going to test the finished material, you can go to QA02 => "Inspection Specification" and click "Task List/Spec". Now based on your customer you can add the right inspection plan Manually. In case if this material is build Make To Stock, then you can use the true MIC range As-Is insp plan....!! This process can serve as a manual work-around for fixing your issue.

Thanks,

Arijit

Former Member
0 Kudos

Hi Arijit,

thanks for your response.

>>I think you are trying to change the MIC ranges (Upper limit, Lower Limit, Target value, etc) for >>the inspection lots created, right? Please correct my understanding here.

That's correct.

The User Exit QPMK0001 I can use! Thanks.


Today is monday, I forgot the most important problem.


In an external database are the measure Values. I must after creating inspection lot call a program. This program fetch data from external database to the inspection lot.


So I need an UserExit to call this program.


Can you give me a solution?


Best Regards,


Ulrike

busyaban7
Active Contributor
0 Kudos

Hi Ulrike,

I think, this should be called inside inspection lot creation program itself (SAPLQPL1). Please double check with technical team, as they can help better here then me.

Wait for some further feedback form other experts and you may get better feedback here.

Thanks,

Arijit

busyaban7
Active Contributor
0 Kudos

Hi Ulrike,

My Apologies, as previous feedback is not correct. You needed an RFC I guess to check external system MIC data ranges, which you will have to pass it on your program through the exit. Please ignore my previous comment & wait for some further feedback from other experts.

Thanks,

Arijit

Former Member
0 Kudos

Hi Arijit,

still very many thanks for your effort!


Best regards,


Ulrike