Showing results for 
Search instead for 
Did you mean: 

BAPI_SALESORDER_SIMULATE V1524 Only quantity 1 ST is allowed (Item 000001)

Active Participant
0 Kudos

We are creating an order using BAPI_SALESORDER_CREATEFROMDAT2 and it's working fine.
Now, the requeriment is to make a simulation before the creation of the order, in order to get the price calculations and perform some checks.

So I've created a new method to pass the tables used in bapi BAPI_SALESORDER_CREATEFROMDAT2 and fill the tables of BAPI_SALESORDER_SIMULATE.
But I always get this error "V1524 Only quantity 1 UN is allowed (Item 000001)"

Values in tables are the same, and are working for creation bapi.

I guess I need to fill some other field in the schedule table, now i'm only passing ITM_NUMBER and REQ_QTY (it's working fine in the creation bapi). I've tried passing also SCHED_LINE = 0001 and REQ_DATE = sy-datum, but same error...

This is the code i'm using (data comes from tables I use in creation bapi)

METHOD simulate_order.

    lv_salesorder   TYPE bapivbeln-vbeln,
    ls_header_in    TYPE bapisdhead,
    ls_items_in     TYPE bapiitemin,
    ls_partners_in  TYPE bapipartnr,
    ls_schedule_in  TYPE bapischdl,
    ls_return       TYPE bapireturn,
    lt_item_in      TYPE STANDARD TABLE OF bapiitemin,
    lt_partners_in  TYPE STANDARD TABLE OF bapipartnr,
    lt_schedule_in  TYPE STANDARD TABLE OF bapischdl,
    lt_item_out     TYPE STANDARD TABLE OF bapiitemex,
    lt_cond         TYPE STANDARD TABLE OF bapicond,
    lt_messagetable TYPE STANDARD TABLE OF bapiret2.

    <ls_items_in>     TYPE bapisditm,
    <ls_partner>      TYPE bapiparnr,
    <ls_schedule>     TYPE bapischdl.

  MOVE-CORRESPONDING is_header_in TO ls_header_in.

  LOOP AT it_items_in ASSIGNING <ls_items_in>.
    MOVE-CORRESPONDING <ls_items_in> TO ls_items_in.
    APPEND ls_items_in TO lt_item_in.

  LOOP AT it_partner ASSIGNING <ls_partner>.
    MOVE-CORRESPONDING <ls_partner> TO ls_partners_in.
    APPEND ls_partners_in TO lt_partners_in.

  LOOP AT it_schedules ASSIGNING <ls_schedule>.
    MOVE-CORRESPONDING <ls_schedule> TO ls_schedule_in.
    APPEND ls_schedule_in TO lt_schedule_in.

      order_header_in    = ls_header_in
      salesdocument      = lv_salesorder
      return             = ls_return
      order_items_in     = lt_item_in
      order_partners     = lt_partners_in
      order_schedule_in  = lt_schedule_in
      order_items_out    = lt_item_out
      order_condition_ex = lt_cond
      messagetable       = lt_messagetable.


Any clue ?

Thanks !

Active Participant
0 Kudos

I've forgot to comment that I'm using quantity = 1

Accepted Solutions (0)

Answers (3)

Answers (3)

Active Contributor

The error V1524 is generate if you try to create a sales order item with quantity different than 1 and the item is of type where the following field is checked:

Typically that setting is used for service related items.

Check out your sales order item configuration and sales order item configuration, see what item type you are trying to create.

Either you are trying to create a wrong item type or your item type configuration is wrong.

Best regards

Dominik Tylczynski

Active Participant
0 Kudos

Hi, thanks for answer.
I'v checked in tx vov7 and the item categories I'm trying to create have this flag checked.

But I'm using quantity = 1 in the creation and simulation.
In the creation is working fine, but not in the simulation.

Active Contributor
0 Kudos
in order to get the price calculations and perform some checks.

Try giving all input parameters like condition type, condition rate and also, set the field T685A_KMANU to C. If this is not working for your testing purpose, have a look at OSS note 536483 and see whether you need to carry out code corrections.

Active Contributor
0 Kudos


Did you pass bellow information

  ls_header_in-doc_type    = 'ZZZ'.
  ls_header_in-sales_org   = p_vkorg.
  ls_header_in-distr_chan  = p_vtweg.
  ls_header_in-division    = p_spart.
  ls_header_in-purch_no    = 'TEST'.

  ls_partners-partn_role = 'AG'.
  ls_partners-partn_numb = P_kunnr.
  APPEND ls_partners TO lt_partners.

*---Fill Item data
  LOOP AT gt_mat INTO gwa_mat.
    ls_items_in-itm_number = ls_items_in-itm_number + 10.
    ls_items_in-material   = gwa_mat-matnr.
    ls_items_in-req_qty    = '1'.
    APPEND ls_items_in TO lt_items_in.

*---Schedule line

    ls_schedule_in-itm_number = ls_schedule_in-itm_number + 10.
    ls_schedule_in-req_qty    = '1'.
*  ls_schedule_in-req_date   = sy-datum.
    APPEND ls_schedule_in TO lt_schedule_in.

      order_header_in   = ls_header_in
      return            = ls_return
      order_items_in    = lt_items_in
      order_partners    = lt_partners
      order_schedule_in = lt_schedule_in
      order_items_out   = lt_items_out.