Hi Lars
Can you please help find what is wrong in this below script? I am not good at script hence struggling..
BEGIN
var_out= select "t1.BILL_VBELN","BILL_FKDAT","BILL_KVGR1_1","BILL_FIL_PROFORMA_INV","BILL_KUNRG","BILL_KTGRD_1","BILL_VKORG_VBRK","BILL_INCO1","BILL_INCO2","BILL_PRCTR","BILL_POSNR","ROUTE","t1.BILL_AUPOS","GET_DAYS","BILL_DATE_FY","BILL_DATE_FP","TO_DATE_EUDAT","TO_DATE_WADAT","DEL_DATE_CALC","TRAN_TIME","CA_BILL_REP_NETWR_COMP_CURR","CA_BILL_REP_WAVWR_COMP_CURR","NEW_DEL_DATE"
from "_SYS_BIC"."pk-sample.productmanagement/CV_REVENUE_RECOG_CUTOFF_PVP" t1
INNER JOIN
(select "BILL_VBELN","BILL_AUPOS", MAX("NEW_DEL_DATE") AS "NEW_DEL_DATE" from "_SYS_BIC"."pk-sample.productmanagement/CV_REVENUE_RECOG_CUTOFF_PVP"
group by "BILL_VBELN" , "BILL_AUPOS" ) t2
on t1.bill_vbeln = t2.bill_vbeln AND t1.bill_aupos = t2.bill_aupos;
END;
I am getting the internal error: invalid column name: t1.BILL_VBELN, I think this is because it cannot find this field t1. BILL)VBELN in the underlying table.
But If I don't put "t1" I do get the column ambiguity error. hence not sure what is going wrong...