[RESOLVIDO] For each

Discussão em 'EMS , HCM e Totvs 11' iniciado por Will, Setembro 23, 2009.

Status do Tópico:
Não esta aberto para novas mensagens.
  1. Will

    Will Membro Participativo

    pessoal, estou ocm o seguinte código referente a uma atualizaçào da base de dados
    Código:
    define buffer b-item-uni-estab for item-uni-estab.
    define var cItem like item-uni-estab.it-codigo.
       for each b-item-uni-estab where b-item-uni-estab.nr-linha  >= 70 and 
                                       b-item-uni-estab.nr-linha  <= 75 and 
                                       b-item-uni-estab.cod-estabel = "11" :
          find b-item-unit-estab no-lock where 
               item-uni-estab.it-codigo = cItem and
               item-uni-estab.cod-estabel = "10".
              disp item-uni-estab.it-codigo
                   item-uni-estab.cod-estabel
                   item-uni-estab.lote-multipl
                   item-uni-estab.lote-minimo.
       end.
    
    porém o mesmo me retorna unknouwn or amibuous tables b-item-unit-estab,
    alguém sabe o que pode ser????????
  2. Cobra.cne

    Cobra.cne Equipe de Suporte Moderador

    Da uma olhada no seu find
    Código:
    find b-item-unit-estab no-lock where 
    altera para
    Código:
    find item-uni-estab no-lock where 

    T+
  3. mcarril

    mcarril Membro Participativo

    define buffer b-item-uni-estab for item-uni-estab.
    define var cItem like item-uni-estab.it-codigo.
    for each b-item-uni-estab where b-item-uni-estab.nr-linha >= 70 and
    b-item-uni-estab.nr-linha <= 75 and
    b-item-uni-estab.cod-estabel = "11" :
    find b-item-unit-estab no-lock where
    item-uni-estab.it-codigo = cItem and
    item-uni-estab.cod-estabel = "10".
    disp item-uni-estab.it-codigo
    item-uni-estab.cod-estabel
    item-uni-estab.lote-multipl
    item-uni-estab.lote-minimo.
    end.

    O Primeiro problema esta no display de item-uni-estab (Note que você não esta fazendo a leitura desta tabela.

    Tenta tirar o B- quando você faz o find da tabela ... Acredito que vá funcionar....

    Abraços...
  4. Will

    Will Membro Participativo

    feito gurizada, erro banal

    vlwwww
Status do Tópico:
Não esta aberto para novas mensagens.

Compartilhe esta Página