Queries for Open Sales Order Lines and Open Purchase Order Lines

Experts,
Forgive me if these have been addressed elsewhere but I can't find them.  I'd like to create two queries to use as Alerts as follows:
1.  Query of open lines in Sales Orders that are more than two weeks old
2.  Query of open lines in Purchase Orders that are more than 2 days old
Thanks in advance for your help.
Steve

Hi Steve,
A couple of query templates you can use for your alerts are as follows:
Purchase Orders
SELECT T0.\[DocNum\], T0.\[DocDate\], T0.\[DocDueDate\], T0.\[CardCode\], T0.\[CardName\], T1.\[ItemCode\], T1.\[Dscription\], T1.\[Quantity\], T1.\[OpenQty\], T1.\[Price\] FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.\[DocDueDate\] < (getdate() -2) AND  T1.\[LineStatus\] = 'O'
Sales Orders
SELECT T0.\[DocNum\], T0.\[DocDate\], T0.\[DocDueDate\], T0.\[CardCode\], T0.\[CardName\], T1.\[ItemCode\], T1.\[Dscription\], T1.\[Quantity\], T1.\[OpenQty\], T1.\[Price\] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.\[DocDueDate\] < (getdate() -14) AND  T1.\[LineStatus\] = 'O'
You can change the SELECT section to remove some of the columns or add extra columns if need be.  Once your happy with the query you can attach it to an alert and set the frequency.
Regards,
Adrian

