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: 

Qty not updating in BAPI for Sales Order

former_member461383
Participant
0 Kudos

Dear Friends,

I’m using FM: SD_SALESDOCUMENT_CREATE to upload open Sales Order of type OR. I passing following fields in BAPI:

  1. AUART Sales Doc Type
  2. VKORG Sales Org
  3. VTWEG Distri Channel
  4. SPART Division
  5. POSNR Line item
  6. MABNR Material
  7. KUNNR Sold-to party
  8. KUNNR Ship-to party
  9. KETDAT Requested Delivery Date
  10. PRDST Pricing Date
  11. ZTERM Terms of Payment Key
  12. INCO1 Incoterms (Part 1)
  13. INCO2 Incoterms (Part 2)
  14. AUDAT Document Date
  15. WAERK Doc Currency
  16. KTGRD Cust Acct Assg Gr
  17. KWMENG Order Quantity
  18. VRKME Sales unit
  19. BWTAR Valuation type
  20. WERKS Plant
  21. VSTEL Shipping Point
  22. LGORT Storage Location
  23. VSART Shipping Type
  24. KSCHL Condition type
  25. KBETR Rate
  26. KWERT Condition Value
  27. ETDAT Schedule line delivery date (optional)
  28. WMENG Schedule line order quantity (optional)

Issue: Target Qty in order is not getting updated. Am I missing some parameter or ABAPer needs to do something in his coding in BAPI?

Kindly help. I’m uploading open Sales Order for the first time, as a fresher. <removed by moderator>

Thanks a lot

Message was edited by: Thomas Zloch

4 REPLIES 4

former_member461383
Participant
0 Kudos

Dear friends,

Qty updation issue resolved. But another issue has come up. It is as follows:

There is one cond type (ZA04) in pric procd. This cond type

  • is a Variant Condition
  • does not have any Acc Sequence
  • neither Manual nor Required in the pricing procd.

When we are uploading Sales Orders with this cond type maintained in KSCHL field and rate in KBETR field in XL, then system is bringing this cond type twice in the order. One with value and other w/out value.

When we create this order type manually (VA01), then this cond type (ZA04) comes in non-editable mode but price field is open.

Pls suggest how to handle this in BAPI. Or a separate BDC is required to upload the value of this cond type.

Thanks a lot.

0 Kudos

are you checking all the fields, that need to be updated , in SALES_ITEMS_INX table in SD_SALESDOCUMENT_CREATE bapi

for example SALES_ITEMS_INX-TARGET_QTY  = 'X'.

Former Member
0 Kudos

Try This

ls_order_items_in-itm_number = '00010'.

ls_order_items_in-target_qty     = '99'.

append ls_order_items_in to lt_order_items_in.

ls_order_items_inx-itm_number = '00010'.

ls_order_items_inx-target_qty    = 'X'.

append ls_order_items_inx to lt_order_items_inx.

then pass the table to sa FM.