cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while creating sales order

Former Member
0 Kudos

Hi

We are facing a problem while creating a sales order in R/3. The sales order number is getting generated. But we are not able to view the same in the backend meaning it is not there in the database. Any inputs would be of help.

regs

Steve

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You mean that your sales order number is not committed to the database. Well you will have to use the Bapi "BAPI_Transaction_COMMIT" after executing the sales order bapi. Refer to the function module documentation. That will help you. if you are not a ABAP programmer then get it done with the help of a ABAP programmer.

Let me know if you require some more information.

regards

ravi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi everybody,

I've got a problem with this too. I use the BAPI_SALESORDER_CREATEFROMDAT2 with BAPI_TRANSACTION_COMMIT and the webdynpro shows me the document number created in R3 with a Success message. But when I go to R3 and try to display the created sales order, it doesn't exists. So... Maybe I'm doing something wrong with the BAPI_TRANSACTION_COMMIT. ¿Can anybody help me with this?

The code I use is this:

When the user pushes the SAVE button in the WebDynpro, this code executes:

//@@begin onActionSave(ServerEvent)

wdThis.wdGetSOCreaCustController().executeBapi_Salesorder_Createfromdat2();

wdThis.wdGetSOCreaCustController().executeBapi_Transaction_Commit();

//@@end

In the custom Controller I've got the code for those executions:

public void executeBapi_Salesorder_Createfromdat2( )

{

//@@begin executeBapi_Salesorder_Createfromdat2()

try {

wdContext.currentBapi_Salesorder_Createfromdat2Element().modelObject().execute();

}

catch (Exception ex) {

wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);

}

wdContext.nodeOutput().invalidate();

//@@end

}

public void executeBapi_Transaction_Commit( )

{

try {

wdContext.currentBapi_Transaction_CommitElement().modelObject().execute();

}

catch (Exception ex) {

wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);

}

wdContext.nodeOutput().invalidate();

//@@end

}

¿Is something wrong? ¿Is something missing?