Similar Messages

  • Table for Purchase Order and Non Purchase order history

    Hi,
    Could you please share me the table name for getting the Purchase order history and Non purchase order history because this is a client requirent.
    I have gone through this tables but not getting exact data i.e. EKPO,EKKO,EKNE...
    please share with me the exact Table name to get all the Purchase order history and not purchase order history..
    Thanks in advance

    Hi Mallikarjun,
    Where did you find the non po info?
    Thanks,
    Neha

  • Make to Order and Individual Purchase Order ( MTO & IPO)

    Hello Gurus,
    1. Can anyone let me know what is Make to order (MTO)and Individual purchase
        order (IPO) and the Differences between both?
    2.  What is the purpose of MTO and IPO and where it is used.
    I would be thankful if anyone can provide me the meaning of both.
    Prashant V.T (PVT)

    Hi Prashant,
    MTO : Make to Order means the Production of the Material starts after getting the sales Order.
    Means once the Sales Order raised for any particuler customer then based on that order production / procurement takes place, and the stock what ever produced will be restricted for that Order only. The Stock cant be used for any other orders.
    where as IPO is different.
    IPO : Individual Purchase Order is like Third Party Sales but with a difference. In Third Party Sales, after getting the Sales Order a Purchase Order is raised to vendor and vendor will supply directly to the customer, and the Ordering compnay will raise the Invoice to the customer once the customer received the stock from vendor.
    IPO is similer but the difference is vendor will send the stock to the company instead of direclty sending to the customer. And the actual compnay will take the stock and do the delivery / shipping/ invoice to the customer.
    MM T.codes MIGO, MIRO plays crucial role in these type of scenarios.
    Hope this gives you some idea.
    REWARD IF HELPFUL.
    Regards,
    Praveen

  • How to block the creation of a Sales Orders without a linked Purchase Order

    Hi. I'm trying to block the creation of a Sales Order that doesn't have a linked Purchase Order. The first thing I did is using the SBO Transaction Notification as follows:
    IF  @transaction_type = 'A' AND @object_type='17'
    BEGIN
         IF (SELECT PoPrss FROM ORDR WHERE DocEntry = @list_of_cols_val_tab_del) = 'N'
         BEGIN
              SET @error = 1
              SET @error_message = 'Purchase Order Missing...'
         END
    END
    This works good. I create the Sales Order, I tick the purchase order field on the logistics tab, I click Add, and then the purchase order window appears...
    Then, the problem begins... If I click the Cancel button, the purchase order is obviously not created, but the Sales Order is created.
    Can someone tell me how to block the creation of the sales order If the user press the cancel button on the purchase order window (and the purchase order is not created)
    As far as I can see, after clicking the add button in the sales order document, the Sales Order is created on the DB. If there's no way of blocking the creation of the Sales Order, can I avoid closing the purchase order window by the SBO_TransactionNotification? (if the purchase order has not been created)
    Thanks...

    Hi Yail,
    I think you can't close the purchase order with the stored procedure.
    Try to catch the Event when the user click on Cancel button.
    So you can list the vents with event logger : https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ede3be37-0e01-0010-1883-cd1b5293473e
    You can block the cancel button and force the user to create the purchase order.
    Hope i help you
    Best regards
    Michael

  • Report  showing list of order confirmations and open/close reservations?

    Hi
    Can we have any standard report having list of  order confirmations and open/close reservations in SAP PM ?
    Regards
    Pooja

    Hi Pooja,
    Try IW12, Display Document flow, if you are looking for a combined report of Order confirmations and Material status.There are various other reports related to order confirmations and Material status seperately. For material status you can use IWBK.
    Better place to post PM questions is in Enterprise Asset management Forum.
    Warm regards,
    Srinivas Potluri

  • How to Identify open Stock Transport Orders and their Purchase Order No?

    I am looking for the most efficient way, with the best SAP tables, to read , to get  STOs and their Purchase Order numbers.
    Also, what would be the best way to get its related Sales Order Number.
       Thank-You.

    STO's : EKPO-PSTYP = 7
    SO : VBFA-VBTYP_N = 'V', AND VBFA-VBTYP_V = 'C',

  • I had'nt used iTunes for quites sometime, opened the music library and previously purchased music and impoerted content is missing.

    I had'nt used iTunes for quites sometime, opened the music library and previously purchased music and impoerted content is missing.

    See Empty/corrupt iTunes library after upgrade/crash.
    tt2

  • Third party sales and individual purchase order MIGO DIFFERENCE?

    Hi experts,
                     any difference between third party sales and individual purchase orders goods receipt(MIGO). What's the stock levels chages after goods receipt in both cases? How the system knows that its third party migo and individual purchase order MIGO? Can anybody clarify my question?
    regards,
    raju

    Hi
    In third party you will not be able to create automatic PO
    The schedule line category CS settings in VOV6 order type NB, MM item category 5 and account assignment category settings as X and in VOV7 for TAS create automatic PO ticked will ensure PR creation only and not PO
    As suggested by the other friend you need to run t code ME59N or ME59  for automatic PO creation but certain condition to be met
    1) In the Purchasing View of the material master data, the "Autom. PO" field must be clicked;
    2) In the Purchasing View of the Vendor Master Data, the "Automatic Purchase Order" field must be clicked;
    3) The Outline Agreement or Purchasing Info Record shall be maintained which will allow the automatic copying of unit price and other conditions into PO;
    4) The Source List shall be maintained for the nominated vendor which was shown in either the Outline Agreement or Purchasing Info Record.
    You have to run ME59N transaction  manually or schedule this as  a background job
    Regards
    Raja

  • What is Sales proposal area and market to order processes

    Hi ,
       What is Sales proposal area and market to order processes. Please send me if you pcui views for this to my id  [email protected]
    regards
    ram.

    What is Sales proposal area and market to order processes. Please send me if you pcui views for this to my id  [email protected]@gmail.com

  • What is PCUI regarding Sales proposal areas and Market to order processes

    HI PCUI professionals....
      i worked with pcui for sales rep view for acct, opp, act, contact persons....
    what is sales propsal areas and market to order process for PCUI. can any body pelase provide the screens regarding this..
    means in the accounts we will be having address tab, detials tab.... like this right..
    what will be the tabs in this Sales proposal areas and Market to order processes.
    pelase tell me it is urgent for me.
    thanks in advance,
    ram

    What is Sales proposal area and market to order processes. Please send me if you pcui views for this to my id  [email protected]@gmail.com

  • Terms of Payment for Local and Import Purchase Order

    Hello Experts,
    I am SAP FICO Consultant, I am given a task of maintaining payment terms for local and import purchase order, I would highly appreciate your help in this regard. I know I can maintain payment terms via OBB8 but I am not sure that how to cover the following scenarios.
    1. 100% Advance
    2. 50% Advance, Balance in 07 Days (usually balance immediate with delivery is accepted but it is paid in 07 days for the record)
    3. 25% Advance, Balance in 07 Days
    4. 10% Advance, Balance in 07 Days
    5. 30 Days Credit
    6. 15 Days Credit
    7. 07 Days Credit
    IMPORTS
    1. 100% Irrevocable LC in advance
    2. 100% TT in Advance
    3. 50% TT in advance & 50% before shipment.
    Looking forward to hear from you.
    Regards
    Muhammad Yousuf Ali

    Hi
    <b>All the Local as well as the R/3 data gets stored in the SRM tables ->
    BBP_PAYTERM (Terms of Payment, Backend-Dependent)
    BBP_PAYTERM_TEXT ( Texts for Terms of Payment, Backend-Dependent)
    BBP_TQ02B ( QM System)
    BBP_TQ02U (Description QM system)
    Also refer to Transaction SLG1 for the log created in this case.</b>
    Hope this will help.
    Please reward suitable points.
    Regards
    - Atul

  • Assigning a Sales Order Number to a Purchase Order

    My company has a requirement that for every purchase order we need to identify what sales order was created to generate the PR.
    I have found that by using the Account Assignment C - Sales Order, this opens the "Account Assignment" Tab and the fields for Sales order, item, and schedule Line.
    I have saved the PO and now am trying to receive the parts into inventory.  When doing so, the inventory needs to post to our inventory GL account, in our case is 135075.  By NOT assigning the GL with the sales order in the PO it doesn't post to this account it posts to a different GL account.
    How do I go about using the "Sales Order" field in the purchase order so I can record which sales order the line item of the PO corresponds to, and when receiving the inventory into stock have it post to the correct GL account?
    Thanks,
    Karen

    The company I work for is a distributor, and doing a Make to Order order type would not be in the best business practice for our company.  We tend to purchase stock for multiple orders and put them in inventory to be sold.  We are looking for a way to "document" what sales order the purchase order line item is being bought for, and sometimes their our multiple lines.
    I understand what you are saying regarding posting to an stock GL vs a consumption GL.
    I am going to research further and see how we can post to a consumption GL and then move the remaining stock over to a stock GL account after we have sold what we have purchased and received.
    I was able to get the receipt posted to the GL 135075 by taking off the "post automatically" indicator in the configuration of the GL account, but this then posed problems when doing other inventory postings such as cycle counting or moving inventory.
    Thank you,
    Karen

  • Third Party and Individual Purchase Order

    <b>Can anybody please send me the steps to configure the Return Process for both Third Party and Indvidual Purchase Orders.</b>

    dear sunil
    THIRD PARTY SCENARIO
    in third-party order processing, your company does not deliver the items requested by a customer. Instead, you pass the order along to a third-party vendor who then ships the goods directly to the customer and bills you. A sales order may consist partly or wholly of third-party items. Occasionally, you may need to let a vendor deliver items you would normally deliver yourself.
    Process Flow
    the processing of third-party orders is controlled via material types. Material types define whether a material is produced only internally can be ordered only from third-party vendors, or whether both are possible. For example, a material that is defined as a trading good can only be ordered from a third-party vendor. However, if you manufacture your own finished products, you may also want, from time to time, to be able to order the same type of product from other vendors.
    Processing Third-Party Orders in Sales
    Third-party items can be created automatically by the system, depending on how your system is set. However, you can also change a standard item to a third-party item during sales processing manually.
    Automatic third-party order processing:-
    if a material is always delivered from one or more third-party vendors, you can specify in the material master that the material is a third-party item. During subsequent sales order processing, the system automatically determines the appropriate item category for a third-party item: TAS. To specify a material as a third-party item, enter BANS in the Item category group field in the Sales 2 screen of the material master record.
    Manual third-party order processing
    In the case of a material that you normally deliver yourself but occasionally need to order from a third-party vendor, you can overwrite the item category during sales order processing. For a material that you normally deliver yourself, you specify the item category group NORM in the material master.
    If, as an exception, you use a third-party material, change the entry TAN to TAS in the ItCa field when processing the sales document. The item is then processed as third-party item.
    If address data for the ship-to party is changed in the sales order in third-party business transactions, the changed data will automatically be passed on to purchase requisition and also to the purchase order ,if one already exists. In the purchase order, you can display the address data for the ship-to party in the attributes for the item.
    You can only change the address data for the ship-to party in the sales order for third-party business transactions, and not in the purchase order.
    Processing Third-Party Orders in Purchasing
    when you save a sales order that contains one or more third-party items, the system automatically creates a purchase requisition in Purchasing. Each third-party item in a sales order automatically generates a corresponding purchase requisition item. During creation of the requisition, the system automatically determines a vendor for each requisition item. If a sales order item has more than one schedule line, the system creates a purchase requisition item for each schedule line.
    Purchase orders are created from purchase requisitions in the usual way. For more information about creating purchase orders, see the Purchasing documentation. During creation of the purchase order, the system automatically copies the delivery address of your customer from the corresponding sales order. In a sales order, you can enter purchase order texts for each third-party item. When you create the corresponding purchase order, the texts are automatically copied into the purchase order. The number of the purchase order appears in the document flow information of the sales order.
    All changes made in the purchase order are automatically made in the sales order as well. For example, if the vendor confirms quantities and delivery dates different from those you request and enters them in the purchase order, the revised data is automatically copied into the sales order
    you process third-party items by creating a normal sales order. In overview for the order, you can then overwrite the default item category (TAN in the standard system) with the special item category for third-party items: TAS
    Billing Third-Party Orders
    If relevance for billing indicator for the item category has been set to B (relevant for order-related billing on the basis of the order quantity) in Customizing, the system includes the order in the billing due list immediately. If, however, the indicator has been set to F (relevant to order-related billing on the basis of the invoice quantity), the system does not include the order in the billing due list until an invoice from the vendor has been received and processed by the purchasing department. In the standard system, item category TAS (third-party order processing) has been given billing-relevance indicator F.
    In the first case, the third-party order is considered to be completely billed only when the invoiced quantity equals the order quantity of the sales order item. In the second case, each time a vendor invoice is received, a customer invoice is created for the quantity in the vendor invoice and the order is considered to be fully invoiced until the next vendor invoice is received.
    If you have activated billing-relevance indicator F for item categories in Customizing, billing can refer to the goods receipt quantity instead of the incoming invoice quantity.
    You can control whether the invoice receipt quantity or the quantity of goods received is relevant for billing in Customizing for copying control for billing at item level.
    FOR YOUR PROCESS Individual Purchase Orders WELL GIVE THE RIGHT SOLUTION
    Individual purchase orders are used when your customer orders goods from you that are not in stock and must be ordered from one or more external vendors.
    Process Flow
    During sales order entry, the system automatically creates a purchase requisition item. The purchasing department creates a purchase order based on the requisition and the vendor ships the goods directly to you (unlike third party order processing, where the vendor ships directly to your customer). You then ship the goods to your customer. While the goods are part of your inventory, you manage them as part of the sales order stock. Sales order stock consists of stock that is assigned to specific sales orders and cannot be used for other purposes.
    Process Flow for 3rd Party Sales
    Customize the third party sales in summary:
    Prerequisites for 3rd party sales,
    Purchasing org,
    purchasing group,
    assign the Purchase org to company code
    assign Purchase org to plant,
    should not maintain the stock in material, it should be trading goods,
    1. Create Vendor XK01
    2. Create Material – Material Type as "Trading Goods". Item category group as "BANS".
    3. Assign Item Category TAS to Order type that you are going to use.
    4. A sale order is created and when saved a PR is generated at the background
    5. With reference to SO a PO is created (ME21N). The company raises PO to the vendor.
    6. Vendor delivers the goods and raises bill to company. MM receives the invoice MIRO
    7. Goods receipt MIGO
    8. Goods issue
    9. The item cat TAS or Schedule line cat CS is not relevant for delivery which is evident from the config and, therefore, there is no delivery process attached in the whole process of Third party sales.
    10. Billing *--
    SD - 3rd party sales order Create Sales Order
    VA01
    Order Type
    Sales org, distr chnl, div
    Enter
    Sold to
    PO #
    Material
    Quantity
    Enter
    Save
    SD - 3rd party sales order View the PR that is created with a third party sales order
    VA01
    Order Number
    Goto Item Overview
    Item ->Schedule Item
    SD - 3rd party sales order View the PR that is created
    ME52N
    Key in the PR number
    Save
    SD - 3rd party sales order Assign the PR to the vendor and create PO
    ME57
    Key in the PR number
    Toggle the "Assigned Purchase Requisition"
    Execute
    Check the box next to the material
    Assign Automatically button
    Click on "Assignments" button
    Click on "Process assignment"
    The "Process Assignment Create PO" box , enter
    Drag the PR and drop in the shopping basket
    Save
    SD - 3rd party sales order Receive Goods
    MIGO_GR
    PO Number
    DN Number
    Batch tab , click on classification
    Serial Numbers tab
    Date of Production
    Flag Item OK
    Check, just in case
    Post
    Save
    SD - 3rd party sales order Create Invoice
    MIRO
    Invoice Date
    Look for the PO , state the vendor and the Material
    Check the box
    Click on "Copy"
    Purchase Order Number (bottom half of the screen)
    Amount
    State the baseline date
    Simulate & Post
    Invoice Number
    *Invoice blocked due to date variance
    SD - 3rd party sales order Create a delivery order
    VL01N
    In the order screen , go to the menu Sales Document , select "Deliver"
    Go to "picking" tab
    State the qty and save
    SD - 3rd party sales order Create a billing document
    VF01
    Ensure that the delivery document is correct in the
    Enter
    Go to edit -> Log
    Save
    rewards pls
    siva

  • Change of Sales Order  automatically changes the purchase order

    Hi 
       I am working on a scenario where a  as soon as a sales order is created it will also create a purchase order on plant which will supply the item to the plant on which sales order is created.This works fine.
    Now when I change sales order( order qty ,requested delivery date, new item added) . On saving the sales order it should change the purchase order which has already been created by updating the schdule lines in the purchase order with new values from the sales order. It is all in same SAP instance.
    Here are possible ways I can think of:-
    1 Change of SO will create a SO IDOC . The SO IDOC should supply required values to the PO Idoc . The PO IDOC should get posted to SAP to change the existing PO.  Client does not have XI so we cant use XI for conversion.
    2 Changing a SO will trigger workflow.The Workflow executes ABAP program which takes data from SO and calls BAPI to change the purchase order and sends notification that PO has changed.   Which BAPI?
    Any thoughts are welcome. We are on 4.7 and we dont have XI. So please do not suggest XI based solution.
    Prashanta

    Prashanta,
    For your 2nd part of question, you can use 'BAPI_PO_CHANGE' to change the PO.
    Thanks

  • Returns line in a purchase order

    Hello all,
    I am working in a GI for return to vendor and i was instructed to create a returns line in a purchase order number. i would like to know how to create a returns line in a PO.
    Thanks,
    Maxx

    In PO, when you want to create a Return, just tick the "Return" indicator in Item overview tab.

  • Please send me fm regarding to get purchase order and change purchase order

    Hi,
    Please send me fm regarding to get purchase order and change purchase order .
    Regards,
    Gurprit Bhatia

    Hi,
    Function module to get the purchase order details:
    BAPI_PO_GETDETAIL.
    data: po_items type table of bapiekpo with header line.
    parameters: p_ebeln type ekko-ebeln.
    call function 'BAPI_PO_GETDETAIL'
      exporting
        purchaseorder                    = p_ebeln
      ITEMS                            = 'X'
      ACCOUNT_ASSIGNMENT               = ' '
      SCHEDULES                        = ' '
      HISTORY                          = ' '
      ITEM_TEXTS                       = ' '
      HEADER_TEXTS                     = ' '
      SERVICES                         = ' '
      CONFIRMATIONS                    = ' '
      SERVICE_TEXTS                    = ' '
      EXTENSIONS                       = ' '
    IMPORTING
      PO_HEADER                        =
      PO_ADDRESS                       =
    tables
      PO_HEADER_TEXTS                  =
       po_items                         = po_items
      PO_ITEM_ACCOUNT_ASSIGNMENT       =
      PO_ITEM_SCHEDULES                =
      PO_ITEM_CONFIRMATIONS            =
      PO_ITEM_TEXTS                    =
      PO_ITEM_HISTORY                  =
      PO_ITEM_HISTORY_TOTALS           =
      PO_ITEM_LIMITS                   =
      PO_ITEM_CONTRACT_LIMITS          =
      PO_ITEM_SERVICES                 =
      PO_ITEM_SRV_ACCASS_VALUES        =
      RETURN                           =
      PO_SERVICES_TEXTS                =
      EXTENSIONOUT                     =
    check sy-subrc  = 0.
    loop at po_items.
      write:/ po_items.
    endloop.
    Check this program too:
    RFFMFG_INV_CANC_ALL for BAPi_PO_GET_DETAIL.
    Hope it helps you.
    Regards,
    Anjali

