top of page

SAP Business One - Query em Hana localiza pelo número da NF

  • Foto do escritor: expertb1
    expertb1
  • 21 de jul. de 2021
  • 1 min de leitura

Copie e cole o conteúdo abaixo




/* select from "OINV" T0 */

Declare numeronf int;

numeronf := /* T0."Serial" */ '[%0]';



Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>NOTA FISCAL DE SAÍDA' as "MenuSAP"

from

oinv t0

where

t0."Serial" = :numeronf


union all


Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>ENTREGA' as "MenuSAP"

from

ODLN t0

where

t0."Serial" = :numeronf


UNION ALL


Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>DEVOLUCAO DE ENTREGA' as "MenuSAP"

from

oRDN t0

where

t0."Serial" = :numeronf


UNION ALL


Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'VENDAS>>DEVOLUCAO DE NF DE SAIDA' as "MenuSAP"

from

oRIN t0

where

t0."Serial" = :numeronf


UNION ALL


Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>NOTA FISCAL DE ENTRADA' as "MenuSAP"

from

oPCH t0

where

t0."Serial" = :numeronf


UNION ALL


Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>DEVOLUCAO NOTA FISCAL DE ENTRADA' as "MenuSAP"

from

oRPC t0

where

t0."Serial" = :numeronf


UNION ALL


Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>RECEBIMENTO' as "MenuSAP"

from

oPDN t0

where

t0."Serial" = :numeronf


UNION ALL


Select

t0."Serial", t0."CardName", t0."DocDate", t0."DocTotal" ,'COMPRAS>>DEVOLUCAO DE MERCADORIA' as "MenuSAP"

from

oRPD t0

where

t0."Serial" = :numeronf;



Comments


  • Instagram
  • LinkedIn ícone social
  • iconeWhats
  • Nosso Canal com Dicas Rápidas
bottom of page