Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to use " BAPI_SALESORDER_SIMULATE "

hi,all

now have such requirement ,as below:

I need get price by call "BAPI_SALESORDER_SIMULATE".

But how to set the parameter " ORDER_ITEMS_IN ". i don't know where normal got "CUST_MAT" ,"REQ_QTY".

plz give me a hand, some sample is good for me

thanks in advance.

kevin

Tags:
replied

Hello Kevin,

extend the example above with this code:

DATA: it_vbapvb LIKE TABLE OF vbapvb,
      wa_vbapvb LIKE LINE OF it_vbapvb.

* Fill it_VBAPVB
wa_vbapvb-matnr = '000000000000000001'.
wa_vbapvb-zmeng = 1.

APPEND wa_vbapvb TO it_vbapvb.

* Fill order_items_in
LOOP AT it_vbapvb INTO wa_vbapvb.
  wa_order_items_in-material = wa_vbapvb-matnr.
  wa_order_items_in-req_qty = wa_vbapvb-zmeng * 1000.

  APPEND wa_order_items_in TO order_items_in.
ENDLOOP.

Regards

Gregor

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question