PROCEDURE getTopElement :
DEFINE OUTPUT PARAMETER cElementname AS CHARACTER NO-UNDO. DEFINE VARIABLE fld AS HANDLE NO-UNDO. DEFINE VARIABLE bh AS HANDLE NO-UNDO. mhStack = DYNAMIC-FUNCTION("getStackHandle"). IF VALID-HANDLE(mhStack) THEN DO: bh = mhStack:DEFAULT-BUFFER-HANDLE. bh:FIND-LAST( ) NO-ERROR. fld = bh:BUFFER-FIELD("cQName") NO-ERROR. cElementname = fld:BUFFER-VALUE NO-ERROR. END. END PROCEDURE. |