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

BAPI_PROJETC_MAINTAIN - External Commit

Hi All,

I have created a custom function module using the SAP Standard Function module BAPI_PROJECT_MAINTAIN. This Custom Function module will be called from VB Interface. The while creating the Custom FM, I have commented the COMMIT WORK Statement which was the part of BAPI_PROJECT_MAINTAIN. I have done this because of the requirement of Commit to be called from the VB Interface.

I am calling the BAPI_TRANSACTION_COMMIT from my VB Code after I made a Call to my Custom FM and the Return Code of this Custom FM is a success.

The Return Code of this BAPI_TRANSACTION_COMMIT is also success, but the commit is not happenning, because when I go and check the PROJ Table, it has not created the Project.

Can soneone tell me why an external commit from another application is not working for this custom FM(Which is based on BAPI_PROJECT_MAINTAIN).

Thanks in Advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 24, 2005 at 10:39 AM

    Hi Sunil,

    The first thing to do would be to create a test sequence in SE37, of first your custom function and then the BAPI_TRANSACTION_COMMIT. This executes the two functions one after the other in a single sequence. If this works, then you have a problem with your VB application.

    In the VB application you should be calling your function and the commit within the one thread. So you should open a connection, call the function, and then call the commit bapi, before closing your connection. If you close the connection first, or call the commit in another thread, then the update wont occur.

    You may find the following thread useful: Sales Order Create BAPI

    Cheers,

    Brad

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 24, 2005 at 12:37 PM

    Hi,

    As it is suggested above first try to test whether data you pass to BAPI_PROJECT_MAINTAIN are correct and if project is created in SAP environment. If yes you have problem in VB.

    One additional suggestions:

    You must include command:

    METHOD_PROJECT-METHOD = 'Save'.

    APPEND METHOD_PROJECT.

    in your BAPI call.

    If you have problem with this BAPI you can also turn on creation of log file via command:

    METHOD_PROJECT-OBJECTTYPE = 'Trace'.

    METHOD_PROJECT-METHOD = 'Create'.

    METHOD_PROJECT-OBJECTKEY = filename.

    APPEND METHOD_PROJECT.

    Krzys

    Message was edited by: Krzysztof Konitz

    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.