on 03-20-2016 9:46 PM
Hi all,
I would like to get some help/explanation regarding an issue that I'm facing with ExecuteFromDB.
My goal is to build certain logic by comparing the value of certain attribute before and after a change was performed by the user. To achieve my goal, I want to compare the value of the buffer VS the value of DB.
However, when performing the query ExecuteFromDB, I’m getting/reading the same value as the one on the buffer (UI).
Is there any explanation to the issue that I’m facing?
Please find below an screenshot of my coding + debugging session.
Any tip/suggestion/solution is welcome.
Thanks in advance.
Kind regards,
Andres
BTW: I found 2 similar post but none of them offer a solution/explanation to my problem.
Hello Andres,
As you can see in one my post I had similar issues. From the screenshot of yours, I can see that you are using Execute and ExecuteFromDB function which will return the buffer value and DB value for later one.
If you want to read from DB, then use ExecuteFromDB function. But using this function, I faced an issue that the "this" node gets overwritten from the DB values. You can try passing the current node values to a variable and after getting value from DB, pass it back to "this" node from variable and do your comparison.
Regards,
Mohan Babu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohan,
in you case you get a copy/reference to the object on DB level.
In my case, I always get a reference to the object in the buffer, even when using ExecuteFromDB function.
did you face this issue?
Is there anyone who can explain this? or should I raise a ticket to SAP?
kind regards,
Andres
Hi Sameer,
The incident "External Reference ID" is "3100931723". I would really appreciate if you could have a look on my incident.
On my incident you can find under attachments a document which explain in detail my problem/issue. Please also find attached to this comment my script (Business Partner - Root - AfterModify).
As you suggested, I'm already trying to get the last saved version of the object in database via function "ExecuteFromDB", But I receive alway the version on the buffer. In case I'm using this functionality in the wrong way, please let me know.
Test Scenario: Change the "Academic Title" (or any other attribute) and check whether you can observe/find the value assigned on DB level vs value assigned on runtime/buffer.
kind regards,
Andres
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.