cancel
Showing results for 
Search instead for 
Did you mean: 

COR1 - By Product component batch user exit

rahul06578
Explorer
0 Kudos
1,024

Hi all,

I am stuck in issue, any help will be appreciated.

I am on COR1, after clicking COMPONENTS, co products elements are getting assigned with batches. For this we used exit_saplv01z_002. It works fine.

Now client want same for BY PRODUCTS at same stage. When I debugged, i found that system is only considering only CO PRODUCTS materials in exit_saplv01z_002. Pfa screenshots.20220314-173256.jpg20220314-173306.jpg

Kindly guide me how can i achieve this. Please ask any questions if needed.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

DominikTylczyn
Active Contributor
0 Kudos

Hello rahul06578

See the note 1500952 - Batch number assignment when entering co-product

It looks like your production scheduling profile assigned to the co-product doesn't activate batch creation during process order creation. You need to assign a production scheduling profile to the co-product. The profile needs to activate batch creation:

Best regards

Dominik Tylczynski

rahul06578
Explorer
0 Kudos

Hi Dominik,

Can we do same for by-product? Because for co-product all is going well. Only for by-product item, i need to assign batch at creation.

Thanks.

rahul06578
Explorer
0 Kudos

There is structure x_bncom which has matnr ffiel. So in the exit exit_saplv01z_002 it is getting used, and batches are generated for these matnrs (i.e, x_bncom-matnr).

I am not getting why it only passes co-product matnrs, and skips by-product matnr.

Thanks.

DominikTylczyn
Active Contributor
0 Kudos

rahul06578 Honestly I don't know if the note applies also to by-products. You need to try that out. I'm afraid it may not work as by-product are like issues in reverse, with negative quantities.

If that doesn't work, you can always determine batches during confirmation - the end result will be the same and it's easier to implement.

rahul06578
Explorer

Hi Dominik,

Thanks for your suggestions and time. Appreciate it.

Will implement during confirmation/release.

One more thing - will workorder_update badi can also serve the purpose?

Thanks.

DominikTylczyn
Active Contributor

rahul06578

I don't think WORKORDER_UPDATE will work here. As it allows for an order validation but it doesn't allow to change it. Check out the interface of the BAdI - there are not methods that would allow custom changes to an order.

rahul06578
Explorer
0 Kudos

Hi Dominik,

To assign batch to by-product at release, which method should be implemented from workorder_goodsmvt badi?

Thanks.

DominikTylczyn
Active Contributor
0 Kudos

Hi rahul06578

The WORKORDER_GOODSMVT is called during an order confirmation not release. Typically when you confirm an order, that is when production is finished, goods movements are posted automatically, i.e. receipt of a finished product and consumption of components. The BAdI is used to influence how those automatic movements are posted - see the BAdI's documentation.

I'd say that the BACKFLUSH method will allow you to enter by-products' batches.

DominikTylczyn
Active Contributor
0 Kudos

Hello rahul06578

rahul06578Why don't you use the WORKORDER_GOODSMVT BAdI to manipulate goods movements generated during process order confirmation?

Best regards

Dominik Tylczynski

rahul06578
Explorer
0 Kudos

Hi Dominik,

This Badi is not for my use. Debugger/control wont stop here in COR1.

DominikTylczyn
Active Contributor
0 Kudos

rahul06578 If you check OSS support notes for the WORKORDER_GOODSMVT BAdI, they all refer to both discrete and process manufacturing. They also mention COR* transaction. So I think the BAdI should work with a process order confirmation.

rahul06578
Explorer
0 Kudos

Hi,

Just inserted breakpoints in every interface of workorder_goodsmvt, none of them got triggered when i clicked component button in cor1. Maybe they will get trigger at release or save level. But my requirement is to pre-fill batches of by-product component, just like exit exit_saplv01z_002 is doing currently in our system. But since it is missing by-product batch determination, i would also like to get the batches of by-product component to be assigned.

In the pic you can see, for co prod batch is assigned, but not for by prod items 20220314-173256.jpg20220314-173306.jpg

Thanks.

DominikTylczyn
Active Contributor
0 Kudos
rahul06578

WORKORDER_GOODSMVT is called during an order confirmation not creation

rahul06578
Explorer
0 Kudos

Hi,

Yes sir, now you got my question. 🙂

DominikTylczyn
Active Contributor
0 Kudos

rahul06578 Yeah, I got your question - see my other answer about batch assignment for co-product. If that doesn't work, you can fall back to the WORKORDER_GOODSMVT option and have co-products batches determined during the confirmation.