04-24-2014 6:51 AM
Hi Experts,
i Had a problem using parallel processing.
RECEIVE RESULTS return parameter showing record updated successfully but unable update it database.
whats is the mistake in below code. write commit after processing all jobs.
DATA: group LIKE rzllitab-classname VALUE ' '.
CALL FUNCTION 'XXXX'
STARTING NEW TASK TASK DESTINATION IN GROUP group
PERFORMING process_parallel ON END OF TASK
FORM process_parallel USING task type clike.
rcv_jobs = rcv_jobs + 1.
RECEIVE RESULTS FROM FUNCTION 'XXXX'
IMPORTING
return = wa_return
profitcenter = va_profitcenter
controllingarea = va_controllingarea.
functioncall1 = done.
* Error Handling
04-24-2014 7:39 AM
Hi,
It's a bit hard to diagnose because your code snippet is obvously not complete.
Maybe you are being misled. Where is wa_return defined? Do you clear it between each call?
Also, to detect errors, I suggest you add some error handling to the 'call function' and 'receive' statments:
(..)
exceptions
system_failure = 1 message lv_mess "char80
communication_failure = 2 message lv_mess
resource_failure = 3.
cheers
Paul
04-24-2014 8:15 AM
DID all the above... its a copy code
Return table providing record successful and it is not updating in DB.
need any special care for database updation.
04-25-2014 5:06 AM
Not sure I understand? Copied code can have issues too.
Anyway, does the called function handle the 'commit' itself?
If not you may need to send a BAPI_TRANSACTION_COMMIT to the same destination.
cheers
Paul