Skip to Content
avatar image
Former Member

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,


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Oct 17, 2008 at 09:51 AM


    Try changing:

    wa_tasklists-group_counter = '1'.


    wa_tasklists-group_counter = '01'.

    Also change

    wa_methods-objectkey(12) = v_orderno

    Can you post the full code?


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      Using the BAPI 'BAPI_ALM_ORDER_MAINTAIN' i was able to create a PM order successfully through program ,but am not able to automatically assign a tasklist details to the new PM order created.

      Please help me resolve this issue.Woudl appreciate if I can get some usefull sorce code on this.


      This is an old thread, Please open one for your specific query.



      Edited by: Paul Meehan on Jun 23, 2010 12:33 PM

  • Jul 03 at 01:20 PM

    Hi, did u get answer for your question,

    I am also facing same issue

    Add comment
    10|10000 characters needed characters exceeded

    • As this is an old thread, please raise a (New) Question if you still encounter problems and clarify what your exact problem is, possibly posting your ABAP-code. However, please search the Community or Google, because many samples and suggestions have been made in the past.

      Regards, Nic T.