Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SALES Return Inter-State (ADD BP STATE)

Hi Experts,

Actually I wrote one query for "Sales Return Interstate" , query executed successfully, but I have to Add one more field here(OCRD STATE1).


After I add that field this query is not executed some error is coming.

Query:

SELECT DateName(mm,T0.DocDate) as 'Month',T2.[TaxId11] as ' BP TIN #',  T0.[CardName] as ' BP Name', T0.[Address]as 'BP Address' ,T1.TaxCode, sum(T1.Quantity) as 'Quantity', T2.TransCat as 'Form Type',

T5.SeriesName, T0.[DocNum]as 'Sales Return No',T0.[DocDate]  as 'Sales Return Date',

sum(T1.LineTotal) as 'Assesable Value',T0.DiscSum,T0.[VatSum] as 'Tax Amt',T0.totalexpns  as 'Addl.Charges',T0.[RoundDif],

T0.[DocTotal], T0.U_INVN as 'Original Bill#',T0.U_Invd as 'Original Bill Date'

FROM

[ORIN]  T0 INNER JOIN [RIN1]  T1 ON T0.DocEntry = T1.DocEntry

INNER JOIN [RIN12]  T2 ON T0.DocEntry = T2.DocEntry

LEFT JOIN NNM1 T5 ON T5.Series = T0.Series

WHERE T0.Canceled = 'N' and T5.seriesname='BAN/ISR1'  and T1.LineTotal <> '0'

and   T0.[DocDate] >= '[%0]' and T0.[DocDate]<= '[%1]'

GROUP BY 

T2.[TaxId11] ,  T0.[CardName], T0.[Address] , T2.TransCat ,T5.SeriesName, T0.[DocNum],T0.[DocDate]

,T1.TaxCode,T0.[VatSum] ,T0.totalexpns ,T0.[RoundDif],T0.[DocTotal], T0.U_Invn,T0.U_Invd ,T0.DiscSum

ORDER BY

T0.[DocNum],T0.[DocDate] Asc

Hope all are understood my requirement.


Please help me out to make this Query

Hope for the best reply ASAP.

Thank You,

Regards,

Ramya.

Former Member
Not what you were looking for? View more on this topic or Ask a question