Virtual attributes evaluation and performance

Shai Eyal shai.eyal at yahoo.com
Wed Feb 2 12:10:57 EST 2011


Thanks for all your replies. It is not any issue of authorization, users have 
PLOG and I was able to re-produce in PRD with SAP_ALL.
The virtual attribute source is eventually database but I wanted to get it using 
objects as much as possible. For instance, the position held by the initiator: 
In object type USR01 I added virtual attribue of type PDOTYPE_S calculated using 
evaluation path "SAP_US_S". Instantiation in SWO1 works perfect, DEV & QA works 
perfect, PRD system workflow container works perfect, but at runtime it 
sometimes fails to get the position attribute. 


My simple workflow has two steps:
step 1 = container operation to get initiator user from workflow template 
container.
step 2 = simple decision, agent determined via rule.
step 3 = send decision via email.

My biggest concern is why the workflow starts or proceed to step 2 before step 1 
is completed. I always assumed it is sequential (I'm not using any form of fork, 
block or alike).  I do consider changing step 1 to background task 
assuming it result in syncronous process.

BTW, I created OSS for this issue, promise to let you know the conclusions.

Thanks guys!!
 
Regards,
Shai Eyal
SAP Logistics senior consultant
SAP Workflow & BPM specialist
http://www.linkedin.com/in/shaieyal
Mobile: 972-52-5816633
Skype: Shai.Eyal







________________________________
From: "sap-wug-request at mit.edu" <sap-wug-request at mit.edu>
To: sap-wug at mit.edu
Sent: Wednesday, February 2, 2011 16:26:30
Subject: SAP-WUG Digest, Vol 75, Issue 2

Send SAP-WUG mailing list submissions to
    sap-wug at mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
    http://mailman.mit.edu/mailman/listinfo/sap-wug
or, via email, send a message with subject or body 'help' to
    sap-wug-request at mit.edu

You can reach the person managing the list at
    sap-wug-owner at mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of SAP-WUG digest..."


Today's Topics:

  1. Re: Virtual attributes evaluation and performance
      (Krishna K Kammaje)
  2. RE: Virtual attributes evaluation and performance (Edward Diehl)
  3. Re: Virtual attributes evaluation and performance (Mike Pokraka)
  4. RE: Virtual attributes evaluation and performance (Morris, Eddie)
  5. RE: Approval Note Update for Shopping Cart  on 7.0 (Dale Brown)


----------------------------------------------------------------------

Message: 1
Date: Wed, 2 Feb 2011 17:59:55 +0530
From: Krishna K Kammaje <kkammaje at in.ibm.com>
Subject: Re: Virtual attributes evaluation and performance
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Cc: sap-wug <sap-wug at mit.edu>, sap-wug-bounces at mit.edu
Message-ID:
    <OFDF30760C.A385FFCA-ON6525782B.00444695-6525782B.0044A860 at in.ibm.com>
Content-Type: text/plain; charset="us-ascii"

Hi Shai,

What a coincidence, I was just trying to figure out the same issue.

In my case an event triggers a workflow. A BO also gets transferred from 
event to Workflow (through binding). One of the BO's virtual attribute is 
used in WF for condition evaluation. Many a times this condition fails 
(does not work as expected). But when I retrigger the event, workflow 
triggers and behaves as expected. 

I will try using event que.

Thanks
Krishna Kishor Kammaje 
SAP Certified Development Associate - ABAP with Netweaver 7.0
| HRMS LCM Team | Manyata | D3 | 9th Floor | MD3-9F-A113 | Mob: +91 990 
100 0799 | Direct - Xtn: 080 280-62953 |




From:  Shai Eyal <shai.eyal at yahoo.com>
To:    sap-wug <sap-wug at mit.edu>
Date:  02/02/2011 17:04
Subject:        Virtual attributes evaluation and performance
Sent by:        sap-wug-bounces at mit.edu



Hi all,

