11-18-2008 8:43 AM
Hi,
I have a problem with the BAPI BAPI_SALESORDER_CREATEFROMDAT2 that I use to create a new sales order.
I call it with the following input-data:
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = ls_header
testrun = ' '
IMPORTING
salesdocument = lv_new_vbeln
TABLES
return = lt_return
order_items_in = lt_order_items
order_schedules_in = lt_order_schedule
order_partners = lt_order_partner.
My problem now is that the document can only be saves uncomplete, that means the return table of the BAPI contains the message V1555 "The sales document is not yet complete: Edit data". The missing data is the complete pricing of the document. I want that the pricing is done automaticly.
If I go then to VA02 and select "Edit - New pricing document" in the menu it works and the pricing is done by SAP in the right way.
How can I configure the BAPI for automaticly do the pricing? I don't wanna do the pricing manually in programm if possible (I mean filling the conditions-table of BAPI).
Is this possible?
Thanks a lot.
Kind regards
Markus
11-18-2008 8:49 AM
11-18-2008 8:49 AM
11-18-2008 9:04 AM
Which value should I set to the pricing fields in the logic_switch parameter?
Thanks!!
11-18-2008 9:37 AM
Hi,
LOGIC_SWITCH-PRICING, Pls try value "D"
It has the following value:
A Copy price components and redetermine scales
B Carry out new pricing
C Copy manual pricing elements and redetermine the others
D Copy pricing elements unchanged
E Adopt price components and fix values
F Copy pricing elements, turn value and fix
G Copy pricing elements unchanged and redetermine taxes
H Redetermine freight conditions
I Redetermine rebate conditions
J Redetermine confirmed purch. net price / value (KNTYP=d)
K Adopt price components and cose. Redetermine taxes.
M Copy pricing elements, turn value
N Transfer pricing components unchanged, new cost
O Redetermine variant conditions (KNTYP=O)
Q Redetermine calculation conditions (KNTYP=Q)
Regards,
Pole
11-18-2008 9:50 AM