cancel
Showing results for 
Search instead for 
Did you mean: 

COR1 - By Product component batch user exit

rahul06578
Explorer
0 Kudos
1,029

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.

View Entire Topic
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.