on 11-15-2016 5:00 AM
Hi all,
Help Needed!
How to block selection of batch number already expired during delivery creation/Inventory Transfer/Goods Issue
SAP HANA /SQL below procedure not working...
--#Block if Batch Expired---------
IF :Object_type = '10000044' THEN
Declare temp_var_101 integer;
SELECT
(SELECT cOUNT (t0."AbsEntry" )
FROM OBTN T0
WHERE t0."AbsEntry" = :list_of_cols_val_tab_del
AND DAYS_BETWEEN(t0."ExpDate",CURRENT_DATE)>=0) INTO temp_var_101 FROM DUMMY;
IF :temp_var_101 > 0 THEN
SELECT 1, 'Selected Batch Expire' INTO ERROR, error_message FROM DUMMY;
END IF;
END IF;
Danish
Help needed on this,its not working,
--#Expired Batch Restriction
IF LTRIM(RTRIM(:object_type)) = '60' AND (:transaction_type='A') THEN
DECLARE item nvarchar(20);
DECLARE batch nvarchar(32);
DECLARE whs nvarchar(8);
DECLARE expDate timestamp;
SELECT OBTN."ItemCode", OBTN."DistNumber", OBTW."WhsCode", OBTN."ExpDate" INTO item, batch, whs, expDate FROM IGE1
INNER JOIN OBTW ON OBTW."WhsCode" = IGE1."WhsCode" AND IGE1."ItemCode" = OBTW."ItemCode" AND IGE1."DocEntry" = CAST(:list_of_cols_val_tab_del AS integer)
INNER JOIN OBTN ON OBTW."ItemCode" = OBTN."ItemCode" AND OBTW."WhsCode"=OBTN."DistNumber";
IF (LTRIM(RTRIM(:item)) <> '' AND LTRIM(RTRIM(:batch)) <> '' AND :expDate < CURRENT_DATE) THEN
SELECT -1 INTO error FROM DUMMY;
SELECT 'Error' || :batch || ' for item ' || :item || ' in Whs ' || :whs || ' has expired.choose a diffnt batch' INTO error_message FROM DUMMY;
END IF;
END IF;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is this query giving result after executing as a normal query. I guess, some issue regarding date function.
Regards
Pradnya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do you have Quality Management module, if QM is there then we can directly send the expired batch stock to blocked stock.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.