I wanted to ask for you help with the issue in subject. I use virtual 
attribute quite often and it works OK. However I have one client where I 
suspect having performance issues with virtual attributes. Example: Simple 
approval workflow, agent is determined using a rule. Rule container if 
filled from BOR virtual attribute. Often the workflow goes into error for 
"Agent determination failed". I click "Restart after error" and now all 
works well. In addition, the problem only happens in production system. To 
me it feels like sometimes virtual attributes are not calculated 
immediately. This client posts many transactions every day but I believe 
SAP should know to handle it
I would also like to mention that the virtual attribute code is quite 
simple (no select statement or such).

Has anyone experienced something like this before? any recommendations? 
BTW, working with event queue handles this properly.

Thanks,

Regards,
Shai Eyal
SAP Logistics senior consultant
SAP Workflow & BPM specialist
http://www.linkedin.com/in/shaieyal


_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.mit.edu/pipermail/sap-wug/attachments/20110202/7031ebee/attachment-0001.htm


------------------------------

Message: 2
Date: Wed, 2 Feb 2011 07:10:22 -0600
From: Edward Diehl <edwarddiehl at hotmail.com>
Subject: RE: Virtual attributes evaluation and performance
To: <sap-wug at mit.edu>
Message-ID: <COL104-W47D47ABE159832B2C8C31A2E40 at phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"


Why not test the critical value in a check function and loop until value it 
populated?  When populated exit the function.

Date: Wed, 2 Feb 2011 03:29:22 -0800
From: shai.eyal at yahoo.com
Subject: Virtual attributes evaluation and performance
To: sap-wug at mit.edu




Hi all,

I wanted to ask for you help with the issue in subject. I use virtual attribute 
quite often and it works OK. However I have one client where I suspect having 
performance issues with virtual attributes. Example: Simple approval workflow, 
agent is determined using a rule. Rule container if filled from BOR virtual 
attribute. Often the workflow goes into error for "Agent determination failed". 
I click "Restart after error" and now all works well. In addition, the problem 
only happens in production system. To me it feels like sometimes virtual 
attributes are not calculated immediately. This client posts many transactions 
every day but I believe SAP should know to handle it
I would also like to mention that the virtual attribute code is quite simple (no 
select statement or such).

Has anyone experienced something like this before? any recommendations? BTW, 
working with event queue handles this properly.

Thanks,

Regards,
Shai Eyal
SAP Logistics senior consultant
SAP Workflow & BPM specialist
http://www.linkedin.com/in/shaieyal





_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug                         
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.mit.edu/pipermail/sap-wug/attachments/20110202/1006ce3e/attachment-0001.htm


------------------------------

Message: 3
Date: Wed, 2 Feb 2011 13:19:27 -0000 (GMT)
From: "Mike Pokraka" <wug at workflowconnections.com>
Subject: Re: Virtual attributes evaluation and performance
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Message-ID:
    <1196c0043c3fbf17818a24166498a59a.squirrel at g.mail.aaisp.net.uk>
Content-Type: text/plain;charset=iso-8859-1

Great mystery sometimes surrounds BOR objects...

Obvious question: are there any recent updates prior to the failing step?
Custom object/document/event? Does your attribute depend on DB data?


On Wed, February 2, 2011 11:29 am, Shai Eyal wrote:
> Hi all,
>
> I wanted to ask for you help with the issue in subject.?I use?virtual
> attribute
> quite often and it works OK. However I have?one client where I suspect
> having
> performance issues with virtual attributes. Example: Simple approval
> workflow,
> agent is determined using a rule. Rule container?if filled from BOR
> virtual
> attribute. Often the workflow?goes into error for "Agent determination
> failed".
> I click "Restart after error" and now all works well. In
> addition,?the?problem
> only happens in production system. To me it?feels like?sometimes virtual
> attributes are not calculated immediately. This client posts many
> transactions
> every day but I believe SAP should know to handle it
> I would also like to mention that the virtual attribute code is quite
> simple (no
> select statement or such).
>
> Has anyone experienced something like this?before? any recommendations?
> BTW,
> working with event queue handles this properly.
>
> Thanks,
> ?
> Regards,
> Shai Eyal
> SAP Logistics senior consultant
> SAP Workflow & BPM specialist
> http://www.linkedin.com/in/shaieyal
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>




------------------------------

