How do i get purchase Report.

Hello All
u201CHow do I get a purchase report from u2013 to date.  The report should be display each individual row itemu2019s  quantity, unit price, Assessable value, Base amount, tax amount .  i.e BED amount, Cess , HSCess, VAT, CST etc.u201D
Regards
Santhosh.K

Try this
Select T0.docnum,
(select seriesname from nnm1 where series=T0.series) as InvSeries,
T0.DocDate,T0.CardName,T0.NumatCard as 'Customer Reference',
(select T8.TaxId11 from pch12 T8 where T8.docentry=T1.docentry) as 'TIN No.',
T1.ItemCode,T1.Dscription,T1.AssblValue,
CAST(T1.Quantity as Decimal(10,3)) as Quantity,T1.unitMsr as UOM,
T1.currency,
T1.PriceBefDi as 'Unit Price',T1.DiscPrcnt as 'Row Discount',
CAST(T1.Price as Decimal(10,2)) as Price,
CAST(T1.LineTotal as Decimal(14,2)) as Basic,
T0.DiscPrcnt as 'Doc Discount',
isnull((select sum(O1.Transvalue) from OINM O1,PDN1 N1,OPDN N0
where
N0.Docentry=N1.docentry and O1.Itemcode=N1.Itemcode and N1.TrgetEntry=T0.Docentry
and O1.Warehouse=N1.WhsCode
and O1.BASE_REF=N0.Docnum
  and O1.TransType = 20 and
N1.Targettype=18),0) as 'GRPO Price',
isnull((select sum(O1.Transvalue) from OINM O1
where
O1.Itemcode=T1.Itemcode
and O1.Warehouse=T1.WhsCode
and O1.BASE_REF=T0.Docnum
  and O1.TransType = 18),0) as 'Price Difference ',
isnull((select sum(O1.Transvalue) from OINM O1,OIPF L0 inner join
IPF1 L1 on L0.Docentry=L1.Docentry,PDN1 N1
where
O1.Itemcode=T1.Itemcode
and O1.Warehouse=T1.WhsCode
and O1.BASE_REF= L0.DocNum and
L1.BaseEntry = N1.Docentry and
N1.TrgetEntry=T0.Docentry
and O1.TransType = 69),0) as 'Lande Cost',
(SELECT T6.[BaseDocNum]
FROM OPDN T5  INNER JOIN PDN1 T6 ON T5.DocEntry = T6 .DocEntry
Where(T5.[DocType]='I') and (T5.[DocNum]=T1.[BaseDocNum]) and (T6.[DocEntry] = T1.[BaseEntry])
and (T6.[LineNum]=T1.[BaseLine]) and (T6.[BaseType]='22')
) as PONumber,
(SELECT T7.[DocDate] FROM OPOR T7 WHERE T7.[DocEntry]=(SELECT T6.[BaseEntry]
FROM OPDN T5  INNER JOIN PDN1 T6 ON T5.DocEntry = T6 .DocEntry
Where(T5.[DocType]='I') and (T5.[DocNum]=T1.[BaseDocNum]) and (T6.[DocEntry] = T1.[BaseEntry])
and (T6.[LineNum]=T1.[BaseLine]) and (T6.[BaseType]='22')
) ) as PODate,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=-90 ),0) as BasicExcise,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=-60 ),0) as ExciseCess,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=7 ),0) as Excisecess_he,
isnull((select Min(BaseSum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum
               and pch4.statype not in (-90,-60,7)),0) as TaxableTurnover,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=4 and taxrate=10),0) as cst10,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=4 and taxrate=12.5),0) as cst12,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=4 and taxrate=3),0) as cst3,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=4 and taxrate=2),0) as cst2,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=4 and taxrate not in (10,12.5,3,2)),0) as cst_others,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=1 and taxrate=4),0) as VAT4,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=1 and taxrate=12.5),0) as VAT12,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=1 and taxrate=0),0) as VAT0,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=1 and taxrate not in (4,12.5,0)),0) as VAT_others,
