Error using anonymous block using refcursor in BIP data model
I am trying to implement below code to get table name which is generated dynamically.
DECLARE
TYPE REFCURSOR IS REF CURSOR;
XDO_CURSOR REFCURSOR;
BEGIN
OPEN :XDO_CURSOR FOR
SELECT FA_WHATIF_DEPRN_PKG.GET_WHATIF_TABLE_NAME(P_REQUEST_ID => :P_REQ_ID)
FROM DUAL;
COMMIT;
END;
this code works independently and provides output but when i use XDO_CURSOR in from clasue of another data set with DM it shows following error:
SELECT T.REQUEST_ID
FROM &L_FA_WHATIF_REP_T T
oracle.xdo.servlet.data.DataException: oracle.xdo.servlet.data.DataException: oracle.xdo.servlet.data.DataException: oracle.xdo.XDOException: java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name