Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in change number creating BOM in Engineering Type.

Former Member
0 Kudos

Can anyone guys help me with my problem.

I'm creating Bom using BAPI_MATERIAL_BOM_GROUP_CREATE.

Every time I create BOM Using one bom only in engineering and all BOM for materials were created.

But every time i create rerun the program and have different change number on its components, the error occur,

"Generation not Supported for Change number"

Can anyone help me with this?

Thanks and God Bless.

1 REPLY 1

Former Member
0 Kudos

In case errors rollback.... I beleive the following logic would resolve your issue.

constants:c_error_type(1) type c value 'E'.

call function 'BAPI_MATERIAL_BOM_GROUP_CREATE'

exporting

testrun = l_testmode

tables

bomgroup = l_bomgroup

variants = l_variants

items = l_items

subitems = l_subitems

materialrelations = l_materialrelations

itemassignments = l_itemassignments

subitemassignments = l_subitemassignments

return = l_return.

if l_testmode is initial.

read table l_return with key type = c_error_type.

if sy-subrc = 0.

call function 'BAPI_TRANSACTION_ROLLBACK'.

else.

call function 'BAPI_TRANSACTION_COMMIT'.

endif.

Thanks

Anantha