Solved Query Costos Ae - SAP Community
Solved Query Costos Ae - SAP Community
Solved Query Costos Ae - SAP Community
Community
SAP Community Products and Technology Enterprise Resource Planning ERP Q&A
Query de Presupuestos
Options
Query de Presupuestos
former_member1173066
Discoverer
on 07-30-2021
0 Kudos
Acabo de generar un query para extraer los datos de las cuentas contables (OACT,
OJDT, JDT1) y ahora quiero unirlo con otro de presupuesto (OBGT, BGT1), pero el
total que me da por mes, no me cuadra, alguien me puede ayudar?, mucho se los
agadeceré, este es el query:
1 de 5 26/03/2024, 09:45 a. m.
Query de Presupuestos - SAP Community https://community.sap.com/t5/enterprise-resource-planning-q-a/query-d...
1 SELECT DISTINCT
2 'BD_2021' AS 'Base de datos',
3 'Presupuesto' AS 'Tipo movimiento',
4 YEAR(T2.[FinancYear]) AS 'Year',
5 (T1.[Line_Id] + 1) AS 'Month',
6 CASE
7 WHEN T0.[GroupMask] LIKE '4%' THEN '1. Ventas'
8 WHEN T0.[GroupMask] LIKE '5%' THEN '2. Costo de Ventas'
9 WHEN T0.[GroupMask] LIKE '6%' THEN '3. Gastos'
10 WHEN T0.[GroupMask] LIKE '7%' THEN '4. Otros Ingresos'
11 WHEN T0.[GroupMask] LIKE '8%' THEN '5. Otros Gastos'
12 ELSE 'Utilidad o Pérdida' END 'Tipo Cuenta',
13 T5.[PrjName],
14 T0.[AcctCode]'Cuenta',
15 T0.[AcctName]'Nombre cuenta',
16 ISNULL(SUM(T1.[CredSTotal]-T1.[DebSTotal]),0) 'Monto'
17 FROM
18 OACT T0
19 LEFT OUTER JOIN BGT1 T1 ON T0.[AcctCode] = T1.[AcctCode]
20 LEFT OUTER JOIN OBGT T2 ON T1.[BudgId] = T2.[AbsId]
21 LEFT OUTER JOIN JDT1 T3 ON T1.[Line_Id] = T3.[Line_Id]
22 LEFT OUTER JOIN OBGS T4 ON T1.[Instance] = T4.[BaseId]
23 LEFT OUTER JOIN OPRJ T5 ON T4.[PrjCode] = T5.[PrjCode]
24 WHERE
25 T0.[GroupMask] IN ('4','5','6','7','8') AND YEAR(T2.[FinancYear])='2021'
26 GROUP BY
27 T0.[AcctCode], T0.[AcctName], T0.[GroupMask], T2.[FinancYear], T1.[Line_id]
28 ORDER BY
29 'Year', 'Month' ,'Tipo Cuenta', T0.[AcctCode] ASC
Show replies
Answer
2 de 5 26/03/2024, 09:45 a. m.
Query de Presupuestos - SAP Community https://community.sap.com/t5/enterprise-resource-planning-q-a/query-d...
Answers (0)
Ask A Question
Continue
Recommendations
Autorización Desviación de Presupuesto
05-13-2010
Query - Log de Modificaciones
01-02-2014
Query de Asientos contables
11-07-2015
Alternativa de LSMW
10-05-2023
Query Antigüedad de Saldos de Clientes informe
06-22-2022
Related Content
Substitute Authorizers for Approval Templates
in Enterprise Resource Planning Q&A 7 hours ago
3 de 5 26/03/2024, 09:45 a. m.
Query de Presupuestos - SAP Community https://community.sap.com/t5/enterprise-resource-planning-q-a/query-d...
SAP Public Cloud Migration Cockpit Query for Transactional Data migration
in Enterprise Resource Planning Q&A Friday
Crystal reports formula get value from another column based on value from a third
column
in Enterprise Resource Planning Q&A Thursday
SAPSupport 85
Edrilan_Berisha 7
Prasoon 5
Margit_Wagner 4
RAHEEL_BABAR 4
ANKIT_CHAUHAN 4
Caetano 3
evelynliu 3
4 de 5 26/03/2024, 09:45 a. m.
Query de Presupuestos - SAP Community https://community.sap.com/t5/enterprise-resource-planning-q-a/query-d...
22 3
LoHa 3
View all
Latest Posts
Re: S4 HANA Public Cloud Extensibility
Re: Concerning iXBRL creation in SAP DM
the purchasing group extract reason details not ap...
Cross-Selling without Structure HgLevlItm
PM order: How to hide the tab 'Enhancement' in Ope...
View all
Follow
Trademark Newsletter
5 de 5 26/03/2024, 09:45 a. m.