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: 

Parallel processing DB updation

0 Kudos

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

3 REPLIES 3

paul_bakker2
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

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