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: 
Read only

Call Function starting new task

Former Member
0 Likes
577

Hi,

We are not able to get data in RECIEVE of call fucntion new task.

call function 'ZRFC_PER_DIEM' starting new task lc_taskid PERFORMING SUBR ON END OF TASK

EXPORTING

h_guid = it_header_guid_n

request_obj = lt_requested_objects_n.

form subr USING task_id type clike.

RECEIVE RESULTS FROM FUNCTION 'ZRFC_PER_DIEM'

CHANGING

var1 = return 1

var2 = return 1 .

endform

Now in above code , we are getting the value in RFC but when we are trying to get those values from RECIEVE RESULT i.e. return1 and return2 , we are not finding it.

Do we have any syntax problem in above code.Or we dont need perfom RECIVE RESULT.

Also we want that , till the RFC is executing the calling program whould not execute i.e after the RFC call is done then and only then my calling program should move for the next line.

so what hould be the proper way to do the same thing.

regards

PG

2 REPLIES 2
Read only

Former Member
0 Likes
420

Hi PG,

Take a look at SAP Library:

http://help.sap.com/saphelp_nw04/helpdata/en/22/042592488911d189490000e829fbbd/frameset.htm

To make the program waits until the end of the asynchronous RFC execution you can use the statement WAIT UNTIL.

Only the following receiving parameters are allowed: IMPORTING, TABLES and EXCEPTIONS. CHANGING does not work for asynchronous RFC.

I hope it could help you.

Best regards!

Read only

0 Likes
420

Thanks Lqueiroz ,

Now again i am getting a DUMP by saying ,

"An error occurred when executing a REMOTE FUNCTION CALL.

It was logged under the name "At least one entry could not be "

on the called page."

so what can be the reason for this

call function 'ZRFC_PER_DIEM' starting new task lc_taskid performing subr on end of task

exporting

h_guid = it_header_guid_n

request_obj = lt_requested_objects_n.

wait up to '1' seconds.

read table gt_scl into ls_scl index 1.

p_transaction_per_diem = ls_scl-value.

read table gt_scl into ls_scl index 2.

transaction_currency_code = ls_scl-value.

form subr using task_id type clike.

data: p_transaction_per_diem type char13,

transaction_currency_code type char3.

receive results from function 'ZRFC_PER_DIEM'

tables

value = gt_scl.

So basically i am getting dumo when receive statenment is running , by giving above dump.

Regards

PG