Boa tarde para todos, Me tirem um dúvia, criei uma upc para ser usada no programa padrão cd1406a1, senqo que quando cadastro a upc em um programa customizado a upc funciona, porém quando cadastro a upc no programa padrão não funciona. Existe algum manual ou procedimneto de como disponibilizar uma upc dentro de um programa padrão? Desde já agradeço. Segue abaixo upc. /*****************************************************************************/ def var wh-pesquisa as widget-handle. def new global shared var gm-campo as widget-handle no-undo. def new global shared var gm-campo-d as widget-handle no-undo. def var tx-label as widget-handle no-undo. def input param p-ind-event as char no-undo. def input param p-ind-object as char no-undo. def input param p-wgh-object as handle no-undo. def input param p-wgh-frame as widget-handle no-undo. def input param p-cod-table as char no-undo. def input param p-row-table as rowid no-undo. def var c-objeto as char no-undo. assign c-objeto = entry(num-entries(p-wgh-objectrivate-data, "~/"), p-wgh-objectrivate-data, "~/"). if p-ind-event = "INITIALIZE" and p-ind-object = "CONTAINER" then do: create text tx-label assign frame = p-wgh-frame format = "x(30)" width = 15 screen-value = "Grupo Máquina" row = 1.5 col = 25 fgcolor = 4 visible = YES. create fill-in gm-campo-d assign frame = p-wgh-frame name = "Nome" data-type = "character" format = "X(30)" width = 30 height = 0.9 row = 1.5 col = 51 visible = YES sensitive = NO. CREATE FILL-IN gm-campo assign frame = p-wgh-frame width = 15 height = 0.9 row = 1.5 col =36 sensitive = Yes visible = YES triggers: ON 'MOUSE-SELECT-DBLCLICK' PERSISTENT RUN gmupc\gmcd0004-upcz.p. end triggers. gm-campo:load-mouse-pointer('image/lupa.cur'). end. /*************************************gmcd0004-upcz.p.**************************************/ def var wh-pesquisa as widget-handle. def new global shared var l-implanta as logical init no. def new global shared var gm-campo as widget-handle no-undo. def new global shared var gm-campo-d as widget-handle no-undo. def new global shared var wh-window as handle no-undo. def new global shared var adm-broker-hdl as handle no-undo. {include/zoomvar.i &prog-zoom=inzoom/z01in144.w /*z01in172.w */ &proghandle=wh-window &campohandle=gm-campo &campozoom=gm-codigo &campohandle2=gm-campo-d &campozoom2=descricao } /********************************************************************************************/
Bom dia Erikles, o programa padrão onde eu quero disponibilizar a upc, já tem uma upc cadastrada, pelo que eu sei tem que disponibilizar a nova upc dentro da upc cadastrada:segue abaixo upc já cadastrada.coloquei a que fiz mas não da erro e não funciona DEFINE INPUT PARAM p-ind-event AS CHAR NO-UNDO. DEFINE INPUT PARAM p-ind-object AS CHAR NO-UNDO. DEFINE INPUT PARAM p-wgh-object AS HANDLE NO-UNDO. DEFINE INPUT PARAM p-wgh-frame AS WIDGET-HANDLE NO-UNDO. DEFINE INPUT PARAM p-cod-table AS CHAR NO-UNDO. DEFINE INPUT PARAM p-row-table AS ROWID NO-UNDO. DEFINE VARIABLE c-char AS CHAR NO-UNDO. DEFINE VARIABLE wh-objeto AS WIDGET-HANDLE NO-UNDO. def var c-objeto as char no-undo. DEFINE VARIABLE l-sai AS LOGICAL NO-UNDO. DEFINE VARIABLE wh-fpage1 AS WIDGET-HANDLE NO-UNDO. DEFINE NEW GLOBAL SHARED VARIABLE wh-nr-requisicao AS WIDGET-HANDLE NO-UNDO. DEFINE NEW GLOBAL SHARED VARIABLE wh-it-codigo AS WIDGET-HANDLE NO-UNDO. DEFINE NEW GLOBAL SHARED VARIABLE wh-it-codigo-new AS WIDGET-HANDLE NO-UNDO. define new global shared variable wh-cd1406a1-req as widget-handle no-undo. DEFINE NEW GLOBAL SHARED VARIABLE wh-c-descricao AS WIDGET-HANDLE NO-UNDO. DEFINE NEW GLOBAL SHARED VARIABLE wh-v10in385 AS WIDGET-HANDLE NO-UNDO. define new global shared variable v_cod_usuar_corren as char no-undo. IF VALID-HANDLE(p-wgh-object) THEN assign c-objeto = entry(num-entries(p-wgh-objectrivate-data, "~/"), p-wgh-objectrivate-data, "~/"). define buffer bf-requis for requisicao. define buffer bf-it-req for it-requisicao. IF p-ind-event = "INITIALIZE" AND c-objeto = 'v10in385.w' THEN DO: ASSIGN wh-v10in385 = p-wgh-object. ASSIGN wh-fpage1 = p-wgh-frame. RUN tela-upc (INPUT wh-fpage1, INPUT p-ind-Event, INPUT "fill-in", INPUT "nr-requisicao", INPUT NO, OUTPUT wh-nr-requisicao). RUN tela-upc (INPUT wh-fpage1, INPUT p-ind-Event, INPUT "fill-in", INPUT "it-codigo", INPUT NO, OUTPUT wh-it-codigo). IF VALID-HANDLE(wh-it-codigo) THEN DO: create fill-in wh-it-codigo-new assign frame = wh-it-codigo:FRAME side-label-handle = wh-it-codigo:side-label-handle DATA-TYPE = wh-it-codigo:data-type format = wh-it-codigo:format width = wh-it-codigo:width height = wh-it-codigo:height row = wh-it-codigo:row col = wh-it-codigo:COL bgcolor = wh-it-codigo:BGCOLOR fgcolor = wh-it-codigo:FGCOLOR label = wh-it-codigo:label visible = wh-it-codigo:visible sensitive = wh-it-codigo:SENSITIVE. on LEAVE of wh-it-codigo-new persistent run gmupc/CD1406A1-UPC02.p (INPUT "it-codigo", INPUT 'leave'). ON "F5":U OF wh-it-codigo-new persistent run gmupc/CD1406A1-UPC02.p (INPUT "it-codigo", INPUT "F5"). ON "MOUSE-SELECT-DBLCLICK":U OF wh-it-codigo-new persistent run gmupc/CD1406A1-UPC02.p (INPUT "it-codigo", INPUT "MOUSE-SELECT-DBLCLICK"). wh-it-codigo-new:LOAD-MOUSE-POINTER("image/lupa.cur"). IF wh-it-codigo-new:MOVE-AFTER-TAB-ITEM(wh-it-codigo) THEN. END. END. IF p-ind-event = "ENABLE" AND c-objeto = 'v10in385.w' THEN DO: IF VALID-HANDLE(wh-it-codigo-new) THEN ASSIGN wh-it-codigo-new:SENSITIVE = wh-it-codigo:SENSITIVE. End. /* If incluído por Flávia Acioli em 18/05/2010 */ If p-ind-event = "ASSIGN" And p-ind-object = 'VIEWER' Then Do: If Valid-handle(wh-nr-requisicao) And Valid-handle(wh-it-codigo-new) Then Do: Find First requisicao Where requisicao.nr-requisicao = Int(wh-nr-requisicao:Screen-value) And (requisicao.cod-estabel = "901" Or requisicao.cod-estabel = "904" Or requisicao.cod-estabel = "905" Or requisicao.cod-estabel = "908") And requisicao.tp-requis = 3 No-lock No-error. If Avail requisicao Then Do: For First item-tab Where item-tab.it-codigo = wh-it-codigo-new:Screen-value No-lock, First tb-pr-cc /* Of item-tab */ Where tb-pr-cc.situacao = 1 /* Ativo */ And tb-pr-cc.dt-inicio <= Today And tb-pr-cc.dt-termino >= Today No-lock: Assign requisicao.tp-requis = 2. End. /* For First requisitante */ End. /* If Avail requisicao */ End. /* If Valid-handle */ End. PROCEDURE tela-upc: DEFINE INPUT PARAMETER pWghFrame AS WIDGET-HANDLE NO-UNDO. DEFINE INPUT PARAMETER pIndEvent AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pObjType AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pObjName AS CHARACTER NO-UNDO. DEFINE INPUT PARAMETER pApresMsg AS LOGICAL NO-UNDO. DEFINE OUTPUT PARAMETER phObj AS HANDLE NO-UNDO. DEFINE VARIABLE wgh-obj AS WIDGET-HANDLE NO-UNDO. ASSIGN wgh-obj = pWghFrame:FIRST-CHILD. DO WHILE VALID-HANDLE(wgh-obj): /* IF wgh-obj:TYPE = "fill-in" then message wgh-obj:NAME view-as alert-box. */ IF wgh-obj:TYPE = pObjType AND wgh-obj:NAME = pObjName THEN DO: ASSIGN phObj = wgh-obj:HANDLE. LEAVE. END. IF wgh-obj:TYPE = "field-group" THEN ASSIGN wgh-obj = wgh-obj:FIRST-CHILD. ELSE ASSIGN wgh-obj = wgh-obj:NEXT-SIBLING. END. END PROCEDURE.
Existem casos que alguns programas do produto padrão não tem as devidas chamadas UPC. Neste caso consulte o suporte e solicite os devidos pontos, pois trata-se de um programa padrão.