Saudações a todos.. Galera é o seguinte. Preciso criar uma UPC no programa CP0309 "Manutenção de requisição de materiais." só que apenas tem o evento de entrar e se salvar, eu precisava criar uma validação na hora de requisitar o material, so que não temos a opção desse evento. O que imaginei em fazer era pegar os dados da listview, ate acho o objeto da listview mas nao consigo saber qual comando que utilizo para pegar os dados da listview. Alguem ja fez algo parecido ?? Abaixo segue o codigo que estou utilizando. Um abraço a todos. Código: /**** definicao de parametros ****/ define input parameter p-ind-event as char no-undo. define input parameter p-ind-object as char no-undo. define input parameter p-wgh-object as handle no-undo. define input parameter p-wgh-frame as widget-handle no-undo. define input parameter p-cod-table as character no-undo. define input parameter p-row-table as rowid no-undo. def var c-objeto as char no-undo. define variable h_frame as widget-handle no-undo. define variable h_frame2 as widget-handle no-undo. define variable h_ctrl AS HANDLE no-undo. assign c-objeto = entry(num-entries(p-wgh-object:private-data, "~/"), p-wgh-object:private-data, "~/"). /* MESSAGE "p-ind-event " p-ind-event skip */ /* "p-ind-object" p-ind-object skip */ /* "p-wgh-object" string(p-wgh-object) skip */ /* "p-wgh-frame " string(p-wgh-frame) skip */ /* "p-cod-table " p-cod-table skip */ /* "p-row-table " string(p-row-table) skip */ /* "c-objeto" c-objeto VIEW-AS ALERT-BOX INFO BUTTONS OK. */ if p-ind-event = "AFTER-DISPLAY":U and p-ind-object = 'CONTAINER' then do: assign h_frame = p-wgh-frame:first-child. /*pegando o primeiro field-group*/ assign h_frame = h_frame:first-child. do while h_frame <> ?: CASE h_frame:NAME: WHEN 'fpage1' THEN DO: assign h_frame2 = h_frame:first-child. /*pegando o primeiro field-group*/ assign h_frame2 = h_frame2:first-child. do while h_frame2 <> ?: CASE h_frame2:NAME: WHEN 'CtrlFrame' THEN ASSIGN h_ctrl = h_frame2. END CASE. if h_frame2:type <> "field-group" then do: assign h_frame2 = h_frame2:next-sibling . end. else assign h_frame2 = h_frame2:first-child. END. END. END CASE. if h_frame:type <> "field-group" then do: assign h_frame = h_frame:next-sibling. end. else assign h_frame = h_frame:first-child. end. end. IF VALID-HANDLE(h_ctrl) THEN DO: do while h_ctrl <> ?: if h_ctrl:type <> "field-group" then do: assign h_ctrl = h_ctrl:next-sibling. end. else assign h_ctrl = h_ctrl:first-child. END. END.
Bom dia, Também estava precisando de um exemplo para interagir com TreeView. Alguém poderia ajudar? Obrigada