Batch detail report Purchase against sale problem

Hello
i want batch detail as follows
Batch Num , ItemCode, Pur Qty,Pur Price, Vendor Name, Sale Qty , Sale Price, Cust Code/Name Balance QTY
When i enter the Doc no of Purchase Invoice the result should shows as follows,(Items are Batchwise ) (I want to show Purchase Invoice against sale)
I done in crystal Report for that I take OPCH,PCH1,IBT1,INV1,OINV,IBT1_SALE
The Query i copy from Crystal is as follows, My result is as i want but only sale price can't display properly
SELECT "IBT1"."BatchNum", "IBT1"."DocDate", "IBT1"."ItemName", "IBT1"."Quantity", "PCH1"."Price", "IBT1"."ItemCode", "IBT1_SALE"."Direction", "IBT1_SALE"."Quantity", "IBT1"."CardName", "IBT1"."CardCode", "IBT1_SALE"."CardCode", "IBT1_SALE"."CardName", "OPCH"."DocNum", "OPCH"."NumAtCard"
FROM   (("satyam"."dbo"."OPCH" "OPCH" INNER JOIN "satyam"."dbo"."PCH1" "PCH1" ON "OPCH"."DocEntry"="PCH1"."DocEntry") INNER JOIN "satyam"."dbo"."IBT1" "IBT1" ON (("PCH1"."ItemCode"="IBT1"."ItemCode") AND ("PCH1"."DocEntry"="IBT1"."BaseEntry")) AND ("PCH1"."LineNum"="IBT1"."BaseLinNum")) INNER JOIN "satyam"."dbo"."IBT1" "IBT1_SALE" ON ("IBT1"."BatchNum"="IBT1_SALE"."BatchNum") AND ("IBT1"."ItemCode"="IBT1_SALE"."ItemCode")
WHERE  "OPCH"."DocNum"=541 AND "IBT1"."DocDate">={ts '2011-04-01 00:00:01'}
ORDER BY "IBT1"."BatchNum"
Suppose i enter Doc No 540 result show without attaching INV1.Pice in Sale price
Batch Num , ItemCode, Pur Qty,Pur Price, Vendor Name, Sale Qty , Sale Price, Cust Code/Name,Balance QTY
PU540-1      I01                 05       100             ABCD                 3                                   ZXCV             02
PU540-2          I02              10          120            ABCD            -                                         -                10
PU540-3      I03                 08       100              ABCD                 -                                        -                08
But When I attach INV1.Price in sale Price field then result Show,
Batch Num , ItemCode, Pur Qty,Pur Price, Vendor Name, Sale Qty , Sale Price, Cust Code/Name,Balance QTY
PU540-1            I01        05           100             ABCD             3              150              ZXCV                02
I create group by IBT1.BatchNum
But i want it should be Show as,
Batch Num , ItemCode, Pur Qty,Pur Price, Vendor Name, Sale Qty , Sale Price, Cust Code/Name,Balance QTY
PU540-1            I01        05          100           ABCD              3               150           ZXCV                      02
PU540-2              I02           10         120           ABCD               -                                     -                          10
PU540-3            I03        08         100           ABCD               -                                     -                          08
For Cust Code i create formula as
if {IBT1_SALE.Direction}=1 then
{IBT1_SALE.CardCode}
ELSE
For sale Qty i create formula as,
If {IBT1_SALE.Direction}=1 then
{IBT1_SALE.Quantity}
And for Balance Qty formula are,
{IBT1.Quantity}-{@Saleqty}

