Mahmad rafi shaik
New Member
i have tried this
DO ON ERROR UNDO , THROW:
FOR EACH ttFileData NO-LOCK:
CREATE ttCustomerDetails.
ASSIGN
ttCustomerDetails.ttcustmId = INTEGER (ENTRY(2 , ttFileData.ttLine))
ttCustomerDetails.ttfirstName = ENTRY(3 , ttFileData.ttLine)
ttCustomerDetails.ttgender = ENTRY(6 , ttFileData.ttLine)
ttCustomerDetails.ttsalary = DECIMAL (ENTRY( 13 , ttFileData.ttLine))
ttCustomerDetails.ttcountry = ENTRY(5 , ttFileData.ttLine)
ttCustomerDetails.ttage = INTEGER ( ENTRY (7 , ttFileData.ttLine))
ttCustomerDetails.ttTenure = INTEGER (ENTRY (8 , ttFileData.ttLine))
ttCustomerDetails.ttDOB = obj1custmomerDetail:calculateDOB(INPUT ttCustomerDetails.ttcustmId ,
INPUT TABLE ttCustomerDetails)
ttCustomerDetails.ttemail = obj1custmomerDetail:createEMAIL(INPUT ttCustomerDetails.ttcustmId ,
INPUT TABLE ttCustomerDetails).
CATCH e AS Progress.Lang.Error:
MESSAGE "error:" e:GetMessage(1)
VIEW-AS ALERT-BOX.
FIND NEXT ttFileData.
END CATCH.
END.
But I'm getting this error
FIND cannot be processed for a FOR EACH mode record.
I'm a fresher so if it is small problem also i feel difficult so someone help me
DO ON ERROR UNDO , THROW:
FOR EACH ttFileData NO-LOCK:
CREATE ttCustomerDetails.
ASSIGN
ttCustomerDetails.ttcustmId = INTEGER (ENTRY(2 , ttFileData.ttLine))
ttCustomerDetails.ttfirstName = ENTRY(3 , ttFileData.ttLine)
ttCustomerDetails.ttgender = ENTRY(6 , ttFileData.ttLine)
ttCustomerDetails.ttsalary = DECIMAL (ENTRY( 13 , ttFileData.ttLine))
ttCustomerDetails.ttcountry = ENTRY(5 , ttFileData.ttLine)
ttCustomerDetails.ttage = INTEGER ( ENTRY (7 , ttFileData.ttLine))
ttCustomerDetails.ttTenure = INTEGER (ENTRY (8 , ttFileData.ttLine))
ttCustomerDetails.ttDOB = obj1custmomerDetail:calculateDOB(INPUT ttCustomerDetails.ttcustmId ,
INPUT TABLE ttCustomerDetails)
ttCustomerDetails.ttemail = obj1custmomerDetail:createEMAIL(INPUT ttCustomerDetails.ttcustmId ,
INPUT TABLE ttCustomerDetails).
CATCH e AS Progress.Lang.Error:
MESSAGE "error:" e:GetMessage(1)
VIEW-AS ALERT-BOX.
FIND NEXT ttFileData.
END CATCH.
END.
But I'm getting this error
FIND cannot be processed for a FOR EACH mode record.
I'm a fresher so if it is small problem also i feel difficult so someone help me