Message: 4
Date: Wed, 2 Feb 2011 14:40:51 +0100
From: "Morris, Eddie" <eddie.morris at sap.com>
Subject: RE: Virtual attributes evaluation and performance
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Message-ID:
    <19D98BBACEC5CE4187DFB55271CB960A0F447DAA04 at DEWDFECCR08.wdf.sap.corp>
Content-Type: text/plain; charset="us-ascii"

Hi Shai,

It may be possible that the agent determination is not caused by the virtual 
attribute performance but by the user who executes the step (And therefore the 
agent determination) is missing PLOG authorization. See note 755767.  Please add 
this authorization object to your users and test again.

Regards,
Eddie

From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Shai 
Eyal
Sent: 02 February 2011 11:29
To: sap-wug
Subject: Virtual attributes evaluation and performance

Hi all,

I wanted to ask for you help with the issue in subject. I use virtual attribute 
quite often and it works OK. However I have one client where I suspect having 
performance issues with virtual attributes. Example: Simple approval workflow, 
agent is determined using a rule. Rule container if filled from BOR virtual 
attribute. Often the workflow goes into error for "Agent determination failed". 
I click "Restart after error" and now all works well. In addition, the problem 
only happens in production system. To me it feels like sometimes virtual 
attributes are not calculated immediately. This client posts many transactions 
every day but I believe SAP should know to handle it
I would also like to mention that the virtual attribute code is quite simple (no 
select statement or such).

Has anyone experienced something like this before? any recommendations? BTW, 
working with event queue handles this properly.

Thanks,


Regards,
Shai Eyal

SAP Logistics senior consultant
SAP Workflow & BPM specialist

http://www.linkedin.com/in/shaieyal



-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.mit.edu/pipermail/sap-wug/attachments/20110202/8850b677/attachment-0001.htm


------------------------------

Message: 5
Date: Wed, 2 Feb 2011 09:26:38 -0500
From: Dale Brown <dale.brown at duke.edu>
Subject: RE: Approval Note Update for Shopping Cart  on 7.0
To: "sap-wug at mit.edu" <sap-wug at mit.edu>
Message-ID:
    <FB1133EE689F0B419554C3FE6F31B707031D73F000 at EX-MAILBOX-03.win.duke.edu>
    
Content-Type: text/plain; charset="us-ascii"

Was able to capture the real time action status for the shopping cart line item 
by enhancing the ONACTIONON_SELECT method with a post exit.  

The method is found in webdynpro component /SAPSRM/WDC_UI_SC_DOTC_BD in view  
V_SC_DOTC_BASIC .  We stored the status in ps_us01 field .

Dale R. Brown
DUKE UNIVERSITY
Sr. Analyst, IT 
OIT - Application and Database Services
919.684.5341



-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of 
sap-wug-request at mit.edu
Sent: Tuesday, January 25, 2011 9:24 AM
To: sap-wug at mit.edu
Subject: SAP-WUG Digest, Vol 74, Issue 41

Send SAP-WUG mailing list submissions to
    sap-wug at mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
    http://mailman.mit.edu/mailman/listinfo/sap-wug
or, via email, send a message with subject or body 'help' to
    sap-wug-request at mit.edu

You can reach the person managing the list at
    sap-wug-owner at mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of SAP-WUG digest..."


Today's Topics:

  1. Re: SRM - Approval Note Update for Shopping Cart  on 7.0
      (Dale Brown)
  2. User decission getting logically deleted (Srinivas Reddy)
  3. Task getting logically deleted (Srinivas Reddy)


----------------------------------------------------------------------

Message: 1
Date: Mon, 24 Jan 2011 14:06:50 -0500
From: Dale Brown <dale.brown at duke.edu>
Subject: Re: SRM - Approval Note Update for Shopping Cart  on 7.0
To: "sap-wug at mit.edu" <sap-wug at mit.edu>
Message-ID:
    <FB1133EE689F0B419554C3FE6F31B707031D160A6D at EX-MAILBOX-03.win.duke.edu>
    
Content-Type: text/plain; charset="us-ascii"

