Wants Combain query of GRPO -Return- AP Invoice
Dear All,
Pls. help me for this query.
A) GRPO :
Vendor code
Vendor name
Doc Num
Doc status
Posting date
Total Before discount
Tax
Freight
Total Payment Due
B) IF GOODS RETURNS ARE DONE THEN:
Doc Num
Doc status
Posting date
Total Before discount
Tax
Freight
Total Payment Due
C) IF AFTER GRPO ,AP INVOICE DONE THEN:
Doc Num
Vendor referance Number.
Doc status
Posting date
Total Before discount
Tax
Freight
Total Payment Due
(A) ,(B),(C) should in a single query.
If possible pls. send me query.
Regards.
Mahesh.
Try this one:
SELECT DISTINCt T1.CARDCODE, T1.CARDNAME , T1.DOCNUM GRPO#,T1.DocStatus 'GRPO Status', T1.DOCDATE 'GRPO Date', T1.DocTotal 'GRPO Total', T3.DOCNUM Return#,T3.DocStatus 'Return Status', T3.DOCDATE 'Return Date', T3.DocTotal 'Return Total',T5.DOCNUM Invoice#,T5.DocStatus 'Invoice Status', T5.DOCDATE 'Invoice Date', (T5.DocTotal-T5.VatSum-T5.TotalExpns-T5.DiscSum) 'Total Before Discount', T5.VatSum 'Tax', T5.TotalExpns 'Freight', (T5.DocTotal - T5.PaidToDate) 'Total Payment Due'
FROM DBO.PDN1 T0
INNER JOIN DBO.OPDN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN DBO.RPD1 T2 ON T2.BASEENTRY = T1.DOCENTRY
LEFT JOIN DBO.ORPD 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
WHERE T1.DOCNUM like '[%0\]%'
Thanks,
Gordon
Similar Messages
-
Wants multiple GRPO - one AP Invoice.
Dear friends,
I have made 1 PO with Qty 100.now perparing 5 GRPO(goods receipt PO)(10-10-10-5-5-10)Qty with different quantities .But i want to make combain AP invoice for that.How can i do that?
Regards,
Mahesh.1.Open AP invoice,Select Vendor code,Enter Vendor Ref. No. & also enter posting date.
2.Click Copy from Select Goods Receipt PO,Select all the relevant goods receipt PO by pressing Ctrl Key & Click ok,
Copy Document Wizard to copy all GRPO into AP invoice.
Jeyakanthan -
How to join GRPO with AP invoice thru query ?
hi all,
How to join GRPO with AP invoice in sql query ?
JeyakanthanHi Jeyakanthan
Are you using query in SAP Business One or outside the system? If you select the tables in SAP Business One as OPCH and OPDN then no inner join will appear, as the links sit on the line level. You will need PCH1 and PDN1. The link can be found in both directions, but bear in mind that 1 AP Invoice could be based on more than 1 Goods Receipt PO. For this reason the best approach is to start at the AP Invoice line level and use the BaseType and BaseRef fields to view which lines were pulled from which Goods Receipt PO's.
Kind regards
Peter Juby -
Hi,
G/L Account mentioned on line level does not get hit in Journal entry on GRPO and AP Invoice in SAP B1 9.0 PL - 11
I am creating an independent AP Invoice, there are two issues:
1. On line level G/L Account field is not open for selection
2. I have then selected and updated the account on Form Settings. Same account gets updated on line level.
In Journal Entry selected G/L account on line level shall be hitted. But it does not put any effect on JE. Accounting is set by Warehouse. It picks up accounts from warehouse only.
Need help its urgent.
Thanks in advance.Invoice is Item Type.
G/L Accounts are set by Warehouse. But if explicitly we are want to change the account on line level in that case, it is not getting reflected in Journal entry. On AR Invoice same scenario works perfectly. On line level I can change the accounts explicitly and have the effect on Journal entries.
Issue seems to be on AP side only.
As required please find attached the screen shots.
JEwith mapped GL Account on Warehouse
JEwith different GL Account on line Level via Form Settings
Thanks & Regards
Sonil -
Sales return - Excise invoice from depot
Dear all,
We are having a sales return scenario in depot which we are executing in following way.
1) Return sales order 2) Delivery against sales order 3) PGR 4) Credit memo 5) Capture of excise invoice in J1IG against the material document posted in PGR with reference to original excise invoice.
But when we are again creating an outgoing excises invoice from depot i.e. re-selling the same material to other customer system does not show the excise invoice in list of inward invoice.
Request to please let us know if we have missed out on a step/ configuration to ensure that the customer return excise invoice is visible to re-sell the material from depot.
thanks & regards,
maheshDear Lakshmipathi,
Thanks for the reply, did go through the thread that you have suggested before i posted this one.
Just wanted to know that we update the register with material document number posted for transfer of material from one storage location to another which is customer return to finished storage location and not with the PGR material document number?
5 Create Transfer posting in MB1B with movement type 453, storage location 0005 and save
6 Note down the material document reference
7 Go to J1IG to reverse excise issue posting
thanks and regards,
mahesh. -
Purchase register query based on down payment invoice
Hai All,
I am creating an invoice based on purchase order.The vat tax is being calculated in the downpayment. I want the vat to be displayed in the downpayment invoice as well as the a/p invoice but i m not getting it in the a/p invoice. Pls guide me with the linking of tables to get the query working. I have formatted the fields req but could not link the tables...Pls guide me with that...
Thanks & Regards,
NeelaHi Neela,
Check the thread.
Re: Purchase register query based on down payment invoice
FROM PCH1 T0
INNER JOIN OPCH T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
LEFT OUTER JOIN PCH12 T3 ON T1.DocEntry = T3.DocEntry
LEFT JOIN ODPI T4 ON T1.CardCode = T4.CardCode
INNER JOIN DPO1 T5 ON T0.ItemCode = T5.ItemCode
Close the thread, if issue solved.
Regards,
Madhan. -
SQL Query (PL/SQL Function Body returning SQL query) doesn't return any row
I have a region with the following type:
SQL Query (PL/SQL Function Body returning SQL query).
In a search screen the users can enter different numbers, separated by an ENTER.
I want to check these numbers by replacing the ENTER, which is CHR(13) || CHR(10) I believe, with commas. And then I can use it like this: POD IN (<<text>>).
It's something like this:
If (:P30_POD Is Not Null) Then
v_where := v_where || v_condition || 'POD IN (''''''''||REPLACE(''' || :P30_POD || ''', CHR(13) || CHR(10), '','')||'''''''''')';
v_condition := ' AND ';
End If;
But the query doesn't return any rows.
I tried to reproduce it in Toad:
select * from asx_worklistitem
where
POD IN (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
==> This is the query that does't return any rows
select (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
from dual;
==> This returns '541449200000171813','541449206006341366'
select * from asx_worklistitem
where pod in ('541449200000171813','541449206006341366');
==> and when I copy/paste this in the above query, it does return my rows.
So why does my first query doesn't work?
Doe anyone have any idea?
Kind regards,
Geert
Message was edited by:
ZorryThanks for the help.
I made it work, but via the following code:
If (:P30_POD Is Not Null) Then
v_pods := REPLACE(:P30_POD, CHR(13) || CHR(10));
v_where := v_where || v_condition || 'POD IN (';
v_counter := 1;
WHILE (v_counter < LENGTH(v_pods)) LOOP
v_pod := SUBSTR(v_pods, v_counter, 18);
IF (v_counter <> 1) THEN
v_where := v_where || ',';
END IF;
v_where := v_where || '''' || v_pod || '''';
v_counter := v_counter + 18;
END LOOP;
v_where := v_where || ')';
v_condition := ' AND ';
End If;But now I want to make an update of all the records that correspond to this search criteria. I can give in a status via a dropdownlist and that I want to update all the records that correspond to one of these POD's with that status.
For a region you can build an SQL query via PL/SQL, but for a process you only have a PL/SQL block. Is the only way to update all these records by making a loop and make an update for every POD that is specified.
Because I think this will have a lot of overhead.
I would like to make something like a multi row update in an updateable report, but I want to specify the status from somewhere else. Is this possible? -
Vendor Return Excise Invoice Report- J1IS and J1IV
Hello
What is the std report of Vendor Return Excise Invoice (j1is and J1iv)
Or
Which table can be using for making the Query.
Regards
Niti NarayanDear Friend,
You can use j1i7 report in that you will get all internally generated excise invoices
Regards
Pramod -
Hi
My requirement is to print vendor return excise invoice with t-code J1IV. I have nace configuration application type V1, output type JEXC, I have two processing rountines 1st processing routine contain program name 'J_1IEXCP_OUTPUT', form routine 'ENTRY', form 'J_1I_EXC_INVOICE' and the 2nd processing routine contain program name 'J_1IEIOT', form routine 'ENTRY', form 'J_1I_EXC_INVOICE'. The 1st processing routine program is written for SD Excise Invoice and the form is script. The 2nd one is useful for me I made a copy of program 'J_1IEIOT' and instead of using script I want to use custom smartform. I have a designed layout . I made a change in NACE configuration in 1st processing routine instead of standard program name 'J_1IEXCP_OUTPUT', I have assigned my custom program name 'YMMVendor_Return', done no changes in form routine 'Entry' kept as it is and deleted the form 'J_1I_EXC_INVOICE' and in PDF/Smartform form I assigned custom smartform 'YMMVendor_Return' designed by me. I am looking for form entry subroutine in this standard 'J_1IEIOT' to put a break-point and check is it calling that program from J1IV but there is no form entry subroutine in 'J_1IEIOT'.
Can anyone please suggest how to resolve it...
Best Regards
IndraExcise is captured at diffrent stage and vat at diffrent stage
U need to creat Returnes PO (note returns PO should have tax code of bed ecc and hecc and vat
do GR MIGO
J1IS hear only Excise partwill be returned and ther is no chance to reverce ur vat or cst
then u need to pass credit memo MIRO agaist returns PO at this stage ur vat amount will be revirsed.
Very imp , In PO ur excise value should be same as u are going to reverse in J1IS.
as there is no relation between J1IS and MIRO (in returns PO excise value in J1IS dont flow in MIRO credit note)
As in purchase there is link between GR excise amount and MIRO. hear excise value captured in J1IEX flowes in MIRO
so be care full while creating PO.
hope this helps -
Vendor Return Excise Invoice + VAT
Hi All,
We are make Vendor Return Excise Invoice wrt J1IS and Credit note by MIRO,
But we want one consolidated print with Excise +Vat, How the same can be done
Regards
Niti NarayanCheck this answered links
Vendor Return Excise Invoice printing
Vendor invoice print -
New Output type for purchase return excise invoice..?
Hi all
For purchase return process with exisable material.
Here I m using the transaction
1.J1IS to create purchase return excise invoice and
2.J1IV for posting to accounts & print purchase return excise invoice
.In standard SAP the output for purchase return excise invoice is JEXC.
here my query is started,
ABAPer created the new program for purchase return output with all new layouts,
And from functional side i have defined new output type for the same as YEXC copying from JEXC.
While doing the transaction J1IV, i getting the output type YEXC, i m not able to print preview.
To proceed further i need some body guidence. Like where to assign the output type.
some body can give some inputs .
Thanks
sap-mmHi AP thanks for ur immediate response.
But i have done all the configuratuion in NACE only.
There in nace i m not able find out the mistake or missing configuration.
Can u expalin me step by step process end to end .
Thanks
sap-mm -
Hi all,
i want a report for GRPO, the query that i have made is as mentioned below;
Select Docnum as Num, U_Gateno as Gate ,Docdate as Date, CardName as Party, U_Billno as Bill, DocDate as Date from opdn
Select Dscription as Item, Quantity as Qnty,unitMsr as Unit, Taxcode as vat from pdn1
now apart from these, i want the "unit price" and the "total" which are variables. Also can anyone please help me how to join these SQL to get a single row report?
Thanks in advance,
Joseph AntonyHi all,
I;m using the following SQL and its working fine;
Select T0.Docnum as Num,T0.U_Gateno as Gate ,T0.Docdate as Date, T0.CardName as Party,
T0.U_Billno as Bill,
T0.DocDate as Date,T1.Dscription as Item,T1.Quantity as Qnty,T1.unitMsr as Unit,T1.Price as Rate,
T1.Linetotal as Amount, T1.Linevat as Vat,(T1.Linevat+T1.LineTotal)as Grand
from OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry
UNION ALL
Select NULL as Num, NULL as Gate, NULL as Date, NULL as Party,
NULL as Bill,
NULL as Date, NULL as Item, NULL, NULL as Unit, NULL as Rate,
NULL as Amount, NULL as Linevat, SUM(T1.Linevat+T1.LineTotal) as Grand
from OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry
Thanks,
Joseph -
I want to query oracle database from sql server can anyone tell steps 2 fo
i want to query oracle database from sql server can anyone tell steps 2 followed
i tried with linked servers but it is throwing errors can anyone hepl in this regard
The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].First of all - you are in the wrong forum.
Look either for the Database general or search for Transparant / Heterogenous Gateways.
cu
Andreas -
I want to query oracle database from sql server can anyone tell steps 2 fol
i want to query oracle database from sql server can anyone tell steps 2 followed
i tried with linked servers but it is throwing errors can anyone hepl in this regard
The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.
OLE DB error trace [OLE/DB Provider 'MSDAORA' ITransactionJoin::JoinTransaction returned 0x8004d01b].First of all - you are in the wrong forum.
Look either for the Database general or search for Transparant / Heterogenous Gateways.
cu
Andreas -
Sales return before invoice generation
Hi Experts,
can we take material return before invoice generation
sales order -
>delivery----
>sales return -
> actual invoice
10 nos 10 nos 2 nos 8 nos
for example sales order 10 quantity, delivery 10 quantity but 2 quantity damaged returned 2 quantity by customer good recived 2 quantity then at the end we generate invoice of 8 quantity. this is done to avoid creating credit memo a number of time.
looking for your reply
Regards,
subhro.this is done to avoid creating credit memo a number of time
When there is a standard procedure to create a credit memo for returns, I dont know why you want to deviate this which is not at all recommended.
If creating credit memo is a regular process for your client (ideally it should not be the case), you can consider giving a BDC for the same. Instead avoiding creation of credit memo is not adviceable.
thanks
G. Lakshmipathi
Maybe you are looking for
-
How to handle 2 or more .jar files with an applet
Hey out there I have created an ftpClient application that uses "jakarta ftpClient". It works fine as an JFrame application � But when I converted the Application into an JApplet I get the following Exception: java.lang.NoClassDefFoundError: org/apac
-
My Photo Stream is no longer adding photos to iCloud for PC WINDOWS 7. any idea why?
-
I cropped a picture and saved it to my album. When I put the picture into iMovie it doesn't show what I cropped. It goes back to how it was before the crop.
-
Delete a node containing a child node with specific value
Hello, I wanted to know how to delete a node which contains specific value in one of its child node. Here is the xml file <?xml version="1.0" encoding="UTF-8"?> <rows> <ROW> <part_num_ref ID="100124">1</part_num_ref> <part_sh
-
Optimization Functionality in Web Dynpro
Hi Experts, Please somebody help me with this. I am evaluating the optimization tools, for example Excel Solver, to see if I can embed it for the Web Dynpro application in Formulation Management. For example, this optimization function will minimize