isnull((select sum(taxsum) from pch4 where pch4.docentry=T0.docentry and pch4.LineNum=T1.Linenum and
                    pch4.statype=9),0) as tcs,
isnull((select sum(linetotal) from pch3 where pch3.docentry=T0.docentry and
T1.linenum=(Select Max(Linenum) from PCH1 T3 where T3.DocEntry=T0.DocEntry)),0 ) as Other_expenses,
T1.Gtotal as Itemwise_grossTotal,
isnull(( select Rounddif from OPCH  T4 where T4.docentry=T0.Docentry and
        T1.linenum=(Select Max(Linenum) from PCH1 T3 where T3.DocEntry=T0.DocEntry)),0) as Inv_RoundDiff,
isnull(( select DocTotal from OPCH  T5 where T5.docentry=T0.Docentry and
        T1.linenum=(Select Max(Linenum) from PCH1 T3 where T3.DocEntry=T0.DocEntry)),0)  as Inv_grosstotal
from Opch T0, pch1 T1,OITM M1 INNER JOIN OITB B1 ON M1.ItmsGrpCod=B1.ItmsGrpCod
where (T0.DocType='I') and T0.docentry=T1.docentry and (T0.DocDate between '[%0]' and '[%1]')
Union All
Select
T0.docnum,
(select seriesname from nnm1 where series=T0.series) as InvSeries,
T0.DocDate,T0.CardName,T0.NumatCard as 'Customer Reference',
(select T8.TaxId11 from RPC12 T8 where T8.docentry=T1.docentry) as 'TIN No.',
T1.ItemCode,T1.Dscription,T1.AssblValue,
CAST(T1.Quantity as Decimal(10,3)) as Quantity,T1.unitMsr as UOM,T1.currency,
T1.PriceBefDi as 'Unit Price',T1.DiscPrcnt as 'Row Discount',
-1*CAST(T1.Price as Decimal(10,2)) as Price,
-1*CAST(T1.LineTotal as Decimal(14,2)) as Basic,
T0.DiscPrcnt as 'Doc Discount',
0 as 'GRPO Price',
-1*isnull((select sum(O1.Transvalue) from OINM O1
where
O1.Itemcode=T1.Itemcode
and O1.Warehouse=T1.WhsCode
and O1.BASE_REF=T0.Docnum
  and O1.TransType = 19),0) as 'Price Difference ',
0 as 'Landed Cost',
(SELECT T6.[BaseDocNum]
FROM OPDN T5  INNER JOIN PDN1 T6 ON T5.DocEntry = T6 .DocEntry
Where(T5.[DocType]='I') and (T5.[DocNum]=T1.[BaseDocNum]) and (T6.[DocEntry] = T1.[BaseEntry])
and (T6.[LineNum]=T1.[BaseLine]) and (T6.[BaseType]='22')
) as PONumber,
(SELECT T7.[DocDate] FROM OPOR T7 WHERE T7.[DocEntry]=(SELECT T6.[BaseEntry]
FROM OPDN T5  INNER JOIN PDN1 T6 ON T5.DocEntry = T6 .DocEntry
Where(T5.[DocType]='I') and (T5.[DocNum]=T1.[BaseDocNum]) and (T6.[DocEntry] = T1.[BaseEntry])
and (T6.[LineNum]=T1.[BaseLine]) and (T6.[BaseType]='22')
) ) as PODate,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=-90 ),0) as BasicExcise,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=-60 ),0) as ExciseCess,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=7 ),0) as Excisecess_he,
-1*isnull((select Min(BaseSum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum
               and RPC4.statype not in (-90,-60,7)),0) as TaxableTurnover,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=4 and taxrate=10),0) as cst10,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=4 and taxrate=12.5),0) as cst12,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=4 and taxrate=3),0) as cst3,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=4 and taxrate=2),0) as cst2,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=4 and taxrate not in (10,12.5,3,2)),0) as cst_others,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=1 and taxrate=4),0) as VAT4,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=1 and taxrate=12.5),0) as VAT12,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=1 and taxrate=0),0) as VAT0,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=1 and taxrate not in (4,12.5,0)),0) as VAT_others,
