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: 

Order cannot be completed; account assignment not maintained

Former Member
0 Kudos

Hi .

I am facing this error .

could anyone tel solution

"Order cannot be completed; account assignment not maintained"

While TECO a order using BAPI_ALM_ORDER_MAINTAIN.

The input i am giving to BAPI is

it_methods-refnumber = 1.

it_methods-objecttype = 'HEADER'.

it_methods-method = 'TECHNICALCOMPLETE'.

it_methods-objectkey = ORDERID.

  append it_methods.

    it_methods-method = 'SAVE'.

    it_methods-objecttype = '   '.

    append it_methods.

it_header-orderid = ORDERID.

it_header-mn_wk_ct = WORKCENTER.

it_header-plan = plant.

append it_header.

  CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

    TABLES

      IT_METHODS              = IT_METHODS

      IT_HEADER               = IT_HEADER

        RETURN                  = RETURN

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    EXPORTING

      WAIT          = 'X'

.

1 REPLY 1

Former Member
0 Kudos


have you checked this piece of sap code where the message is getting generated.

   *--- Kontierung pflegen, wenn noch keine vorhanden --------------------*
  CALL FUNCTION 'CO_I1_ABRV_ARCH_FREI'
    EXPORTING
      caufvd_imp    = header
    IMPORTING
      continue      = continue
    EXCEPTIONS
      error_message = 1
      OTHERS        = 2.

* ..check switch for OLC...
  IF cl_erp_co_olc_tools=>is_olc_relevant( header-netzkont )
    = abap_true.
* ..Switch is on && order is operation ACC
    IF continue = space.
*     Errors on settlement creation occured.
*     ->See settlement rule log.
      MESSAGE i045(erp_co_olc_e).
      EXIT.
    ENDIF.
  ELSE.
    IF continue = space.
      PERFORM message_send USING 'IW'
                                 ' '
                                 177
                                 c_msgv_empty
                                 c_msgv_empty
                                 c_msgv_empty
                                 c_msgv_empty.
      IF  g_rfc_active IS INITIAL.
        MESSAGE i177.
      ENDIF.

      EXIT.              "=====================================>

put a break point here and run your FM

do check the account assignment of your order. it shall help.