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

BAPI_SALESORDER_CREATEFROMDAT2 partners

I have been trying to use BAPI_SALESORDER_CREATEFROMDAT2 to generate the header for a sales order to shich items will be added later. I am having problems specifying my partners.

The docs say the partner role must use the german keyword, e.g. WE for ship to party. The problem is, my tables are set up with US abbreviations, e.g. SP.

I have tried passing both SP and WE, and get errors for each. SP tells me i have not passed a ship to (because i assume it looks for "WE" hardcoded, as i have seen in the code, and WE, which tells me the customer number is not valid, becuase, again i assume, that it is looking in KNVP for the customer number set up as a WE.

I have checked my sales org, etc, and everything is ok. I have run it with the convert parameter both off and on, and it seems to have no effect.

Stranger still, if i enter the parameters into SE37 in test mode, i dont get the errors back, and it looks like the order would be created. when i use the exact same parameters in my abap, i get the errors.

I am lost.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 30, 2004 at 03:17 PM

    Hi David,

    SP stands for the sold-to party which is abbreviated 'AG', 'SH' is ship-to which is 'WE' in German.

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 30, 2004 at 03:42 PM

    Hi David,

    There are several places where SAP shows you some value but stores a different value in the database. This is what is known as external and internal representation. You need to use conversion exits to convert one form into another form. You can find out if a particular field uses a conversion exit, you can go to the domain level and you will find the conversion exit that it uses(if any). In case of the partner function, here are the conversion exits.

    CONVERSION_EXIT_PARVW_INPUT  --> Converts partner 
                                     function from external
                                     to internal format.
    
    CONVERSION_EXIT_PARVW_OUTPUT --> Converts partner 
                                     function from internal 
                                     to external format.
    

    All database selects should always be done in internal format. All dialog entries will usually be in external format.

    Hope this helps in understanding the WE to SH or the SP to AG conversions.

    Regards,

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I already understand them. i just dont know why the bapi does not seem to be DOING them.

      I do not have the opportunity to do a conversion exit. plus, either value i pass, i get errors returned from the bapi.

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.