Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

unable to to add a tasklist using 'BAPI_ALM_ORDER_MAINTAIN'

Hi all,

I am using FM 'BAPI_ALM_ORDER_MAINTAIN' to add a tasklist to a work order but i am getting following error:--

1. Error reading the order in the document tables.

2. Error during processing of BAPI methods.

Please see the code below and suggest what is wrong in this.

  • Populate the Internal table IT_METHODS

wa_methods-refnumber = 1.

wa_methods-objecttype = 'TASKLIST'.

wa_methods-method = 'ADD'.

wa_methods-objectkey = v_orderno.

APPEND wa_methods TO it_methods.

CLEAR wa_methods.

wa_methods-method = 'SAVE'.

APPEND wa_methods TO it_methods.

CLEAR wa_methods.

  • Populate the Internal table IT_HEADER.

wa_header-orderid = v_orderno.

wa_header-equipment = wa_afih-equnr.

APPEND wa_header TO it_header.

CLEAR wa_header.

  • Populate the Internal table IT_TASKLISTS.

wa_tasklists-task_list_type = c_tlist_type. "E

wa_tasklists-task_list_group = c_esmcbii . "ESMCBII

wa_tasklists-group_counter = '1'.

APPEND wa_tasklists TO it_tasklists.

CLEAR wa_tasklists.

  • Call the FM 'BAPI_ALM_ORDER_MAINTAIN' to assign the Tasklist group,

  • counter for the current Equipment



it_methods = it_methods

it_header = it_header

it_tasklists = it_tasklists

return = it_return2.

Thanks and Regards,


Former Member
Not what you were looking for? View more on this topic or Ask a question