Skip to Content
author's profile photo Former Member
Former Member

Object-Instance does not take changed attributes - database does

Hey Guys,

I am new to Workflow-Creation and just doing my first project with WF and ABAP OO.

In my WF I am working with an Account described in an instance of a persistent class, created by myself.

In some Workitems i call tasks (-> here: methods of the object) that change (persistent) attributes.

Going to the next Workitem, the change has not been taken by the instance of the object - the attributes are the same as before. BUT in the database-table, the persistent class is representing, the values HAVE changed.

So I would have to refresh or reinstanciate the instance of the class to load the attributes again, before reaching every Workitem.

I thought (and even read in SAP's Workflow Book) that Objects in WF are instanciented for every Workitem or Operation they are used - so the attributes should be equal to the values in the database without manually reinstancing them -shouldn't they?

What did I try to solve the Problem and have up-to-date values in my instance:

Checking Bindings

Checking LPOR and Find_by_lpor methods

testing the methods, that change attributes (outside of workflow)

looking for solutions in OSS

looking for solutions in SDN

Is anybody familiar with this situation and can offer a solution?

Thank you very much.

Background Information:

System: SAP ECC 6.0 / SAP_APPL Rel. 603 (SAPKH60302)#

PS: I hope I wrote this thread in the right way - it is my first one here. If not, tell me please.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 14, 2010 at 08:05 AM


    How did you populate the Attributes of the class? using constructor method right?

    If i understood correctly, using constructor your attributes are populated. But its not changing for every instance. That is the issue right?

    If so, for each instance you have to pass different input's. so that the attributes getting populated with different values right?

    Please make sure that, for each instance is the same input is passed or different input's.

    Also test the class with different instances in SE24 itself. If it is working fine in SE24, then there is some issue's with

    workflow binding.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Mike Pokraka

      > Mike Pokraka wrote:

      Patrick is absolutely right though, it doesn't make sense to try both methods at the same time.

      Of course. I am sorry. I just removed the event-raise and changed the task into a synchronous one - still endless loop.

      But I made an interesting discovery:

      I just took a closer look at my technical workflow-protocol. In the loop's first run, the container of the step, that changes the status contains the object-instance I assigned to the wf.

      In the second run, the step's container contains the object with the key:0000000000000.

      Perhaps again a little more background... 😉

      This is a part of my wf's structure:

      start loop -decision of the way by reading the status

      -- A

      ---(ok) -

      set status:1 -
      loop again



      set status:66


      loop again

      -- B

      ---(ok) -

      set status:2 -
      loop again



      set status:66


      loop again

      Step A: No problem

      Step B: Wrong key (only in the step "set status"). In step B is still the right key.

      I hope this helps to understand the problem a little more.

      If we cannot find a solution, I will post an oss-message....

      Thank you very much, so far!

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.