cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Subledger Source Document Type in Journal Entry Query

kedalenechong
Participant
0 Kudos
121

Hi All

How to get a corresponding mapping between these two Origin values in Journal Entry Query Statement and Subledger Journal Entry so we know which Origin Number in JE belongs to AP Invoice PU Origin?

kedalenechong_1-1747715601670.png

 

Kedalene Chong

 

View Entire Topic
Felipe_Lima
Active Participant
0 Kudos

Hi @kedalenechong ,

Yes. TransType is what you're looking for. A simple CASE statement will deal with it. See a very basic example below. You'll have to adapt it to your needs.

SELECT
	CASE TransType 
		WHEN '13' THEN 'SI'
		WHEN '14' THEN 'CN'
		WHEN '15' THEN 'DN'
		WHEN '18' THEN 'PU'
		WHEN '19' THEN 'PC'
		-- Include the other types based on the TransType (Object Type) list I shared
	END AS 'Origin'
	-- Then the rest of your query...
FROM OJDT

Felipe_Lima_0-1747816875337.png

BR,
Felipe