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

Parallel processing DB updation

0 Likes
996

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

paul_bakker2
Active Contributor
0 Likes
814

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

Read only

0 Likes
814

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.

Read only

0 Likes
814

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