Parked Document Workflow Configuration

Susan R. Keohan skeohan at MIT.EDU
Mon Sep 16 19:54:18 EDT 2002


Hi Abby,
 
First off, you need to code a check function module which will look at the
document type, and if it is not KG or KR will end with exception.  If the
document contains these document types, it should not end in exception and
the workflow will get started.
This Check Function Module would be specified in the event linkage table
(TX SWETYPV) for your object.
At least I could answer part 1 of your question.  See the code below for a
very very simple example of a check function module that only wants to
trigger workflow if the FIPP document type is 'SI'
 
At least I could answer part one of your question...
 
 
function zfipp_wf_selector_si.
*"----------------------------------------------------------------------
* This function module has been made MES-compliant at level 4 - 3/27/01
*"*"Local interface:
*"       IMPORTING
*"             VALUE(EVENT) LIKE  SWETYPECOU-EVENT
*"             VALUE(RECTYPE) LIKE  SWETYPECOU-RECTYPE
*"             VALUE(OBJTYPE) LIKE  SWETYPECOU-OBJTYPE
*"             VALUE(OBJKEY) LIKE  SWEINSTCOU-OBJKEY
*"       TABLES
*"              EVENT_CONTAINER STRUCTURE  SWCONT
*"       EXCEPTIONS
*"              CONTAINER_ERROR
*"              NO_WORKFLOW
*"----------------------------------------------------------------------
   include <cntain>.
   include rsweincl.
   include rswtgdat.
 
   data: doc_type like vbkpf-blart.
   data: co_code like vbkpf-bukrs.
 
 
       swc_get_element wi_container 'DOCUMENTTYPE' doc_type.
       swc_get_element wi_container 'SourceCompanyCode' co_code.
       if sy-subrc eq 0.                " doc.type found in container
         perform check_bukrs using co_code.
         case doc_type.
           when 'SI'.
               exit.           "doc.type in container;   SI
           when others.
               raise no_workflow. "doc.type in container; not SI
         endcase.
        endif.           "work-item found
 
endfunction.
 
At 12:25 PM 9/16/2002 -0400, you wrote:
>Hi all -
>
>I have a problem and was hoping for some advice - our client wants to use
>the standard workflow for parked document approval for two types of parked
>documents - vendor invoices & vendor credit memos.  However, once that
>workflow is configured and activated, it's being triggered for ALL parked
>documents, although it just errors for all other types of parked documents.
>However, once the workflow has been started, it doesn't look like the
>standard posting transaction FBV0 - will allow you to post the document,
>whether or not the workflow has worked.
>
>I'm not certain how to get around this problem so that the workflow only
>triggers for the document types KG & KR so that we can use FBV0 for all
>other document types.  Any suggestions?  Thanks!
>Abby  :)
>_________________________________________________________________
>The information transmitted is intended only for the person or entity to
>which it is addressed and may contain confidential and/or privileged
>material.  Any review, retransmission, dissemination or other use of, or
>taking of any action in reliance upon, this information by persons or
>entities other than the intended recipient is prohibited.   If you received
>this in error, please contact the sender and delete the material from any
>computer.
 
Susan R. Keohan
SAP Workflow Developer
MIT Lincoln Laboratory
244 Wood Street
B240
Lexington, MA. 02142
(781)981-3561
skeohan at mit.edu
 


More information about the SAP-WUG mailing list