In PS 7.53 I am using the following code to insert a row into a table:
[code/]
If Not None(INV_ITEM_ID) Then
&BUSINESS_UNIT = BUSINESS_UNIT;
&PO_ID = PO_ID;
&LINE_NBR = LINE_NBR;
&INV_ITEM_ID = INV_ITEM_ID;
SQLExec("Insert into PS_PO_LINE_ITM_REV(BUSINESS_UNIT, PO_ID, PO_LINE_NBR, INV_ITEM_ID, REVISION) SELECT &BUSINESS_UNIT, &PO_ID, &LINE_NBR, &INV_ITEM_ID, A.REVISION FROM PS_EN_REVISION A WHERE A.INV_ITEM_ID = :1 AND C.DATE_IN_EFFECT <= :2 AND C.DATE_OBSOLETE => :2", INV_ITEM_ID, PO_LINE_SHIP.DUE_DT);
End-If
[/code]
When executed the error message reads "Field does not exist -- PO_LINE_SHIP.DUE_DT. (2,104)"
When the syntax check is run on this code there is no error so I know the record and field name are correct. I think maybe I just need the syntax to refer to this record and field that are on another panel within the panel group for the same PO LINE_NBR that is currently in the buffer.
Thanks for any help,
J9
[code/]
If Not None(INV_ITEM_ID) Then
&BUSINESS_UNIT = BUSINESS_UNIT;
&PO_ID = PO_ID;
&LINE_NBR = LINE_NBR;
&INV_ITEM_ID = INV_ITEM_ID;
SQLExec("Insert into PS_PO_LINE_ITM_REV(BUSINESS_UNIT, PO_ID, PO_LINE_NBR, INV_ITEM_ID, REVISION) SELECT &BUSINESS_UNIT, &PO_ID, &LINE_NBR, &INV_ITEM_ID, A.REVISION FROM PS_EN_REVISION A WHERE A.INV_ITEM_ID = :1 AND C.DATE_IN_EFFECT <= :2 AND C.DATE_OBSOLETE => :2", INV_ITEM_ID, PO_LINE_SHIP.DUE_DT);
End-If
[/code]
When executed the error message reads "Field does not exist -- PO_LINE_SHIP.DUE_DT. (2,104)"
When the syntax check is run on this code there is no error so I know the record and field name are correct. I think maybe I just need the syntax to refer to this record and field that are on another panel within the panel group for the same PO LINE_NBR that is currently in the buffer.
Thanks for any help,
J9