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

Roll Back in BDC

Former Member
0 Likes
1,849

Hi all,

In BDC i am using ROLE BACK WORK. It is not working.

Let me explain clearly.

At certain case i need to create Vendor and Customer

Perform Create_vendor " Through BDC

If Vendor_success = 'X'. "Flag for Vendor success

perform Customer.

endif.

here if customer is not created i need to ROLLBACK vendor.

In the CTU parameters i took update as 'L'.

But it is not working properly.

regards,

Sri

Hi all,

In BDC i am using ROLE BACK WORK. It is not working.

Let me explain clearly.

At certain case i need to create Vendor and Customer

Perform Create_vendor " Through BDC

If Vendor_success = 'X'. "Flag for Vendor success

perform Customer.

endif.

here if customer is not created i need to ROLLBACK vendor.

In the CTU parameters i took update as 'L'.

But it is not working properly.

regards,

Sri

8 REPLIES 8
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,452

Its not possible to roll back in bdc.

because CTU does the db commit automatically.

You can try something like simulation mode execution.

or you can try using the class/methods of CMD_EI_API & VMD_EI_API . But im not sure whether it requires a commit work explicitly at last.

Read only

0 Likes
1,452

Hi Keshav,

Thanks for your replay, I checked the class. but

I am new to class even those are for XK01 and XD01 but i want for FK01 and FD01.

Is there any way with BDC.

thank you

Regards,

sri

Read only

0 Likes
1,452

Sri, as told previously, no way, you can't rollback a BDC.

Ana Luisa, RACOMMIT just allows to continue the BDC after a COMMIT WORK has been done inside the BDC (by default it stops). So it doesn't prevent the COMMIT WORK to be done.

I have added your question to the BDC FAQ wiki: http://wiki.sdn.sap.com/wiki/display/ABAP/BatchInputFAQ

Maybe you can try with IDocs: if they allow packets of more than 1 IDoc, then they don't do any database commit.

Read only

0 Likes
1,452

Hi Sandra,

Thank you for the clarification. I misunderstood the online help.

Regards,

Ana Luisa.

Read only

Former Member
0 Likes
1,452

Hi Sri,

Are you using the standard BI program RFBIKF00 or a call transaction?

With the call transaction you have the OPTIONS FROM opt addition where you can specify wether a COMMIT WORK terminates batch input processing or not (opt component RACOMMIT)

Regards,

Ana Luisa.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,452

HI for creating customer are you refering to any of the data related to vendor ??

Why dont you create customer first and when sy-subrc = 0 ( after call transaction of customer ), then execute the vendor details.

Read only

Former Member
0 Likes
1,452

Hi sandra,

Thank you for clarifying the issue.

and let me ask you a question, what is the use of CTU-parameters update into LOCAL.

Keshav it is Vice versa. if vendor not created, customer has to roll back.

Regards,

Sri

Read only

0 Likes
1,452

>

> what is the use of CTU-parameters update into LOCAL.

>

according to [wiki Batch Input - BDC|http://wiki.sdn.sap.com/wiki/display/ABAP/BatchInput-+BDC#BatchInput-BDC-Updatemode], CTU_PARAMS-UPDMODE = 'L' means:

> Local update task. Update function modules are executed as if SET UPDATE TASK LOCAL has been executed at the start of each LUW, i.e. they are executed in the same workprocess as the main program.

I let you refer to the [ABAP documentation of SET UPDATE TASK LOCAL|http://help.sap.com/abapdocu_70/en/ABAPSET_UPDATE_TASK_LOCAL.htm]