Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

logic needed

Former Member
0 Likes
386

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
366

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

1 REPLY 1
Read only

Former Member
0 Likes
367

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