Check Function Module for FIPP(CREATED)

Patrik van Odijk patrik.van.odijk at gbg.frontec.se
Tue Jan 30 06:56:00 EST 2001


Mike,
 
I hope I understand you correctly; you want to access the key to the created
FIPP object.
 
You have the key in the parameter OBJKEY that is passed to the function.
This field is only one long string with all key fields of the object. You
can choose either to create an object with the key ocr move the key field to
an own defined structure.
 
/Patrik
_____________________________
Patrik van Odijk
Frontec Affdrssystem Gvteborg
Phone: +46 -(0)31-7071293
Web: www.frontec.se
 
----- Original Message -----
From: "Mike Mathieson" <msmathieson at hotmail.com>
To: <SAP-WUG at MITVMA.MIT.EDU>
Sent: Monday, January 29, 2001 3:09 PM
Subject: Check Function Module for FIPP(CREATED)
 
 
>
>
> I want to create a check function module for FIPP(CREATED) so the workflow
> only starts if the invoice was created with reference to a purchase order.
> But the CREATED event does not have any parameters, so I'm not sure how to
> code it.  Do I need to add parameters to the CREATED event of a delegate
of
> FIPP or is there a way to get the key fields of a business object?  I have
> never created a check function module before so I am just guessing - here
> is
> what I have scratched together.
>
> FUNCTION z_fipp_check_event_po.
> *"----------------------------------------------------------------------
> *"*"Local interface:
> *"  IMPORTING
> *"     VALUE(OBJTYPE) LIKE  SWETYPECOU-OBJTYPE
> *"     VALUE(OBJKEY) LIKE  SWEINSTCOU-OBJKEY
> *"     VALUE(EVENT) LIKE  SWEINSTCOU-EVENT
> *"     VALUE(RECTYPE) LIKE  SWETYPECOU-RECTYPE
> *"  TABLES
> *"      EVENT_CONTAINER STRUCTURE  SWCONT
> *"  EXCEPTIONS
> *"      NON_PO_INVOICE
> *"      CONTAINER_ERROR
> *"----------------------------------------------------------------------
>
>   INCLUDE <cntain>.
>
> *  DATA: zfipp LIKE SWOTOBJID OCCURS 0 WITH HEADER LINE.
> *  SWC_GET_TABLE EVENT_CONTAINER '??????' zfipp.
> *  DESCRIBE TABLE zfipp LINES SY-TFILL.
> *  IF SY-TFILL EQ 0.
> *    RAISE container_error.
> *  ENDIF.
>
>   swc_get_element event_container 'SourceCompanyCode' hold_bukrs.
>   swc_get_element event_container 'DocumentNo'        hold_belnr.
>   swc_get_element event_container 'FiscalYear'        hold_gjahr.
>
>   SELECT ebeln UP TO 1 ROWS
>     FROM vbsegs
>     INTO vbsegs-ebeln
>    WHERE ausbk = hold_bukrs
>      AND belnr = hold_belnr
>      AND gjahr = hold_gjahr
>      AND ebeln NE space.
>   ENDSELECT.
>
>   IF vbsegs-ebeln IS INITIAL.
>     RAISE non_po_invoice.
>   ENDIF.
>
> ENDFUNCTION.
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
 


More information about the SAP-WUG mailing list