This is relatively simple, but it's best to keep it here for future use.
FORM check_if_customer_is_blocked USING a_cust_id TYPE kunnr. DATA : is_blocked TYPE cassd_x. SELECT SINGLE cassd INTO is_blocked FROM kna1 WHERE kunnr = a_cust_id. IF NOT is_blocked IS INITIAL. MESSAGE e888(sabapdocu) WITH 'Customer is blocked!'. ENDIF. SELECT SINGLE cassd INTO is_blocked FROM knvv WHERE kunnr = a_cust_id. IF NOT is_blocked IS INITIAL. MESSAGE e888(sabapdocu) WITH 'Customer is blocked!'. ENDIF. ENDFORM.
No comments :
Post a Comment