cancel
Showing results for 
Search instead for 
Did you mean: 

Create Batch in QPL1_INSPECTION_LOT_CREATE

Former Member
0 Kudos

Hello experts,

I need to create inspection lot automatically from SAP MII. Thanks to SCN, now I can successfuly create it (please see the thread Unable to create inspection lot from MII). Now I have faced another issue. I also need to create batch when creating inspection lot (like in QA01 t-code). But unfortunately I am not able to do it.

To create inspection lot I use FM QPL1_INSPECTION_LOT_CREATE. This FM inserts record to QALS table with a batch number (field CHARG). But batch is not actually created (I cannot see it via MSC3N).

So the question is: Is it possible to create batch via QPL1_INSPECTION_LOT_CREATE? If so, what input parameter should I fill to create batch?

Any reply will be greatly appreciated!

Thanks in advance!

Best Regards,

Vitaliy

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Vitaliy,

On a related side note there is content on the SDN already that will help to get you started on integrating MII with SAP ERP QM and will work with the MII 12.1 version and is available here: Integrating MII with ERP QM - This article provides some insight on how to integrate your MII v12.1 software with the SAP ERP QM module via JCo. This will allow in-depth SPC material based inspection lot analysis for single and multiple inspections lots. This document provides both an overview of the process steps and screens along with detailed steps on how to build your content within MII and a pre-built example project of all of the content.

Hope that this helps get you started,

Sam

PS:  Other template & modeling content examples are available from the main MII Wiki page here: Modeling - xMII - SCN Wiki

Former Member
0 Kudos

Hello Sam,

Thank you a lot for such a detailed reply and giving examples of integration with QM! I think this will be very helpfull!

I know about BAPI_BATCH_CREATE and already using it to create batches. I just wanted to know for sure is it possible to create batch with the help of QPL1_INSPECTION_LOT_CREATE.

While gathering information about how to create inspection lot in the same way as if I was using QA01 t-code I've figured out that FM QPL1_ISPECTION_LOT_CREATE fits the best for this task. So I assumed, if QPL1_ISPECTION_LOT_CREATE creates inspection lot like QA01, then maybe it can create batch, like QA01 does..

It was only my assumption.. I just want to know can QPL1_ISPECTION_LOT_CREATE be used to create batches.

Thanks again for your reply!

Best Regards,

Vitaliy

Former Member
0 Kudos

Hi Vitaliy,

     I am facing the same issue." Batch does not exit even though the Inspection Lot is created and the Batch no is assigned to it." Where you able to figure out a solution for the same. It will be really helpful if you could share the same.

Thanks & Regards,

Susmitha Pritam

Former Member
0 Kudos

Hi Susmitha,

I've searched a lot about this and as a result I've figured out, that functional module QPL1_ISPECTION_LOT_CREATE creates inspection lot only and does not create a batch.

That's why I am using another FM to create batch - BAPI_BATCH_CREATE.

I am using these FM's in sequence. In details it looks something like this (I am working in MII, but the approach will be the same for ABAP programm):

1. Develop transaction (function) to create inspection lot (based on QPL1_ISPECTION_LOT_CREATE);

2. Develop transaction (function) to create batch (based on BAPI_BATCH_CREATE);

3. Develop common transaction (function) to process QM data alike t-code QA01. This transaction will sequentially call transaction 1 and transaction 2.

This solution resolved my issue. Hope it will help you.

If you need more information please don't hesitate to contact me again.

Best Regards,

Vitaliy

Former Member
0 Kudos

Thank you so much Vitaliy. Appreciate your quick turn around on this. It resolved my issue.

Thanks & Regards,

Susmitha Pritam

Former Member
0 Kudos

You are welcome! Cheers 🙂

Answers (1)

Answers (1)

0 Kudos

Vitaliy,

I believe that you have to create the Batch first and this will generate the required inspection lots for the batch as part of the quality process based on the material master defintion for quality characteristics and your overall quality plan for  the material.  In short, if you use MII to create a batch (BAPI_BATCH_CREATE) then the inspection lots should get generated as a result of the creation of the new batch.  I am not a QM expert but this was my understanding of how the inspection process is defined.

Sam