Customized Query for purchase register
Hi All,
I need a query for purchase register which gives excise information with biferication.
OPCH, PCH1, ORPC, RPC1 and IEI4
In excel reporter we get the purchase register report But excise amount does not come in that report.
So, I need Customised report for that.
Regards
Shashi
hi shashi,
SELECT M.DocNum AS 'AP Inv. #', M.DocDate as 'Date', M.CardName as 'Vendor Name',M.NumAtCard as 'Bill No. & Dt.',
(Select Sum(LineTotal) FROM PCH1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
(SELECT Sum(TaxSum) FROM PCH4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
(SELECT Sum(TaxSum) FROM PCH4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
(SELECT Sum(TaxSum) FROM PCH4 where statype=7 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
(SELECT Sum(TaxSum) FROM PCH4 where statype=1 and DocEntry=M.DocEntry) as ' VAT (Rs.) ',
(SELECT Sum(TaxSum) FROM PCH4 where statype=4 and DocEntry=M.DocEntry) as ' CST (Rs.) ',
(SELECT Sum(TaxSum) FROM PCH4 where statype=10 and DocEntry=M.DocEntry) as ' CVD (Rs.) ',
(SELECT Sum(TaxSum) FROM PCH4 where statype=5 and DocEntry=M.DocEntry) as ' Ser.Tax (Rs.) ',
(SELECT Sum(TaxSum) FROM PCH4 where statype=6 and DocEntry=M.DocEntry) as 'CS on Ser.Tax (Rs.)',
(SELECT Sum(TaxSum) FROM PCH4 where statype=8 and DocEntry=M.DocEntry) as 'HECS_ST (Rs.)',
(Select Sum(LineTotal) From PCH3 Q Where Q.DocEntry=M.DocEntry) AS 'Freight (Rs.)',
M.WTSum AS 'TDS (Rs.)',
M.DocTotal as 'Total (Rs.)'
FROM OPCH M LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
LEFT OUTER JOIN PCH4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
LEFT OUTER JOIN PCH5 J ON M.DocEntry = J.AbsEntry
LEFT OUTER JOIN PCH3 Q ON M.DocEntry = Q.DocEntry
WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]') AND (T.TrgetEntry = ' ')
GROUP BY
M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
ORDER BY
M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.[DiscSum],M.WTSum,M.DocTotal
Jeyakanthan
Similar Messages
-
Create a variant for Purchase register
Hi,
while implementing MM& CIN for my client, created one T.code YDOM ( customized T.code) for purchase register.
with YDOM t.code users can see the purchase register reports. but some entries are not showing values.
user is asking why some entries not showing any value?
with the help of YDOM t.code, shall i create any Variant? so that remianing entries values flow correctly.
what is the procedure to create a variant for YDOM t.code?
please let me know
regards,
obulesudo you mean that system is displaying the fields but values are not coming in there then variant is not the solution and you need to check with an abaper why data is not flowing there
and if you want to change the screen layout then you are going the right way as mentioned in above thread -
Standard program for purchase register
Hi,
Any one tell me what is the standard report for purchase register in sap
regards,
lakshminarayanaPurchase Register Report
Purchase Register
Reward points.. -
Custom SmartForm for Purchase Order Printing
Hi,
I need a customized smartform for purchase order, which is called after the standard transaction ME9F.
I adjusted "Conditions for Output Control" by using transaction NACE ( Erased the name of the form MEDRUCK, Entered my customized smartform's name under smartform Form part and chose the type as smartform )
However, I couldn't success to see my printview whereas I continued to see the printview of Medruck.
I'd searched for the problem through here and the net, I found some names of smartforms such as: /SMB40/MMPO_L and /SMB40/MMPO_A and their driver programs like: /SMB40/FM06P . The package which consists of these elements was mentioned as " /SMB40/ "... but despite I downloaded it, my system still doesn't have the elements.
So, how can I use my own purchase order smartform or if i need the forms mentioned, in which best practice package i can find them?
SAP ECC 6.0
SAP_APPL 604
SAP_BASIS 701
Thanks in advance,Hi,
If your SAP doesnt have a standard smartform for PO, it is quite complicated to use smarform rather than sapscript.
I guess that you will need to modify the program SAPFM06P that calls the sapscript and make it call the smartform.
I will take a few time to adapt the sapscript.
Regards
Miguel -
Hi experts,
Does anyone know some useful FM or bapi for purchase register??
Regards,
Ashesh.Place a Search in SCN with your subject line or even more Good term.
-
Query For Purchase A/P Cycle Details
Hi
All export pls. provide me Query for Purchase A/P Cycle Details i.e Vendor Code Vendor Description doc. date posting date po date amount quantity unit price same as Grpo returns and invoice in singal screen
Thanks & RegardsHi,
What do you mean by Query for Purchase A/P Cycle . All Query for A/P Cycle , you can search in SDN.Any specific unsolved query for you can be posted here.Ok.
Check the details:
1.PO creation
http://e-mory.blogspot.com/2008/01/sap-me21n-create-purchase-order_30.html
2.Goods Receipt
http://e-mory.blogspot.com/2008/02/sap-migo-goods-receipt.html
3.Invoice Verification
http://e-mory.blogspot.com/2007/11/sap-miro-enter-invoice-verification.html
Regards,
Biju K -
Hi,
I want to FMS Query for Purchase Order.
I want to display the weight * price in one user define field.
Please suggest meHi Tushar.......
Try this.......
declare @var1_wt as varchar(255)
declare @var2_Pr as varchar(255)
declare @var3 as float
declare @var4 as float
set @var1_wt=$[$38.58.0]
set @var2_Pr=$[$38.14.0]
set @var3=cast( substring(replace(@var1_wt,',',''),0,len(replace(@var1_wt,',',''))-1) as float)
set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
select @var3 * @var4
Regards,
Rahul -
Z report for purchase register
Hello Friends,
My client is having Z report for running purchase register. but if he runs reports, conditional values are not flowing to the report.
Only quantity, amt, net order price, UOM are appearing, vat, duties, freight are not displaying in the report. Please tell me what to do?
Regards,
nr sHi,
For the conditions of freight,etc, you may try picking them from tables KOMV and KOMP for PO conditions. This should help you resolve your problem of conditions not getting picked up and since its a z-program, you may have to check the code written for any hardcoding done.
Regards,
Ancy -
Custom Event for Purchase Requisition Create, Change & Delete
Hello Experts,
I want to create a custom event which triggers on Purchase Requisition Create, SAP provide's standard event's for purchase requisition release but not for create.
What are all the steps and how to create a new event.
Thanks in Adavance,
Sandhya.Hi Sandhya,
may i know the reason why you are trying to create custom methods.
You have business object BUS2009(for PR line item wise release) and BUS2105(for PR overall release).
Both those business object have events RELEASESTEPCREATED (for PR creation) and SIGNIFICANTLYCHANGED(For PR change).
Even then if you want to create custom events, create a subtype of the standard business object, then click on events, and then select create. Now create your Z-events, say ZCREATED (For creation), ZCHANGED (for changed) and ZDELETED (for deleted). Now select each event, click on edit -> Change release status -> object type component -> to be implemented. Follow the same for all the events. Then select each event, click on edit -> Change release status -> object type component -> to be released.
Now click on your custom object, click on edit -> Change release status -> object type component -> to be implemented.Then click on your custom object, click on edit -> Change release status -> object type component -> to be released.
After this in SWEC tcode, click on new entries. Select change document object as BANF, business object as say ZBUS2105 and event as ZCREATED. make sure radio button on create is checked.
Similary create entries for ZCHANGED event and ZDELETED.
Select on change and on delete radio button for event ZCHANGED and ZDELETED event respectively.
let me know if you have any queries.
Regards,
Raj -
Hi Gurus,
I want prepare a purchase register . please tell me the tables for that. please help me out.
regards,
Lakshmihi,
find tables in MM-PUR (Purchasing) :
EBAN - Purchase Requisition
EBKN - Purchase Requisition Account Assignment
EBUB - Index for Stock Transport Requisitions for Materi
EINA - Purchasing Info Record: General Data
EINE - Purchasing Info Record: Purchasing Organization D
EIPA - Order Price History: Info Record
EKAB - Release Documentation
EKAN - Vendor Address: Purchasing Document
EKBE - History per Purchasing Document
EKBEH - Removed PO History Records
EKBZ - History per Purchasing Document: Delivery Costs
EKBZH - History per Purchasing Document: Delivery Costs
EKEH - Scheduling Agreement Release Documentation
EKEK - Header Data for Scheduling Agreement Releases
EKES - Vendor Confirmations
EKET - Scheduling Agreement Schedule Lines
EKETH - Scheduling Agreement Schedules: History Tables
EKKI - Purchasing Condition Index
EKKN - Account Assignment in Purchasing Document
EKKO - Purchasing Document Header
EKPA - Partner Roles in Purchasing
EKPB - "Material Provided" Item in Purchasing Document
EKPO - Purchasing Document Item
EKPV - Shipping-Specific Data on Stock Tfr. for Purch. D
EKRS - ERS Procedure: Goods (Merchandise) Movements to b
EKUB - Index for Stock Transport Orders for Material
EORD - Purchasing Source List
EQUK - Quota File: Header
EQUP - Quota File: Item
T024 - Purchasing Groups
T024E - Purchasing Organizations
T024W - Valid Purchasing Organizations for Plant
T024Z - Purchasing Organizations
T027A - Shipping Instructions, Purchasing
T027B - Texts: Shipping Instructions
T027C - Codes for Compliance with Shipping Instructions
T027D - Compliance with Shipping Instructions: Texts
T069 - Certificate Categories
T069Q - Control Data for Source Determination and Checkin
T069T - Certificate Categories: Text Description
T160 - SAP Transaction Control, Purchasing
reward points if hlpful. -
Customer Subscreen for Purchase Requisition
Hello All,
I need a custom subscreen on requisition at <b>HEADER</b> level. 'MEREQ001' adds a screen at item level. Is there any Screen Exit / BADI to add a custom screen at header level? Any kind of help is really appreciated.
Thank you all,
ChandniHi Chandi Reddy,
The t.code is ME51 For this available exits are :
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting
LMELA010 Inbound shipping notification: Transfer item data from
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Rece
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition rel
M06B0003 Number range and document number
M06B0004 Number range and document number
M06B0005 Changes to comm. structure for overall release of requi
M06E0004 Changes to communication structure for release purch. d
M06E0005 Role determination for release of purchasing documents
ME590001 Grouping of requsitions for PO split in ME59
MEETA001 Define schedule line type (backlog, immed. req., previe
MEFLD004 Determine earliest delivery date f. check w. GR (only P
MELAB001 Gen. forecast delivery schedules: Transfer schedule imp
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery toler
MM06E001 User exits for EDI inbound and outbound purchasing docu
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into P
MM06E008 Monitoring of contr. target value in case of release or
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound proces
MMAL0004 ALE purchasing info record distribution: Inbound proces
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001
For t.code we51n the available exits and badi are :
Enhancement/ Business Add-in Description
Enhancement
MEREQ001 Customers' Own Data in Purchase Requisition
Business Add-in
ME_COMMITMNT_PARKING BAdI for Redefining Commitment Interface When Parking
ME_MEREQ_PARKING BAdI Purchase Requisition: "Hold"
ME_REQ_HEADER_TEXT Copy Header Text: Enjoy Purchase Requisition
o.of Exits: 1
o.of BADis: 3
Rewards some points.
Rgds,
P.Naganjana Reddy -
Creating a Query for Purchase Order Approval
I need to develop a query to check if any of the line totals in a new purchase order exceeds $500. I have to attach this query to the approval procedure (under 'Terms' in 'Define Approval templates'). When the 'Add' button on the purchase order is clicked, the values on the form are still not available in the database. This means, my query has to pick the data from the new purchase order form. Is there any way to build such a query? Thanks.
Satish, Alerts just notify the appropriate parties. They do not stop a document from being posted. This means, it is not capable to recognize the situation unless it's already stored in the DB.
Alexey. what about creating a Development Request about this topic?
Regards,
Felipe -
Could someone share with me a Query for Purchase report in BP Currency?
Hi All,
Does anyone have a Purchase Analysis query by Business Partner (Vendor/Supplier) that returns all invoices by the month or anything else (items etc purchased) by the month in BP Currency please?
I would like to use it as standalone query and eventually import it as a Crystal Report query.
Appreciate it. Thank you.I just managed to create the report using Crystal and db files coming from Purchase Invoice and currency details coming from BP vendor file.
-
Hello
I am doing a Query. I need to add this field with the complete name of the person who did a Purchase document order.
I found this field with this information througt transacction SU01.
Full Name of Person
ADDR3_DATA
NAME_TEXT
That field contains the information that I need. But the problem is, this table in not allowed to be used as a join table.
I have been looking with the tables conected to this field but they do not load the data that I need.
If someone know something about it,Irma, como estás?
Probá con la tabla USER_ADDR o la USR03.
Saludos -
Hi All,
I am unable to use this query as the data is repeating.
SELECT T1.CARDCODE, T1.CARDNAME , T1.DOCNUM as 'PURCHASE ORDER#',T1.DocStatus 'PO Status', T1.DOCDATE 'PO Date', T1.DocTotal 'PO Total', T0.[Dscription], T0.[Quantity],T0.[OpenQty],T1.[U_RevNo], T1.[U_RevDt], T1.[U_RevRmrks],T1.[Comments], T3.DOCNUM DRN#,T3.DocStatus 'DRN Status', T3.DOCDATE 'DRN Date',T2.[Dscription], T2.[Quantity],T2.[U_ExcsqTY] as 'Short/Excess', T3.DocTotal 'DRN Total',T3.[Comments],T5.DOCNUM Invoice#,T5.DocStatus 'Invoice Status', T5.DOCDATE 'Invoice Date',T4.[Dscription], T4.[Quantity], (T5.DocTotal-T5.VatSum-T5.TotalExpns-T5.DiscSum) 'Total Before Discount', T5.VatSum 'Tax', T5.TotalExpns 'Freight', (T5.DocTotal - T5.PaidToDate) 'Total Payment Due',T5.[Comments], T7.DOCNUM AS 'CREDIT MEMO#', T7.DOCDATE, T7.DOCTOTAL,T6.[Dscription], T6.[Quantity],T7.[Comments]
FROM DBO.POR1 T0
INNER JOIN DBO.OPOR T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN DBO.PDN1 T2 ON T2.BASEENTRY = T1.DOCENTRY
LEFT JOIN DBO.OPDN T3 ON T2.DOCENTRY = T3.DOCENTRY
LEFT JOIN DBO.PCH1 T4 ON T4.BASEENTRY = T1.DOCENTRY
LEFT JOIN DBO.OPCH T5 ON T5.DOCENTRY = T4.DOCENTRY
LEFT JOIN DBO.RPC1 T6 ON T6.BASEENTRY = T5.DOCENTRY
LEFT JOIN DBO.ORPC T7 ON T7.DOCENTRY = T6.DOCENTRY
where T1.DOCDATE >='[%0]' and T1.DOCDATE <='[%1]'
I tried to use distinct in the query but it shows error ,'The ntext type data cannot be selected as DISTINCT because it is not comparable.'
Thanks,
JosephHi Joseph,
Try this:
SELECT T1.CARDCODE, T1.CARDNAME , T1.DOCNUM as 'PURCHASE ORDER#',T1.DocStatus 'PO Status', T1.DOCDATE 'PO Date', T1.DocTotal 'PO Total', T0.Dscription, T0.Quantity,T0.OpenQty,T1.Comments, T3.DOCNUM DRN#,T3.DocStatus 'DRN Status', T3.DOCDATE 'DRN Date',T2.Dscription, T2.Quantity, T3.DocTotal 'DRN Total',T3.Comments,T5.DOCNUM Invoice#,T5.DocStatus 'Invoice Status', T5.DOCDATE 'Invoice Date',T4.Dscription, T4.Quantity, (T5.DocTotal-T5.VatSum-T5.TotalExpns-T5.DiscSum) 'Total Before Discount', T5.VatSum 'Tax', T5.TotalExpns 'Freight', (T5.DocTotal - T5.PaidToDate) 'Total Payment Due',T5.Comments, T7.DOCNUM AS 'CREDIT MEMO#', T7.DOCDATE, T7.DOCTOTAL,T6.Dscription, T6.Quantity,T7.Comments
FROM DBO.POR1 T0
INNER JOIN DBO.OPOR T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN DBO.PDN1 T2 ON T2.BASEENTRY = T1.DOCENTRY AND T2.BaseLine=T0.LineNum
LEFT JOIN DBO.OPDN T3 ON T2.DOCENTRY = T3.DOCENTRY
LEFT JOIN DBO.PCH1 T4 ON T4.BASEENTRY = T1.DOCENTRY AND T4.BaseLine=T2.LineNum
LEFT JOIN DBO.OPCH T5 ON T5.DOCENTRY = T4.DOCENTRY
LEFT JOIN DBO.RPC1 T6 ON T6.BASEENTRY = T5.DOCENTRY AND T6.BaseLine=T4.LineNum
LEFT JOIN DBO.ORPC T7 ON T7.DOCENTRY = T6.DOCENTRY
where T1.DOCDATE >='[%0\]' and T1.DOCDATE <='[%1\]'
Thanks,
Gordon
Maybe you are looking for
-
I have the new Macbook Air w/128Gb
My wife just gave me a Great Macbook Air w/128Gb & 4Gb, i want to use it at work, but need to use Windows 7 or 8 to access my companies Domain. Will Parallels or Fusion 5 work on the Air? Are there any drawbacks, and which is best for this? Thanks,
-
Reconcilation after global consolidation
hi there, I just did a consolidation,posted the data in new set of books and tried to reconcile the data between the 2 set of books. But i found the data is not reconciling, can anyone help me out on this. Any suggestions are welcome. Regards
-
How to set any variant as default to selection screen?
-
Underlay row not exported to excel to a single row
Happy New Year to all, I have an underlay function in Details a section. I also have Details b thru Details z sections. When using the underlay feature in Details a, it lines up beautifully with Details b row. However, when I export to excel data
-
How to save Internal table into Excel Sheet in App. Sever in Background
How can i save my file int excel in application server in background. i am able to do in fronend but not in back ground.