-1*isnull((select sum(taxsum) from RPC4 where RPC4.docentry=T0.docentry and RPC4.LineNum=T1.Linenum and
                    RPC4.statype=9),0) as tcs,
-1*isnull((select sum(linetotal) from RPC3 where RPC3.docentry=T0.docentry and
T1.linenum=(Select Max(Linenum) from RPC1 T3 where T3.DocEntry=T0.DocEntry)),0 ) as Other_expenses,
-1*T1.Gtotal as Itemwise_grossTotal,
-1*isnull(( select Rounddif from ORPC  T4 where T4.docentry=T0.Docentry and
        T1.linenum=(Select Max(Linenum) from RPC1 T3 where T3.DocEntry=T0.DocEntry)),0) as Inv_RoundDiff,
-1*isnull(( select DocTotal from ORPC  T5 where T5.docentry=T0.Docentry and
        T1.linenum=(Select Max(Linenum) from RPC1 T3 where T3.DocEntry=T0.DocEntry)),0)  as Inv_grosstotal
from ORPC T0, RPC1 T1,OITM M1 INNER JOIN OITB B1 ON M1.ItmsGrpCod=B1.ItmsGrpCod
where (T0.DocType='I') and T0.docentry=T1.docentry and (T0.DocDate between '[%0]' and '[%1]')

