Skip to Content
author's profile photo Former Member
Former Member

Problem with BAPI_MATERIAL_SAVEDATA

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!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 07, 2008 at 06: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 07, 2008 at 06: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!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2008 at 03: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 02:18 PM

    Hi Daniel.

    I'm already using this, but the problem is always the same... A success message without a material created.

    Thanks!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 07: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.