Ramki -  Thanks for the info.  But what I'm looking for is something that can 
tell me the current status as it comes into the doc_change_badi - not after it 
has left the doc_change_badi .  While  I was doing more investigation it seems 
that if there was something coming in on the item detail that would show me 
which button was chosen - such as inquire, reject, or approve, that I may could 
get my code to do as the user wants. I need something that indicates the current 
screen content as it comes into the doc_change_badi when the "submit" is done on 
the shopping cart. I tried looking at the items - but don't see anything.  Is 
there a function module or method that will show each inidividual item line 
status. I can loop through the lines and if they are not all set to the approve 
radio-button, then I can ignore updating the approval note.  Do you know of 
anything else to call?  Will something have to be done elsewhere to set the line 
item status into maybe some zfield of our o!
wn before getting to the doc_change_badi?    



Dale R. Brown
DUKE UNIVERSITY
Sr. Analyst, IT 
OIT - Application and Database Services
919.684.5341



-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of 
sap-wug-request at mit.edu
Sent: Monday, January 24, 2011 12:18 PM
To: sap-wug at mit.edu
Subject: SAP-WUG Digest, Vol 74, Issue 40

Send SAP-WUG mailing list submissions to
    sap-wug at mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
    http://mailman.mit.edu/mailman/listinfo/sap-wug
or, via email, send a message with subject or body 'help' to
    sap-wug-request at mit.edu

You can reach the person managing the list at
    sap-wug-owner at mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of SAP-WUG digest..."


Today's Topics:

  1. Re: SRM - Approval Note Update for Shopping Cart  on 7.0
      (Ramki Maley)


----------------------------------------------------------------------

Message: 1
Date: Mon, 24 Jan 2011 10:56:30 -0500
From: Ramki Maley <rmaley at erpworkflow.com>
Subject: Re: SRM - Approval Note Update for Shopping Cart  on 7.0
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Message-ID: <4D3DA12E.2030806 at erpworkflow.com>
Content-Type: text/plain; charset="utf-8"

Dale,

You can call method /sapsrm/cl_wf_apv_facade=>get_current_decision in 
the doc_change BAdI to determine the current decision. If it is 
'APPROVED' you can update the note as needed.

Cheers,
Ramki.


On 1/21/11 5:55 PM, Dale Brown wrote:
>
> I?m trying to locate the proper place as to where I can place code to 
> update the ?approval note? box for 7.0 SRM shopping cart.
>
> I have been trying to use the BBP_DOC_CHANGE_BADI and that works good 
> for me when an approval response is done, but when an inquire response 
> is done, I?m having issues with what the user is asking for.  I?m 
> thinking I may have to move my code in order to cover all the 
> responses of the work item ? because the ?submit? action(as far as 
> updating SWWWIHEAD table) for the work item does not happen until 
> after it has gone through the BBP_DOC_CHANGE_BADI code.  Here?s the 
> scenario I?m facing.  We have up to a 7 level approvalprocess for a 
> shopping cart to be approved.  For each time the cart goes to the next 
> level for someone to approve it ? our user wants to have in the 
> ?approval note? a description of thatparticular  level.  When the item 
> is approved this works ok in the BBP_DOC_CHANGE_BADI, because I just 
> add the next level?s description to the ?approval note? box.  But for 
> inquire or reject ? the next level description does not need to appear 
> because the item is going back to the orderer and not the next 
> approval level. The BBP_DOC_CHECK_BADI is not the place for me either 
> based on my code logic ? which is keying on the standard tasks of the 
> workflow.  Using info from swwwihead to get main workflow id and then 
> matching to BALHDR log table for the workflow to get my next level.  
> My problem is that on an inquire/reject, the current approval work 
> item task is not marked complete, and the new ?Accept Decision? 
> standard task is not available until after the BBP_DOC_CHANGE_BADI.  
> So I can?t code around not placing the next level comments.  It 
> happens just like the approve submit action does and places the next 
> level comments in the approval note box.  Can anyone recommend 
> current SAP code that may already be written that is doing what I?m 
> trying to accomplish or know of the correct badi that can be changed 
> to use our code.  Or where would be the proper class/method that could 
> be enhanced to place my code.
>
> *Dale R. Brown*
>
> *DUKE UNIVERSITY***
>
> *Sr. Analyst, IT
> OIT - Application and Database Services
> 919.684.5341*
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.mit.edu/pipermail/sap-wug/attachments/20110124/2f2eb555/attachment-0001.htm


