Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Query Debit and Credit into single line

0 Kudos

Hi all

i want to ADD Debit and Credit into sing Colum

maybe there is way to make custom Column

do you guys know how to do it?

  • SAP Managed Tags:
8 REPLIES 8

venkateswaran_k
Active Contributor

If I understand your question correctly, you want to display only one Amount Column?

  • SAP Managed Tags:

0 Kudos

YES "Debit" "Credit" and "Dr/CR" Like this

  • SAP Managed Tags:

0 Kudos

YES "Debit" "Credit" and "Dr/CR" Like this total 3 Column

  • SAP Managed Tags:

venkateswaran_k
Active Contributor
0 Kudos

Hi hswy11

SELECT T1.Refdate, T1.account, 
       T1.Ocrcode3,
       (T1.debit + T1.credit) as "Amount"
CASE WHEN T1.DEBIT > 0 THEN "DR" ELSE "CR" END AS "DRCR"
FROM OJDT T0 INNER JOIN JDT1 T1
ON T0.TRANSID = T1.TRANSID
  • SAP Managed Tags:

0 Kudos

My code looks not working

do you why?

  • SAP Managed Tags:

0 Kudos

If Credit Amount into single line Mark should be Reverse

do you know how to reverse Mark?

  • SAP Managed Tags:

0 Kudos

What is the error ?

After the word "Amount", Put Comma

  • SAP Managed Tags:

0 Kudos
CASE WHEN T1."Debit" > 0 THEN T1."DEBIT"  ELSE (-1*T1."CREDIT") END AS "DRCR"

Amount > 0 "==== is the correction
  • SAP Managed Tags: