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: 

issue in creating sales doc wirth reference contract

Former Member
0 Kudos
145

hi friends,

my requirement is to create a sales order with reference to contract.i had tried it by using bapi 'BAPI_SALESORDER_CREATEFROMDAT2' but i am getting message like this

Sales dcoument:

S SALES_HEADER_IN has been processed successfully

S SALES_ITEM_IN has been processed successfully

W The sales document is not yet complete: Edit data

i am getting sales document number but when am trying to open the docu i am getting error message saying that

sales docu is not in database or has to be archived.

please share the valuable information if u have send me sample code.

please help.

regards sravani.

8 REPLIES 8

Former Member
0 Kudos
91

Hi,

call BAPI_TRANSACTION_COMMIT after your posting..

Read FM documentation of BAPI_TRANSACTION_COMMIT..

hope this may help you..

Regards,

Ravi.

0 Kudos
91

THANKS FOR REPLY BUT I HAVE ALREADY USED THAT FM IN MY PROGRAM.

AnjaneyaBhardwaj
Contributor
0 Kudos
91

Hi ,

It is happening because you sales order will not get the created using the BAPI till you have any warning messages/error message as you can see your data is incompete you need to pass the complete data for this ...Till the time warning issue is resolved you will not have the sales order created ...

Try to craete a sales order munually see what is that you are feeding manually to remove the incompletion log and then pass the same data to BAPI ....

You should not have any warning or error as in background you do not have anyone to take a decision on that warning messages .

Thanks,

Anjaneya .

madhu_vadlamani
Active Contributor
0 Kudos
91

HI Sravan,

1) You are telling sales order created but not there in database.2) Instead of creating from report try to create from se37 directly and use bapi_transaction_commit as a sequence.Check like this and tell me what is the message you are getting.If still you any issue then i will send you the sample code.

Regards,

Madhu.

AnjaneyaBhardwaj
Contributor
0 Kudos
91

On a lighter note ...

The sales order number getting generated does not mean sales order has been craeted ...

Thanks ,

Anjaneya .

0 Kudos
91

I AM GETTING SAME MESSAGES IN FM ALSO

SALES_HEADER_IN has been processed successfully

SALES_ITEM_IN has been processed successfully

The sales document is not yet complete: Edit data

Standard Order 787 has been saved

I AM USING ANOTHER BAPI 'BAPI_SALESORDER_CREATEFROMDAT1'

I AM GETTING SALES DOC BUT IT I AM GETTING LIKE THIS

Contract 40000036 / 10 Archived

I.E., MY DOC NUMBER IS NOT VISIBLE IN DATABASE.

0 Kudos
91

Hi Sravan,

This is not a issue. You are passing all data correctly. Please show this error to your sd consultant. They will give the solution.

Check this and post if need help.

Contract 40000036 / 10 Archived

Regards,

Madhu.

0 Kudos
91

Have u tried creating sales order it manually ...with the same data ......i am sure you are getting incomplation log and edit data manually press on the edit data and see what is that you need to pass to create the order succusfully ....once you are able to do that please search the structure/place holder of your data in the BAPI pass that and then play ....You can also put a break point in the BAPI and check why are you getting this warning ....until unless you remove that ....you will not have the order .....