2011 Nov 17 2:40 AM
Hi
Several addon programs are using addon table ZXXXX to update records of it.
We are also using OPEN FI Function module program, where the same addon table
has to be updated using UPDATE command. Worried about data loss in this case.
The idea is, addon programs already have Enquee..dequee for table, however
its safety to first check the BKPF entry lock before updating table.
Now how to lock table in OPEN FI side.??we already have enquee dequee to lock addon table. but seems not enough.
After searching SDN forum, i found IN UPDATE TASK can help me to solve this issue. Also can you tell whether SET UPDATE TASK LOCAL has to be used in my case.
Can you explain me bit more how above two can help me.
Appreciate your answer.
Regards
prince
Hi
Several addon programs are using addon table ZXXXX to update records of it.
We are also using OPEN FI Function module program, where the same addon table
has to be updated using UPDATE command. Worried about data loss in this case.
The idea is, addon programs already have Enquee..dequee for table, however
its safety to first check the BKPF entry lock before updating table.
Now how to lock table in OPEN FI side.??we already have enquee dequee to lock addon table. but seems not enough.
After searching SDN forum, i found IN UPDATE TASK can help me to solve this issue. Also can you tell whether SET UPDATE TASK LOCAL has to be used in my case.
Can you explain me bit more how above two can help me.
Appreciate your answer.
Regards
prince
2011 Nov 17 4:37 AM
Hello Prince,
Now how to lock table in OPEN FI side.??we already have enquee dequee to lock addon table. but seems not enough.
What do you mean by "not enough"? Please elaborate!
After searching SDN forum, i found IN UPDATE TASK can help me to solve this issue.
I'm not sure how an UPDATE TASK(read: Update Work Process) will help you in locking the table
Update WPs help in maintaining the transactional integrity of the data within a particular LUW. I've never heard of Update WPs registering SAP Locks.
If you can elaborate your requirement further, i think you'll get better responses!
BR,
Suhas
2011 Nov 17 4:57 AM
Hi,
Go thru the link below, it clearly tell you how lock object works in this context.
http://help.sap.com/saphelp_nw04/helpdata/en/23/edae617ba64e85bd4997f25c77eb1f/content.htm
Difference between Update Task and SET UPDATE TASK IN LOCAL is:
In update task: First the changes are written to VBLOG table and then to respective database (With the help of Dialog WP) you can use COMMIT WORK (Asynchronous update) or COMMIT WORK AND WAIT (Synchronous update).
IN SET UPDATE TASK IN LOCAL: Update happens directly thru memory (No update Dialog WP is used) and always is a Synchronous update irrespective of WAIT statement used or not.
Hope this helps!!
Reetesh
2011 Nov 17 5:50 AM
Hi
Sorry for producing insufficienty information.
Acutally i think there is no link between LOCK and IN UPDATE TASK.
However my issues is the ROLLBACK.
Need to confirm if i use UPDATE XXXXX statement directly and if error, recovery seems to be difficult.
If i use FM IN UPDATE TASK, it first write the contents in local and update in 1 LUW.
and also ROLLBACK can be done for 1LUW at once.
More than lock issue, seems Recovery is problem if i use UPDATE statement directly. Pls correct me if i am wrong.
Regards
Chandra
2011 Nov 17 6:09 AM
Hi,
When update takes place thru a T-code there are two type of LUW`s are involved Database LUW and SAP Luw.
A transaction (SAP Luw) is collection of DB LUW`s which which ends with COMMIT WORK. If the data is consistent all of it is written to the respective database tables otherwise all of it is rolled back by system. ACID principle.
Please read this small document to get hang of this: http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm
Reetesh
2011 Nov 17 6:21 AM
Hello Prince,
If i use FM IN UPDATE TASK, it first write the contents in local and update in 1 LUW.
and also ROLLBACK can be done for 1LUW at once.
Yes, you're correct!
One of the key properties of an SAP LUW is atomicity. Either all or none of the changes are committed to the database.
BR,
Suhas
2011 Nov 17 6:23 AM
Hi
Thanks for reply.
Pls confirm Just using IN UPDATE TASK in FM is enough to solve the recovery issue?
Or SET UPDATE TASK LOCAL command is required?
Regards
pricne
2011 Nov 17 6:26 AM
2011 Nov 17 7:03 AM
Hi
>
> Several addon programs are using addon table ZXXXX to update records of it.
> We are also using OPEN FI Function module program, where the same addon table
> has to be updated using UPDATE command. Worried about data loss in this case.
>
> The idea is, addon programs already have Enquee..dequee for table, however
> its safety to first check the BKPF entry lock before updating table.
>
> Now how to lock table in OPEN FI side.??we already have enquee dequee to lock addon table. but seems not enough.
>
> After searching SDN forum, i found IN UPDATE TASK can help me to solve this issue. Also can you tell whether SET UPDATE TASK LOCAL has to be used in my case.
>
> Can you explain me bit more how above two can help me.
>
> Appreciate your answer.
>
> Regards
prince
If the value of the formal parameter '_SCOPE' of the enqueue FMis set as 2, the update work process inherits the locks from the dialog work process, and the locks are automatically released at the end of the update process, however, if the value of '_SCOPE' parameter is set as '3', both the update and dialog work process should release the locks.
Please provide more information about the 'recovery issue'? to get a better response.
-Rajesh
2011 Nov 17 8:25 AM
Hi
I am using code in OPEN FI.
How to do rollback?
Suppose when i posting FI document and if Update fails how to rollback the whole transaction datas and Addon updated data?
Any idea?
Does the Commit work is required inside OPEN FI also?
because i heard Commit work is not required in exit or badis etc?
Regards
Chandra
2011 Nov 17 8:31 AM
Hi Chandra,
Narration of your requirement is inconsistent, you being by asking about lock object, then moved on to update task and now you are talking about BADI.
Since BADI is enhancement you need not bother about Commit Work nor about Roll Back transaction will take care of the same.
Reetesh
2011 Nov 17 8:39 AM
Hi Ritesh
Sorry for the inconsistent query.
Actually my requirement is confirm when should i use IN UPDATE TASK while updating table written in OPENFI(Which is considered as one kind of enhancement of FI).
which includes Lock process also.
In forum, few place where mentioned that commit work is not required when using in BADI or exit.
so i want to confirm whether OPENFI is exception or not.
Again sorry for the inconvience.
Regards
Prince
2011 Nov 17 9:20 AM
Hello Prince,
How to do rollback?
Suppose when i posting FI document and if Update fails how to rollback the whole transaction datas and Addon updated data?
You need to provide the details of the BTE you've implemented & which transaction it is associated with!
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |