Professional Documents
Culture Documents
In this case, you have to create a Z-Table (For e.g. zmmt_plantprofit) for maintaining combination of Plant and Profit center and then validate based on this table.
TABLES : zmmt_plantprofit. IF wmarc-prctr IS NOT INITIAL. SELECT SINGLE * FROM zmmt_plantprofit WHERE werks = wmarc-werks AND prctr = wmarc-prctr. IF sy-subrc <> 0. MESSAGE e004(zm01). "WITH 'Please Enter Correct Profit Center '. ENDIF. ENDIF.