phoenix_me
Member
I have a TEMP-TABLE 'Zmiany' which is an OUTPUT PARAMETER from procedure. I am using this TEMP-TABLE 'Zmiany' in QUERY. I am processing QUERY in DO WHILE NOT QUERY-OFF-END loop. But inside this loop I would like to search again through TEMP-TABLE 'Zmiany'.
After FIND FIRST I don't know if I will have access to 'Zmiany' from QUERY or from FIND FIRST statement?. And what will be a Liftime and Visibility of 'Zmiany' from FIND FIRST statement? I would like to have only access to 'Zmiany' from FIND FIRST statement inside "IF Zmiany.Pole = '15' THEN DO:" block.
I put (1), (2) and (3) in code. I know that in (1) I have available 'Zmiany' from QUERY but I am not sure from which place (QUERY of FIND FIRST statement) I will have available 'Zmiany' in (2) and (3)?
After FIND FIRST I don't know if I will have access to 'Zmiany' from QUERY or from FIND FIRST statement?. And what will be a Liftime and Visibility of 'Zmiany' from FIND FIRST statement? I would like to have only access to 'Zmiany' from FIND FIRST statement inside "IF Zmiany.Pole = '15' THEN DO:" block.
I put (1), (2) and (3) in code. I know that in (1) I have available 'Zmiany' from QUERY but I am not sure from which place (QUERY of FIND FIRST statement) I will have available 'Zmiany' in (2) and (3)?
Code:
RUN Procedure.p (OUTPUT TABLE Zmiany) NO-ERROR.
DEFINE QUERY Change FOR Zmiany, POHeader.
OPEN QUERY Change FOR
EACH Zmiany,
EACH POHeader WHERE POHeader.PONum = INTEGER(Zmiany.Klucz1)
NO-LOCK BY POHeader.PONum,
.
GET FIRST Change.
DO WHILE NOT QUERY-OFF-END('Change'):
Zmiany.Pole (1)
IF Zmiany.Pole = '15' THEN
DO:
FIND FIRST Zmiany WHERE...
Zmiany.Pole (2)
END.
Zmiany.Pole (3)
END.