SELECT "IBT1"."BatchNum", "IBT1"."DocDate", "IBT1"."ItemName", "IBT1"."Quantity", "PCH1"."Price", "IBT1"."ItemCode", "IBT1_SALE"."Direction", "IBT1_SALE"."Quantity", "IBT1"."CardName", "IBT1"."CardCode", "IBT1_SALE"."CardCode", "IBT1_SALE"."CardName", "OPCH"."DocNum", "OPCH"."NumAtCard", "INV1"."Price"
FROM   ((("satyam"."dbo"."OPCH" "OPCH" INNER JOIN "satyam"."dbo"."PCH1" "PCH1" ON "OPCH"."DocEntry"="PCH1"."DocEntry") INNER JOIN "satyam"."dbo"."IBT1" "IBT1" ON (("PCH1"."ItemCode"="IBT1"."ItemCode") AND ("PCH1"."DocEntry"="IBT1"."BaseEntry")) AND ("PCH1"."LineNum"="IBT1"."BaseLinNum")) INNER JOIN "satyam"."dbo"."IBT1" "IBT1_SALE" ON ("IBT1"."BatchNum"="IBT1_SALE"."BatchNum") AND ("IBT1"."ItemCode"="IBT1_SALE"."ItemCode")) INNER JOIN "satyam"."dbo"."INV1" "INV1" ON (("IBT1_SALE"."ItemCode"="INV1"."ItemCode") AND ("IBT1_SALE"."BaseEntry"="INV1"."DocEntry")) AND ("IBT1_SALE"."BaseLinNum"="INV1"."LineNum")
WHERE  "OPCH"."DocNum"=541 AND "IBT1"."DocDate">={ts '2011-04-01 00:00:01'}
ORDER BY "IBT1"."BatchNum"
But it show result as,
Batch Num , ItemCode, Pur Qty,Pur Price, Vendor Name, Sale Qty , Sale Price, Cust Code/Name,Balance QTY
PU540-1      I01                  05       100       ABCD                      3              150           ZXCV             02

