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: 

SD_SALESDOCUMENT_CREATE - Sales document is not yet complete

Former Member
0 Kudos

I'm trying to create a sales document with the RFC SD_SALESDOCUMENT_CREATE but I keep on getting the result message "The sales document is not yet complete: Edit data". I am passing the same data as I would to VA01 but I'm not having any luck. I am passing the following information:

SALES_HEADER_IN:

  • DOC_TYPE

  • SALES_ORG

  • DISTR_CHAN

  • DIVISION

STATUS_BUFFER_REFRESH = 'X'

SALES_ITEMS_IN:

  • ITM_NUMBER

  • MATERIAL

  • TARGET_QTY

  • TARGET_QU

  • PURCH_NO_C

SALES_PARTNERS:

  • PARTN_ROLE

  • PARTN_NUMB

SALES_CONDITIONS:

  • ITM_NUMBER

  • COND_TYPE

  • COND_VALUE

  • CURRENCY

  • COND_UNIT

Does anyone have any ideas why I am getting this message?

Also, does anyone know what the parameter CONVERT_PARVW_AUART does?

Thanks in advance,

Charles

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Charles,

You can go to the VA02 and check the "incompletion log" to find out what you are missing.

Cheers,

Sanjeev

11 REPLIES 11

Former Member
0 Kudos

Hello Charles,

Try to use TA SE37 and make a trail an error methode until your document is complete. I have no idea what it could be, Mandatory fields, Partners missing, etc...

The parameter CONVERT_PARVW_AUART is a parameter what has been used in previous SAP releases (probably before 4.0) to convert German code for Ordertype and Partnertype if they were not equal to the Customizing settings.

Regards,

John

Former Member
0 Kudos

Hi Charles,

You can go to the VA02 and check the "incompletion log" to find out what you are missing.

Cheers,

Sanjeev

0 Kudos

Hi Sanjeev,

Thanks for the suggestion. When I go into VA02 and enter the document number that was returned to me from the function call I get an error saying that the sales docuemnt is not in the database or has been archived. Any idea why?

Charles

0 Kudos

Hi Charles,

You will have to commit the order by calling BAPI_TRANSACTION_COMMIT right after your call to SD_SALESDOCUMENT_CREATE.

You are getting the "the sales docuemnt is not in the database or has been archived" error message as the RFC does not commit the order in the database. Once you call the commit BAPI after your RFC call you will be able to view the order in VA02.

Anu

Former Member
0 Kudos

Hi,

You get such error messages when the document is not complete. This happens when the certian required fields are not supplied. for example : Incoterms can be made a mandatory field. If it is not supplied, the document would be incomplete. Inorder to know what fields are mandatory, please try to create a sales order manually in VA01. try to supply the values for one sales order and create the document. The system will guide you when you try to save the order. You will have an option to navigate to the mandatory fields and thus you can know about the fields.

Regards,

Vara

Former Member
0 Kudos

This message is very typical of what is called 'Incompletion' in SD. If you are online and you don't enter certain data, you will get this message. This is a configurable setting. This is to make sure that certain values are entered in the document. In the same configuration, there is also a setting where-in you can allow the saving of the document, but will not allow further processing(like creation of a delivery or a billing document).

When you are entering data online, certain data is defaulted. I suggest you remove everything that is defaulted in VA01 and enter just the values that you are passing through the RFC. You should get the same message online too. Now you go to the incompletion log and see what is missing. Supply the same information through your RFC and you should be good to go.

Hope this helps, if not, revert back to the forum

Regards,

Srinivas

0 Kudos

Thanks everyone for you suggestions. After going through all the defaulted data I finally managed to get the RFC to create a sales document via SE37. Now I don't know what the difference is, or whether this is the correct forum (please forgive me....you've all been so helpful so far) but when I call this RFC via the SAP COM objects with VB I get the original incomplete message, even though i've checked (and quite thoroughly at that!) that each parameter I pass through in SE37 I am passing the exact same value via the COM object. I get no error messages but the return table contains the same incomplete sales document message asking me to edit data. Help! Any other suggestions?

0 Kudos

Hi Charles,

I am not sure why you expected that you will get different results from BAPI and RFC, because BAPI and RFC are one and the same things as far as application logic is concerned. As I adviced in my previous reply, you should check the "incompletion log" to find out what is missing. I feel it is data problem, you are obviously missing some parameters for BAPI.

Cheers,

Sanjeev

0 Kudos

Hi Charles,

Now we are one step closer. So you are able to create it from SE37 but not through RFC and you covered all the data.

I can think of one thing that may be causing it. Can you check if you are passing the values in the internal format or external format like material, partner function etc? If you are currently passing them in internal format, then try passing them in external format and if you passed them in external format, then try passing them in internal format.

Srinivas

0 Kudos

Hi again,

Okay...so thanks to Anu for the information about the BAPI COMMIT. I didn't think that calling a RFC would require the BAPI_COMMIT to be called. I thought that it was only necessary if I used the BAPIs. It works now so I'm very happy.

One thing that has cropped up is that when I create a sales document a lot of sales conditions are created by default. When I add sales conditions into the SALES_CONDITIONS_IN parameter I was hoping that the values would merge with the defaults (ie. the defaults would be edited) but instead I get duplicate conditions with different values. Is there any way of doing this with the CREATE call or would i need to make a sepereate call to CHANGE?

Former Member
0 Kudos

A couple of extra thoughts--please be sure you are entering all the required partner functions. In most cases you need at lease a ship-to and usually a sold-to partner as well (not sure if FM will derive it for you as VA01 will).

Also, as mentioned CONVERT_PARVW_AUART will translate either your order type or your partner function. This is still relevant in 4.6 and beyond--example, partner function AP in english is actually stored as AD (German) in the system and order type CO is stored as LP. This flag should be checked if you will be using the english version of the value as an input.