on 10-17-2008 10:22 AM
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
Hi, did u get answer for your question,
I am also facing same issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.