Maybe you are looking for

  • How can I remove a Disabled Extension not compatible with Firefox 4.0.1? I just want to remove it... I don't want to wait for a compatible update. Why can't I remove it?

    When I upgraded from 3.XX to 4.0.1, it informed me that 2 extensions were not compatible and it never gave me the option to remove them. Firefox 4.0.1 disabled them and now I'm not able to remove them. Also they were added by Acrobat Pro X (Adobe Acr

  • Creation of PO using BAPI from SRM

    Hi all,       When PR is transfered to SRM from ERP,When i try to create PO in ERP using BAPI,i am getting a error message.SRM also uses the same BAPI to replicate PO In ERP,but then we dont get any error message. According to my understanding in bot

  • Lock box residual amount

    Hello Sapians, I have an issue with the Lockbox when the payment difference is .XX USD. For example I have an invoice of 200 dollars and payterm has 1% discount if you pay in 10 days, now lets say the Customer made a payment of 197.98 USD and when I

  • Simple question about billing adress.

    This question may be simple, but is important to me. May I change my credit card without changing my billing adress? It's just that I am afraid that if I change my Credit card, which is european, I will then receive my bill in euros. So, will it affe

  • Updating Reader 10.1.3

    Reader 10.1.3 on Mac OS 10.5.7 on a 2.7GHz Intel Corei7 MacBook Pro.   Keeps telling me I need to update, but the updates fail.   Have tried downloading 10.1.4, but the installation fails. I have screen pics for both failures, but the so-called 'univ