on 12-30-2004 2:46 PM
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.
Hi David,
SP stands for the sold-to party which is abbreviated 'AG', 'SH' is ship-to which is 'WE' in German.
Regards,
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i tried passing SP and SH. With convert on, i get "no customer master record for ..." with convert off, i get "please specify a sold to or ship to".
I tried passing AG and WE. With convert on OR off, i get "no customer master for ..." (message is VP200)
It does not seem to matter if i use the german or the english abbreviations, or i have convert on or off. it just does not want to accept the partners. I have verified that the number exists in KNA1, and in KNVP with the correct sales area and english abbreviation.
Is there another table i am not checking?
By the way, if i go into VA01, and enter the sales order manually, it works fine, and accepts the number for both sold to and ship to.
Hi David,
I probably misunderstood your problem. Did you try passing on the value for partner function in internal(German) representation and your customer number in internal format as well(with all the leading zeros)? I think the customer number without the leading zeros is what is causing the problem.
Please let me know if I am way off the target.
Thanks,
Srinivas
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.