‎2008 Feb 07 3:42 AM
I wish to put a control check as user enter the cost center it should validate that the cost center should be in the same plant.
it shold also give a msg if its blocked.
so i 'm using this :
select single GSBER into GSBER from t134g
where werks = zmm_isslip-werks.
*GSBER "business area
if sy-subrc = 0.
select single * from csks
where GSBER = GSBER and kostl = zmm_isslip-kostl.
if csks-bkzkp = 'X' and csks-pkzkp = 'X' .
message 'Cost Center Blocked ' type 'E'.
endif.
endif.
Thanks in advance.
‎2008 Feb 07 3:58 AM
While GSBER "business area u r using select single, but select single should contain all primary key in where condition in this u r missing SPART, so try to use WERKS and SPART in where condition in first select.
Try and let me know
Madhavi
‎2008 Feb 07 3:58 AM
While GSBER "business area u r using select single, but select single should contain all primary key in where condition in this u r missing SPART, so try to use WERKS and SPART in where condition in first select.
Try and let me know
Madhavi