Skip to Content

Qty not updating in BAPI for Sales Order

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jul 23, 2012 at 07:22 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2012 at 12:47 PM

    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'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2012 at 09:17 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.