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: 

SalesOrder-creation with BAPI - pricing problems

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

pole_li
Active Participant
0 Kudos

Hi,

Try to set the LOGIC_SWITCH parameter.

Regards,

Pole

4 REPLIES 4

pole_li
Active Participant
0 Kudos

Hi,

Try to set the LOGIC_SWITCH parameter.

Regards,

Pole

Former Member
0 Kudos

Which value should I set to the pricing fields in the logic_switch parameter?

Thanks!!

pole_li
Active Participant
0 Kudos

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

Former Member
0 Kudos

Thank you!!