QUERY FOR GOODS RETURN -- GRPO -- PO HISTORY
HI Folks
I need to write a query for the following requirement.
Goods Return
It's Base GRPO (no & date)
and it's PO (date & no)
The above fields should be in the same query.
Can anyone help me on this please.
regards
karthik
Hi
Select T0.Project AS 'Job Number', T0.DocDate as [Date of Goods Return],T0.DocNum As [Good Return Number],T2.DocNum as [GRPO Number],
T2.DocDate as [GRPO Date],T4.DocNum as [PO Number],T4.DocDate as [PO Date],T0.CardName as 'Vendor Name',SUM(t1.linetotal) as ' Basic'
FROM ORPD T0
Inner Join RPD1 T1 on T0.DocEntry=T1.DocEntry
Inner Join OPDN T2 on T1.BaseEntry=T2.DocEntry and T1.BaseType='20'
Inner Join PDN1 T3 on T2.DocEntry=T3.DocEntry
Inner Join OPOR T4 on T4.DocEntry = T3.BaseEntry and T3.BaseType ='22'
GROUP BY T0.Project , T0.DocDate,T0.DocNum,T2.DocNum,
T2.DocDate ,T4.DocNum ,T4.DocDate ,T0.CardName
*When i run this query the BASIC amt is calculated by Multiplying basic * no of line items. Can anybody guide me where changes has to be made. And also i am going to add Freight,Excise,CST & VAT at document level in thus query.*
regARDS
KARTHIK
Similar Messages
-
Goods Return - GRPO - PO QUERY
Friends
The following is the requirement for one of my client:-
PROJECT CODE - GOODS RETURN DATE - GOODS RETURN # - GRPO # - GRPO DATE - PO # - po DATE - VENDOR NAME - BASIC - FREIGHT - EXCISE - VAT - CST - G/R DOC TOTAL
I need the above for Document Level
Would appreciate if someone can help me on this.
regards
KARTHIKGORDON
Following is the query. Everything comes right. I did not get correct Tax Details. Can u pls guide me where i had made errors in the query
Select T1.Project AS 'Job Number', T0.DocDate as [Date of Goods Return],T0.DocNum As [Good Return Number],T2.DocNum as [GRPO Number],
T2.DocDate as [GRPO Date],T4.DocNum as [PO Number],T4.DocDate as [PO Date],T0.CardName as 'Vendor Name',T0.DOCTOTAL,
(t0.DOCTOTAL) - (T0.VATSUM) - (T0.TotalExpns) as 'Basic',
t0.totalexpns as 'Freight & P&F Amt',
Sum(T5.TaxSum) as 'BEDAmt',
Sum(T6.TaxSum) as 'ECeSSAmt',
Sum(T7.TaxSum) as 'HECess Amt',
Sum(T8.TaxSum) as 'AED Amt',
Sum(T9.TaxSum) as 'CST along with Excise Amt',
Sum(T10.TaxSum) as 'CST Amt',
Sum(T11.TaxSum) as 'VAT Amt',
Sum(T12.TaxSum) as 'VAT along with Excise Amt',
SUM(T13.TaxSum) as 'CST on Freight Amt',
Sum(T14.TaxSum) as 'VAT on Freight Amt',
Sum(T15.TaxSum) as 'BED on Freight',
Sum(T16.TaxSum) as 'CESS on Freight',
Sum(T17.TaxSum) as 'HECESS on Freight'
FROM ORPD T0 Inner Join RPD1 T1 on T0.DocEntry=T1.DocEntry
Inner Join OPDN T2 on T1.BaseEntry=T2.DocEntry
Inner Join PDN1 T3 on T2.DocEntry=T3.DOCENTRY
Inner Join OPOR T4 on T4.DocEntry = T3.BaseEntry
LEFT OUTER JOIN rpd4 T5 ON T5.DocEntry=T0.DocEntry and T0.DocEntry=T5.DocEntry AND T5.staType=-90 AND T1.LineNum=T5.LineNum
LEFT OUTER JOIN RPD4 T6 ON T6.DocEntry=T0.DocEntry and T0.DocEntry=T6.DocEntry AND T6.staType=-60 AND T1.LineNum=T6.LineNum
LEFT OUTER JOIN RPD4 T7 ON T7.DocEntry=T0.DocEntry and T0.DocEntry=T7.DocEntry AND T7.staType=7 AND T1.LineNum=T7.LineNum
LEFT OUTER JOIN RPD4 T8 ON T8.DocEntry=T0.DocEntry and T0.DocEntry=T8.DocEntry AND T8.staType=-80 AND T1.LineNum=T8.LineNum
LEFT OUTER JOIN RPD4 T9 ON T9.DocEntry=T0.DocEntry and T0.DocEntry=T9.DocEntry AND T9.staType=13 AND T1.LineNum=T9.LineNum
LEFT OUTER JOIN RPD4 T10 ON T10.DocEntry=T0.DocEntry and T0.DocEntry=T10.DocEntry AND T10.staType=4 AND T1.LineNum=T10.LineNum
LEFT OUTER JOIN RPD4 T11 ON T11.DocEntry=T0.DocEntry and T0.DocEntry=T11.DocEntry AND T11.staType=1 AND T1.LineNum=T11.LineNum
LEFT OUTER JOIN RPD4 T12 ON T12.DocEntry=T0.DocEntry and T0.DocEntry=T12.DocEntry AND T12.staType=14 AND T1.LineNum=T12.LineNum
LEFT OUTER JOIN RPD4 T13 ON T13.DocEntry=T0.DocEntry and T0.DocEntry=T13.DocEntry AND T13.staType=26 AND T1.LineNum=T13.LineNum
LEFT OUTER JOIN RPD4 T14 ON T14.DocEntry=T0.DocEntry and T0.DocEntry=T14.DocEntry AND T14.staType=25 AND T1.LineNum=T14.LineNum
LEFT OUTER JOIN RPD4 T15 ON T15.DocEntry=T0.DocEntry and T0.DocEntry=T15.DocEntry AND T15.staType=22 AND T1.LineNum=T15.LineNum
LEFT OUTER JOIN RPD4 T16 ON T16.DocEntry=T0.DocEntry and T0.DocEntry=T16.DocEntry AND T16.staType=23 AND T1.LineNum=T16.LineNum
LEFT OUTER JOIN POR4 T17 ON T17.DocEntry=T0.DocEntry and T0.DocEntry=T17.DocEntry AND T17.staType=24 AND T1.LineNum=T17.LineNum
WHERE T0.DocDate >='[%0]' AND T0.DocDate <='[%1]' AND T0.DocType = 'I'
GROUP BY T1.Project,T0.DocDate,T0.DocNum,T2.DocNum,T2.DocDate,T4.DocNum,T4.DocDate,T0.CardName,t0.DOCTOTAL, T0.VATSUM,T0.TotalExpns
regards
KARTHIK -
Query for Good receipt PO Minus Good Return
Hi Experts,
How to write a query which is Good Receipt PO, minus out Good Return?
Below is the Good Receipt PO which i only can do.
SELECT T1.DocDate AS 'Posting Date', T1.DocNum AS 'Document Number', T1.U_CUSTPONO AS 'Customer PO No', T0.ItemCode AS 'Item No.', T1. U_DONO AS 'Supplier DO NO.' ,T0.Dscription AS 'Item/Service Description', T0.Quantity AS 'Quantity', T0.unitMsr AS 'UOM' , T0.WhsCode AS 'WhseCode'
FROM [dbo].[PDN1] T0 INNER JOIN [dbo].[OPDN] T1 ON T1.DocEntry = T0.DocEntry WHERE T1.DocDate>=[%0] AND T1.DocDate <=[%1] ORDER BY T1.DocDate
Thanks.
Regards,
DannyHai Danny Gan
Try This
SELECT T1.DocDate AS 'Posting Date', T1.DocNum AS 'Document Number', T1.U_CUSTPONO AS 'Customer PO No', T0.ItemCode AS 'Item No.', T1. U_DONO AS 'Supplier DO NO.' ,T0.Dscription AS 'Item/Service Description', T0.Quantity AS 'Quantity', T0.unitMsr AS 'UOM' , T0.WhsCode AS 'WhseCode'
FROM dbo.PDN1 T0 INNER JOIN dbo.OPDN T1 ON T1.DocEntry = T0.DocEntry WHERE T1.DocDate>=%0 AND T1.DocDate <=%1 and T0.TargetType <> 21 ORDER BY T1.DocDate
Edited by: Prasanna s on Apr 7, 2009 1:28 PM -
CIN for Goods Return to Vendor
Hi
Could some one can let me know how to update the RG23 D register in case of return to vendor from depot plant.
1.. ME21N - Create a Returns PO (Activate "Returns" indicator for PO line item)
2. MIGO - Goods Receipt > Purchase Order (Returns PO) (Here system will hit Mvmt type "161" and you can also select Un-restricted/blocked stock from where you want to return the stock)
3.. MIRO - Credit memo w.r.t. Returns PO.
Please let me know the process in case of depot plant with respect to updatation of RG23D register.Dear,
Please follow below mention cycle: -
1.ME21N - Create a Returns PO Returns indicator for PO line item.
2. MIGO - Goods Receipt Mvmt type "161" against return purchase order
3. J1IS u2013 Excise Invoice Other Movements
click on create button to create an outgoing excise invoice
Take ref.doc.type - MATD, Doc Number - Material document NO Series Group, Excise Group, Vendor
Check BED, ECS and SECess values to be reversed. and click on save button.
4. J1IV - Post Excise Invoice.
5. MIRO - Credit memo against. Returns PO.
Note: - Before all process maintain Material chapter id and vendor excise detail in J1ID.
Regards,
Mahesh Wagh -
Excise invoice for goods return
Hi
We are working on ECC 6.0.
When we try to create Excise Invoice through J1IS for Ref doc Type MATD for Material Doc of 122 Movement Type we are getting the following error - "GL account has not been assigned for PLA AT1 in customisation"
Can anyone help that for which Excise Transaction Type (ETT), the GL account has to be assigned under GL Accounts per Excise Transaction.
RegardsHi Prasanna,
Check in T-code J1ID, in this look for column PLA AT1 and enter
relevant GL codes as required.
Regards
Velu Mudaliar -
Issue Price Difference Acct. in JE of goods return
Dear all,
There is issue in price difference account(Defined as Material Purchase Gain A/c in warehouse)
in good return journal entry,
Eloborating problem : User booking subcontracting grpo for qty 1470.024 with price also for 1470.024,
JE for GRPO is Sub Contracting Charges A/c Dr to Sub Contracting Charges Clearing A/c Cr.
ie.,
Sub Contracting Charges a/c Dr -11,92,189.46
Sub Contracting Charges Clearing A/c Cr -11,92,189.46
Now they partially do good return for qty 811 with price 1470.024,
JE for Goods return is
Material Purchase Gains A/c Dr -11,78,900.46
Sub Contracting Charges a/c Dr -13,289
Sub Contracting Charges Clearing A/c Cr -11,92,189.46
Actually sub contracting charges a/c should have been debited to 11,92,189.46,
Why it is hitting Material purchase gains a/c ?
Pl clarify it.
Edited by: Jeyakanthan A on May 21, 2009 3:26 PMHai!
As per my understanding,
Stock Acc always in Asset Draw, Price Diff Acc in Expense Draw.
For Example..
1.I am purchasing a item of 10 qty each 1 rupee through GRPO.
2.It will post a JE like stock acc INR 10 Debit and GRNI Acc 10 Credit.
3.After that i have transfered my 5 qty to some other warehouse.
4.I am booking a AP invoice with that GRPO as base, now i have changed my price to 2 rupee.
5.It will post a JE like stock acc INR 5(51 which like in warehouse) debit, GRNI Acc INR 10 debit, price Diff Acc INR 5 Debit (51 go as expence) and Vendor INR 20 Credit.
Regards,
Thanga Raj.K -
Hi all,
I have created a GRPO the journal Entry was right
entry is Raw material Dr 25000
GR/IR 25000
and Immediately I have done goods return.
But when I see the journal entry in Goods Return, Price difference account got effected..
the entry for Goods return is
Ra material Dr - -10000
Price Difference Dr - -15000
To GR/IR 25000
I dont understand why my price difference account got effected?
Regards
Shashisorry wrong post
-
Hi
How exactly is the status of a Goods return controlled / automatically set by B1?
I.e.: I created a new one based on a GRPO and it has been closed immediately after saving it, automagically. Actually, theses Goods are going back and they will return (reworked) and I planned to do a GRPO then based on the Goods return issued now. However, this will not be possible anymore.
When does B1 close / leave open a Goods Return?
How is a Goods Return usually 'balanced'/closed?
Thanks
FranzPaul,
This seems not to be entirely correct.
I have several Goods Return that have an open status. This is true for all the documents that are not based on an GRPO or alike, for instance. In these cases when the reworked goods return a GRPO can be based on the Goods Return. However, this seems only to be possible if the Goods Return is not based on any other document.
In my case, the flow of the ggods can not completly followed because B1 automatically closes Goods Retuns that are based on
an other document, i.e. a GRPO.
What I would like to do to completely be able to follow the goods flow in B1:
Purchase Order -> GRPO -> Goods Return -> GRPO
But only these are possible:
Purchase Order -> GRPO -> Goods Return
or:
Goods Return -> GRPO
Franz -
Goods return without quality inspection
Dear Friends ,
I wants to do material return without quality inspection , is it possible , how can we do this.
Regards,
Mahesh.Hi Mahesh,
In SAP Business One, there is no quality inspection for goods return. You need to post on a proper forum to get the answer.
Thanks,
Gordon -
Hi all!
how to go for 'Goods Return' after the corresponding invoice been paid?
thanks in advance,
Meera.Meera,
Once an Invoice is Paid, the Invoice document is marked as Closed by SAP. Nothing further can be done about that invoice.
An Item AP Credit memo actually Credits your Vendors Account and Debits Inventory.
If you do a Goods Return, the transaction would post as Credit to Allocation Account (depends on your G/L setup) and Debit Inventory. You will then need to create another A/P Service credit memo document and get credit from the Vendor.
Therefore an Item AP Credit Memo would be the way to go in this scenario
Suda -
Problem creating goods return.
hi
I am creating a release order using idocs(PORDCR01) and against that release order 3 different goods receipts (mvmt type 101) are made each of quantity 5 through idocs (WMMBID02).
Now i need to create a goods return (122) against the RO for quantity 15 using idocs. But its giving me an error saying that the PO is deficit of quantity 10. Its considering only the first goods receipt with quantity 5. Is there any way by which all the three goods receipts quantities are considered at one time for goods return.
Goods movements are created against RO only.
appreciate any suggestions for the same!
thanks.
AnandHi !
I think you can only return the quantity thas was in the goods-reciepts.
In your case you'll have to do a 122 für each of the 3 different goods receipts.
Try the MRL in dialog...
Regards
Rainer
Some points would be nice if that helped.... -
Problem of Query of Module Purchase Order, Good Receipt PO, Good Return
Hi,
I would like to seek for assistance regarding double entries of documents, I have used the query and found out lately the it has a problem, Please refer to thread "Query of Module Purchase Order, Good Receipt PO, Good Return" for details.
You help is very much appreciated.
Regards,
ClintHi Clint,
Try this one:
SELECT DISTINCT 'GRPO' AS TYPE, T1.DOCNUM
'GRPO/RET#', T3.DOCNUM 'PO#',T1.CARDCODE,
T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE, T0.QUANTITY,
T0.PRICE, T0.LINETOTAL
FROM DBO.PDN1 T0
INNER JOIN DBO.OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN DBO.POR1 T2 ON T0.BASEENTRY = T2.DOCENTRY
INNER JOIN DBO.OPOR T3 ON T2.DOCENTRY = T3.DOCENTRY
WHERE T1.DOCNUM = '[%0]' AND T0.ITEMCODE IS NOT NULL
UNION ALL
SELECT DISTINCT 'RETR', T1.DOCNUM,T3.DOCNUM,
T1.CARDCODE, T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE,
T0.QUANTITY, T0.PRICE, T0.LINETOTAL
FROM PDN1 T0
INNER JOIN OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN RPD1 T2 ON T0.TRGETENTRY = T2.DOCENTRY
INNER JOIN ORPD T3 ON T2.DOCENTRY = T3.DOCENTRY
WHERE T1.DOCNUM = '[%0]' AND T0.ITEMCODE IS NOT NULL
If you still have duplicates, let me know any differences in those lines.
Thanks,
Gordon -
Goods Return for Capital Goods
Dear Experts,
I need correct SAP Process for the below scenario :
GRPO for Capital goods has been raised.
Incoming excise Invoice for the GRPO has been booked. While booking Incoming excise invoice, 50% of the Excise duties will be posted to Capital Goods On hold account defined in the GL Account determination.
Now due to some reasons i am raising Goods return for the GRPO raised earlier for the Capital Goods.
Then i am booking the Outgoing excise Invoice. But in the Outgoing excise invoice the 50% Of the excise duties posted to the on hold account is not reversed.
In outgoing excise Invoice,Only sales accounts defined in tax code will be credited and CENVAT Clearing account will be debited.
How to reverse the 50% Excise duties got posted in the On hold Account ?
Kindly mail some Valuable suggestions
Regards
New Age Bizsoft SolutionsHi,
There is no defined process for returning capital goods.
While making the Incoming excise invoice Purchase tax accounts defined in tax code and On Hold account defined in GL Account determination will be debited for the 50% value.
While returning the same,in Outgoing excise invoice, sales tax accounts defined in tax code will be credited for the whole value.
After doing this, An adjustment journal entry need to be passed by crediting the On hold account and debiting the sales tax accounts defined in tax codes for only the 50% excise value.
By doing so our input and output for excise booking will balance.
Hope you got my view in it.
Regards
Ravindran Srinivasan. -
Goods Return from GRPO to backdate with error.
Dear all,
I've got a problem from copying Goods Return from GRPO to the backdate, for example, GRPO Posting Date is '2011-12-11' and Return Posting Date is '2011-11-11', the system threw the below error:
Reconciliation date must be on or after the last posting date for transactions selected for reconciliation [Message 3821-3]
I am using B1 8.82 PL00, the error never come before in older versions of B1.
Please help me,
Many thanks,
DoanHi Doan,
Thanks for your answer.
You're right, I can backdate the DocDate, but what matters is the posting date because of VAT reports.
This way, the VAT is due on a previous date, and now it cannot be issued correctly and VAT reports are all wrong.
This never happened before 8.82, why now?...
Regards,
Jorge -
Query of Module Purchase Order, Good Receipt PO, Good Return
Hi,
Like to ask assistance regarding Module Purchase Order, Good Receipt PO, Good Return under Purchasing A/P.
I have a hard time to linking the tables above:
PO Module have table : OPOR and OPOR1
GRPO have table : OPDN and PDN1
Good Return have table : ORPD and RPD1
Its very mind bubling linking this 6 tables can anyone please can assist regarding the situation, a query that shows that they are connected to each other.
Thank very much!
ClintClint,
Like Suda said, this query assumes your have normal business practise.
One more thing to mention, the lower part of union all needs some other change. Here is the complete query:
SELECT DISTINCT 'GRPO' AS TYPE, T1.DOCNUM "GRPO/RET#", T3.DOCNUM PO#,T1.CARDCODE, T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE, T0.QUANTITY, T0.PRICE, T0.LINETOTAL, T0.TOTALFRGN, T0.RATE
FROM PDN1 T0
INNER JOIN OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN POR1 T2 ON T0.BASEENTRY = T2.DOCENTRY
INNER JOIN OPOR T3 ON T2.DOCENTRY = T3.DOCENTRY
WHERE T1.DOCNUM LIKE '[%0]'
UNION ALL
SELECT DISTINCT 'RETR', T1.DOCNUM,T3.DOCNUM, T1.CARDCODE, T1.CARDNAME , T1.DOCDATE, T0.ITEMCODE, T0.QUANTITY, T0.PRICE, T0.LINETOTAL, T0.TOTALFRGN, T0.RATE
FROM PDN1 T0
INNER JOIN OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN RPD1 T2 ON T0.TRGETENTRY = T2.DOCENTRY
INNER JOIN ORPD T3 ON T2.DOCENTRY = T3.DOCENTRY
WHERE T1.DOCNUM LIKE '[%0]'
Maybe you are looking for
-
Form feed, null and StringTokenizer
is form feed recognized as null when using the StringTokenizer? i currently have my StringTokenizer set with a blank space and i am attempting to read until the value is (EOF) null and while it hasMoreTokens. the text file that i am reading from span
-
Anyone know where can download some dissertation adout adobe bridge plug-in?
anyone know where can download some dissertations about adobe bridge plug-in?I`m vexationing and afflictioning ...........
-
How to move the Documents folder to another HD
I'll be installing a second HD by removing the DVD and want to move some folders to that drive. I would like to move Downloads and Documents folders. Thanks in advance, JoaoBra
-
Is there any tool available to migrate oracle applications forms to OAfwk pages. Is it feasible by any means?
-
Can't update to Camera Raw 7.3
I have the pay monthly version of CS6. I'm trying to take a picture from Lightroom 4 over to CS6. It says in Lightroom that I need to update Photoshop to Camera Raw 7.3. I go to updates in Photoshop and it spins for a second then a popup window says