‎2009 Feb 02 11:17 AM
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
‎2009 Feb 02 11:37 AM
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!
‎2009 Feb 03 4:50 AM
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