Iniciar sessão com a Microsoft
Iniciar sessão ou criar uma conta.
Olá,
Selecione uma conta diferente.
Tem várias contas
Selecione a conta com a qual pretende iniciar sessão.

Este artigo aplica-se ao Microsoft Dynamics NAV 2009 para todos os países e todos os idiomas.

Sintomas

Suponha que executa uma folha de planeamento e activar a definição Automática L.M. Kit criar para um produto de Kit que tem suficiente cotações no Microsoft Dynamics NAV 2009 R2 e no Microsoft Dynamics NAV 2009 Service Pack 1 (SP1). Quando tenta registar uma encomenda de venda para o produto de Kit, recebe a seguinte mensagem de erro:

O movimento de reserva não existe. Os campos de identificação e valores: n. º movimento ='Entry_Number', positivo = 'Yes'

Resolução

Informações sobre correção

Agora tem uma correcção suportada disponível na Microsoft. Contudo, destina-se apenas a corrigir o problema descrito neste artigo. Aplique-a apenas em sistemas que tenham este problema específico. Esta correcção poderá ser submetida a testes adicionais. Por conseguinte, se não estiver a ser gravemente afectado por este problema, recomendamos que aguarde o próximo service pack do Microsoft Dynamics NAV 2009 ou a próxima versão do Microsoft Dynamics NAV que contenha esta correcção.


Nota Em casos especiais, os custos normalmente inerentes para suporte chamadas poderão ser anuladas se um técnico de suporte técnico do Microsoft Dynamics e produtos relacionados determina que uma actualização específica resolverá o problema. Os custos de normais do suporte serão aplicados a questões de suporte adicionais e problemas que não se enquadrem na atualização específica em questão.



Informações de instalação

A Microsoft fornece exemplos de programação apenas a título ilustrativo, sem garantia expressa ou implícita. Isto inclui, mas não está limitado a, garantias implícitas de comercialização ou adequação a um fim específico. Este artigo pressupõe que está familiarizado com a linguagem de programação que está a ser demonstrada e com as ferramentas que são utilizadas para criar e depurar procedimentos. Técnicos de suporte da Microsoft podem ajudar a explicar a funcionalidade de um determinado procedimento, mas não modificarão estes exemplos para proporcionarem funcionalidades adicionais nem criarão procedimentos adaptados às necessidades específicas do utilizador.

Nota Antes de instalar esta correcção, certifique-se de que todos os utilizadores de cliente do Microsoft Navision são registados no sistema. Isto inclui os utilizadores de clientes do Microsoft Navision Application Server (NAS). Deve ser o único usuário do cliente que tem sessão iniciada quando implementar esta correcção.

Para implementar esta correcção, tem de ter uma licença de desenvolvedor.

Recomendamos que a conta de utilizador na janela Logins do Windows ou na janela Logins de base de dados seja atribuída a ID de função "SUPER". Se a conta de utilizador não é possível atribuir o ID de função "SUPER", tem de verificar que a conta de utilizador tem as seguintes permissões:

  • A permissão Modificar para o objecto que estará a alterar.

  • A permissão executar para o objecto 5210 de ID de objecto de sistema e para o objecto 9015 de ID de objecto de sistema .



Nota Não tem de ter direitos para os arquivos de dados, excepto se tiver de efectuar a reparação de dados.

Alterações de código

Nota Sempre o código de ensaio corrige num ambiente controlado antes de aplicar as correcções para os computadores de produção.
Para resolver este problema, altere o código na função DemandtoInvProfile na codeUnit compensação de perfil de inventário (99000854) do seguinte modo:

Nota: 26/10/11 Ocorreu uma ligeira alteração a esta KB para tornar o código inline com o código que foi publicado para NAV 5.0SP1. A funcionalidade não foi alterado. São linhas específicas, que foi alterado na secção "Adicionar" o código de substituição;

