Solved Query Costos Ae - SAP Community

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Query de Presupuestos - SAP Community https://community.sap.com/t5/enterprise-resource-planning-q-a/query-d...

Community

SAP Community  Products and Technology  Enterprise Resource Planning  ERP Q&A

 Query de Presupuestos

All community  What are you looking for today?

Options

Query de Presupuestos

former_member1173066
Discoverer

on 07-30-2021

 0 Kudos

Buen Día a Todos,

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

SAP Managed Tags:

SAP Business One

 Show replies

Answer

Accepted Solutions (0)

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

Type your question here...

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...

FMS in Item Master Data displays wrong data in Query report 


in Enterprise Resource Planning Q&A yesterday

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

Query- special price list of business partners 


in Enterprise Resource Planning Q&A Thursday

Top Q&A Solution Author

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

Privacy Terms of Use

Copyright Legal Disclosure

Trademark Newsletter

Support Cookie Preferences

5 de 5 26/03/2024, 09:45 a. m.

You might also like