Ap invoice closing

one of the invoice status shows open - printed trying to close. it is not allowing to close. can anyone tell me what is wrong or how can we close this.

You can only close AP invoice by outgoing payment or other similar transactions. It can not be closed freely.
Thanks,
Gordon

Similar Messages

  • Invoices Closed by Reconciliation?

    Experts, I have tried to search here and have found nothing that can lead me in the right direction, so I am hoping someone may know the answer.
    I am trying to create a query that lists all AR Invoices that have been closed by reconciling them against other transactions, as opposed to being closed by either having a payment applied to it or a credit memo based on it. Is this even possible? I can go into an invoice, right click in the header and see the "applied transactions", but I cant seem to find a way to create this same thing by query. 
    Can anyone help guide me into the right direction if it even possible?
    Thanks!

    Gordon, That does produce some results, but I am not sure how I can use it. I have just finished talking to the manager and basically it has come down to the fact that he wants to duplicate the "applied transactions" screen.  He just wants to type in a invoice number and see all applied transactions with some details.
    Can this be done with the same query?

  • A/R Invoice closed without target documents

    Dear Experts,
    I have an A/R Invoice with 'Closed' status, and it does not have any Credit Memo or Incoming payment made agst. this invoice, I cant figure it out why without target document it get closed.
    Suggestion are welcome.
    Regards,
    Ravi

    Hi
    Please right button in the invoice and choose reconciled transactions.
    You can see you need.
    Kind regards.
    Agustín Marcos Cividanes

  • A/P Invoice Closed but Rows Open...

    Hello Experts,
    Scenario:
    An A/P Invoice made from GRPOs. Now the situation is this that A/P invoice is closed but there is not Target document, I mean A/P is closed without Target Document. But this A/P Invoice is not manually Closed i.e. Closed by the system.
    Also all the ROWS are open of this said A/P invoice.
    There is another situation from where I caught it, is the Inventory Posting List. This A/P invoice has a valule but in Inventory Posting List it shows ZERO (0) Value against this (PU) A/P invoice.
    Help Required,
    Thanks & Regards,

    hi,
    ap invoice rows get closed if you create ap credit memo frm ap invoice,
    but why are worried about row status in ap invoice,since document status is already closed.
    inventory posting list records price when u receive goods,since ur doing grpo hence price
    is shown posting list where it enters,if u do ap invoice without creating grpo then price should
    be corrosponding to ap invoice.
    Hope it solves problem.
    Jeyakanthan

  • A/R Invoice Closed but Status not Changed

    Hi All,
    I have Prepared one A/R Invoice Value of Material, Freight, Taxes.
    To reverse this Invocie, I have passed on A/R Credit Memo but still invoice is showing status as Open-Printed.
    I have checked JE for both are showing same value.
    Can any body help me to solve this problem please.
    With Warm Regards,
    Chintesh Soni

    Dear Shridharan,
    I have updated PL 38 on my laptop for testing.
    It is working fine but, in Service Calls, when i am adding activity it is showing error and activity does not getting add.
    If i will Add any activity or first activity say for Return mannually. Rest all activity will be added automatically. Due to this problem i m stuck.
    Other wise i have tested PL 38 for upgrading.
    I have already raised three question to SAP from our S user name and password means from Customer portal with high priority but till date i have not received response.
    With Warm Regards.
    Chintesh Soni

  • Reverse a Tranastion for a closed AR Invoice?

    Hi,
    We have a document chain that is Delivery Note to AR invoice, and they are both closed but we need to reverse the transaction. The AR Invoice was closed when it should not have been. It was not based on a SO so cannot use the Credit Memo method i presume so really not sure the exact method to reverse this closed AR Invoice?
    Thank you,
    MB

    Hi Matthew,
    How was the invoice closed and which version are you using?
    If it was closed with a Payment, first cancel the payment and then base a credit note on the invoice.
    If it was closed with a manual reconciliation, cancel the reconciliation and then base a credit note on the invoice.
    If this does not solve the issue let us know how the invoice was closed.
    Hope it helps,
    Jesper

  • Need sql query to find out same item is used in open po and closed po

    Hi Experts,
    I have an requirement is that, i need to find out the item is used in open po and closed po.
      example: A is the item is used in closed PO and Open PO.
      i need to write down the scripts how many same items is used in open po and closed po.
    if any sql script is there please share.
    Please let us know if any concerns.
    Thanks
    bmn

    Hi
    Please try below query
    select
    distinct c.segment1
    from
    po_lines_all a,
    po_line_locations_all b,
    mtl_system_items_b c
    where
    a.po_line_id= b.po_line_id
    and a.item_id=c.inventory_item_id
    and b.closed_code='OPEN'
    and a.item_id in ( select 
    item_id
    from
    po_lines_all d,
    po_line_locations_all e,
    mtl_system_items_b f
    where
    d.po_line_id= e.po_line_id
    and d.item_id=f.inventory_item_id
    and e.closed_code in ('CLOSED','FINALLY CLOSED','CLOSED FOR INVOICE','CLOSED FOR RECEIVING'));

  • Document closed while making payments on account

    Dear all,
    I'm facing the following issue.
    Eg:-
    I have created one AR/AP invoice for letsay 'x' business partner for INR.10000.
    While making incoming or outgoing payments,when i'm choosing this BP,all the open invoices will appear one by one.Now i've choosed this particular invoice and in payment means I entered Rs.3000 by cheque as part payment but i forgot to change the amount in incoming/outgoing payments window against the particular line item.So the following mssge appears
    " INR -7,000.00 of the amount to be paid is not matched to existing transactions. Transfer this difference to new posting?"
    if i said yes-the document is added.
    Now the issue is:-
    Next time when i choose the same party no due is showing for that bill but entry passed only for 3000 INR & the particular AR/AP invoice also get closed even if it is a mistake.the system shouldn't accept this.
    Please guide me regarding this
    Thanks & Rgds
    Suresh Kannan
    Edited by: Marc Riar on Jan 31, 2008 1:18 PM

    Suresh,
    This is an issue with how the functionality works. 
    If you highlight the invoice and then short pay it by entering a different amount in the payment means windows, SAP marks this invoice closed.
    If you do not highlight any invoice then the payment is posted on account and later can be linked to an invoice using Link invoices to payments
    To fix your current situation please cancel incoming payment and redo it.
    Suda

  • How to add a receipt number in the following Query for PO Report

    Hi Guys,
    I need a help regarding following query.
    Its a PO report for 11.5.10.2
    select distinct pv.segment1 supplier_number,
    pv.vendor_name supplier_name,
    pha.segment1 po_number,
    pha.revision_num revision_num,
    pha.authorization_status po_status,
    to_char(pha.creation_date, 'DD/MM/YYYY') creation_date,
    pha.currency_code currency_code,
    pla.sum_amount_ordered sum_amount_ordered,
    pda.sum_quantity_ordered sum_quantity_ordered,
    pda.sum_amount_received sum_amount_received,
    pda.sum_quantity_received sum_quantity_received,
    (pla.sum_amount_ordered - pda.sum_amount_received) sum_accrued, --AVI
    ( pda.sum_quantity_ordered - pda.sum_quantity_received) quantity_accrued, --AVi
    to_char(rsl.date_receipt, 'DD/MM/YYYY') date_receipt,
    -- rsl.receipt_num receipt_number,
    ppa.segment1 project_code, ppa.project_status_code, --10.0.0.4
    aia.invoice_num invoice_num,
    aia.invoice_date invoice_date, --AVI 
    aia.creation_date invoice_creation_date, --AVI 
    aia.amount invoice_amount_allocated_to_po, --AVI
    pla.purchase_basis,
    pla.category_id,
    -- pda.item_description,
    haou.name organisation, --10.0.0.3
    pda.sum_quantity_billed sum_quantity_billed , --10.0.0.3
    gcc1.CONCATENATED_SEGMENTS,
    gcc2.CONCATENATED_SEGMENTS
    from po_headers_all pha,
    po_vendors pv,
    pa_projects_all ppa,
    hr_all_organization_units haou,
    (select po_header_id,
    sum(quantity * unit_price) sum_amount_ordered,
    org_id,
    purchase_basis,
    category_id
    -- pla.item_description,
    from po_lines_all
    group by po_header_id, org_id
    , purchase_basis,
    category_id
    -- pla.item_description
    ) pla,
    (select pla.po_header_id,
    pda.project_id,
    sum(pda.quantity_ordered) sum_quantity_ordered,
    sum(pda.quantity_delivered * pla.unit_price) sum_amount_received,
    sum(pda.quantity_delivered) sum_quantity_received,
    sum(pda.quantity_billed) sum_quantity_billed, --10.0.0.3
    accrual_account_id
    from po_distributions_all pda, po_lines_all pla
    where pla.po_line_id = pda.po_line_id
    group by pla.po_header_id, pda.project_id,accrual_account_id
    ) pda,
    (select po_header_id, charge_account_id,
    -- rsh.receipt_num,
    min(rsl.creation_date) date_receipt
    from rcv_shipment_lines rsl
    where rsh.SHIPMENT_HEADER_ID=rsl.SHIPMENT_HEADER_ID
    group by po_header_id,charge_account_id
    ) rsl,
    (select distinct aia.invoice_num, pda.po_header_id , aia.invoice_date --10.0.0.3
    , aia.creation_date , sum(aida.amount) amount
    from po_distributions_all pda,
    ap_invoice_distributions_all aida,
    ap_invoices_all aia
    where pda.po_distribution_id = aida.po_distribution_id(+)
    and aia.invoice_id(+) = aida.invoice_id
    Group by
    aia.invoice_num, pda.po_header_id , aia.invoice_date --10.0.0.3
    , aia.creation_date) aia,
    (select haou2.organization_id, haou2.name
    from fnd_flex_value_sets ffvs,
    fnd_flex_value_norm_hierarchy ffvnh,
    fnd_flex_values_vl ffvv,
    hr_all_organization_units haou1,
    FND_FLEX_VALUE_CHILDREN_V ffvcv,
    hr_all_organization_units haou2
    where ffvs.FLEX_VALUE_SET_NAME = 'CAP_CODE_BU'
    and ffvs.FLEX_VALUE_SET_ID = ffvnh.flex_value_set_id
    and ffvnh.parent_flex_value like 'PO%'
    and ffvv.FLEX_VALUE_SET_ID = ffvnh.flex_value_set_id
    and ffvv.FLEX_VALUE between ffvnh.child_flex_value_low and ffvnh.child_flex_value_high
    and substr(haou1.name, 1, Instr(haou1.name, '-')) =
    substr(ffvv.DESCRIPTION, 1, Instr(ffvv.DESCRIPTION, '-'))
    and haou1.organization_id = fnd_global.org_id
    and ffvcv.parent_flex_value = ffvnh.parent_flex_value
    and ffvcv.flex_value_set_id = ffvs.flex_value_set_id
    and substr(haou2.name, 1, Instr(haou2.name, '-')) =
    substr(ffvcv.DESCRIPTION, 1, Instr(ffvcv.DESCRIPTION, '-'))
    union --10.0.0.1
    select f.organization_id, f.name --10.0.0.1
    from hr_all_organization_units f --10.0.0.1
    where f.organization_id = fnd_global.ORG_ID --10.0.0.1
    ) bu
    , po_line_locations_all plla --10.0.0.4
    , gl_code_combinations_kfv gcc1
    ,gl_code_combinations_kfv gcc2
    where pv.vendor_id = pha.vendor_id
    and pla.po_header_id = pha.po_header_id
    and pda.po_header_id = pha.po_header_id
    and pha.po_header_id = rsl.po_header_id(+)
    and pda.project_id = ppa.project_id(+)
    and pha.po_header_id = aia.po_header_id(+)
    and aia.po_header_id = pha.po_header_id
    and pla.org_id = haou.organization_id
    and pha.authorization_status in ('APPROVED', 'OPEN')
    and plla.po_header_id = pha.po_header_id --10.0.0.4
    and plla.closed_code in ('APPROVED', 'OPEN', 'CLOSED FOR INVOICE', 'CLOSED FOR RECEIVING', 'CANCELLED') --10.0.0.4
    and bu.organization_id = haou.organization_id
    AND gcc1.code_combination_id = pda.accrual_account_id
    AND gcc2.code_combination_id =rsl.CHARGE_ACCOUNT_ID
    In the following query I have commented receipt_num using the table rcv_transaction_headers.
    If I uncomment it the query results huge number of unexpected report.
    How can I add receipt number to the following query?
    Should I use rcv_transactions. If yes, what would be the join conditions.
    Kindly help as its urgent.
    Thanks in advance.
    Regards
    Avijit

    Sandeep is correct. I don't have time to tell you the correct query, but mine is something like this based on Sandeep's information:
    SELECT rsh.receipt_num
    FROM   rcv_transactions      rcvt,
           po_lines_all          pla,
           rcv_shipment_headers  rsh
    WHERE  rcvt.shipment_header_id   = rsh.shipment_header_id
    AND    rcvt.PO_LINE_ID          = pla.PO_LINE_ID
    AND    pla.item_id              = (select distinct inventory_item_id
    from mtl_system_items
    where segment1 = '1216107-2')

  • Open item in query

    I have a request for a query that displays open customer documents :
    Selection customer number and date range 01.01.2008 to 31.12.2008
    and return in columns : sum of open items amounts on 01.01.2008, sum of open items amoutns on 02.01.2009.... sum of open items amounts on 31.12.2008....
    For a given date D this is simple : documents where postingDate <= D < clearingDate.
    But how to do it for the full range ??
    Please help !

    Hi
    Please try below query
    select
    distinct c.segment1
    from
    po_lines_all a,
    po_line_locations_all b,
    mtl_system_items_b c
    where
    a.po_line_id= b.po_line_id
    and a.item_id=c.inventory_item_id
    and b.closed_code='OPEN'
    and a.item_id in ( select 
    item_id
    from
    po_lines_all d,
    po_line_locations_all e,
    mtl_system_items_b f
    where
    d.po_line_id= e.po_line_id
    and d.item_id=f.inventory_item_id
    and e.closed_code in ('CLOSED','FINALLY CLOSED','CLOSED FOR INVOICE','CLOSED FOR RECEIVING'));

  • Pay for Delete "PFD" While Making Payments?

    I have a private student loan that went into default when it wasn't supposed to (that's a whole different story). But long story short, I am communicating with the loan holder (SunTrust) regarding a PFD for the defaulted loan. My goal is to pay the loan amount in full in exchange for SunTrust removing all debts / entries regarding the loan from my credit reports. My only other option is hiring a lawyer to dispute the defaulted loan since it should never have gone into default, but neither SunTrust nor AES will help and are basically telling me to sue or pay up. They are currently actively seeking payment of the loan and I want to fax an official PFD request. But should I setup monthly payments in the meantime, or pay NOTHING until they respond to the PFD request? My thinking is to stop any potential judgements while the PFD request is pending. Would setting up monthly payments make it difficult / impossible to request a PFD since the amount is actively changing? Thanks

    Suresh,
    This is an issue with how the functionality works. 
    If you highlight the invoice and then short pay it by entering a different amount in the payment means windows, SAP marks this invoice closed.
    If you do not highlight any invoice then the payment is posted on account and later can be linked to an invoice using Link invoices to payments
    To fix your current situation please cancel incoming payment and redo it.
    Suda

  • Cash Flow  IN ORACLE APPLICATION

    dear Brother's
    What is the meaning of "CASH Flow"?
    How can handle it in oracle?
    Is a cash flow like any other report like balance sheet?

    Hi
    Cash Flow statement in Oracle refers to the summary of projected Cash position after certain period.It is like Cash Forecasting. This is handled through Oracle Cash Management Module
    Suppose you would like to know the cash position after 30 days from now
    A sample could be as follows
    Opening Cash Balance as of Now
    Add
    Sales Orders
    Sales Invoices
    Receivables
    Project Orders
    Less
    Purchase requisition
    Purchase orders
    Suppliers Invoices
    Closing Cash Balance after 30 Days
    You can choose the components to add and remove the functions according to your Business Requirement
    It is not the Cash and Funds Flow statement as required by Auditors. You can prepare the same with a Customized Report.
    Hope this helps
    Regards
    Sivakumar

  • ORA-03001 "unimplemented feature" error for SQL when using view

    Our ERP allows us (IT staff) to create Information Access Layers which are basically views. These can be "live" where the view is like your tradiitonal one or non-live, where a table of data is replicated on a schedule and a view is available over that table.
    The following SQL runs fine with a non-live IAL but gives an ORA-03001 error when using a live one.
    Any ideas why please? We are using 9.2.0.6
    Thanks
    with
    d_list as
    select territory, customer_name, order_no, sum(buy_qty_due) || ' x ' || catalog_desc d, sum(total_line_price_less_disc) v
    from
    ifsinfo.cust_ord_salescodes
    where
    site LIKE 'OKM' || '%'
    and
    line_date_entered >=TO_DATE ('01/06/2007','DD/MM/YYYY')
    AND
    line_date_entered <ADD_MONTHS (TO_DATE ('01/06/2007','DD/MM/YYYY'),2)+(1-1/(60*60*24))
    AND
    sub_division = 'GAS'
    AND
    line_item_no <= 0
    AND
    line_status != 'Cancelled'
    group by
    territory, customer_name, order_no, catalog_desc
    select
    d_list.territory,
    d_list.customer_name,
    d_list.order_no,
    d,
    0 as sum_value,
    d_list.v
    from
    (select d_list.order_no, sum(V) sv from d_list having sum(V) > max(3000) group by d_list.order_no) s_list,
    d_list
    where
    s_list.order_no=d_list.order_no
    order by
    d_list.territory, d_list.customer_name, d_list.order_no,d
    /Note: If I run the following it is fine, but obviously does not provide what I want:
    with
    d_list as
    select territory, customer_name, order_no, sum(buy_qty_due) || ' x ' || catalog_desc d, sum(total_line_price_less_disc) v
    from
    ifsinfo.cust_ord_salescodes
    where
    site LIKE 'OKM' || '%'
    and
    line_date_entered >=TO_DATE ('01/06/2007','DD/MM/YYYY')
    AND
    line_date_entered <ADD_MONTHS (TO_DATE ('01/06/2007','DD/MM/YYYY'),2)+(1-1/(60*60*24))
    AND
    sub_division = 'GAS'
    AND
    line_item_no <= 0
    AND
    line_status != 'Cancelled'
    group by
    territory, customer_name, order_no, catalog_desc
    select
    d_list.territory,
    d_list.customer_name,
    d_list.order_no,
    d,
    0 as sum_value,
    d_list.v
    from
    --(select d_list.order_no, sum(V) sv from d_list having sum(V) > max(3000) group by d_list.order_no) s_list,
    d_list
    --where
    --s_list.order_no=d_list.order_no
    order by
    d_list.territory, d_list.customer_name, d_list.order_no,d
    /

    Thanks David. The actual SQL is as follows:
    with
    p_list as
    (select * from
    (select 'OKM'     p_company,
         'GAS'     p_subdiv,
         '01/06/2007' p_startdate,
         2     p_months,
         3000     p_minval,
         DECODE(UPPER('OKM'),'OKM','DD/MM/YYYY','KMI','DD/MM/YYYY','OIA','MM/DD/YYYY') p_datefmt
    from dual)
    d_list as
    select territory, customer_name, order_no, sum(buy_qty_due) || ' x ' || catalog_desc d, sum(total_line_price_less_disc) v
    from
    ifsinfo.cust_ord_salescodes,
    p_list
    where
    site LIKE p_company || '%'
    and
    line_date_entered >=TO_DATE (p_startdate,p_datefmt)
    AND
    line_date_entered <ADD_MONTHS (TO_DATE (p_startdate,p_datefmt),p_months)+(1-1/(60*60*24))
    AND
    sub_division = p_subdiv
    AND
    line_item_no <= 0
    AND
    line_status != 'Cancelled'
    group by
    territory, customer_name, order_no, catalog_desc
    select d_list.territory, d_list.customer_name, d_list.order_no, d, decode(lag(d_list.order_no) over (order by d_list.territory, d_list.customer_name, d_list.order_no),d_list.order_no,0,s_list.sv) as sum_value, d_list.v  from
    (select d_list.order_no, sum(V) sv from d_list, p_list having sum(V) > max(p_minval) group by d_list.order_no) s_list,
    d_list
    where
    s_list.order_no=d_list.order_no
    order by
    d_list.territory, d_list.customer_name, d_list.order_no,d
    /the mystery is why it works for a view over a table (created by SQL A) but not a view (which is SQL A).
    The actual VIEW is:
    SELECT
         SUBSTR(co.contract,1,3)                         company,
         co.contract                               site,
         co.order_no                              order_no, 
         co.order_id                              order_type_code,
         co.currency_code                         currency_code,
         ROUND(1/col.currency_rate,x_curr_rounding_dp)          currency_rate,
         co.customer_po_no                         customer_po_no,
         co.date_entered                              head_date_entered,
         co.authorize_code                         coordinator,
         NVL(co.market_code,coc.market_code)               customer_market_code,
         NVL(co.district_code,x_def_district_code)          customer_district_code,
         co.customer_no                              customer_no,
         ifsapp.cust_ord_customer_api.get_name(co.customer_no)     customer_name,
         co.state                              head_status,
         decode(co.state,'Cancelled','N','Invoiced/Closed','N','Y')
    head_open_status,
         ROUND     (
              ifsapp.customer_order_api.get_total_base_price(co.order_no)
              ,x_rounding_dp)                         total_order_value,
    -------     co.salesman_code                         head_salesman_code,
         col.line_no                              line_no,
         col.rel_no                              rel_no,
         col.line_item_no                         line_item_no,
         NVL(col.part_no,x_def_inv_part)                    inventory_part_no,
         col.catalog_no                              sales_part_no,
         col.catalog_desc                         catalog_desc,
         col.date_entered                         line_date_entered,
         col.catalog_type                         sales_part_type,
         col.planned_ship_date                         line_planned_ship_date,
         col.planned_delivery_date                         line_planned_delivery_date,
         col.promised_delivery_date                         line_promised_delivery_date,
         col.real_ship_date,
    -------     col.ref_id                              line_salesman_code,
         col.state                              line_status,
         decode(col.state,'Cancelled','N','Invoiced/Closed','N','Y')
    line_open_status,
         nvl(col.ref_id,co.salesman_code)               salesman_code,
         nvl(col.C_Salesman_Region_Code,sps.region_code)          region_code,
         nvl(col.C_Salesman_Division,sps.division)          division,
         nvl(col.C_Salesman_Sub_Division,sps.sub_division)     sub_division,
         nvl(col.C_Salesman_Territory,sps.territory)          territory,
         NVL2     (
              ifsapp.customer_group_api.get_description(co.priority),co.priority,coc.cust_grp
              )                              customer_group_code,
         NVL(col.discount,0)                          discount_percentage,
         NVL(col.order_discount,0)                     order_discount_percentage,
         (1-NVL(col.discount,0)/100) *
         (1-NVL(col.order_discount,0)/100)               discount_factor,
         1-(1-NVL(col.discount,0)/100) *
         (1-NVL(col.order_discount,0)/100)               less_discount_factor,
         ROUND     (
              (DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
              ,x_rounding_dp)                         line_discount_amount,
         ROUND     (
              greatest(col.buy_qty_due-col.qty_invoiced,0)*(DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
              ,x_rounding_dp)                         rem_line_discount_amount,
         col.buy_qty_due                              buy_qty_due,
         col.qty_invoiced                         qty_invoiced,
         greatest(
              col.buy_qty_due-col.qty_invoiced,0
              )                              qty_remaining,
    qty_shipped,
         greatest(
              col.buy_qty_due-col.qty_shipped,0
              )                              qty_not_shipped,
         ROUND     (
              DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)
              ,x_rounding_dp)                         unit_line_price,
         ROUND     (
              DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)-
              ROUND     (
                   (DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
                   ,x_rounding_dp)     
              ,x_rounding_dp)                         unit_line_price_less_disc,
         ROUND     (
              DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)
              ,x_rounding_dp)                         total_line_price,
         ROUND     (
              DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)-
              ROUND     (
                   (DECODE(SIGN(col.line_item_no),1,0,col.buy_qty_due*col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
                   ,x_rounding_dp)     
              ,x_rounding_dp)                         total_line_price_less_disc,
         ROUND     (
              DECODE(SIGN(col.line_item_no),1,0,greatest(col.buy_qty_due-col.qty_invoiced,0)*col.base_sale_unit_price*col.price_conv_factor)
              ,x_rounding_dp)                         rem_total_line_price,
         ROUND     (
              DECODE(SIGN(col.line_item_no),1,0,greatest(col.buy_qty_due-col.qty_invoiced,0)*col.base_sale_unit_price*col.price_conv_factor)-
              ROUND     (
                   greatest(col.buy_qty_due-col.qty_invoiced,0)*(DECODE(SIGN(col.line_item_no),1,0,col.base_sale_unit_price*col.price_conv_factor)*(1-(1-NVL(col.discount,0)/100)*(1-NVL(col.order_discount,0)/100)))
                   ,x_rounding_dp)
              ,x_rounding_dp)                         rem_total_line_price_less_disc,
         NVL(co.commission_percentage,0)                    commission_percent,
         1-NVL(co.commission_percentage,0)/100               commission_factor,
         NVL(co.commission_percentage,0)/100               less_commission_factor,
    col.cost
    FROM
         ifsapp.customer_order_line                    col,
         ifsapp.customer_order                         co,
         ifsapp.sales_part_salesman                    sps,
         ifsapp.cust_ord_customer                    coc,
         (select
              2                               x_rounding_dp,
              6                               x_curr_rounding_dp,
              '9999999'                         x_def_inv_part,
              'Domestic'                         x_def_district_code
          from
          dual)                                   constants
    WHERE
         col.order_no=co.order_no
    AND
         co.customer_no = coc.customer_no
    AND
         (NVL(col.ref_id,co.salesman_code) = sps.salesman_code or sps.salesman_code is null)
    ------AND
    ------     co.state != 'Cancelled'
    ------AND
    ------     col.state !='Cancelled'
    ------AND
    ------     col.line_item_no <=0I suspect it is the level of complexity that Oracle cannot handle. I have seen notes about Oracle errors with views generating that ORA 03001, maybe I should log it with Oracle...

  • Including data post-filtering

    Hi all:
    I have a database table named ORDERS that contains repair order data and invoice data. Each record has an ORDERTYPE (i.e. INVOICE or REPAIR) and all invoice records have a system-generated ORDERID that links them to the repair orders (called the REFORDERID). 
    I have a second database table called ORDERLN that contains all individual line items for the repair orders and invoices. I need to access this data selectively to retrieve sales and cost information. 
    All tables currently have inner joins not enforced.
    The data lines for repair orders and invoices are separate in the ORDERLN table and have to be linked via ORDERIDs.  There may be several lines for one repair order or invoice (part data, labor data, comments, etc).  The repair orders have their own line items with COST data and the invoices have their own line items with SALES data.
    I need to limit my selected report data by the invoice closed date, which is contained in the ORDERS table. So the problem arises here where I need to include INVOICETYPE="invoice" within a date range, then the repair orders (also in the ORDERS table) get dropped.  I need these repair order IDs to access their corresponding cost information in the ORDERLN table.  The only data point i have to link the invoice and repair order in the ORDER table is via the REFORDERID -- see the image I attached.
    I need a way to first restrict the invoice type and close date, then use the REFORDERID on those data records to pull in the associated repair orders (these would already be closed orders). 
    I have all the sales data in my report working, displaying sales by part and invoice order ID. However, I can't get the part cost data for the repair order line items to display because the REFORDERID (in the ORDERS table) is nested within each invoice record. If I don't limit the data by invoicetype="invoice" I can get the cost data to work; however, I need to filter the whole dataset by invoice closed date.
    Can anyone guide me either with record selection formulas or SQL queries?

    This is really not that difficult because Crystal will let you "alias" tables.  For example, in the Database Expert, you would add a second copy of your ORDERS table.  Crystal will tell you the table already exists and ask if you want to add an alias.  The table will then be added as ORDERS_1.  To prevent confusion, I would then select ORDERS_1 on the right of the screen, press F2, and rename it to REPAIRS.  Do the same thing with ORDERS and name it INVOICES.  You would then link from INVOICES to REPAIRS on the Order ID (or whatever field joins invoices to repair records).  In the Select Expert you would add something like the following criteria:
    {INVOICES.INVOICETYPE} = 'invoice' and
    {REPAIRS.INVOICETYPE} = 'repair'
    To get the line items, you would also add another copy of your ORDERLN table.  To link things together, you would have the invoices table link to one copy of ORDERLN and the repairs table link to the other copy.   The picture below shows how the tables join together.
    -Dell

  • How to do manual return

    Hi guyz..
    I'm still a fresh on this, may i know how to do manual return in sap b1, glad if anyone could help.. =)

    Hello,
    In case of Manual return ie without Base Document also if A/P or A/R invoice closed
    For Purchase with "Excise Tax" u could only start with Goods Return and based on this as base Document u Need to post Outgoing Excise Invoice and then the A/P Credit Memo (In remarks u could provide the invoice no for reference) .
    For Sales with "Excise Tax" u could only start with  Return and based on this as base Document u Need to post Incoming Excise Invoice  and then the A/R Credit Memo  (In remarks u could provide the invoice no for reference) .
    For Vat Based
    if A/P Invoice is posted and closed  then you need standalone A/P Credit Memo to reverse
    if A/R Invoice  posted  tand closed hen you need  standalone A/R Credit Memo to revere .
    Regards;
    Balaji.s
    Edited by: Balaji Selvaraj on Mar 9, 2012 4:50 AM
    Edited by: Balaji Selvaraj on Mar 9, 2012 5:05 AM

Maybe you are looking for

  • Error while running adf application

    Hi while running a simple adf application on jdev11g i am getting following error: ServerInstance1 startup time: 25355 ms. ServerInstance1 started.[Running application HRSystem on Server Instance ServerInstance1...] [12:52:51 AM] ---- Deployment star

  • Partner Profile Problem

    In checking my partner profiles on WE20 I'm finding some issues On the BW system looking at my ECC system I see:     Partner profile XYZSE3010/LS       Header entry (table EDPP1)       Correct partner status       Recipient of notifications exists   

  • Odd iTunes Store Hack

    Ok so I have problem and no one from apple seems to want to help me. today I checked my email and there were two girdt card redemption numbers in them so when i clicked on it it took me striaght to the apple itunes account page i signed in like norma

  • Mac as a router

    I know how to setup my mac as a router. Given the fact that my macbook is connected to the ethernet. However, is it possible while my mac is connected to a router (via Airport) and at the same time share my internet to other computer via airport as w

  • HTML TEMPLATE QUERY

    Hi everyone, I am creating a website for a friends shop. He wants a list of products down the left hand side of the page that remains the same throughout site. Is it best to create a new HTML template add css elements and the text of the products. Th