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: 

BAPI_MATERIAL_SAVEDATA creating material eventhough tax classification for some countries are blank

Former Member
0 Kudos

Recently we got an issue like, material got created even when there is no tax classification is maintained for some countries ie left blank. Material creation in the above case is happening through the FM BAPI_MATERIAL_SAVEDATA in a workflow where we will be filling all the details through the code. when i checked the program,,the tax classification for some countries are not filling, so ideally while creating material it should give an error but it is not giving instead it is creating material with blank value for tax classification. If we try manually in MM01,,material is not creating with blank tax classification value for the same data. kindly help to resolve this.

1 REPLY 1

Former Member
0 Kudos

Hey Sasi,

you problem was interesting, so i tried my hands on SAVEDATA BAPI. i worked on this long back. SAVEDATA doesnt have a check there to check for the message you are getting.

moreover that is a success message M3-015 and not error one. just that it is not proceeding further after putting that message. you can probably do a /h to debug after save and put a breakpoint on this message.

also, i tried with BAPI_MATERIAL_SAVEREPLICA, but it didnt help too. material got created

when i debugged i found that, that message is triggered before calling FM 'MATERIAL_MAINTAIN_DARK' which is main FM creating Material in ECC.

probably you will have to put a check in your custom code which sends error message to user if tax classifications are not present.

Thanks

Gaurav