------------------------------

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


End of SAP-WUG Digest, Vol 74, Issue 40
***************************************



------------------------------

Message: 2
Date: Tue, 25 Jan 2011 14:01:43 +0530
From: Srinivas Reddy <ootasrinivasreddy at gmail.com>
Subject: User decission getting logically deleted
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Message-ID:
    <AANLkTinOdPYh2Nq=3T3KPxNa+FQ8uEEK+dD-BpdNfg7j at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Experts,

In my requirement I have 2 level of approvals all the agent determination is
brought from the custom tables. These 2 level of approvals will happen only
on UI screen not in SBWP. So for this I have extended the standard object
BUS2096 with custom events APPROVE , REJECT and SSC_APPROVE and
SSC_REJECT.Now to test I am using the standard t-code SWUE (Create event). I
have also created a blank method in BUS2096  with a message " Approval will
happen only fromUWL". For the first step of approval I am calling the
terminating events APPROVE and REJECT working good. For the second level
approval I am calling the terminating events "SSC_APPROVE and SSC_REJECT.
Once the first level of approval is done the second level approval step is
getting logically deleted. Can someone help where it is going wrong.??

-- 
Thanks and Regards
Srini..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.mit.edu/pipermail/sap-wug/attachments/20110125/69059290/attachment-0001.htm


------------------------------

Message: 3
Date: Tue, 25 Jan 2011 19:54:01 +0530
From: Srinivas Reddy <ootasrinivasreddy at gmail.com>
Subject: Task getting logically deleted
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Message-ID:
    <AANLkTi=wAQsQf9fGd1CbAV0c+aWthvxq79U--Xkrnry3 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi Experts,

I have a workflow requirement where the workflow should trigger if a user
changes a billing document (t-code VA02) to SUBMIT status.Two level of
approvals is required for the billing document to create,all the agent
determination is done via custom method with export
parameters E_AGENTS referred to SWHACTOR.As the approval process will happen
only from UI screen I did not use user decission task for this
requirement,instead I used a task (Standard task with APPROVE and REJECT as
terminating events) calling a method and raising a message(Decission should
be taken only from UI) if the user clicks on the workitem in SBWP.An
automatic customizing is done to send the workitem lying in SBWP to UI
screen. Once the 1st approval is done following steps will do some database
updates with agent determination step (via custom method)  a workitem will
go for the second approval.
I have extended the standard object BUS2096 to ZBUS2096 with custom events
APPROVE , REJECT for 1st level approval and SSC_APPROVE and SSC_REJECT  for
second level approval and delegated to BUS2096. I have called this custom
events as terminating events for the task (Task calling a method which will
give a message to the user to take action only from UI). For the first level
of approval process I have called APPROVE and REJECT as terminating events
and SSC_APPROVE and SSC_REJECT as terminating events for the second level
approval. While testing the object everything is working fine only until
first level approval,once the first level approval is done the second level
approval task is getting logically deleted.
The testing process I have followed:
1) Change existing sales order in VA02 with the SUBMIT status.
2) Goto t-code SWUE and create event APPROVE for the BUS2096.
After doing this I checked the status of the workflow in SWI1 where the
second approval step is getting logically deleted.

Can some one tell me what could be the reason for the secong decission step
getting logically deleted. Fior referance please check the enclosed screen
shot.

Thanks and Regards
Srini..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://mailman.mit.edu/pipermail/sap-wug/attachments/20110125/b15ad6d0/attachment.htm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: W0006_Issue.jpg
Type: image/jpeg
Size: 141480 bytes
Desc: not available
Url : 
http://mailman.mit.edu/pipermail/sap-wug/attachments/20110125/b15ad6d0/W0006_Issue.jpg


------------------------------

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


End of SAP-WUG Digest, Vol 74, Issue 41
***************************************



------------------------------

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


End of SAP-WUG Digest, Vol 75, Issue 2
**************************************


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20110202/e4511d4d/attachment.htm


More information about the SAP-WUG mailing list