Progress_Learner
Member
Dear All,
Hope you all are doing well
Although it seems very simple question but I am still unable to understand this.
We are able to compile above code even if we are referencing customer buffer after FOR EACH block. Initially I thought that default buffer names/fields are available but when we use DO FOR TRANSACTION above it (please refer below code for this) then we are not even able to compile this so as per my understanding, some reference of customer buffer must be available after FOR EACH LOOP.
Please suggest what kind of reference is available after FOR EACH Block because record scope cannot be available here as another user (in multi-user environment) is able to update the record after for each block.
Please suggest.
Kind Regards,
Learner
Hope you all are doing well
Although it seems very simple question but I am still unable to understand this.
Code:
FOR EACH customer EXCLUSIVE-LOCK:
UPDATE customer.NAME.
END.
MESSAGE customer.NAME
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
We are able to compile above code even if we are referencing customer buffer after FOR EACH block. Initially I thought that default buffer names/fields are available but when we use DO FOR TRANSACTION above it (please refer below code for this) then we are not even able to compile this so as per my understanding, some reference of customer buffer must be available after FOR EACH LOOP.
Code:
DO FOR customer TRANSACTION:
FOR EACH customer EXCLUSIVE-LOCK:
UPDATE customer.NAME.
END.
END.
MESSAGE customer.NAME
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
Please suggest what kind of reference is available after FOR EACH Block because record scope cannot be available here as another user (in multi-user environment) is able to update the record after for each block.
Please suggest.
Kind Regards,
Learner