on 09-15-2016 4:30 PM
Hi,
I defined a manual distribution rule (see the attachment)
I want to create a query on JDT1 to see all the Profit Code
but when I have a manual distribution rule I can't see the Profit code, I can see only the manual distribution rule
What's the table connected with the manual distribution rule?
I see OOCR, OCR1 or OPRC but I haven't found the profit code used in the manual distribution rule
regards
Angelo Palladino
Hi Angelo,
The values of Manual Distribution Rule are stored on OMDR and MDR1.
This query should help you:
SELECT
T0.Number,
T1.Line_ID,
T1.Account,
T1.ProfitCode AS Profit,
ISNULL(T2.PrcCode, T3.PrcCode) AS ProfitCode
FROM
OJDT T0
INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId
LEFT JOIN OCR1 T2 ON T2.OcrCode = T1.ProfitCode
LEFT JOIN MDR1 T3 ON T3.OcrCode = T1.ProfitCode
WHERE
ISNULL(T1.ProfitCode , '') <> ''
Hope it helps.
Best regards,
Diego Lother
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.