SAP ABAP IMG Activity SIMG_OIJ_TSW_007 (Business Add-In for nomination status checks)
Hierarchy
IS-OIL (Software Component) IS-OIL
   IS-OIL-DS-TSW (Application Component) Trader's and Scheduler's Workbench
     OIJ (Package) TSW Traders and Schedulers Workbench
IMG Activity
ID SIMG_OIJ_TSW_007 Business Add-In for nomination status checks  
Transaction Code S_SO7_65001222   (empty) 
Created on 20020709    
Customizing Attributes SIMG_OIJ_TSW_007   Business Add-In for nomination status checks 
Customizing Activity SIMG_OIJ_TSW_007   Business Add-In for nomination status checks 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name SIMG_OIJ_TSW_007    

Here you can implement a Business Add-In (BAdI) for enhancing status prerequisite checks.

When you define Status Profiles and Dependencies, you have the choice to define prerequisite status codes for a process using simple boolean expressions, or a more complex logic by implementing a filter-dependent BAdI. You can then refer to the BAdI that you implement here, instead of a boolean expression for active/inactive status codes.

You can implement status code checks that are dependent on the nomination data itself.

Example

If Contract partner equals 'X', check status code 'ZAP1' (approved my manager 1)
If Contract partner equals 'Y', do not check an approval status
otherwise check status 'ZAP2' (approved by manager 2)

method IF_EX_OIJ_NOM_STPREREQ~PREREQUISITE_CHECK.

DATA: ls_nom_item TYPE roijnomiio.

LOOP AT it_nom_item INTO ls_nom_item.
CHECK: ( ls_nom_item-docind EQ 'S' OR
ls_nom_item-docind EQ 'G' ) AND
NOT ls_nom_item-conpat IS INITIAL.
CASE ls_nom_item-conpat.
WHEN 'X'.
CALL FUNCTION 'OIJ_NOMST_CHECK_STATUS'
EXPORTING
iv_status = 'ZAP1'
iv_nomtk = is_nom_header-nomtk
IV_NOMIT = ls_nom_item-nomit
EXCEPTIONS
STATUS_NOT_SET = 1
STATUS_NOT_ACTIVE = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ev_check_fullfilled = lc_true.
ENDIF.
WHEN 'Y'. ev_check_fullfilled = lc_true.
WHEN others.
CALL FUNCTION 'OIJ_NOMST_CHECK_STATUS'
EXPORTING
iv_status = 'ZAP2'
iv_nomtk = is_nom_header-nomtk
IV_NOMIT = ls_nom_item-nomit
EXCEPTIONS
STATUS_NOT_SET = 1
STATUS_NOT_ACTIVE = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ev_check_fullfilled = lc_true.
ENDIF.
ENDCASE.

endmethod.

Requirements

Standard settings

Recommendation

Activities

Further notes

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG SIMG_OIJ_TSW_007 0 I400022114 Trader's and Scheduler's Workbench 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20021031 
SAP Release Created in 46C