Application Development and Automation 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: 

Assign all operations of task list (routing) to service order

suresh_kumar53
Participant
0 Kudos
515

Hi All,

I need to assign multiple tasklists to sevice order. For that I am using FM CO_IH_TASK_LIST_SET_EXTERNAL. It is working fine for first task list. And when I am trying to assign second task list (in the same loop) program is going to either dump or giving update termination.

Can any body suggest me how I need to proceed and suggest me if any other BAPI/FM available. I checked BAPI_ALM_ORDER_MAINTAIN but I think it will not assign all operations at a time.

My code.. Here lv_cuobj I am taking as '1' always.

LOOP AT it_task_assign INTO wa_task_assign.

CALL FUNCTION 'CO_IH_TASK_LIST_SET_EXTERNAL'

EXPORTING

i_aufnr = wa_task_assign-aufnr

i_vaplz = gv_arbpl

i_vawrk = gv_werks

i_plnty = wa_task_assign-plnty

i_plnnr = wa_task_assign-plnnr

i_plnal = wa_task_assign-plnal

i_cuobj = lv_cuobj

i_flag_save = 'X'

i_flag_commit = 'X'.

COMMIT WORK AND WAIT.

ENDLOOP.

Regards,

Suresh.

4 REPLIES 4

suresh_kumar53
Participant
0 Kudos
396

Can any body suggest me how to assign multiple tasklists to service order (tcode IW32) at a time.

0 Kudos
396

My problem resolved.

0 Kudos
396

It is nice to know that your problem could be resolved. The idea of a forum is to SHARE the experiences. So it would be even nicer if you would give a hint how you solved it.

Thanks

Marcel

PrabhuPole
Product and Topic Expert
Product and Topic Expert
0 Kudos
396

Hi Suresh,

thanks for you blog for the task list updating for the work order.. its working perfectly but when we are creating work order by using BAPI : BAPI_ALM_ORDER_MAINTAIN and when we needs to update the task list by using FM : CO_IH_TASK_LIST_SET_EXTERNAL it will not work, why because this is only for foreground.

if we wanted to use in any one custom FM just we have to create custom report separately then call it in the FM.

Best Regards,

Prabhu. Pole