Naveen Sharma
New Member
Hi guys,
I am new to Progress forum and this is my first post.
I am trying to develop a small maintenance program where the input frame will contain 1 dept and each department will have 3 managers. User will be updating all the 4 fields.
I have written the following code :
where AML1 is 1 manager. The same code has to be repeated 3 times for 3 managers.
Since i dont want to repeat the same code I am trying to put the same in a internal procedure and pass AML1 as an input-output parameter which is not working . Can somebody help me out??
I am new to Progress forum and this is my first post.
I am trying to develop a small maintenance program where the input frame will contain 1 dept and each department will have 3 managers. User will be updating all the 4 fields.
I have written the following code :
Code:
UPDATE AML1 VALIDATE(INPUT AML1 <> "" AND CAN-FIND(employee WHERE employee.domain = global_domain
AND employee.Employeecode = INPUT AML1
AND employee.divdept = divdept), "Invalid Employee!Please Re-enter.") WITH FRAME f1
EDITING:
IF(FRAME-FIELD = "AML1") THEN
DO:
{mfnp.i employee AML1 "employee.domain = global_domain and employee.divdept = pdivdept.divdept and employee.Employeecode" AML1 employee.employeecode employee_idx1}
IF recno <> ? THEN DO:
DISPLAY employee.employeecode @ AML1
NAME @ L1name WITH FRAME f1.
END. /* if rec no <> ? */
END. /* end of if frame field = AML1 */
END. /* end of editing AML1 */
FIND FIRST employee WHERE employee.domain = GLOBAL_domain
AND employee.divdept = divdept
AND employee.employeecode = AML1 NO-LOCK NO-ERROR .
IF AVAILABLE employee THEN DO:
ASSIGN AML1 = employee.employeecode
L1name = employee.NAME .
DISPLAY employee.employeecode @ AML1
employee.NAME @ L1name WITH FRAME f1.
END.
where AML1 is 1 manager. The same code has to be repeated 3 times for 3 managers.
Since i dont want to repeat the same code I am trying to put the same in a internal procedure and pass AML1 as an input-output parameter which is not working . Can somebody help me out??
Last edited by a moderator: