cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi Gurus,

I have requirement to create Custom Batch creation while process order release or save in COR2.

I have tried with these FMs VB_CREATE_BATCH and BAPI_BATCH_CREATE in few user exits.

in Debugging screen batch is creating and after the session the Batch is not created when checked thru MSC3N Tcode.

In some cases it is going to dump saying there is Unexpected COMMIT WORK.

Please help on this.

0 Likes
View Entire Topic
pataselano
Active Contributor
0 Likes

No need commit for fm VB_CREATE_BATCH.

Please change your input parameters as follows:

X_BNCOM-KZBEW = 'B'

KZCLA = '1'

XKCFC = ' '

After call fm VB_CREATE_BATCH, please make sure that sy-subrc = 0.

If still not work then please share your input parameter for YMCHA and X_BNCOM.

praveen_kumar132
Participant
0 Likes

Hi Andy ,

Thank you the suggestion.

I have passed Matnr,batch and werks in YMCHA structure

and in X_BNCOM only X_BNCOM-KZBEW = 'B'

i am getting sy-subrc - 0.

but batch is not created.

code is in this exit ZXCO1U06.

pataselano
Active Contributor
0 Likes

Please try fm VB_CREATE_BATCH in tcode SE37 first.

In tcode SE37, you need run fm BAPI_TRANSACTION_COMMIT after you run fm VB_CREATE_BATCH.

Please check whether you can found new batch number in tcode MSC3N.

If batch number is still not found in tcode MSC3N then please share your input parameter for YMCHA and X_BNCOM.