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

COMMIT WORK closes a transaction call

Former Member
0 Likes
1,967

Hi! I have two different programs. In one of them, I call a transaction to the second program in this way:

CALL TRANSACTION 'ZVGI03A_RCR' USING bdcdata.

Inside the second program, I have to use 'COMMIT WORK' but after that the program finish itself suddenly, returning to the first program.

What is the reason?

Thanx!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,416

Can I call the program usign CALL PROGRAM instead of CALL TRANSACTION??

7 REPLIES 7
Read only

Former Member
0 Likes
1,416

Hi,

U cant use the commit work inside a program, calling form call transaction method. It ends the LUW.

Sreedhar

Read only

Former Member
0 Likes
1,417

Can I call the program usign CALL PROGRAM instead of CALL TRANSACTION??

Read only

0 Likes
1,416

You can use "Submit program <progname> and return."

Read only

0 Likes
1,416

Hi

If you have used a COMMIT WORK command, your BDC'll end at the point where you've done the COMMIT.

Which kind is your Z-program?

Max

Read only

0 Likes
1,416

You can use submit program if the report is a report, but how would you handle the BDC table? If possible, I'd take the commit out of the other program.

Rob

Read only

1,416

Hi,

There is actually a standard solution for this with the CALL TRANSACTION statement.

It has an optional syntax element 'OPTIONS FROM opt' where the 'opt' is a structure with specific option fields.

One of the fields 'RACOMMIT' controls whether the commit work statement will stop the BDC or not. By default it will but by using this field you can prevent it from happening ...

Regards,

Steven

Read only

Former Member
0 Likes
1,416

Hi !

You could use the Call Transacation ... OPTIONS

For example:

CALL TRANSACTION 'ZXYZ' UING bdc_tab

OPTIONS FROM bdc_opt.

where bdc_opt is defined as:

DATA: bdc_opt TYPE ctu_params.

and the parameter: bdc_opt-racommit ist set to ' '.

Then the Call-Transaction will not end on any COMMIT WORK of the called transaction.

Regards

Rainer