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

Issue in Commit Work Statement

Former Member
0 Likes
921

Dear All,

I have a Z Module Program which calls another Z Module Program1.

There are various Database Updations taking Place in Z Module Program1 due to which i need to write Commit Work in it.

However as soon as the Z Module Program1 sees Commit Work statement, it terminates its execution and comes back to Z Module Program.

But I dont want this. I want it to continue to next statement. Can anyone tell me how can this be achieved. I mean I need to write Commit Work also.

I Googled internet for this and i found one link which says:

If the statement COMMIT WORK is executed by calling special programs, be aware of the following:

In a program executed using batch input, or if you have called the program using the USING addition of the statement CALL TRANSACTION, COMMIT WORK terminates the batch input processing when using the corresponding settings.

    * In a program called using CALL DIALOG, COMMIT WORK initiates the processing of subroutines or updated function modules registered using PERFORM ... ON COMMIT and CALL FUNCTION ... IN UPDATE TASK. Therefore, it does not complete the current SAP LUW. The SAP LUW cannot be completed until the COMMIT WORK statement is executed in the calling program.

    * Execution of the COMMIT WORK statement is not permitted during the updating procedure or during the execution of subroutines registered using PERFORM ... ON {COMMIT|ROLLBACK}.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
849

If you're using CALL TRANSATION to call the second module-pool program, then you'll have to use the field RACOMMIT of the structure CTU_PARAMS.

Read the F1 documentation for CALL TRANSACTION for more details.

BR,

Suhas

6 REPLIES 6
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
849

Do the program 2 depends on the data saved in program 1 ? What is happening in program 2 ?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
850

If you're using CALL TRANSATION to call the second module-pool program, then you'll have to use the field RACOMMIT of the structure CTU_PARAMS.

Read the F1 documentation for CALL TRANSACTION for more details.

BR,

Suhas

Read only

Former Member
0 Likes
849

Thank you so so much... My Problem is solved....

Read only

Former Member
0 Likes
849

Currenlty am trying to trace out an ABAP issue.

with ref. :  http://scn.sap.com/thread/3228498

where Commit work is being calling for both CC31 and thru IQS1.

  • For CC31, control flows to PERFORM....ON COMMIT. (where a BAdi is called to generate ECR)

  • But thru IQS1 on COMMIT WORK statement, i press F5, control goes back to initially called module PAI , highlighted as under, rather than going back to PERFORM .... ON COMMIT

process after input.

    module exit at exit-command.

    call subscreen common.
    call subscreen detail.

    module csl_02.

    field okcode
       module okcode.

And on F8, Message is displayed that ECR is created, but internally BAdi is not called and ECR is not updated in AENR table.

Any inputs !!

Thanks

Read only

0 Likes
849

Is your "PERFORM .... ON COMMIT" registered in the second case ?

Is your badi method executed in update task ?

For the second case please let us know the badi used.

Read only

Former Member
0 Likes
849

Hi Kesavdas,

In second case, Perform...on commit is not called / not registered.

BADI used is ECR_UPDATE.

Thanks,

Alok