cancel
Showing results for 
Search instead for 
Did you mean: 

Batch number allocation in process order.

Former Member
0 Kudos

Hi

I have a sceanrio where batch number allocation in process order should be material specific. This is client requ.

For E.G

Header material A is made of Component B and C.

Component B is internally manufactured and should have external batch number assignment at time of order release. "Create Batch" option in "goods reciept" Tab of process order should be greyed out to avoid error.

Process Order should not be released for any material if batch number is not assigned.

How to do the setting so that Component B always has external batch assignment while Header material A has internal batch assignment.

Please note that Creating two different process order is not an option.

Accepted Solutions (1)

Accepted Solutions (1)

svs_sap
Active Contributor
0 Kudos

Hi

There are 2 things in batch management.

For header material A - Create internal batch with batch master, batch number assignment and creation of new batches in configuration along with maintaining batch management tick mark in material master, and other relevant settings in config and master data as per your requirement. Maintain a custom table where you can define the materials which needs to be assigned internal number during order release and create the batch if this material is available in this custom table, and use user exit for order creation for this.

For component material B - You can mention batch externally because this material you are not going to define in custom table. And order should allow this to add external batch, this you can set in function module with ABAP help.

You have to customize this requirement with ABAP support and this can be achievable.

Regards,

Sharat

Answers (2)

Answers (2)

rupesh_brahmankar3
Active Contributor
0 Kudos

Dear,

Use the Exit EXIT_SAPLCOBT_001 under enhancement PPCO0001 where-in based on your requirement you can create batch for your order. You can use CALL FUNCTION 'VB_CREATE_BATCH' to create the batchs as per your requirement.

For details please refer this link,

http://scn.sap.com/message/8004872#8004872

Regards,

R.Brahmankar

Former Member
0 Kudos

Hello Rupesh!

I have seen you suggesting the solution with using VB_CREATE_BATCH in PPCO0001, unfortunately this approach results in a short dump NESTED_PERFORM_ON_COMMIT.  So, is this a valid solution in ECC 6.0 or not?

rupesh_brahmankar3
Active Contributor
0 Kudos

Dear,

Yes It is valid for ECC 6.0 I have use the same on ECC 6.0 Kindly recheck your coding and logic.

Apart form that you can use the BAPI

BAPI_BATCH_CREATE

BAPI_TRANSACTION_COMMIT

Regards,

R.Brahmankar

Former Member
0 Kudos

I appreciate your reply!

I've tried a very simple logic in EXIT_SAPLCOBT_001, which checks the Batch# (POSITION_TABLE-CHARG IS INITIAL) and then calls FM VB_CREATE_BATCH.  The short dump occurs within original VB_CREATE_BATCH code - line 938 - PERFORM insert_batches ON COMMIT.  This call is not conditional and cannot be avoided through the use of the FM parameters, which makes me think that the error has nothing to do with my logic.

Would you be able to share what you did to avoid the system error?

Thanks!

rupesh_brahmankar3
Active Contributor
0 Kudos

Dear,

Make sure the automatic batch creation setting in Prodn Scheduling profile OPKP has been turned-off so that the batch is created only through the user-exit.

Also do you have batch status management active?

Also in the bapi VB_CREATE_BATCH  there is a fm called CALL FUNCTION 'TRANSACTION_END, this is issuing a commit work you can put a break-point and check the same.


Regards,

R.Brahmankar

former_member186193
Active Contributor
0 Kudos

Hi,

Use user exit PPCO007 - User exit when saving a production order. And ask your ABAPer to develop a logic using the order type. So that B material system will check for external batch assignment and A material auto batch generation.

Regards,

Alok Tiwari