cancel
Showing results for 
Search instead for 
Did you mean: 

unable to to add a tasklist using 'BAPI_ALM_ORDER_MAINTAIN'

Former Member
0 Kudos

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

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

TABLES

it_methods = it_methods

it_header = it_header

it_tasklists = it_tasklists

return = it_return2.

Thanks and Regards,

Vimal

suresh2019
Explorer
0 Kudos

Hi, did u get answer for your question, I am also facing same issue

Accepted Solutions (0)

Answers (2)

Answers (2)

suresh2019
Explorer
0 Kudos

Hi, did u get answer for your question,

I am also facing same issue

NTeunckens
Active Contributor
0 Kudos

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.

peter_atkin
Active Contributor
0 Kudos

Vimal,

Try changing:

wa_tasklists-group_counter = '1'.

to

wa_tasklists-group_counter = '01'.

Also change

wa_methods-objectkey(12) = v_orderno

Can you post the full code?

PeteA

Former Member
0 Kudos

Hi,

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.

-Paul

Moderator

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