Container element as variable in functional method

Claus Lücking wug at lucking.dk
Tue Jul 1 08:13:43 EDT 2014


Thanks Mike,

Finally I got access to a 7.40 system and it works as you describe below.
But not for the task description, only for work item text. Task description
is SAP Script and it is stated in the book that functional methods will not
work there. I have tried but it's true - it is not working. Please correct
me, if you or anyone else know a workaround.

Anyway - it was the work item text which was most important.

For future reference, I have tried in three different systems and it is
working in all of them - the value of the referenced container element is
passed to the method:

BASIS 701 SP 6
BASIS 731 SP 7
BASIS 740 SP 4

In all the systems I get an error when I run a check for the standard task,
but I can save anyway and it is working:

Variable &_WI_OBJECT_ID.GET_TEXT_VARIABLE& exists in the work item text, but
not in the container

Probably the error which stopped me in the beginning - I cannot find a any
sap notes for this - but I can live with that ;-)

Also your description about calling static class is working well - thanks.

Br,

Claus.

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of
Mike Pokraka
Sent: 7. juni 2014 00:22
To: SAP Workflow Users' Group
Subject: RE: Container element as variable in functional method

Hi,
With much respect, I must disagree with Jocelyn. This works perfectly well:
&THING.GET_STUFF( I_VAL=&BLAH& )&

I just tried a nested expression in a task description on 7.4 and it worked.
(Always test before disagreeing with Jocelyn - and that's meant in a good
way! :-)

I think it may have had issues in the early OO days, but certainly on 7.1 it
was OK. Well, in bindings at least. I must admit I never tried it in work
item texts - Claus, as you're on an older version, suggest you try your
expression in a binding into a task container element and use that in your
text just to see if that works. If yes, report the text issue.

Jeff - re. your comments about instantiation of a utility class, this is
also unnecessary. You just treat a static class as a system element, i.e.
using % instead of &, as in:
%zcl_calendar.get_next_date( i_weekday = 'MON' )% You don't even need
IF_WORKFLOW to use this form in a binding or expression.

This was already described back in the second edition of The Book.

Regards,
Mike

On Fri, June 6, 2014 11:28 am, Dart, Jocelyn wrote:
> Hi Claus,
> No functional methods aren't up to much, as they can only use static 
> input parameters in bindings.
> They're in my personal "to be quietly ignored" list.
> Rgds,
> Jocelyn
>
> From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On 
> Behalf Of Claus Lücking
> Sent: Friday, 6 June 2014 7:33 PM
> To: 'SAP Workflow Users' Group'
> Subject: Container element as variable in functional method
>
> Hi,
>
> Could someone please confirm that it is not possible to use a 
> container element as variable in a functional method used directly in 
> the work item text field in a standard task?
>
> E.g. this goes perfect: &_Wi_Object_ID.GET_WORKFLOW_TEXT(I_STEP= '340' 
> )&
>
> But then I would like to exchange the value '340' with the content of 
> a container element called Step and thus try this:
> &_Wi_Object_ID.GET_WORKFLOW_TEXT(I_STEP= &Step& )&
>
> But the method does not get any value for the import parameter even 
> the container element has a value.
>
> Thanks,
>
> Claus.
>
> Basis 731 SP7
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
>

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




More information about the SAP-WUG mailing list