on 2023 Sep 04 2:55 PM
Dear All,I need a query to block my sales order, ar invoice and delivery in SAP Business One version for HANA without selecting cost centres in the system.
Hope to get your response.
Request clarification before answering.
Hi,
This is for Sales Order, you can modify and apply to other documents
IF :object_type = '17' and (:transaction_type = 'A' or :transaction_type ='U')
THEN
BEGIN
IF EXISTS (
select T0."DocEntry" from ORDR T0 inner join RDR1 T1 on T0."DocEntry"=T1."DocEntry"
where T0."DocEntry" = :list_of_cols_val_tab_del
and ifnull(T1."OcrCode",'')=''
)
THEN
BEGIN
error := 1701;
error_message := 'Cost center cannot be null.';
END;
END IF;
END;
END IF;
Hope this helps,
Son Tran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 22 | |
| 12 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.