/********* Begin Procedure Script ************/
VENNAMEFUZZ DECIMAL;
BEGIN
VENNAMEFUZZ = 0.8;
------ SELECTION PRO -----------------------------------
LT_1 =
SELECT DISTINCT
"AK"."LIFNR" AS VENDORNUMB,
"EC"."NAME1" AS VENDORNAME
FROM
"BSAK" AS "AK"
LEFT OUTER JOIN
"BSEC" AS "EC"
ON
"AK"."BUKRS" = "EC"."BUKRS" AND
"AK"."BELNR" = "EC"."BELNR" AND
"AK"."GJAHR" = "EC"."GJAHR" AND
"AK"."BUZEI" = "EC"."BUZEI"
WHERE
"AK"."MANDT" = SESSION_CONTEXT('CLIENT') AND
"AK"."LIFNR" LIKE '0011%' AND
"AK"."BSCHL" IN ('31', '32', '34' , '21', '22' , '24' ) AND
"AK"."BUKRS" = 'RO01' AND
"AK"."BLDAT" >= '20160801'
AND "AK"."BLDAT" <= '20160808';
LT_5=
SELECT DISTINCT
"IT"."VENDORNUMB" AS VENDORNUMB,
"IT"."VENDORNAME" AS VENDORNAME
FROM
:LT_1 AS "IT";
IT_1 =
SELECT DISTINCT
"AK"."LIFNR" AS VENDORNUMB,
"EC"."NAME1" AS VENDORNAME
FROM
"BSAK" AS "AK"
LEFT OUTER JOIN
"BSEC" AS "EC"
ON
"AK"."BUKRS" = "EC"."BUKRS" AND
"AK"."BELNR" = "EC"."BELNR" AND
"AK"."GJAHR" = "EC"."GJAHR" AND
"AK"."BUZEI" = "EC"."BUZEI"
WHERE
"AK"."MANDT" = SESSION_CONTEXT('CLIENT') AND
"AK"."LIFNR" LIKE '0011%' AND
"AK"."BSCHL" IN ('31', '32', '34' , '21', '22' , '24' ) AND
"AK"."BUKRS" = 'RO01';
----SETTING CURSOR
BEGIN
DECLARE CURSOR c_WS FOR SELECT * FROM :LT_5;
FOR WS_row AS c_WS() DO
VAR_OUT=
SELECT * FROM :VAR_OUT
UNION ALL(
SELECT
WS_ROW.VENDORNUMB,
VENDORNAME
FROM
:IT_1
WHERE
CONTAINS(VENDORNAME,WS_ROW.VENDORNAME , FUZZY(:VENNAMEFUZZ)));
END FOR;
END ;
Please help as I am facing the same error in above code.