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

Use "Call function - starting new task" to receive results

Former Member
0 Kudos
2,518

Dear All,

Recently,I  use bapi 'BAPI_DELIVERYPROCESSING_EXEC' to create delivery.For some other reason,I need use sytax CALL FUNCTION fm starting new task task PERFORMING return ON END OF TASK.But in this way,I can't receive results.

I copy my code in there,please give me some advice, Thanks a lot.

1 ACCEPTED SOLUTION

Tomas_Buryanek
Active Contributor
0 Kudos
778

Do you have some text/identification in task varible before calling aRFC? It should not be initial.

-- Tomas --
3 REPLIES 3

Former Member
0 Kudos
778

This is my code.

CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC' STARTING NEW TASK task                                                PERFORMING return_form ON END OF TASK   

     TABLES   

       request          = tbl_request .

*     createditems  = createditems

*     return             = return.    

   WAIT UNTIL gr_flag = 'X'.    

   createditems[] = gt_createditems[].    

   return[]            = gt_return[].

FORM return_form USING task.   

    RECEIVE RESULTS FROM FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'     

        TABLES        

          createditems = gt_createditems        

          return            = gt_return.     

       gr_flag = 'X'.

ENDFORM.

Tomas_Buryanek
Active Contributor
0 Kudos
779

Do you have some text/identification in task varible before calling aRFC? It should not be initial.

-- Tomas --

0 Kudos
778

Hi Tomas,

Thank you very much. It's amazing. When I define "DATA: task type c." ,I can't receive results.

But if I define "DATA: task type string value 'Z01' .", i get it.