cancel
Showing results for 
Search instead for 
Did you mean: 

Código de origem do documento

former_member716107
Discoverer
0 Kudos
988

Bom dia

A minha duvida é, se existe alguma tabela que armazena os tipos de documentos.

Por exemplo:

TF - transferencia de estoque

NS - nota fiscal de saida

NE - nota fiscal de entrada

etc...

Existe um relatorio de rastreamento de lotes, que possui essa coluna com o titulo de "Código de origem do documento".

Obrigado

lenastodal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi and welcome to the SAP Community!

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers (if you haven't already), as it provides tips for preparing questions that draw responses from our members. For example, you can outline what steps you took to find answers (and why they weren't helpful) and share screenshots of what you've seen/done. The more details you provide, the more likely it is that members will be able to assist you.
Should you wish, you can still edit your question.
Finally, if you're hoping to connect with readers, please consider adding a picture to your profile as it encourages readers to respond to you. Here's how you do it: https://www.youtube.com/watch?v=F5JdUbyjfMA&list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS.

Best,
Lena
SAP Community Moderator

jitin_chawla
Product and Topic Expert
Product and Topic Expert
0 Kudos
View Entire Topic
0 Kudos

Bom dia, vê se ajuda

SELECT 

CASE T3.BaseType
        WHEN 13 THEN 'Fatura Clientes'
        WHEN 14 THEN 'Notas de credito Clientes'
        WHEN 15 THEN 'Doc. Entrega'
        WHEN 16 THEN 'Devolução'
        WHEN 18 THEN 'Fatura Fornecedores'
	WHEN 17	then 'Pedido Vendas'
        WHEN 19 THEN 'Notas de credito Fornecedores'
        WHEN 20 THEN 'Entrada Mercadoria OP'
        WHEN 21 THEN 'Devolução Mercadoria'
        WHEN 59 THEN 'Entrada Mercadorias'
        WHEN 60 THEN 'Saída de mercadorias'
        WHEN 67 THEN 'Transferencia de Estoque'
        ELSE CONVERT(NVARCHAR(20),T3.BaseType)
    END AS Documento,
FROM OIBT T0
INNER JOIN OBTN T1 ON T1.ItemCode=T0.ItemCode AND T1.DistNumber=T0.BatchNum
INNER JOIN OBTQ T2 ON T2.ItemCode=T1.ItemCode AND T2.SysNumber=T1.SysNumber
LEFT JOIN IBT1 T3 ON T3.ItemCode=T0.ItemCode AND T3.BatchNum=T0.BatchNum
LEFT JOIN JDT1 T4 ON T4.TransType=T3.BaseType AND T4.BaseRef=T3.BaseNum AND T4.CreatedBy=T3.BaseEntry