Ansicht
Dokumentation
W_CS_BADI_011 - BAdI: Checks for Plant Assignment
rdisp/max_wprun_time - Maximum work process run time BAL_S_LOG - Application Log: Log header dataThis documentation is copyright by SAP AG.
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.
In the standard system, there is no activated BAdI implementation.
For information about the implementation of BAdIs in the context of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.
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.
CL_GUI_FRONTEND_SERVICES - Frontend Services ABAP Short Reference
This documentation is copyright by SAP AG.
Length: 2914 Date: 20240523 Time: 191031 sap01-206 ( 89 ms )