Similar Messages

  • Report of purchases against sales order

    I would like to know if there is any standard report available is SAP wherein we can view the total purchase orders generated against the sales order/orders itemwise.
    Nitin Naik

    Hi,
    As you want to se all purchase against sales order you can use the report ME2M with account assignment category as C or X.
    regards,
    zafar

  • Reg.Purchase against sale order

    Dear Friends
    Anybody have idea regarding purchase material against sale order and that will be kept as stock.
    As and when it is used according to the requirement. The procurement should be posted to stock account in purchase order itself. how to do it. pls help me.
    Thanks
    Rajakumar.K

    Dear ,
    i thinck ur company using trading business
    based on sales order u can create PO with account assignment E Sales order , system will asl sales order number in account assignment data at item detail level.
    the process will be
    Pre-shipment Shipment Procedure :
    1) create a sales order
    2) create PO with account assignment E where system will ask for sales order number
    3)delivery with vl10n
    3) preshipment invoice-VF01
    POST-SHIPMENT Procedure:
    1) do the GR the stock will be invetorized for ur sales order
    2)invoice verification MIRO
    3)Final Delivery: vl02 u have to change the intial delivery
    4)Final (Post-Shipment) Invoice: VF01
    work with ur FI consultant for G/L accounts
    Regards
    venu gopal
    Edited by: venu kk on May 19, 2009 6:36 AM

  • GL ACcount Detail Report

    Hi,
    I have to write a query with GL account Detail report for the Sales Invoices along with Item level details against that invoice. So i used the ra_customer_trx_all table. When i included this in my query, I get the correct number of records, one receivable account entry and 'n' number of revenue account entries. But since this table doesnt have the item level information. I included the ra_customer_trx_lines_all table, but this gives me too many records.
    Any help on this would be appreicated.
    Regards,
    JA

    Hi,
    ra_customer_trx_all ->
    ra_customer_trx_lines_all ->
    ra_cust_trx_line_gl_dist_all
    ra_cust_trx_line_gl_dist_all stores the accounting entries for the line/invoice.
    But remember you can have lines of line, tax, freight, charges etc. plus the revenue and receivable sides of the accounting entry.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • Single contract details report in Reporting services taking approx 40 secon

    Component name: Single contract details report
    Application: online application
    Problem: Single contract details report in  Reporting services taking approx.40 seconds to show the report
    Report is look like below screen shot :
    The report is designed in order to show as much information as possible for an agreement. In order to present the information in a clearly arranged manner the data is clustered and displayed on separate report tabs. The data clustering is as follows:
    u2022     Header Information
    u2022     Overall Contract Details
    u2022     Vehicle Details
    u2022     Driver Details
    u2022     Mileage Details
    u2022     Maintenance/Services Details
    u2022     Tyres Details
    u2022     Fuel/Oil Details
    u2022     Invoices Details
    u2022     Contract History
    Single Contract Details report is a very huge report it is split into tabs. Navigation between these tabs is possible with a menu bar at the top of the report. Each tab has its own name and located there as a link. By clicking on it the tab is shown.
    This report is a special type of report name as drill down report. Due to the Crystal limitation that a report can only contain one sub report, AOL used java component to call single contract report
    Figure: Drill down Report
    This is the only report of this type in AOL which is using the drill down functionality in crystal and now we are investigating the performance issue for this report, we have checked all possible area (java, crystal report) where we can improve the performance for this report.
    We thought if we can replace the java component with crystal and directly crystal report will connect to single contract report using hyperlink, it may increase the performance but due to the Crystal limitation that a report can only contain one sub report we are not able to do this approach.

    HI Piroz,
    Im actually looking for the same thing...
    How can I create a report were I can see if a contract has been changed or cancelled? I use VA45 to see contracts, I would like to run a report to see if there has been any changes on the contracts of if they have been cancelled, thank you soooooo much if you can help me

  • Purchase Order created against sales order.. report

    Hi Folks!
    I want to see purchase orders created against sales orders.
    Is there any report?
    Regards

    Hi,
    You can develop your own report by using table VBAK-VBELN(sales document),VBAK-BSTNK(Customer purchase order number).
    Just try....
    Hope it helps you...
    Regards,
    Jaheer.

  • Reg.Purchase order against sale order( E )

    Dear Experts
    I configured PO against cost centre (K - Cost center and G/L A/c is created) and it is working.But I want to configure against sale order (E).what is the configuration required. Pls advise in details
    Thanks
    Rajakumar.K

    Dear Raja,
    Third-party order processing (for direct-to-customer delivery/drop shipment) is triggered when a sales order containing a third-party item is created.
    When this occurs, the system automatically generates a purchase requisition item of the category u201Cthird-partyu201D for each delivery schedule line of the sales order item.
    This requisition item is converted into a purchase order (PO) item. Depending on the confirmation control key, the quantities/dates in the sales order are confirmed when the PO is created or an order acknowledgment is maintained.
    If you create a third-party item without referencing a requisition generated from a sales order, this is not third-party order processing in the foregoing sense: a matching-up of the data between the SD sales order and the purchase order cannot be carried out in such cases!
    Sales Order
    In the standard system, the sales order item for the third-party process has the item category TAS (this is found automatically if the item category group BANS has been set in the material master, or it can be changed manually). In the standard system, the schedule line category CS is found for the item category TAS. It is specified in Customizing for the schedule line category CS that a purchase requisition (type NB) with the item category '5' (third-party) and account assignment category 'X' is generated.
    The number of the requisition that is generated can be displayed via the delivery schedule lines in procurement.
    If a PO is generated from this requisition, it can be seen in the document flow for the SD sales order (Environment  Document flow).
    Purchase Requisition
    The requisition is generated via the function module ME_REQUISITION_EXT. An important characteristic is that the field EBAN-ESTKZ (creation indicator) contains a 'V'. If a third-party requisition is created in dialog mode, this field does not contain the indicator u2018Vu2019 u2013 that is to say, this is not a third-party process in the sense defined. A source determination process is carried out at the time of creation. The purchase order units found during this process are adopted! The account assignment, containing the number, item, and schedule line of the sales order, cannot be changed in the requisition. The account assignment is the u2018pointeru2019 between the requisition and the SD order!! Since Release 4.6, the delivery address cannot be changed either. The address of the goods recipient (ship-to party) from the SD order is adopted as the delivery address (caution: this can be located both at header and item level in the SD order).
    There is a requisition item for each delivery schedule line in the sales order!
    Purchase Order
    Purchase order items generated from the above requisitions contain EKPO-STATU = 'V'. The delivery address comes directly from the sales order (see LMEPOF3T MEPO_ITEM_FILL_ADDR) and cannot be changed. Neither can the account assignment be changed; here too it is the 'pointeru2019 between the PO and the sales order. In the standard system, the account assignment category is 'X', with KZVBR = ' '. Since the account assignment is located at item level, you must not convert several third-party requisitions into a single PO item, otherwise the update of the sales order is liable to fail!
    An 'actual' goods receipt does not take place with regard to a third-party item. The 'WEPOS' indicator is not set for the item categories 'S', but can be set manually. The posting of a GR results merely in a value update here. The entry of a vendor invoice can be made dependent on the prior entry of a GR. In the third-party process, this only makes sense if you wish to prevent the customer from receiving an invoice before having received the goods. A goods receipt should be recorded when the vendor reports the outward delivery.
    At the time of saving, the document flow and confirmations are updated in the SD order. If problems should arise on the SD side due to changes (e.g. the customer has been blocked), an error message is issued here first!
    In the case of third-party items generated without reference to a 'third-party requisition', i.e. the item category u2018Su2019 is merely entered manually, there can be no update between SD order and purchase order. Here, for example, the delivery address is not read from the sales order u2013 it must be entered manually (mandatory field).
    Sanjeev

  • Purchase and Sales Report

    Hi
       There is one requirment for Report, My client need a  report for pur & sales in which Purchase amount with Vat 4% and 12.5% should show seperatly colume can anyone help for this
    With regards,
    Gopal Krishna

    Hi,  all
    Actually here we have not Implemented SD Module and Sales Entry are flowing through FI Module, In this case Total Sales of the month and Tax Details. is there any such Standard Report for this?
    With Regards,
    Gopal Krishna

  • Purchase Order against Sales Order

    Hi Experts,
                     It could be possible to prepare purchase order against sales order in which the data of sales order could be pulled in  purchase order. Please help me in this matter.

    Hi Shailesh......
    Off course it is possible. All you need to do s Open Sales Order and go to Logistic Tab and while creating Sales Order ctick on Split Purchase Order and the moment you add the Sales Order it will Pop up the Purchase Order creation window where you need to fill the details and add PO and then add Sales Order.
    But if you have defined Preferred Vendors in Item Master Data then while autocreation of PO by this way will take its Preferred vendors automatically.......
    Regards,
    Rahul

  • Reg.Purchase order against Sale order.

    Dear Experts
    I have configured newly in our Ides system for A/c assignment "K", and I want to configure against sale order " E ", what are the settings to be done. Plaase help.
    Thanks
    Rajakumar.K

    Dear Experts
    VA02 ->enter sale order -> press enter.. the following error occured
    " Field VBAP NTGEW is not defined in incompletion procedure 20 "
    " Field VBAP BRGEW is not defined in incompletion procedure 20 "
    Error 2nd :
    Subs.function purchase requisition from sales document not possible: Item 000002 is not completely configured.
    how to solve this problem.
    Thanks
    Rajkumar.K
    Edited by: Raja Kumar on Oct 3, 2008 9:21 AM

  • Problem in Master detail report

    Hi Team,
    I want to generate a master detail- report on table employees(empno,ename,sal,jobid,deptno,deptname,dept_mobileno,dept_pincode).
    The report should be display in the format which is shown in the image present at URL:- http://www.uploadup.com/di-DC37.jpg
    For each unique combination of columns (empno,ename,sal,jobid) , i want to display the detailed records ( more than one ) (deptno,deptname,dept_mobileno,dept_pincode).
    Please see the image present at URL :- http://www.uploadup.com/di-DC37.jpg
    Please help me on this how to edit templates for my requirement and what sql query is required to solve this problem.
    Thanks and Regards,
    Rajendra Yadav

    913508 wrote:
    Hi Team,Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "913508".
    You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    I want to generate a master detail- report on table employees(empno,ename,sal,jobid,deptno,deptname,dept_mobileno,dept_pincode).
    The report should be display in the format which is shown in the image present at URL:- http://www.uploadup.com/di-DC37.jpg
    For each unique combination of columns (empno,ename,sal,jobid) , i want to display the detailed records ( more than one ) (deptno,deptname,dept_mobileno,dept_pincode).
    Please see the image present at URL :- http://www.uploadup.com/di-DC37.jpg
    Please help me on this how to edit templates for my requirement and what sql query is required to solve this problem.Thanks for making the effort to create the demo screenshots, they're helpful but with APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    Please create sample tables and data on apex.oracle.com and post guest developer credentials for your workspace here.
    +{message:id=9816577}+ covers a similar problem.

  • Pending order delivery against sales order and quotation problem

    Dear Expert
    I am facing problem when we are tracking delivary quantity against sales order and quotation. then our delivary quantity not matching with invoiced quantity.
    Actually the logic of report are below
    Pick up the VBAK-VBELN and VBAK-KUNNR where AUART = quotation, VKORG, VTWEG, SPART, ERDAT = selection.
    now when any quantity which are added in sales order in new line not cattered through below code and it show problem of mismatch.
    Can any one help me in finding data from all this table to catter delivey quantity, quotation qty and sale order qty.
    thanks in advance.

    Starting from quotes, you could find your quote, then read SD document flow table VBFA for next document of type sales order (could be more than one sales order from a quote).  Then you could obtain delivery documents (could be more than one for a sales order) for all your sales orders, again using next document code in table VBFA.  This would present you tables that could contain multiple rows:
    quote
       sales order
           delivery,
           delivery
        sales order
            delivery
    and so forth.  You might also consider using table VBUK or VBUP to discover status of each quote item.

  • Customer payment report against sales invoice

    Dear Experts.
    My client has requirement to track customer payment against sales invoice. Actually client sometimes do partial payment also. I know we can get from bsid(open item) & bsad(cleared item) table. I unable to find actual required data.
    regards
    sanjay verma

    Dear Sanjay,
    Apart form the FBL5N,  Please check the below path for more standard reports which helps you to fulfill your requirement.  Hope its helpful.
    In SAP Easy Access screen
    Regards,
    Inthiyaz

  • Report for viewing Sales order no against delivery date & actual GI date

    Hi Experts,
    Is there any report for viewing Sales order no against delivery date & *actual GI date*
    Because in VL06F , i can only able to get planned GI.
    Please guide regarding the same where i can get 'ACTUAL GI DATE ' against above combination .
    Regards,
    Sujit S.

    dear Hrishi,
    i followed your suggestion, but couldn't get desired results,
    here i can get planned GI date, where i wanted to get Actual GI date for complted deliveries,
    thanks for your valuable reply.
    @ G. Lakshmipathi ;-
    i think i will need to develop z-report for fetching the data from the tables
    VBAK (to get sale order reference) and
    LIKP (to get delivery and actual GI date)
    thanks for your reply,
    Regards,
    Sujit

  • Which are the most popular reports in SAP BI for Purchasing and Sales

    Hi Experts,
    I'm looking to work on one completed BI content flow.
    I wanted to work on 1 report from each module to activate the relevant objects.
    Can anyone please let me know which reports in Purchasing and Sales are frequently used in SAP BI.
    Thanks

    Hi,
    Please check table - RSRREPDIR       
    Report names which are related to purchasing  - 0PUR_C0N_Q00Y, N and Y indicates number.
    same for sales report names - 0SD_C0N_Q00Y .
    Query tech names - 0PUR_C01_Q0021
    Thanks

