cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent expired batch allocation during operation release in process order

0 Kudos

Hello Team

Good day. I am working for pharma client and have came across an issue like Business would like to prevent expired batch allocation to component at the time of operation release. Currently we are using QA07 with background job which is picking batches which will be going to expire or already expired based on initial run days ( our case is 1 day) and moved those batches from unrestricted to blocked stock which is working absolutely fine.

As per their process they are creating Process orders in one month advance and later released. What is happening here is, batch which will be near to expire and allocated to process order getting picked up via QA07 background job if it is falling under initial time frame so, business would like to exclude allocated batch during QA07 execution reason being is that consumption and other activities should be done before batch movement from unrestricted to block stock. I have checked configuration but no luck it will be great if you can advise here how to tackle this requirement via any enhancment, user exist or configuration.

As manual work around i had suggested to use MB1B move stock blocked to unrestricted. Appreciate your response here.

Accepted Solutions (1)

Accepted Solutions (1)

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

If you use QA07 without the indicator Block batch, system will not move the batches to restricted stock, it will only show a list of the batches about to expire. You can manually choose what will happen with this batch.

Another alternative is to change your process and post the goods issue to the order earlier, as soon as the batch is determined, using CO27.

If none of these options are suitable for you, you can create a copy of program RQAAAS10 and change it to avoid the consumption of batches allocated to an order.

Regards,

Caetano

0 Kudos

Hello Caetano,

Thank you for your feedback on my query.To prevent expired batch allocation block batch indicator needs to be checked on QA07 Screen. I will check with business if they are willing to change SOP or not. If they are not willing to change SOP then i will go ahead with implicit enhancement option to meet below requirements :

  • 1.If batch is fully allocated to process order and falling under initial run days should not move to block stock
  • 2.If batch is partially allocated to process order and falling under initial run days should move reaming stock only from unrestricted to block stock

i have prepared below logic :

Enable Implicit enhancement on QA07 execute using BADI INSPECTIONLOT_UPDATE

Either need to maintain plant specific entry in TVARV or utilize existing ZTECH table

Compare RESB table with MCHB table for reserved batch and put condition if both entries match then exclude batch during QA07 executionà This is applicable for fully reserved batch

Partial allocated batch: Compare RESB table with MCHB table for reserved batch and put condition if both entries match then exclude batch with reserved quantity and move remaining quantity to block stock based on calculations like Available quantity from (MCHB) table – Reserved quantity from (RESB) table.

Could you please check this logic and let me know your thoughts or Shall i prepare new transaction like ZQA07 which will be copy of program RQAAAS10 (as given by you).? Do you have any specific BADI for QA07 ?

Your expert advise will be appreciate here.

Thanks,

Mayur.

Answers (2)

Answers (2)

0 Kudos

Hello All,

Thank you all for your feedback and answers. I decided to proceed with below options

1. Enhancement by copying QA07

2. Increase time frame period max by 90 days

Hence closing this thread.

former_member42743
Active Contributor
0 Kudos

Let me see if I understand the process.

- QA07 runs nightly and will block/restrict batches that are to expire within the next day.

- A batch has already been assigned to be used in a process order, possibly up to a month before.

- If the batch was already assigned to be used in an order, you want it to be excluded from the QA07 run.

That's what I'm understanding here from what you wrote in the question. If you accomplish that third step, you are opening up an electronic check that would allow you to potentially use expired material in a drug product. No.. No.. No.

Pharma & Chemicals are what I do. And I can assure you that a process like that would not be approved in a regulated environment. Or at least it shouldn't be. I encourage you to not do this and advocate strongly against it. If they insist, then make sure you've documented the recommendation to not do it. You don't want your fingerprints on your next product recall. Not in the drug industry.

In fact, if you assign materials to your order up to a month in advance, your QA07 program SHOULD be running with a window of at least 32 days. Not one day. And that would depend on what kind of orders you are doing. I might even recommend a 60 day window. Some process orders might take a few weeks to complete which means by the time the assigned material/batch is actually consumed into the production process it could be expire while sitting in staging on the production floor. I.e. lets say in tableting I use one recipe to make the tablet, print the tablet and coat the tablet. It might take me a week to make the tablets and 48 hrs to print the tablets. It could be over a week before they get around to the coating operation and any coating materials could have expired in that week.

