SAP ABAP IMG Activity 0FTV_MOD_BADI_08 (BAdI: Verification of Personnel Number)
Hierarchy
EA-HRGXX (Software Component) Sub component EA-HRGXX of EA-HR
   FI-TV-COS (Application Component) Travel Expenses
     PTRA_ADDON (Package) Travel Management Add-On
IMG Activity
ID 0FTV_MOD_BADI_08 BAdI: Verification of Personnel Number  
Transaction Code S_ALN_01001352   (empty) 
Created on 20021127    
Customizing Attributes 0FTV_MOD_BADI_08   Business Add-In: Verification of Personnel Number 
Customizing Activity SIMG_OFTP_PR_003_14   Business Add-In: Verification of Personnel Number 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name FITV_PERSNO_AUTH_CHK    

Use

Implementing this Business Add-In enables you to add an additional authorization check for the personnel number.

This is particularly useful when you want to use the authorization checks of HR.

Requirements

Standard settings

Activities

Implement the method CHECK_AUTHORITY of the Business Add-In FITV_PERSNO_AUTH_CHK.

Within the method, you can distinguish between Process Before Output, Process After Input, and SAP EP user interface by reading the parameter I_PBO_PAI. The possible values for this parameter are PBO, PAI, and EPO. You can return a value to the calling program by using the export parameter E_RCODE. If the value is not equal to zero, no personnel number data is displayed.

If you pass the value EPO for parameter I_PBO_PAI, the BAdI is used for the SAP EP user interface. In this case, you may not issue messages (nor use any other dialogs). If the return value is not equal to zero, the error message 56(090) "No authorization for personnel number &" is displayed on the SAP EP interface.

Example

The implementation of the method CHECK_AUTHORITY could look like this, for example:

METHOD if_ex_fitv_persno_auth_chk~check_authority .

check i_persno <> ''.

e_rcode = 0.

CALL FUNCTION 'HR_CHECK_AUTHORITY_PERNR'

EXPORTING

pernr = i_persno

EXCEPTIONS

no_authorization_for_pernr = 1

OTHERS = 2.

IF sy-subrc <> 0.

e_rcode = 4.

IF i_pbo_pai = 'PBO'.

    MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ELSE.

    MESSAGE ID sy-msgid TYPE 'E' NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF

ENDIF.

ENDMETHOD.

Business Attributes
ASAP Roadmap ID 203   Establish Master Data 
Mandatory / Optional 3   Nonrequired activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20050726 
SAP Release Created in 200