Maybe you are looking for

  • The computer has rebooted from a bugcheck, constant crash.

    My newly built PC rebooted constantly and its driving me nuts, can anyone point me the reason? The errors are like this:  The computer has rebooted from a bugcheck.  The bugcheck was: 0x0000001e (0xffffffffc0000005, 0xfffff8000db1f0c0, 0x000000000000

  • Check Existing Image in Invoice

    Hi All      I  am attaching image to invoice .. I need to check  before attachment whether the particular image is exists already in the invoice.   it would be helpful if anyone suggeset function module or Table to check the existing image.. I used t

  • Spinning beach ball spins me crazy

    Hi all, I have this problem.( Macbook Pro 4 GB, 2.5 ghz)  As I´m writing this the notorious beach ball appears and the computer actually writes on its own!! It all began when I downloaded Yosemite and parallel desktop plus Windows 7 because I needed

  • Deploy Crystal report at BW

    Hello, I have developed a CR with underlying BW query via SAP toolbar. I saved the report to BW under my role and publish to BOE. It prompted a new transport request and I created the TR. Nex,t I launch /crystal/rptadmin at BW dev, I can see the repo

  • Ibook is stuck - can see my book but won't launch

    I can see my book cover in the iBook library but when I tap on the book to open it to read iPad brings me to a page I've never seen before -- it is asking me to rate the book by stars, option to "tell a friend" or "write a review".  It also presents