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 for display total price by bp currency and local currency (MYR)

najwalokman
Newcomer
0 Kudos
242
  • SAP Managed Tags:

SC = USD , Local Currency = MYR

our DocTotal currency follow BPCurrency.

I want to display Total Price divide two column. Can help me how to the query?

Original = The DocTotal

Local = If the DocCur <> 'MYR' , need to calculate DocRate * DocTotal

SELECT T6.[descript]'Area',T4.[SlpName]'Salesman', T0.[DocDate]'Date',T2.[SeriesName]'Doc Type', T0.[DocNum]'Doc No.', T0.[DocStatus], T0.[CardName], T7.[ItemCode], T7.[ItemName], T1.[Quantity],T10.[UomCode], T0.[DocCur], ( T1.[Price]*T1.[Quantity])'Total Price'

FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry]

INNER JOIN NNM1 T2 ON T0.[Series] = T2.[Series]

INNER JOIN OCTG T3 ON T0.[GroupNum] = T3.[GroupNum]

INNER JOIN OSLP T4 ON T0.[SlpCode] = T4.[SlpCode]

INNER JOIN OCRD T5 ON T0.[CardCode] = T5.[CardCode]

INNER JOIN OTER T6 ON T5.[Territory] = T6.[territryID]

INNER JOIN OITM T7 ON T1.[ItemCode] = T7.[ItemCode]

INNER JOIN OITB T8 ON T7.[ItmsGrpCod] = T8.[ItmsGrpCod]

INNER JOIN OCRG T9 ON T5.[GroupCode] = T9.[GroupCode]

INNER JOIN OUOM T10 ON T7.[PUoMEntry] = T10.[UomEntry]

0 REPLIES 0