Executing a BDC via a Task

Nat 4 Govender ngovender4 at toyota.co.za
Tue Sep 23 01:20:16 EDT 2003


Hi all,
 
Sorry I that should have read I have tested the method via the object.
We have also change the mode from "N" to "A" and this works via the
workflow.
 
WF-BATCH as SAP ALL and SAP NEW so from authorization point that should not
be a problem.
 
 
 
 
This is the part of the code for this method
SET PARAMETER ID 'CH1' FIELD OBJECT-KEY-DocumentNumber.
SET PARAMETER ID 'CH2' FIELD OBJECT-KEY-DocumentType.
SET PARAMETER ID 'CH3' FIELD OBJECT-KEY-DocumentVersion.
SET PARAMETER ID 'CH4' FIELD OBJECT-KEY-DocumentPart.
 
CLEAR bdcdata. REFRESH bdcdata.
 PERFORM bdc_dynpro   TABLES bdcdata
                      USING 'SAPLCV110' '0100'.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'BDC_OKCODE' '/00'.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'DRAW-DOKNR' Object-key-DocumentNumber.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'DRAW-DOKAR' Object-key-DocumentType.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'DRAW-DOKTL' Object-key-DocumentPart.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'DRAW-DOKVR' Object-key-DocumentVersion.
 PERFORM bdc_dynpro   TABLES bdcdata
                      USING 'SAPLCV110' '0101'.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'BDC_OKCODE' '=TSCLASS'.
 PERFORM bdc_dynpro   TABLES bdcdata
                    USING 'SAPLCV110' '0101'.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'BDC_OKCODE' '=SAVE'.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'RCTMS-MWERT(13)' SupD_E.
 PERFORM bdc_field    TABLES bdcdata
                      USING 'RCTMS-MWERT(14)' SchD_E.
 
CALL TRANSACTION 'CV02N' USING bdcdata
                         Mode    'N'
                         UPDATE  'S '.
 
 
Regards
Nat Govender
Toyota South Africa
SAP Support  - SAP Workflow
Ext.: 32645
Direct Line : 031 - 910 2645
E-Mail : ngovender4 at toyota.co.za
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
                               DISCLAIMER
This message is a privileged and private communication and may be read,
copied and used only by the intended recipient(s).  If you are not an
intended recipient, please let us know by return email/fax.  Please then
delete the message and do not disclose its contents to any person.  Neither
the sender nor Toyota South Africa Motors accepts any liability whatsoever
as a result of the further dissemination of this message.  Whilst all
reasonable steps are taken to avoid corruption of data or information, we
do not accept any liability should such corruption occur.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
 
 
 
                      "Soady, Phil"
                      <phil.soady at sap.com        To:       SAP-WUG at MITVMA.MIT.EDU
                      >                          cc:
                      Sent by: SAP               Subject:  Re: Executing a BDC via a Task
                      Workflow
                      <Owner-SAP-WUG at MITV
                      MA.MIT.EDU>
 
 
                      2003/09/23 06:05 AM
                      Please respond to
                      "SAP Workflow
                      Users' Group"
 
 
 
 
 
Remember that when it executes in the workflow,
a background async task is used with WF-BATCH as the user.
So not only are the auth settings of WF-BACTH of interest
but also the METHOD itself.  Your custom method I assume is makes a
 "call transaction using"
note that the mode must be   mode = 'N'.
 
If all the above is correct, check SM58.
You may not have sufficient background tasks to spawn such new tasks.
 
 
You said you tested it in background via the Object.
How ? Im not aware of test in background option in SWo1 ?
regards
 
Phil Soady
Senior Consultant - Business Technologies
Professional Services
SAP Australia
Level 1, 168 Walker Street, North Sydney 2060, Australia.
M   +61 412 213 079
E   phil.soady at sap.com
 
 
-----Original Message-----
From: Michael Pokraka [mailto:workflow at quirky.me.uk]
Sent: Tuesday, September 23, 2003 1:43 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Executing a BDC via a Task
 
Good suggestion. Just to add: if that doesn't work either (i.e. no error)
then the fact that it runs under user WF-BATCH might have something to do
with it....
Cheers
Mike
 
On Mon, Sep 22, 2003 at 11:19:34AM -0400, Dywan, Abby wrote:
> Stick a breakpoint in the BDC, and turn the task into a dialog (just for
testing purposes).  When you run the task you can get into the background
code, turn the BDC into asynchronous mode, and see what your bug is.
>
> Hope that helps -
> Abby  :)
>
> Abby Dywan
>
> Clarkston Consulting
> adywan at clarkstonconsulting.com
> cell:  (404) 808-3974
>
>
> -----Original Message-----
>> From: Nat 4 Govender [mailto:ngovender4 at toyota.co.za]
> Sent: Monday, September 22, 2003 12:59 AM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Executing a BDC via a Task
> Importance: High
>
>
> Hi All,
>
> We are having a problem in executing a BDC via a task.
>
> When we test the BDC via the object, in background, is works fine however
> when performing the same method through the workflow it just hangs.
>
> Can anyone help
>
> Regards
> Nat Govender
> SAP Support
> SAP Workflow
> Ext.: 32645
> Direct Line : 031 - 910 2645
> E-Mail : ngovender4 at toyota.co.za
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- -
-
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - -
-
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - -
-
> - - - - - - - - - - - - - - - - - - - - - -
>                                DISCLAIMER
> This message is a privileged and private communication and may be read,
> copied and used only by the intended recipient(s).  If you are not an
> intended recipient, please let us know by return email/fax.  Please then
> delete the message and do not disclose its contents to any person.
Neither
> the sender nor Toyota South Africa Motors accepts any liability
whatsoever
> as a result of the further dissemination of this message.  Whilst all
> reasonable steps are taken to avoid corruption of data or information, we
> do not accept any liability should such corruption occur.
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - -
-
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - -
-
> - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - -
-
> - - - - - - - - - - - - - - - - - - - - - -
 


More information about the SAP-WUG mailing list