Background method error Access 'C' is not valid for verb type 'A'

Dart, Jocelyn jocelyn.dart at sap.com
Mon Nov 4 23:24:45 EST 2002


Hi David,
Definitely always use the macros for container changes -
even if it seems the same now you never know what's going to
change when you upgrade and there have been some fairly dramatic
changes in container storage in the latest releases.
 
For your current problem - check the spelling of your output
parameter "Positions" including case (yes I know it shouldn't be
case-sensitive but even so...) and that it is marked as an
export parameter for your method and that it has data definition
WF_syst-act_agent as per your variable.
 
Also check your method is synchronous of course.
 
 
Regards,
        Jocelyn Dart
Consultant (SRM, EBP, Workflow)
and co-author of the book
"Practical Workflow for SAP"
SAP Australia
email: jocelyn.dart at sap.com
phone: +61 412 390 267
fax:   +61 2 9935 4880
 
 
 
 
 
-----Original Message-----
From: David Weston [mailto:weston at clockwork.ca]
Sent: Tuesday, 5 November 2002 2:04 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Background method error Access 'C' is not valid for verb
type 'A'
 
 
Thanks Jocelyn, afraid there's nothing wrong with that...seems to be a
problem
with the swc_set_element on the 'Positions' element.
I commented this swc-set out and the task completed OK.....I'm looking at
that now.
Any other ideas ? I did try what you suggested just to make sure but the
method still
errors.
 
Thanks again.
 
Dave
 
 
----- Original Message -----
From: "Dart, Jocelyn" <jocelyn.dart at sap.com>
To: <SAP-WUG at MITVMA.MIT.EDU>
Sent: Monday, November 04, 2002 9:14 PM
Subject: Re: Background method error Access 'C' is not valid for verb type
'A'
 
 
> Hi David,
> Use the macros to fill the role container.
> Do not attempt to fill the role container manually.
>
> Instead of
> refresh container1.
> container1-element = 'COMPANYCODE'.
> container1-tab_index = '000000'.
> container1-elemlength = '004'.
> container1-type = 'C'.
> container1-value = bukrs.
>
> You should be using something like
>
> swc_refresh container1.
> swc_set_element container1 'COMPANYCODE' bukrs.
>
> All in the book of course - example code for calling rules and all.
>
> Regards,
>         Jocelyn Dart
> Consultant (SRM, EBP, Workflow)
> and co-author of the book
> "Practical Workflow for SAP"
> SAP Australia
> email: jocelyn.dart at sap.com
> phone: +61 412 390 267
> fax:   +61 2 9935 4880
>
>
>
>
> -----Original Message-----
>> From: David Weston [mailto:weston at clockwork.ca]
> Sent: Tuesday, 5 November 2002 12:32 PM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Background method error Access 'C' is not valid for verb type
> 'A'
>
>
> Hi folks
>
> I have created a synchronous method to run as a background task in a
workflow to
> retrieve the result (position) of a workflow role resolution based on
responsibilities and
> am getting the following error:
>
> Access 'C' is not valid for verb type 'A'.
>
> If i use the restart workflow function in SWI2_DIAG the method completes
correctly.
> I have one import parameter for company code based on LFB1-BUKRS and an
export parameter that
> returns the position based on WFSYST-ACT_AGENT.
>
> The method code looks as follows:
>
> BEGIN_METHOD FINDMAILUSERSFORCC CHANGING CONTAINER.
> data: bukrs type lfb1-bukrs.
> data: actors like swhactor occurs 0 with header line.
> data: positions like wfsyst-act_agent.
> data: container1 like swcont occurs 0 with header line.
> data: ad_appl type flag.
> data: i77aw like t77aw occurs 0 with header line.
> data: wegid type wegid.
> data: results like swhactor occurs 0 with header line.
> data: begin of actor_test occurs 0.
>         include structure swhactor.
> data: short like objec-short,
>       stext like objec-stext,
>       end of actor_test.
> data: user_tab like actor_test occurs 0 with header line.
>
> SWC_GET_ELEMENT CONTAINER 'CompanyCode' bukrs.
>
> refresh container1.
> container1-element = 'COMPANYCODE'.
> container1-tab_index = '000000'.
> container1-elemlength = '004'.
> container1-type = 'C'.
> container1-value = bukrs.
>
> call function 'RH_GET_ACTORS'
>      EXPORTING
>           act_object      = 'AC98000012'
>           search_date     = sy-datum
>      TABLES
>           actor_container = container1
>           actor_tab       = actors
>      EXCEPTIONS
>           others          = 0.
>
> sort actors by otype objid.
> delete adjacent duplicates from actors comparing otype objid.
> read table actors index 1.
> positions = actors.
> swc_set_element CONTAINER 'Positions' positions.
>
> END_METHOD.
>
> Has anyone experienced anything like this before ? If so I'd appreciate
> any feedback
>
> Cheers
> Dave
>
>
>
 


More information about the SAP-WUG mailing list