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