‎2008 Aug 07 6:41 PM
Hi.
I'm having a problem when creating new materials with FM 'BAPI_MATERIAL_SAVEDATA'.
First, I'm taking a new material number with FM 'BAPI_MATERIAL_GETINTNUMBER', the number is generated without any problems. After, I try to create the new material, I have a message of 'SUCCESS' (Material have been created), but when I come to MM03 to see it, the material have not been created. I'm using COMMIT WORK after these BAPIs.
Please, help!
Thanks and Regards!
‎2008 Aug 07 7:00 PM
Hi,
Why do you want to use 'BAPI_MATERIAL_GETINTNUMBER' for creating a new number?
The fm: BAPI_MATERIAL_SAVEDATA, has a call to 'MATNR_NUMBER_CREATE' to create a new number.
Did you pass all the requred fields in the proper tables? Check that.
And also use 'BAPI_TRANSACTION_COMMIT' after the BAPI_MATERIAL_SAVEDATA call.
Regards,
Subramanian
‎2008 Aug 07 7:00 PM
Hi,
Why do you want to use 'BAPI_MATERIAL_GETINTNUMBER' for creating a new number?
The fm: BAPI_MATERIAL_SAVEDATA, has a call to 'MATNR_NUMBER_CREATE' to create a new number.
Did you pass all the requred fields in the proper tables? Check that.
And also use 'BAPI_TRANSACTION_COMMIT' after the BAPI_MATERIAL_SAVEDATA call.
Regards,
Subramanian
‎2008 Aug 07 7:56 PM
Hi Subramanian.
I've checked all the process and it's OK. I"m just having problem after FM 'BAPI_MATERIAL_SAVEDATA' have been executed. I have a return from this bapi with a 'SUCCESS' message, that the material have been created without any problems, but when I come to transaction MM03, or table MARA, MARC... The new material isn't in there!
Thanks and regards!
‎2008 Aug 08 5:41 AM
Some time Wait statement works just check by using Wait 30 sec statement after your commit.
Thanks
Sudharshan
‎2008 Aug 08 4:53 PM
Hi Sudharshan.
I've checked what you told me, but all the things that I saw was all right. It's very strange, because my BAPI has a SUCCES message, the number of the material created, but nothing happens! Material is not created...
Thanks.
‎2008 Aug 08 8:29 PM
Hello Rodolfo,
Why don't you use:
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Regards,
Daniel.
‎2008 Aug 11 3:18 PM
Hi Daniel.
I'm already using this, but the problem is always the same... A success message without a material created.
Thanks!
‎2008 Aug 12 8:10 PM
The material number returned by the FM BAPI_MATERIAL_GETINTNUMBER was moved to a variable, and the zeros didn't appear when calling the FM BAPI_MATERIAL_SAVEDATA. So, the problem was with the zeros on material number.