Skip to Content
author's profile photo Former Member
Former Member

function module in new task

Hi:

I've got a Z function module. I want to use starting new task syntax with it. But the problem is that its having an importing parameter also. is there any alternative for that. I need to process this FM in a new task. Points will be rewarded.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 07:58 AM

    Hi,

    HERE THE EXAMPLE

    <b>&----


    *& Form DIF_PLAN

    &----


    </b>

    FORM dif_plan TABLES it_param TYPE tdf_el

    USING nam LIKE t_name

    idx.

    CONCATENATE nam idx INTO taskname.

    CALL FUNCTION 'Y_F_CO_DIF_DF_ELEM'

    STARTING NEW TASK taskname

    DESTINATION IN GROUP DEFAULT

    PERFORMING outdata_new ON END OF TASK

    EXPORTING

    i_keart = 'N'

    i_kkzst = ' '

    i_curtp = p_curtp

    TABLES

    t_param = it_param

    t_el_hv = it_el_hv

    t_elehkns = it_elehkns

    t_ckmlkev = it_ckmlkev

    r_mlcct = ra_mlcct

    r_categ = ra_categ

    EXCEPTIONS

    int_err = 1

    OTHERS = 2.

    IF sy-subrc <> 0.

    MESSAGE e203(zmco).

    ELSE.

    ADD 1 TO started_task.

    ENDIF.

    IF free_task <= proc_cnt_n .

    WAIT UNTIL gs_cnt >= started_task.

    CLEAR: started_task, gs_cnt.

    *

    <b>*Quantity of free processes</b>

    CALL FUNCTION 'SPBT_GET_CURR_RESOURCE_INFO'

    IMPORTING

    free_pbt_wps = free_task

    EXCEPTIONS

    internal_error = 1

    pbt_env_not_initialized_yet = 2

    OTHERS = 3

    .

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    ENDIF.

    PERFORM num_task USING 4.

    proc_cnt = proc_cnt - 1.

    ENDFORM. "DIF_PLAN

    <b>&----


    *& Form outdata_new

    &----


    *& -->TASKNAME text

    &----


    </b>

    FORM outdata_new USING taskname.

    RECEIVE RESULTS FROM FUNCTION 'Y_F_CO_DIF_DF_ELEM'

    TABLES

    t_outdata = it_dif_df_elem1

    EXCEPTIONS

    int_err = 1

    OTHERS = 2.

    APPEND LINES OF it_dif_df_elem1 TO it_dif_df_elem.

    ADD 1 TO gs_cnt.

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 07:09 AM

    CALL FUNCTION update_function IN UPDATE TASK

    [EXPORTING p1 = a1 p2 = a2 ...]

    [TABLES t1 = itab1 t2 = itab2 ...].

    Add a comment
    10|10000 characters needed characters exceeded

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.