Linha: InventoryProfile. " N º linha": = LineNo; alterar para: InventoryProfile. " N º linha": = NextLineNo;

Linha: LineNo: = LineNo + 1; foi removido.

Código existente

...InventoryProfile.SETCURRENTKEY("Line No.");

SalesLine.SETCURRENTKEY(Type,"No.","Variant Code","Drop Shipment","Location Code","Document Type","Shipment Date");
SalesLine.SETFILTER("Document Type",'%1|%2',SalesLine."Document Type"::Order,SalesLine."Document Type"::"Return Order");
SalesLine.SETRANGE(Type,SalesLine.Type::Item);
SalesLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",SalesLine."Location Code");
Item.COPYFILTER("Variant Filter",SalesLine."Variant Code");
SalesLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
SalesLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);

IF SalesLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromSalesLine(SalesLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL SalesLine.NEXT = 0;

ServiceLine.SETCURRENTKEY(Type,"No.","Variant Code","Location Code","Posting Date");
ServiceLine.SETRANGE("Document Type",ServiceLine."Document Type"::Order);
ServiceLine.SETRANGE(Type,ServiceLine.Type::Item);
ServiceLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",ServiceLine."Location Code");
Item.COPYFILTER("Variant Filter",ServiceLine."Variant Code");
ServiceLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
ServiceLine.SETFILTER("Posting Date",'>%1&<=%2',0D,ToDate);

IF ServiceLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromServiceInvLine(ServiceLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL ServiceLine.NEXT = 0;

ReqLine.SETCURRENTKEY("Ref. Order Type","Ref. Order Status","Ref. Order No.","Ref. Line No.");
ReqLine.SETRANGE("Ref. Order Type",ReqLine."Ref. Order Type"::"Prod. Order");
ProdOrderComp.SETCURRENTKEY("Item No.","Variant Code","Location Code",Status,"Due Date");
ProdOrderComp.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",ProdOrderComp."Location Code");
Item.COPYFILTER("Variant Filter",ProdOrderComp."Variant Code");
ProdOrderComp.SETRANGE(Status,ProdOrderComp.Status::Planned,ProdOrderComp.Status::Released);
ProdOrderComp.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF ProdOrderComp.FIND('-') THEN
REPEAT
ReqLine.SETRANGE("Ref. Order Status",ProdOrderComp.Status);
ReqLine.SETRANGE("Ref. Order No.",ProdOrderComp."Prod. Order No.");
ReqLine.SETRANGE("Ref. Line No.",ProdOrderComp."Prod. Order Line No.");
ReqLine.SETRANGE("Operation No.",'');
IF NOT ReqLine.FIND('-') THEN BEGIN
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromComponent(ProdOrderComp,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
END;
UNTIL ProdOrderComp.NEXT = 0;

PlanningComponent.SETCURRENTKEY("Item No.","Variant Code","Location Code","Due Date");
PlanningComponent.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",PlanningComponent."Location Code");
Item.COPYFILTER("Variant Filter",PlanningComponent."Variant Code");
PlanningComponent.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF PlanningComponent.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromPlanComponent(PlanningComponent,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL PlanningComponent.NEXT = 0;

TransferReqLine.SETCURRENTKEY(Type,"No.","Variant Code","Transfer-from Code","Transfer Shipment Date");
TransferReqLine.SETRANGE("Replenishment System",TransferReqLine."Replenishment System"::Transfer);
TransferReqLine.SETRANGE(Type,TransferReqLine.Type::Item);
TransferReqLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",TransferReqLine."Transfer-from Code");
Item.COPYFILTER("Variant Filter",TransferReqLine."Variant Code");
TransferReqLine.SETFILTER("Transfer Shipment Date",'>%1&<=%2',0D,ToDate);

IF TransferReqLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfPlan(TransferReqLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL TransferReqLine.NEXT = 0;

TransLine.SETCURRENTKEY("Item No.");
TransLine.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Variant Filter",TransLine."Variant Code");
Item.COPYFILTER("Location Filter",TransLine."Transfer-from Code");
TransLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);
FilterIsSetOnLocation := Item.GETFILTER("Location Filter") <> '';

IF TransLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfer(TransLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
IF FilterIsSetOnLocation THEN
InventoryProfile."Transfer Location Not Planned" := TransferLocationIsFilteredOut(Item,TransLine);
InventoryProfile.INSERT;
UNTIL TransLine.NEXT = 0;
...

Código de substituição

...InventoryProfile.SETCURRENTKEY("Line No.");

SalesLine.SETCURRENTKEY(Type,"No.","Variant Code","Drop Shipment","Location Code","Document Type","Shipment Date");
SalesLine.SETFILTER("Document Type",'%1|%2',SalesLine."Document Type"::Order,SalesLine."Document Type"::"Return Order");
SalesLine.SETRANGE(Type,SalesLine.Type::Item);
SalesLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",SalesLine."Location Code");
Item.COPYFILTER("Variant Filter",SalesLine."Variant Code");
SalesLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
SalesLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);

// Add the following line.
SalesLine.SETRANGE("Build Kit",FALSE);
// End of the line.

IF SalesLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromSalesLine(SalesLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL SalesLine.NEXT = 0;

// Add the following lines.
KitSalesLine.SETCURRENTKEY("Document Type",Type,"No.","Variant Code","Location Code","Shipment Date");
KitSalesLine.SETRANGE("Document Type",KitSalesLine."Document Type"::Order);
KitSalesLine.SETRANGE(Type,KitSalesLine.Type::Item);
KitSalesLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",KitSalesLine."Location Code");
Item.COPYFILTER("Variant Filter",KitSalesLine."Variant Code");
KitSalesLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
KitSalesLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);
IF KitSalesLine.FINDFIRST THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromKitSalesLine(KitSalesLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL KitSalesLine.NEXT = 0;
// End of the lines.

ServiceLine.SETCURRENTKEY(Type,"No.","Variant Code","Location Code","Posting Date");
ServiceLine.SETRANGE("Document Type",ServiceLine."Document Type"::Order);
ServiceLine.SETRANGE(Type,ServiceLine.Type::Item);
ServiceLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",ServiceLine."Location Code");
Item.COPYFILTER("Variant Filter",ServiceLine."Variant Code");
ServiceLine.SETFILTER("Outstanding Qty. (Base)",'<>0');
ServiceLine.SETFILTER("Posting Date",'>%1&<=%2',0D,ToDate);

IF ServiceLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromServiceInvLine(ServiceLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL ServiceLine.NEXT = 0;

ReqLine.SETCURRENTKEY("Ref. Order Type","Ref. Order Status","Ref. Order No.","Ref. Line No.");
ReqLine.SETRANGE("Ref. Order Type",ReqLine."Ref. Order Type"::"Prod. Order");
ProdOrderComp.SETCURRENTKEY("Item No.","Variant Code","Location Code",Status,"Due Date");
ProdOrderComp.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",ProdOrderComp."Location Code");
Item.COPYFILTER("Variant Filter",ProdOrderComp."Variant Code");
ProdOrderComp.SETRANGE(Status,ProdOrderComp.Status::Planned,ProdOrderComp.Status::Released);
ProdOrderComp.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF ProdOrderComp.FIND('-') THEN
REPEAT
ReqLine.SETRANGE("Ref. Order Status",ProdOrderComp.Status);
ReqLine.SETRANGE("Ref. Order No.",ProdOrderComp."Prod. Order No.");
ReqLine.SETRANGE("Ref. Line No.",ProdOrderComp."Prod. Order Line No.");
ReqLine.SETRANGE("Operation No.",'');
IF NOT ReqLine.FIND('-') THEN BEGIN
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile.TransferFromComponent(ProdOrderComp,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
END;
UNTIL ProdOrderComp.NEXT = 0;

PlanningComponent.SETCURRENTKEY("Item No.","Variant Code","Location Code","Due Date");
PlanningComponent.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Location Filter",PlanningComponent."Location Code");
Item.COPYFILTER("Variant Filter",PlanningComponent."Variant Code");
PlanningComponent.SETFILTER("Due Date",'>%1&<=%2',0D,ToDate);

IF PlanningComponent.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromPlanComponent(PlanningComponent,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL PlanningComponent.NEXT = 0;

TransferReqLine.SETCURRENTKEY(Type,"No.","Variant Code","Transfer-from Code","Transfer Shipment Date");
TransferReqLine.SETRANGE("Replenishment System",TransferReqLine."Replenishment System"::Transfer);
TransferReqLine.SETRANGE(Type,TransferReqLine.Type::Item);
TransferReqLine.SETRANGE("No.",Item."No.");
Item.COPYFILTER("Location Filter",TransferReqLine."Transfer-from Code");
Item.COPYFILTER("Variant Filter",TransferReqLine."Variant Code");
TransferReqLine.SETFILTER("Transfer Shipment Date",'>%1&<=%2',0D,ToDate);

IF TransferReqLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfPlan(TransferReqLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
InventoryProfile.INSERT;
UNTIL TransferReqLine.NEXT = 0;

TransLine.SETCURRENTKEY("Item No.");
TransLine.SETRANGE("Item No.",Item."No.");
Item.COPYFILTER("Variant Filter",TransLine."Variant Code");
Item.COPYFILTER("Location Filter",TransLine."Transfer-from Code");
TransLine.SETFILTER("Shipment Date",'>%1&<=%2',0D,ToDate);
FilterIsSetOnLocation := Item.GETFILTER("Location Filter") <> '';

IF TransLine.FIND('-') THEN
REPEAT
InventoryProfile.INIT;
InventoryProfile."Line No." := NextLineNo;
InventoryProfile."Item No." := Item."No.";
InventoryProfile.TransferFromOutboundTransfer(TransLine,TempItemTrkgEntry);
IF InventoryProfile.IsSupply THEN
InventoryProfile.ChangeSign;
IF FilterIsSetOnLocation THEN
InventoryProfile."Transfer Location Not Planned" := TransferLocationIsFilteredOut(Item,TransLine);
InventoryProfile.INSERT;
UNTIL TransLine.NEXT = 0;
...

Pré-requisitos

Tem de ter um dos seguintes produtos instalado para aplicar esta correcção:

  • Microsoft Dynamics NAV 2009 R2

  • Microsoft Dynamics NAV 2009 Service Pack 1

Informações de remoção

Não é possível remover esta correcção.

Estado

A Microsoft confirmou que este é um problema nos produtos da Microsoft listados na secção "Aplica-se a".

Nota Este é um artigo "Publicação rápida" criado diretamente a partir da organização de suporte da Microsoft. As informações contidas neste documento são fornecidas como-se em resposta a questões emergentes. Como resultado da urgência na sua disponibilização, os materiais podem incluir erros tipográficos e podem ser revistos em qualquer altura sem aviso prévio. Para outras considerações, consulte os Termos de utilização .

Precisa de mais ajuda?

Quer mais opções?

Explore os benefícios da subscrição, navegue em cursos de formação, saiba como proteger o seu dispositivo e muito mais.

As comunidades ajudam-no a colocar e a responder perguntas, a dar feedback e a ouvir especialistas com conhecimentos abrangentes.

Estas informações foram úteis?

Quão satisfeito está com a qualidade do idioma?
O que afetou a sua experiência?
Ao selecionar submeter, o seu feedback será utilizado para melhorar os produtos e serviços da Microsoft. O seu administrador de TI poderá recolher estes dados. Declaração de Privacidade.

Obrigado pelo seu feedback!

×