07-15-2013 9:45 AM
Hello All ,
i need to create an fm for example taking 1000 rows from mara not in once but 4 parallel process as 250.
And i need it in background task.
Any help and ideas would be great!!
Thanks,
Asim..
07-17-2013 8:57 AM
i have found it.. it was getting dump cause of the table i was using.. i have changed it and to make it 4 paralled process i needed to change taskname in every process cause its saying the process already working so its not working with same session name here is code how i solved it and thank you all for answers
START-OF-SELECTION.
DO 4 TIMES.
lv_tabix = lv_tabix + 1.
taskname = taskname + 1.
CALL FUNCTION 'ZAI_FM_H4D'
STARTING NEW TASK taskname
DESTINATION IN GROUP DEFAULT
PERFORMING s_form ON END OF TASK
EXPORTING
rows = p_rows
index = lv_tabix
EXCEPTIONS
communication_failure = 1 MESSAGE gv_msg
system_failure = 2 MESSAGE gv_msg.
ENDDO.
07-15-2013 11:29 AM
Hi,
You can write a parallel processing, here is the link <link farm removed>
Split your selection criteria and pass to RFC function module, and get the results from the return table.
Message was edited by: Suhas Saha
07-16-2013 8:15 AM
i have changed the method i need to do it starting new task now but i am getting dump CALL_FUNCTION_SEND_ERROR here how i call my fm i didnt understand what is wrong its not going to s_from subroutine getting dump
CALL FUNCTION 'ZAI_FM_H4D'
STARTING NEW TASK 'TASK'
PERFORMING s_form ON END OF TASK
EXPORTING
ROWS = 1000
EXCEPTIONS
MATERIAL_NOT_FOUND = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
07-16-2013 12:42 PM
Hi,
Is your s_form is a subroutine or method??
Create a method to call on end of task..
Ex:
CALL FUNCTION 'ZFM_SAVE2'
STARTING NEW TASK zpa_taskno
DESTINATION IN GROUP zpa_group
CALLING return_info ON END OF TASK
Here return_info is a method in the same class.
Thank you
07-17-2013 8:56 AM
07-15-2013 11:30 AM
Hi Asim,
Have a look in this link http://help.sap.com/saphelp_45b/helpdata/en/34/8e73966df74873e10000009b38f9b8/content.htm.
Hope this will helpful for you
Regards,
Prasanna
07-17-2013 8:57 AM
i have found it.. it was getting dump cause of the table i was using.. i have changed it and to make it 4 paralled process i needed to change taskname in every process cause its saying the process already working so its not working with same session name here is code how i solved it and thank you all for answers
START-OF-SELECTION.
DO 4 TIMES.
lv_tabix = lv_tabix + 1.
taskname = taskname + 1.
CALL FUNCTION 'ZAI_FM_H4D'
STARTING NEW TASK taskname
DESTINATION IN GROUP DEFAULT
PERFORMING s_form ON END OF TASK
EXPORTING
rows = p_rows
index = lv_tabix
EXCEPTIONS
communication_failure = 1 MESSAGE gv_msg
system_failure = 2 MESSAGE gv_msg.
ENDDO.