SAP ABAP IMG Activity W_CS_BADI_011 (BAdI: Checks for Plant Assignment)
Hierarchy
SAP_APPL (Software Component) Logistics and Accounting
   SD-MD-MM-CS (Application Component) Additional Material Functions
     WSD_CS_CUST (Package) Customizing Enhanced Material Search
IMG Activity
ID W_CS_BADI_011 BAdI: Checks for Plant Assignment  
Transaction Code S_PR0_40000354   (empty) 
Created on 20070108    
Customizing Attributes W_CS_BADI   Enhancements Using Business Add-Ins 
Customizing Activity W_CS_BADI_011   BAdI: Checks for Plant Assignment 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name BADI_WSD_CBP_VALIDATION    

Use

You use this BAdI for the Close-by Plants function (transaction WSD_CBP) to determine whether a close-by plant relationship is valid or invalid. The BAdI is called before a close-by plant assignment is created.

This BAdI uses the interface IF_WSD_CBP_VALIDATION.

Requirements

Standard settings

In the standard system, there is no activated BAdI implementation.

Activities

For information about implementing BAdIs as part of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

Example

Assuming a user wants to disable the creation of a close-by plant relationship if the plant and the close-by plants are not in the same country, the implementation could look like this:

method IF_WSD_CBP_VALIDATION~IS_VALID_RELATION.

DATA: ls_plant_t001w TYPE T001W,

ls_close_by_t001w TYPE T001W.

SELECT SINGLE * FROM T001W INTO ls_plant_t001w WHERE werks = IS_CBP-plant.

SELECT SINGLE * FROM T001W INTO ls_close_by_t001w WHERE werks = IS_CBP-close_by.

IF ls_plant_t001w-land1 <> ls_close_by_t001w-land1.

r_is_valid = ' '.

ELSE.

r_is_valid = 'X'.

ENDIF.

endmethod.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 1   Mandatory 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  20070329 
SAP Release Created in 700