Skip to Content
0
Feb 04, 2020 at 10:18 AM

BAPI_SALESORDER_CHANGE not same check than VA02

286 Views

Hello,

i'm trying to update order price date with bapi BAPI_SALESORDER_CHANGE.

  ls_order_inx-updateflag = 'U'.
  ls_order_in-price_date = i_datum.
  ls_order_inx-price_date = 'X'.

  CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
      salesdocument    = i_vbeln
      order_header_in  = ls_order_in
      order_header_inx = ls_order_inx
    TABLES
      return           = lt_ret.

I face an error : (Function : SD_SALES_HEADER_MAINTAIN - after call FM: DATE_CONVERT_TO_FACTORYDATE)

Date 31.01.2020 is after the end of factory calendar XX. (V1 - 086).

This date is FVBAKKOM-VDATU (Requested delivery date).

But if I edit this same date with VA02, no problem.

I want to avoid batch input if possible.

Do you know why this check is done ?

Sales Org Calendar is indeed over. But if VA02 dont care, why dont BAPI do the same logic ..

Best Reagrds,

Guillaume.