53
© 2006 Wellesley Information Services. All rights reserved. © 2006 Wellesley Information Services. All rights reserved. Beyond the Basics – Explore the Power of User Exits to Enhance Accounts Payable (A/P) Functionality Martin Ullmann Ariston Consulting & Technologies

Explore the Power of User Exits to Enhance Accounts Payable Functionality

Embed Size (px)

Citation preview

  • 2006 Wellesley Information Services. All rights reserved. 2006 Wellesley Information Services. All rights reserved.

    Beyond the Basics Explore the Power of User Exits to Enhance Accounts Payable (A/P) FunctionalityMartin UllmannAriston Consulting & Technologies

  • 2What Well Cover

    Understanding enhancements Implementing user exits, BTEs, and BAdIs Applying AP master data enhancements Understanding AP invoice entry enhancements Looking at AP payment program enhancements Wrap-up

  • 3Introduction

    SAP enhancements are powerful tools, but they are often under-utilized Reasons are:

    fDifferent enhancement types are confusingfDifficult to find enhancementsfNot sure how to implement an enhancement

    Learn the different SAP enhancements Learn how to implement enhancements Take home sample codes of various AP enhancements

  • 4What Well Cover

    Understanding enhancements Implementing user exits, BTEs, and BAdIs Applying AP master data enhancements Understanding AP invoice entry enhancements Looking at AP payment program enhancements Wrap-up

  • 5What Are Enhancements?

    Enhancements is a generic term for SAP functionality that allows you to expand the SAP standard functionality

    Enhancements are called in the SAP standard code and use function modules or classes

    MOVE VBAP TO IVBAP.

    CALL USER-EXIT.

    IF NOT EVBAP IS INTIALIVBAP = EVBAP.

    ENDIF.

    SAP standard code

    EVBAP = IVBAP.EVBAP-VKONT = 12345...

    Enhancement

  • 6What Are Enhancements? (cont.)

    Benefits of enhancements Enhancement of standard code without modifications Enhancements do not have to be re-implemented during

    upgrades or support packages Enhancements have to be re-tested during upgrades or

    support packages SAP constantly adds new enhancements

  • 7SAP Enhancement Type

    SAP delivers three different types of enhancements User exits

    fOldest type of enhancementsfUses function modulesfTwo types of user exits:

    Validations and substitutions within FI, CO, PS, and AM

    Customer enhancements Business Transactions Events (BTEs)

    fPublish and subscribe interfacesfProcess interfaces

    Business Add-Ins (BAdIs)fUses classes instead of function modules

  • 8What Are Enhancements?

    Enhancements are NOT modifications

    NOYESSupported by SAP

    YESNOChanges in the standard SAP code

    ModificationsEnhancements

  • 9How to Find Available SAP Enhancements

    Enhancements can be found in the IMG

    Click on documentation

  • 10

    How to Find Available SAP Enhancements (cont.)

    Go to the implementation transactions of the different enhancement types User exits

    fTransaction CMOD BTE:

    fTransaction FIBF BAdIs

    fTransaction SE18 Online Service Support: OSS

    Search for enhancements or user exit within the respective module

  • 11

    User Exits: Transaction CMOD

    Step 1: Go to Utilities SAP enhancements

    Step 2: Execute Repository Report

  • 12

    User Exits: Transaction CMOD (cont.)

    2051 user exits available: SAP Release 4.70

  • 13

    BTEs: Transaction FIBF

    Step 1: Go to Environment Info system

    Step 2: Execute Repository Report

  • 14

    BTEs: Transaction FIBF (cont.)

    About 500 BTEs available: SAP Release 4.70

  • 15

    BAdIs: Transaction SE18

    Step 1: Click on Value List

    Step 2: Click on SAP Applications

  • 16

    BAdIs: Transaction SE18 (cont.)

    About 2,000 BAdIs available: SAP Release 4.70

  • 17

    What Well Cover

    Understanding enhancements Implementing user exits, BTEs, and BAdIs Applying AP master data enhancements Understanding AP invoice entry enhancements Looking at AP payment program enhancements Wrap-up

  • 18

    Implementation of User Exits

    Use transaction CMOD to create a project Choose a project name within your naming

    convention standards Assign enhancement to your project Create the user exits within the function modules

    ABAP/4 knowledge necessary The user exit contains custom functionality

    Activate project

  • 19

    Implementation of User Exits: Transaction CMOD

    Step 1: Create a project Step 2: Assign

    enhancement

    Step 4: Activate project

    Step 3: Create the user exit.

    Double-click on enhancement and include

    program.

  • 20

    Implementation of BTEs

    Find SAP Sample function module Copy SAP Sample function module and create own

    function module ABAP/4 knowledge necessary Transaction SE37 The function module contains custom functionality

    Include new function module in the BTE function module list

  • 21

    Implementation of BTEs: Transaction FIBF

    Step 1a: Place cursor in the BTE

    you want to implement

    Step 1b: Click on Sample function

    module

    Step 2: Copy Sample function

    module

  • 22

    Implementation of BTEs: Transaction FIBF (cont.)

    Step 3a: Go to Settings Process Modules of an SAP application

    Step 3b: Insert your own function module

  • 23

    Implementation of BAdIs

    Create new BAdI implementation Use SAP BAdI definition The method contains custom functionality

    Activate the implementation

  • 24

    Implementation of BAdIs: Transaction SE19

    Step 1a: Enter name of new BAdI implementation

    Step 1b: Click Create

    Step 1c: Enter the name of the SAP BAdI

    definition

  • 25

    Implementation of BAdIs: Transaction SE19 (cont.)

    Step 1d: Double-click on the method to be

    implemented

    Step 1e: Write your own code

  • 26

    Implementation of BAdIs: Transaction SE19 (cont.)

    Step 2a: Activate Method

    Step 2b: Activate BAdIimplementation

  • 27

    Enhancement Dashboard

    Create a Control Dashboard for your enhancements Advantages:

    fCentral repository of implemented enhancementsfAllows you to centrally switch on/off enhancements fAudit trail of activated/deactivated enhancements

    See article: Create a Control Dashboard to Monitor Your Internal

    Controls (FI/CO Volume 4/Issue 6)

  • 28

    Enhancement Dos and Donts

    Dos: Your enhancement needs to be performance efficient

    fUse SELECT SINGLE statements if you need to select values from SAP tables

    Donts: Never execute a COMMIT statement in an enhancement

    Warning

  • 29

    What Well Cover

    Understanding enhancements Implementing user exits, BTEs, and BAdIs Applying AP master data enhancements Understanding AP invoice entry enhancements Looking at AP payment program enhancements Wrap-up

  • 30

    AP Master Data Enhancements

    Validation of vendor master data during data entry Enhancement:

    fSAPMF02K: User exit vendor master data Includes only new vendor master values

    BTEs: P&S Interfacef00001440: Vendor master data: Final checks

    Includes old and new vendor master values BAdI: VENDOR_ADD_DATA

    fMethod: CHECK_ALL_DATA Allows you to check data in user-defined screens

  • 31

    AP Master Data Enhancements (cont.)

    Substitution of vendor master data fields BAdI: VENDOR_ADD_DATA

    fMethod: PRESET_VALUES_CCODE (company code fields)fMethod: PRESET_VALUES_PORG (purchasing fields)

  • 32

    AP Master Data Enhancements (cont.)

    User-defined fields and screen BAdI: VENDOR_ADD_DATA_CS additional data for vendors

    fAllows you to create user-defined screens for vendor master data

    BAdI: VENDOR_ADD_DATAfMethod: SAVE_DATA saves user-defined fieldsfMethod: INITIALIZE_ADD_ON_DATAfMethod: READ_ADD_ON_DATA

  • 33

    What Well Cover

    Understanding enhancements Implementing user exits, BTEs, and BAdIs Applying AP master data enhancements Understanding AP invoice entry enhancements Looking at AP payment program enhancements Wrap-up

  • 34

    Enhancements During Manual Invoice Creation (FB60)

    FI-Validation: Transaction OB28 Callup Point 1: Document Header Callup Point 2: Document Line item

    FI-Validations can be used for all financial documents, including journal entries, AP invoices, AR invoices, or MM documents (goods issues or goods receipts)

    For parked documents (FV60), the validation is called if an invoice is Saved as Complete

  • 35

    Enhancements During Manual Invoice Creation (FB60) (cont.)

    Example: Invoice Date must be before Posting Date

  • 36

    Example: Invoice Date must be before Posting Date (cont.)

    Enhancements During Manual Invoice Creation (FB60) (cont.)

  • 37

    Enhancements During Manual Invoice Creation (FB60) (cont.)

    FI-Substitutions: Transaction OBBH Callup Point 1: Document Header Callup Point 2: Document Line item

    Not all fields are released for substitutions from SAP Header: Reference (XBLNR), Header text (BKTXT) Line item: Assignment (ZUONR), Text (SGTXT) If you want to include additional fields in substitutions,

    i.e., Payment Block (ZLSPR)fOSS Note: 42615 Substitution in FI

  • 38

    Enhancements During Manual Invoice Creation (MIRO)

    Validations within Logistic Invoice Verification: Document Header Validation

    fBAdI: MRM_HEADER_CHECK Method: HEADERDATA_CHECK

    fBAdI is executed at the document header level Complete Invoice Validation

    fBAdI: INVOICE_UPDATE Method: CHANGE_AT_SAVE

    fBAdI is executed when you post the document

  • 39

    Enhancements During Manual Invoice Creation (MIRO) (cont.)

    Example: Display a warning message, if you enter a credit memo

  • 40

    Enhancements During Manual Invoice Creation (MIRO) (cont.)

  • 41

    Enhancements During Manual Invoice Creation (MIRO) (cont.)

    Substitution with Logistic Invoice Verification BAdI: MRM_HEADER_DEFAULT

    fMethod: HEADER_DEFAULT_SETfBAdI allows you to default certain invoice fields, like

    document type, invoice date, or date of invoice receipt BTE: Substitution of complete FI document

    fProcess Interface: 00001120 fBTE is executed at the time you post an FI document

    The complete FI document (header and line item) is available

    Header Reference or Assignment field values can be changed

  • 42

    Enhancements During Manual Invoice Creation (MIRO) (cont.)

    Example: Move the Purchase Order number to the assignment field of the vendor line

  • 43

    Enhancements During Manual Invoice Creation (MIRO) (cont.)

    Invoice is entered against Purchase Order 4500000106

  • 44

    Enhancements During Manual Invoice Creation (MIRO) (cont.)

    Purchase order number is transferred to the

    Assignment field

  • 45

    Enhancements During Automatic Invoice Creation

    Evaluated Receipt Settlement Enhancement MRMH0001 consists of two function modules,

    which allows the change of different fieldsfEXIT_SAPLMRH_001

    Invoice data, like document date, posting date, reference number, payment term, can be changed

    fEXIT_SAPLMRH_002 Tax information like tax code and jurisdiction code

    can be changed

  • 46

    Enhancements During Automatic Invoice Creation (cont.)*----------------------------------------------------------------------** INCLUDE ZXM08U20 * *----------------------------------------------------------------------* DATA: T_ESSR LIKE ESSR, T_MKPF LIKE MKPF. LOOP AT T_SELWENR. MOVE-CORRESPONDING I_RBKPV TO E_RBKPV_ERS_CHANGE. * Requirement 1: Document is the ERS execution date E_RBKPV_ERS_CHANGE-BLDAT = SY-DATUM. * Requirement for Services: * Move the external number to the FI Document Reference number SELECT SINGLE * FROM ESSR INTO T_ESSR WHERE LBLNI = T_SELWENR-LFBNR. IF SY-SUBRC = 0. E_RBKPV_ERS_CHANGE-XBLNR = T_ESSR-LBLNE. ENDIF. * Requirement for Goods Receipts: * Move the Goods-Receipt reference to the FI Document Reference number SELECT SINGLE * FROM MKPF INTO T_MKPF WHERE MBLNR = T_SELWENR-LFBNR AND MJAHR = T_SELWENR-LFGJA. IF SY-SUBRC = 0. E_RBKPV_ERS_CHANGE-XBLNR = T_MKPF-XBLNR. ENDIF. ENDLOOP. E_CHANGE = 'X'.

  • 47

    What Well Cover

    Understanding enhancements Implementing user exits, BTEs, and BAdIs Applying AP master data enhancements Understanding AP invoice entry enhancements Looking at AP payment program enhancements Wrap-up

  • 48

    Enhancements During the Payment Proposal

    SAP delivers several BTEs for the AP payment program, transaction F110 BTE 00001820: Item Selection

    fAllows changing the payment method (ZLSCH) of invoicesfAllows blocking invoices for paymentfAllows exclusion of invoices in the proposal

    BTE 00001810: Bank SelectionfAllows determination of the house bank to be paid based

    on user-defined criteria

  • 49

    Enhancements During the Payment Proposal (cont.)

    BTE 00001820: Item Selection Example: Block all invoices over $1,000,000.00

  • 50

    What Well Cover

    Understanding enhancements Implementing user exits, BDT, and BAdIs Applying AP master data enhancements Understanding AP invoice entry enhancements Looking at AP payment program enhancements Wrap-up

  • 51

    Resources

    FI/CO Expert Create a Control Dashboard to Monitor Your Internal

    Controls, Taylor Erickson; (FI/CO Volume 4/Issue 6) User-Exits in FI/CO, Tami Becker; (FI/CO Volume 1/Issue 6)

  • 52

    7 Key Points to Take Home

    Enhancements are NOT modifications Test your enhancements after each support package

    and upgrade In order to implement SAP enhancements, you need

    both business and technical knowledge Use an enhancement dashboard to centrally

    maintain enhancements Use performance-efficient ABAP code Never execute a COMMIT statement in an

    enhancement Search in SAP OSS for sample codes and examples

  • 53

    Your Turn!

    How to contact me:Martin Ullmann

    [email protected]