Skip to Content

Call FM Starting New Task

Hello,

I have more than some 500,000 records to update using a BAPI thats inside my Z*FM

and i am using the parallel processing as below:

data: lv_task(10) type c.

loop at it_data into wa_data.

clear wa_addr.
  wa_addr-addrnumber = f_bpdet-addrnumber.
  wa_addr-city1 = f_file_data-city.
  wa_addr-post_code1 = f_file_data-zip.
  wa_addr-po_box = f_file_data-po_box.
  wa_addr-street = f_file_data-street.
  wa_addr-house_num1 = f_file_data-house.
  wa_addr-str_suppl1 = f_file_data-suppl.
  wa_addr-roomnumber = f_file_data-roomno.
  wa_addr-region = f_file_data-regio.
  append wa_addr to it_addr.

  call function 'ZPARTNER_CHANGE_PARPRO' starting new task lv_task
    destination 'none'
    exporting
      i_partner    = wa_data-gpart
      i_part_data  = ls_part_data
      i_part_datax = ls_part_datax
    tables
      it_addr      = it_addr
      it_addrx     = it_addrx
      it_succ_data = it_succ_data
      it_err_data  = it_err_data .

endloop.

But there seems to be some error in my task name or due to some reason, its getting stuck up somewhere

and system is hanged .

Can someone suggest me what am i doing wrong here.

Thanks

Ricky

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2011 at 07:47 PM

    Hi,

    You're not seem to pass the task name, lv_task.

    Please check this usefull link about parallel processing: http://help.sap.com/saphelp_nw70/helpdata/en/fa/096e92543b11d1898e0000e8322d00/content.htm

    Hope it helps,

    Kr,

    m.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Ricky Shaw

      Best to loop through your records and build up an internal table that stops at an amount like 10,000. Then increment a counter, concatenating that to your task name each time to create a different task name. Then you can have a number of these firing off in parallel.

      data: lv_task(10) type c,

      counter type i,

      task(3) type n.

      loop at it_data into wa_data.

      add 1 to counter.

      clear wa_addr.

      wa_addr-addrnumber = f_bpdet-addrnumber.

      wa_addr-city1 = f_file_data-city.

      wa_addr-post_code1 = f_file_data-zip.

      wa_addr-po_box = f_file_data-po_box.

      wa_addr-street = f_file_data-street.

      wa_addr-house_num1 = f_file_data-house.

      wa_addr-str_suppl1 = f_file_data-suppl.

      wa_addr-roomnumber = f_file_data-roomno.

      wa_addr-region = f_file_data-regio.

      append wa_addr to it_addr.

      if counter = 10000.

      concatenate 'NEWTASK' l_task into lv_task.

      call function 'ZPARTNER_CHANGE_PARPRO' starting new task lv_task

      destination 'none'

      exporting

      i_partner = wa_data-gpart

      i_part_data = ls_part_data

      i_part_datax = ls_part_datax

      tables

      it_addr = it_addr

      it_addrx = it_addrx

      it_succ_data = it_succ_data

      it_err_data = it_err_data .

      add 1 to l_task.

      clear: lv_task, counter.

      refresh: it_addr.

      endif.

      endloop.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.