<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi Seth,<br><br>thanks for the update, I've had similar prob recently (on ecc6), only it was popping up when trying to reference the bor attrib in the body of a workitem, but it is the same error. I couldn't figure it out so did a workaround. Annoying because I got it to work before on another ecc6 site. <br><br>Do you get this error if you refernce the attrib in a workitem. maybe worth checking?<br><br>BTW my workflow used bor bus2009 as an attribute of my custom PR Item class, so I don't reccon it is bor specific.<br><br>Let us know what oss say.<br><br>Cheers<br>Mark<br><br>&gt; Date: Fri, 24 Apr 2009 10:36:31 -0500<br>&gt; From: Seth.Stevens@anadarko.com<br>&gt; To: sap-wug@mit.edu<br>&gt; <br>&gt; I thought I would share an update on this issue.<br>&gt; <br>&gt; OSS supplied internal documentation on how to create an ABAP Object<br>&gt; attribute with a BOR object and use it in a workflow binding.<br>&gt; Essentially, it was the same information provided in the BLOG's on SDN.<br>&gt; After reviewing the document and my code, we are in agreement that<br>&gt; everything is setup as outlined.  I even used their SAP delivered demo<br>&gt; class that demo's this functionality and get the same error.  If I try<br>&gt; to change the description on standard task 56407943 and insert the<br>&gt; expression CL_SWF_FORMABSENC.CREATOR.USERNAME it throws the error when<br>&gt; you try to save.  After bringing this to their attention I got the below<br>&gt; response:<br>&gt; <br>&gt; "We have to discuss this internally. Please do not expect a quick<br>&gt; solution. Maybe expressions of type<br>&gt; <br>&gt; &amp;ABAP_Class.BOR_Object.Attribute&amp;.<br>&gt; <br>&gt; will even be forbidden at all. We'll keep you updated.<br>&gt; <br>&gt; Sorry for giving bad news."<br>&gt; <br>&gt; I am curious to know if anyone has actually made this work in another<br>&gt; system or if it is something specific to our patch level and version.<br>&gt; Again, it looks like it works until you try to save the binding so I'm<br>&gt; curious if this works in some systems or if it was just missed during<br>&gt; the QA process.<br>&gt; <br>&gt; One suggestion they offered, that does work, is to setup the class as<br>&gt; directed, then assign class.bor_attribute to a container element of your<br>&gt; bor type, then use bor.attribute in your step.  This works, but again is<br>&gt; a bit of an unnecessary operation.  Even when doing this a warning is<br>&gt; thrown that says "Conversion From '[NN.]' to '[BO.USR01]' Can Cause<br>&gt; Data-Dependent Errors".<br>&gt; <br>&gt; Just wanted to share an update...If I hear anything further of use I'll<br>&gt; pass it along.<br>&gt; <br>&gt; --Seth<br>&gt; <br>&gt; -----Original Message-----<br>&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On Behalf<br>&gt; Of Stevens, Seth<br>&gt; Sent: Wednesday, April 22, 2009 8:22 AM<br>&gt; To: SAP Workflow Users' Group<br>&gt; Subject: RE: Using BOR Object as Attribute In ABAP Class<br>&gt; <br>&gt; Thanks for the feedback.  I actually tried doing this with a different<br>&gt; business object altogether (FIPP, tried to bind BELNR) and got the same<br>&gt; error.  I have a note in with OSS so hopefully I'll hear something from<br>&gt; them.<br>&gt; <br>&gt; Thanks,<br>&gt; Seth <br>&gt; <br>&gt; -----Original Message-----<br>&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On Behalf<br>&gt; Of Mike Pokraka<br>&gt; Sent: Wednesday, April 22, 2009 2:21 AM<br>&gt; To: SAP Workflow Users' Group<br>&gt; Subject: RE: Using BOR Object as Attribute In ABAP Class<br>&gt; <br>&gt; Very good point, and could well be the cause here. Try changing it to<br>&gt; USR01DOHR explicitly and see if it works then.<br>&gt; All the more reasons to use a user class :-)<br>&gt; <br>&gt; On Tue, April 21, 2009 10:48 pm, Dart, Jocelyn wrote:<br>&gt; &gt; Hi Seth/Mike,<br>&gt; &gt; BO USR01 has a weird little feature in that if you are in a system <br>&gt; &gt; without HR it uses USR01 natively and if you are in a system with HR <br>&gt; &gt; it uses USR01DOHR - the employee based equivalent.<br>&gt; &gt; So that might be why you are seeing some strange behaviours. Just a <br>&gt; &gt; thought.<br>&gt; &gt; But I agree with Mike - USR01 is usually my first candidate to redo as<br>&gt; <br>&gt; &gt; an ABAP Class that I control.  Similarly BUS1065/EMPLOYEET which have <br>&gt; &gt; a nasty tendency to pay far too much attention to HR Structural Auths,<br>&gt; <br>&gt; &gt; and a nice Utilities class for odds and sods such as calculating<br>&gt; deadline dates.<br>&gt; &gt; Regards,<br>&gt; &gt; Jocelyn<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt;<br>&gt; &gt; From: sap-wug-bounces@mit.edu on behalf of Mike Pokraka<br>&gt; &gt; Sent: Tue 21/04/2009 9:43 PM<br>&gt; &gt; To: SAP Workflow Users' Group<br>&gt; &gt; Subject: RE: Using BOR Object as Attribute In ABAP Class<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Sounds like a bug, what patch level are you on?<br>&gt; &gt; If the binding editor can expand the BOR attribute to the BOR <br>&gt; &gt; component level then I'd definitely report it. I've reported a few <br>&gt; &gt; issues with ABAP Classes in WF and found them to be very helpful and <br>&gt; &gt; usually quite quick in resolving issues (which is not what I can say<br>&gt; for other areas of OSS).<br>&gt; &gt;<br>&gt; &gt; Cheers,<br>&gt; &gt; Mike<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; On Mon, April 20, 2009 10:47 pm, Stevens, Seth wrote:<br>&gt; &gt;&gt; Yeah, not sure what the issue is here.  Everything is marked as <br>&gt; &gt;&gt; public and the binding editor can see the object and display all the <br>&gt; &gt;&gt; correct attributes; however, the binding syntax check throws the <br>&gt; &gt;&gt; error when you choose one of the attributes.  At this point I'll <br>&gt; &gt;&gt; probably look for a work around but will send out an update if I<br>&gt; figure out the issue.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Thanks again...<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; --Seth<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; -----Original Message-----<br>&gt; &gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On <br>&gt; &gt;&gt; Behalf Of Mike Pokraka<br>&gt; &gt;&gt; Sent: Monday, April 20, 2009 4:34 PM<br>&gt; &gt;&gt; To: SAP Workflow Users' Group<br>&gt; &gt;&gt; Subject: RE: Using BOR Object as Attribute In ABAP Class<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Hi Seth,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; You're on the right track, but missing the bit that the binding <br>&gt; &gt;&gt; editor won't instantiate the class. If you make the constant public <br>&gt; &gt;&gt; (so the binding editor can see it) and specify it as the initial <br>&gt; &gt;&gt; value for your attribute it should be happy. I think. Not sure <br>&gt; &gt;&gt; how/why it's working in one instance but not the other - see if you <br>&gt; &gt;&gt; can expand the attribute in a regular binding.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Regarding a user class, I still say go for it. It's easier to work <br>&gt; &gt;&gt; with and far more flexible and there's nothing stopping you from <br>&gt; &gt;&gt; mixing and matching. I often end up with BOR and classes for the same<br>&gt; object.<br>&gt; &gt;&gt; Basically I take an opportunistic approach: if I need to spend any <br>&gt; &gt;&gt; time working with a BOR object then it's a good excuse to add the <br>&gt; &gt;&gt; functionality to a class instead (provided it's not a major effort).<br>&gt; &gt;&gt; Regarding maintaining two code streams - just mark the BOR method <br>&gt; &gt;&gt; obsolete. If it needs changing then do it the other way around:<br>&gt; &gt;&gt; incorporate the class into your BOR object as a private attribute, <br>&gt; &gt;&gt; change the code in the class and replace your BOR method code to call<br>&gt; <br>&gt; &gt;&gt; the class method. Although BOR doesn't understand classes as <br>&gt; &gt;&gt; components, you can instantiate and use a class internally because <br>&gt; &gt;&gt; it's standard ABAP.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Cheers,<br>&gt; &gt;&gt; Mike<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; On Mon, April 20, 2009 3:08 pm, Stevens, Seth wrote:<br>&gt; &gt;&gt;&gt; Mike,<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Thanks for the reply.  I assume that you are talking about setting <br>&gt; &gt;&gt;&gt; an initial value in the class and not in the workflow container, if <br>&gt; &gt;&gt;&gt; that is the case I am already doing this.  I have created a constant<br>&gt; <br>&gt; &gt;&gt;&gt; with "direct type entry" like below:<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; BEGIN OF C_BOR_USR01,<br>&gt; &gt;&gt;&gt;   INSTID TYPE SIBFBORIID VALUE IS INITIAL,<br>&gt; &gt;&gt;&gt;   TYPEID TYPE SIBFTYPEID VALUE 'USR01',<br>&gt; &gt;&gt;&gt;   CATID  TYPE SIBFCATID VALUE 'BO',<br>&gt; &gt;&gt;&gt; END OF C_BOR_USR01.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; I then created an attribute called TRADER_BOR_USR01 of type <br>&gt; &gt;&gt;&gt; SIBFLPORB and placed the below code in the constructor.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; ME-&gt;TRADER_BOR_USR01-INSTID = 'MYUSERID'.<br>&gt; &gt;&gt;&gt; ME-&gt;TRADER_BOR_USR01-TYPEID = 'USR01'.<br>&gt; &gt;&gt;&gt; ME-&gt;TRADER_BOR_USR01-CATID = 'BO'.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; The binding editor in the workflow builder shows all the correct <br>&gt; &gt;&gt;&gt; attributes and structure of the USR01 business object so I assume <br>&gt; &gt;&gt;&gt; the editor is reading the correct BO type; however, if I select one <br>&gt; &gt;&gt;&gt; of the<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; attributes and try to use it I get the error.  If you see anything <br>&gt; &gt;&gt;&gt; I'm<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; missing please let me know.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; As far as creating a user class, this is something I would like to<br>&gt; do.<br>&gt; &gt;&gt;&gt; My only issue is this is our only class based workflow thus far and <br>&gt; &gt;&gt;&gt; we<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; have tons of BOR based workflows.  I don't want to have to maintain <br>&gt; &gt;&gt;&gt; all the custom code associated with the user object in two places.<br>&gt; &gt;&gt;&gt; I guess I could create a wrapper class for the BO then maintain the <br>&gt; &gt;&gt;&gt; code<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; in the BOR until when/if we convert our old workflows to use the<br>&gt; &gt;&gt; class.<br>&gt; &gt;&gt;&gt; Regardless, I'd still like to figure this problem out for use<br>&gt; &gt;&gt; elsewhere.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Thanks in advance.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; --Seth<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; ________________________________<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On <br>&gt; &gt;&gt;&gt; Behalf Of Mike Pokraka<br>&gt; &gt;&gt;&gt; Sent: Saturday, April 18, 2009 4:35 PM<br>&gt; &gt;&gt;&gt; To: 'SAP Workflow Users' Group'<br>&gt; &gt;&gt;&gt; Subject: RE: Using BOR Object as Attribute In ABAP Class<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Hmmm, reading my own post I notice a bit of confusion. Let's try <br>&gt; &gt;&gt;&gt; that second sentence again:<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; The attribute needs to be populated with an initial value that <br>&gt; &gt;&gt;&gt; contains at least the object class and type.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On <br>&gt; &gt;&gt;&gt; Behalf Of Mike Pokraka<br>&gt; &gt;&gt;&gt; Sent: 18 April 2009 20:12<br>&gt; &gt;&gt;&gt; To: 'SAP Workflow Users' Group'<br>&gt; &gt;&gt;&gt; Subject: RE: Using BOR Object as Attribute In ABAP Class<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Hi Seth,<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; The problem is that the binding editor does not know the object type<br>&gt; <br>&gt; &gt;&gt;&gt; of your attribute. It needs to have an initial value containing the <br>&gt; &gt;&gt;&gt; object class and type.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; However, an SAP user is one of the easiest and most useful objects <br>&gt; &gt;&gt;&gt; to implement as a class. I would suggest going with a ZCL_USER class<br>&gt; <br>&gt; &gt;&gt;&gt; instead. Much easier to work with.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Cheers,<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Mike<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On <br>&gt; &gt;&gt;&gt; Behalf Of Stevens, Seth<br>&gt; &gt;&gt;&gt; Sent: 15 April 2009 21:42<br>&gt; &gt;&gt;&gt; To: SAP Workflow Users' Group<br>&gt; &gt;&gt;&gt; Subject: RE: Using BOR Object as Attribute In ABAP Class<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; As a side note, same thing happens if I try to use an attribute of <br>&gt; &gt;&gt;&gt; the<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; BOR in a binding.  Try to bind ZCL_MKT_TRADE . TRADER_BOR_OBJ . <br>&gt; &gt;&gt;&gt; ZEMAIL<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; to a sendmail step.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; --Seth<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; ________________________________<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On <br>&gt; &gt;&gt;&gt; Behalf Of Stevens, Seth<br>&gt; &gt;&gt;&gt; Sent: Wednesday, April 15, 2009 3:26 PM<br>&gt; &gt;&gt;&gt; To: SAP Workflow Users' Group<br>&gt; &gt;&gt;&gt; Subject: Using BOR Object as Attribute In ABAP Class<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; I am creating a custom workflow for our marketing group using ABAP <br>&gt; &gt;&gt;&gt; Classes.  The main class I am dealing with is called ZCL_MKT_TRADE.<br>&gt; &gt;&gt;&gt; We do not have HR implemented and subsequently use BOR object USR01 <br>&gt; &gt;&gt;&gt; for agent assignments in many custom workflows and have a lot of <br>&gt; &gt;&gt;&gt; custom methods and attributes of use to this workflow.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; I need to use the trader (user) for several things in the workflow <br>&gt; &gt;&gt;&gt; so I created an attribute on ZCL_MKT_TRADE called TRADER_BOR_OBJ <br>&gt; &gt;&gt;&gt; that is of type BOR Object USR01 as outlined in Jocelyn's SDN BLOG.<br>&gt; <br>&gt; &gt;&gt;&gt; I want to<br>&gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; use the trader for the agent assignment on a given workitem.  I use <br>&gt; &gt;&gt;&gt; "Expression" and then select <br>&gt; &gt;&gt;&gt; &amp;ZCL_MKT_TRADE.TRADER_BOR_OBJ.NAMEWITHLEADINGUS&amp; as the expression.<br>&gt; &gt;&gt;&gt; This is available in the dropdown but when I choose it I get an <br>&gt; &gt;&gt;&gt; error saying "NAMEWITHLEADINGUS is not a component of data object <br>&gt; &gt;&gt;&gt; TRADER_BOR_OBJ".<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Is it not possible to accomplish what I am trying to do here?  I can<br>&gt; <br>&gt; &gt;&gt;&gt; always have the trader attribute on my class simply store the userid<br>&gt; <br>&gt; &gt;&gt;&gt; of the trader and then instantiate a separate USR01 BOR Object in my<br>&gt; <br>&gt; &gt;&gt;&gt; workflow container to host all the trader details; however, my first<br>&gt; <br>&gt; &gt;&gt;&gt; idea seems like better design.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Thanks,<br>&gt; &gt;&gt;&gt; Seth<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;         &lt;&lt;<br>&gt; &gt;&gt;&gt;                 ATT1922862.txt  (0.2KB)<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;                 (0.2KB)<br>&gt; &gt;&gt;&gt;          &gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; _______________________________________________<br>&gt; &gt;&gt;&gt; SAP-WUG mailing list<br>&gt; &gt;&gt;&gt; SAP-WUG@mit.edu<br>&gt; &gt;&gt;&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; SAP-WUG mailing list<br>&gt; &gt;&gt; SAP-WUG@mit.edu<br>&gt; &gt;&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; SAP-WUG mailing list<br>&gt; &gt;&gt; SAP-WUG@mit.edu<br>&gt; &gt;&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br>&gt; &gt;&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; SAP-WUG mailing list<br>&gt; &gt; SAP-WUG@mit.edu<br>&gt; &gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; SAP-WUG mailing list<br>&gt; &gt; SAP-WUG@mit.edu<br>&gt; &gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br>&gt; &gt;<br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; SAP-WUG mailing list<br>&gt; SAP-WUG@mit.edu<br>&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br>&gt; <br>&gt; _______________________________________________<br>&gt; SAP-WUG mailing list<br>&gt; SAP-WUG@mit.edu<br>&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br>&gt; <br>&gt; _______________________________________________<br>&gt; SAP-WUG mailing list<br>&gt; SAP-WUG@mit.edu<br>&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<br><br /><hr />Get the next generation of Free Windows Live Services <a href='http://get.live.com' target='_new'>Click here!</a></body>
</html>