Planning needs to do a better job of managing materials so no components get even close to their expiry period. If they don't, then they need to pay the price of constantly requesting that QA move these borderline expired materials back to unrestricted stock to use them up. (They do require that only QA can make those movements I hope).

Craig

0 Kudos

Hello Craig,

Its nice to see your feedback. Your understanding is absolutely correct.

A batch has already been assigned to be used in a process order, possibly up to a month before.-->This our process now

- If the batch was already assigned to be used in an order, you want it to be excluded from the QA07 run.---> This business would like to have to avoid expired batches allocation to process order.I agreed i proposed them 30 days window but they were not agreed.

Hence I decided to go ahead with enhancement regulatory process we will documented and get it sign from our QA team. Do you have any solution like how to avoid expired batch allocation at the time of batch determination on process order operation level? rather than using QA07 .

Thanks,

Mayur.

former_member42743
Active Contributor

Absolutely. You can use batch determination procedures with process orders. Standard functionality. I would not do away with QA07, it serves as the last line of defense. In theory, the goal is to never see a batch processed by QA07. There is nothing but cost and lost time associated with an expired batch.

In the most basic of batch determination, you set a general rule that says you can't use any batch that expires in the next xxx days. I'd recommend 45 days if you assign components a month in advance.

You could get a bit fancier and probably set it up to look at the planned GR date of the order and set the rule to not allow any batches to be assigned that would expire prior to the planned GR Date of the order. If you use the condition technique properly you only need one batch determination rule to be created at the plant level to cover all components. You could also add a material level table into the mix and then you'd have the flexibility to specify specific rules for specific materials.

Batch determination would also allow you set up FIFO, FILO or other sorting for selection. Or you can use various quantity sorting rules as well.

Craig

0 Kudos

Hello Craig,

Thank you for your feedback. In my case we are having different types of materials like ROH,Bulk and API(SFG) as part of BOM and classes being used for those materials also used globally. On configuration as you suggested how can i restrict specific to plant ?

in this case, shall i create new classes associated with my plant without touching global classes ? It will be great if you can share such configuration document on this requirement mapping so that i will make it in my sandbox. As i have never came across such issue so your inputs will be highly appreciated.

Thanks,

Mayur.

former_member42743
Active Contributor
0 Kudos

You really need to understand the use of the condition table technique SAP uses in batch determination.

SAP already delivers the tables and access strategies. All you probably have to do is create the record in transaction COB1. With strategy type CO01 it already has two key combinations pre-defined. Order type/plant and order type/plant/component.

The general rules go in at order type/plant.

Component specific rules go in at order type/plant/component.

All your classes should already have LOBM_VFDAT as a class characteristic. If not , add it.

Craig

0 Kudos

Hello,

Thank you very much for your reply.I have already tried configuration like maintained LOBM_VFDAT,LOBM_LFDAT and LOBM_RLZ with sorting crieteria like <= 32 days but it didn't worked as excepted. Not sure how can we achieve this requirement on configuration ?

Your correct LOBM_VFDAT has already maintained all classed which is being assigned to materials.What i feel is that in cofiguraiton we should define some trigger point where system should know about fully reserved batch as well as partial reserved batch and behave accordingly. Could you please share me your approach in step by step way on configuration because i might need to change my existingn configuration.

Thanks,

Mayur

former_member42743
Active Contributor

It might know. I believe another factor you have to look at is replenishment lead time. (I think that is it).

A lot of materials get set up with almost immediate replenishment. I.e. I can make or purchase all I need and have it here by next week. Or tomorrow.

The problem is SAP never took into account batch management when they built this. I.e. they think any batch can be "made" again if you don't have it. So if your order dates are far enough out, and your replenishment time short enough, it doesn't care how much you have on hand because you can just order/make more it. But that is not the case with batches. But that's why you can often assign unlimited amounts of a batch to an order. It thinks you can just buy or make more.

If your replenishment lead time though is set to like 60 days and your order is to be done before that, it will only look at current inventory levels.

At least that's how I had it explained to me. You might to check with a planning consultant on that.

Craig