Similar Messages

  • My PC crashed and I lost all my stuff, including i tunes account. How do I get purchased songs back?

    My PC crashed and I lost all my stuff, including i tunes account. How do I get purchased songs back?

    matthewfrommerseyside wrote:
    It is a new pc - old one crashed and lost everything.
    Yes, I got that. My question was "are you using the same iTunes account to access music purchased from the Store?" I think your answer is "yes".
    matthewfrommerseyside wrote:
    But they are all on my ipod - can i not sync back to itunes?
    iTunes is not designed to do that. However, this user tip from tt2 may help you recover your music from your iPod, although it's not a simple process: Recover your iTunes library from your iPod or iOS device
    Ignore any references in the tip to iOS devices, the Classic does not use iOS. The tip has a list of software, including the TouchCopy referred to by tbirdvet that may assist you in recovering your music.

  • How can I get Launching report directory in report trigger??

    how can I get Launching report directory in report trigger??
    pls help me :'<
    I can run this function in forms.
    "how can I get Launching report directory in report trigger??"
    does reports have same function???

    Click the little down arrow/+ symbol  next the + - in the folders bar.

  • For an Org Unit, how do we get all Reporting Org units (Also employees reporting to the sub org unit) & Employees ?

    Hi Experts,
    I have a very common requirement in SAP HCM ABAP development.
    For an Org Unit, how do we get all Reporting Org units(Also employees reporting to the sub org unit) & Employees ?
    I have tried using RH_STRUC_GET_MULTIPLE_ROOTS and RHPH_STRUCTURE_READ, but the evaluation path is insufficient to get all objects under it. I tried with both O-S-P and O-O-S-P evaluation paths and as per some constraints, I can’t create a customized evaluation path for a reason.
    I am using PNPCE database for user selection screen and user would be advising the Org unit. I even referred the standard transaction ‘S_AHR_61016495’ which is using PCH logical database.
    I would really appreciate if anyone could provide a solution for this. (Rewards guranteed )
    Kindly help.
    Thank you.
    Regards,
    Mahesh Konade

    Hi Alexandre,
    Although I could not respond in time, thank you so much for your prompt reply.
    I had used the same RHPH_STRUCTURE_READ and passed the appropriate values to it, but it did not populate the required results. I cross checked the results manually, may be some relations issue. But later I tried using RH_STRUC_GET_MULTIPLE_ROOTS and it worked fine.
    Meanwhile I had done a workaround with PCH and RH_STRUC_GET and it served the purpose of getting all the Org units, it’s reporting sub-org-units, positions and persons (The deepest structure from the root org unit advised on selection screen).
    The solution I used is, I captured the org-units advised on selection screen by user using PCH logical database and then by looping on sub-org units reporting to the main org-unit I populated related positions and persons holding them and assigned it to the PNPCE logical database.
    Thank you so much for the help.
    Regards,
    Mahesh Konade

  • HT204053 How can I get a report of my iTunes purchases

    My son has used his ID to purchases many extras in an app game and I would like a purchase report to see what he has charged.

    Tunes Store & Mac App Store: Seeing your purchase history and order numbers
              http://support.apple.com/kb/HT2727

  • How do you get purchased songs from Touch to itunes?

    Hi, I purchased a few songs of of the itunes app on my ipod touch. My question now is, How do I get those songs to show up in my itunes library on my computer? Thanx

    simply sync your touch. your purchased song will be added to your iTunes and you should see a playlist with them.

  • HT5085 How do I get purchases from iCloud to my ipad

    How do I get my purchases from iCloud to ipad?

    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Loss all of my music, how do i get purchased songs back?

    Was trying to move all my files to an external hard drive, and numberious things happensed after that that I won't get into. I ended up haveing to erase and reinstall my itunes to try to get my music back onto it. Ended up losing it all and wasting around 8 hours. No i know i have to reload my hundreds of cd back onto mu ipod. ( will takes weeks, i swear i hate my ipod) but how do i get my purchased music back?
    Message was edited by: BGZ718

    Use the form on this page to request a free redownload, or use the Transfer Purchases feature if applicable. If neither of these works, you will need to purchase the content again to get them back; Apple needs to pay the copyright holders for each download from the iTunes Store other than podcasts, album artwork, and iPod touch/iPhone applications.
    (37515)

  • How do I get purchase date in playlist export?

    I want to identify my iTunes music purchases and keep a file of this information.
    When I create a Smart Playlist in iTunes that displays only those items where Purchased is True.
    Viewing the list in iTunes, I can see the Purchase Date.
    I then select - File > Library > Export Playlist > and save the result as a .TXT file.
    When I open this file using Excel for Mac or Numbers, the Purchase Date is not one of the columns.
    Any idea how to get purchase date as a column returned?
    TIA - JP

    If anyone would like to see the true purchase date and you wish to place this information in a file for reference, I discovered that if you create a SmartPlaylist for Purchase = true and make sure that you are showing the Purchase Date in the list, select all the rows, copy and then paste into a text document and then open as a tab delimited spreadsheet, you'll have a true list of all songs that you've purchased and their dates.

  • How can I get the report status?

    I am using web service to connect to BI Publisher and run the report by java code. And I have questions still unclear, anyone who knows about it please help me.
    1. Is there any method to get the report status, such as whether the report runs successfully or not.
    2. If I have a huge table that binds with the template (maybe RTF template), how about the performance of the BI publisher?
    3. I use the sample codes in the web service tutorial to run the report, but the out pdf report doesn't change when i add or remove the table data, how can I resolve it?
    Thanks very much.

    Use the web services and use this function
    getScheduledReportStatus
    you will get the status of the report ran.
    Possible values are: "Completed", "Error" "Running", "Scheduled","Suspended", "Unknown"
    It is in the table XMLP_SCHED_OUTPUT status column :)

  • How do I get "purchased songs" back?  Accidently deleted it under "STORE"?

    I accidentally deleted "purchsed songs"... HOw do I get it back?

    When you purchase another song (or get a free download), it will come back.

  • How do i get purcHASED songs on my iPhone thru home sharing

    How do I get the home shared playlist from my computer to my son's iphone

    yyour sons devices need to be signed into home sharing with your Apple Id. Settings-music-home sharing. If the music is purchased through iTunes and his phone and iPad are running iOS 8 or up you could set up family sharing which would give him access to all of your purchased content without using your Apple ID on his devices This would also give him access to your saved payment method for new purchases but it can be set to prompt you for permission for any purchase he tries to make.

  • How do I get purchased Itunes songs from Windows PC to MAC OS powerbook itu

    I have been purchasing music from Itunes (using my Windows PC) and burning CDs. Now, I have an ipod which I will be using with my MAC powerbook. How do I get the purchased music over to the MAC so I can download them onto my IPOD. The PC is too old and not compatable with an IPOD.
    I sorta need step by step directions... thanks

    michele8888 wrote:
    I have been purchasing music from Itunes (using my Windows PC) and burning CDs. Now, I have an ipod which I will be using with my MAC powerbook. How do I get the purchased music over to the MAC so I can download them onto my IPOD. The PC is too old and not compatable with an IPOD.
    I sorta need step by step directions... thanks
    On your PC:
    1) Back up the original downloaded files (the files ending in .m4p). An easy way for this is to use iTunes's "Back Up to Disc" function to back up your iTunes Music Store purchases onto a CD-R/DVD-R.
    2) Deauthorize your computer (Store > Deauthorize Computer...)
    On your Mac:
    1) Insert the disc with your backed up purchased files. Choose "File > Import", and select the tracks to add to your Mac's iTunes library.
    2) Authorize your new Mac to play these purchases (again) (Store > Authorize Computer...)
    You should be good to go at this point when syncing your iPod.
    Hope this helps,
    Steve

  • How can we get purchase req. no in third party sales order

    Hi,
    I am creating third party order scenario, where i can get purchase req. no in third party sales order.
    Regards,
    M B Raju

    HI
    Once you save the Sale order then go to VA02
    Double click on the Line item , click on the schedule line tab
    under Schedule line tab  you can see the Purchase Req. number
    Regards,
    Prasanna

  • PC died.  How do I get purchased music to new Iphone?

    As stated, my PC died and I can't get purchased music to my new iphone 4s.  I downloaded itunes to my new PC and set up imatch, so I can access everything via wifi, but I want to actually get the music onto the phone.
    Any assistance would be greatly appreciated.

    slebo3213 wrote:
    Good try but no.  Did that and I get something across the top of itunes about steps 1 through 3 but it's not actually syncing to the phone.  Probably because the music isn't actually on the new PC.  It's accessing the music via imatch.
    True.
    You need to put the music on the new computer.
    Did you fail to maintain a backup of your computer?

Maybe you are looking for

  • Encoding a Premiere project with WME

    I have an evolving project that I have been able to export audio and video separately (AVI and WAV) then to encode with Windows Media Encoder with good results quite a few times. Then, suddently - and although I have been able to export to DVD succes

  • Runtime Polymorphism

    Hi Asper the code snippet below: What is the advantage that we get by declaring the object as in Statement 1 over the declaration in Statement 2 below, when both obj1 and obj2 can perform all methods available in subclass B. Moreover as per what I kn

  • Performance ... soft attributes hurt a lot

    After writing a rather extensive application using a modified version of jsf (that works very well) I did some profiling. Boy was I surprised. When you get into an application which contains views (trees) that are somewhat complex, such as a tabset c

  • How to attach a hyperlink to a jpeg w ps touch

    how to attach a hyperlink to a jpeg with ps touch?

  • Apple Script should transfer text into a numbers table.

    Hello together, at first i want to appologize my english. So at second i want to write an AppleScript, that starts with a display dialoge and ask me some things. Thats not the real problem i have started it so... tell application "Numbers"   activate