Query with standard delivery address

Hi there,
I built a query with the query manager where I just want a sheet with the basic customer data for which I used the tables: OCDR, CDR1, OCTG, OCPR. All is fine, however certain customers have several delivery addresses, for those customers I get all addresses including a doubling or trebling etc. of  the contact persons. I was wondering if there is a possiblity to only get the standard delivery address as output data and how I would implement this in my query. 
I am thankful for any suggestions.
Ute de Vries

Let´s see customer XY has this default billing address: 
Name XY
Postcode ABC
4565 Village People
This delivery address:
Name XY
Street 45
4565 Village People
and additionally this delivery address (at the moment the default one):
Holmenkolmen
Street 23
8678 Somewhere
I would like to generate a query output where only both the default adresses are shown. My query shows all delivery addresses and doubles the contact persons. 
{SELECT T1.[CardCode], T1.[CardName], T1.[CardType] ,T1.[Address], T1.[ZipCode], T1.[City], T1.[MailAddres], T1.[MailZipCod], T1.[MailCity], T1.[Phone1], T1.[Fax], T1.[E_Mail], T1.[IntrntSite], T1.[LicTradNum], T2.[U_kmBisOrt], T2.[U_zeitBsOrt], T3.[Name], T3.[Position], T3.[Tel1], T3.[Fax], T3.[Cellolar], T3.[E_MailL], T4.[PymntGroup] FROM  .[OCTG] T4  INNER  JOIN .[OCRD] T1  ON  T1.[GroupNum] = T4.[GroupNum] INNER  JOIN .[CRD1] T2  ON  T2.[CardCode] = T1.[CardCode]  INNER  JOIN .[OCPR] T3  ON  T3.[CardCode] = T1.[CardCode]   WHERE (T1.[CardCode] = ) AND T2.[AdresType] = 'S'}
Thanks again,
Ute

Similar Messages

  • Different PO through SOCO with different delivery address

    Hi,
    We are facing issue with sourcing cockpit. While creating purchase
    order for multiple shopping carts through Sourcing cockpit, If multiple
    line item have different shipping location it is creating different
    Purchase orders.
    We have requirement to create one PO with same vendor for multiple line
    items. For above problem we are keeping same vendor even though it
    creates two seperate POs.
    Kindly advise.
    Thank you
    Ritesh

    Hi Ritesh,
    Please check the answers in this thread :
    PO split  in  sourcing cockpit   ?      :-(
    BADI BBP_SC_TRANSFER_BE
    Method GROUP_PO
    Kind regards,
    Yann
    Message was edited by: Yann Bouillut

  • Query with standard template workflow for Purshase Requisition.

    Hi all
    I am fresher in Workflow. I have to configure standard template workflow for Purshase Requisition.
    I know the flow how to configure it(through forum only).
    I have a development system where all release codes,release strategies are defined.
    when i saw the standard workflows through "pftc" tx code,in workflow builder some default rules are defined.
    I donno is there any oraganisational structure is defined in my system.
    my question are-Is these rules are alternative to Org.structure?
    By the help of rules would i configure agent id in Workflow through spro transaction.
    I am not able to assign agent id which i am using to right now.how can i do that?
    Is i able to do all this once i have defined org. structure.?..
    Thanks in advance..

    Ashwani,
    Since you are new to this  forum, i would suggest you to search this forum. You will get a lot of threads related to PR release workflow and even link to documentation. By going through those docs you may understand the whole process. And after that if you face some new challenges you can come back and post a new thread.
    Don't forget to search before posting a new thread.
    Thanks,
    Shweta

  • Shopping cart default delivery address based on company code

    Hi All,
    As a standard behaviour of SRM, currently delivery address in shopping cart is defaulted from attribute (ADDR_SHIPT). But in our case we use cross company purchasing where requisitioners buy for different company codes.
    Some times, they forgot to change the default dlivery address and shopping carts are getting created with wrong delivery address.
    Is there any way, the we can default the delivery address based on company code selected by the user instead of defaulting from user attribute?
    Suggestions would be greatly appreciated.
    Regards,
    Krish

    Hi Krish,
    Am looking for a same solution but instead of delivery address, we are looking for change in invoice recipient address
    ADDR_BILLT. For this i have identifed a FM: BBP_GET_BILL_TO_PARTY from which system pulls the defaulted attribute of user profile. Now we are in a change of pulling the attribute defaulted to the company code entered in SC rather than the user's defaulted ADDR_BILLT.
    Similarly i guess for your issue you can use the FM: BBP_GET_ORG_SHIPTO_ADDR implementing a enhancement in DOC CHANGE BADI
    Regards,
    Nihar

  • Delivery Address changes in third Party Scenario

    Hi All,
    System is not allowing to make changes in delivery address (At PR/ PO Level) for Third party Scenario (Sales Order based).
    I had checked the Field Groups of PO/ PR Knowm to me and try to make delivery address field editable. but didnt get any success. Is it Possible to get the dellivery address field in change mode for third party Scenario. If yes, how?
    pls. Note: I'm not talking about the Manual third party order processing.
    Regards,
    S Anand

    Why dont you want to make a change at SO level?
    From OSS note 550192 - FAQ: Changing third-party and individual PO items
    Question: What do I have to consider when I change the ship-to party for the entire sales order or for a third-party item?
    Answer: In the third-party scenario, the ship-to party of the third-party item in the sales order is identical with the delivery address of the respective purchase order item. Up to and including Release 4.5, there is no automatic function for a synchronous change so that this must be done manually in both documents. As of Release 4.6, the system automatically updates the delivery addresses from the purchase order items if the ship-to party of the third-party item changes. The change of the delivery address in the purchase order is therefore no longer possible; thus the 'Delivery address' is only displayed in the display mode in the purchasing transaction.
    For additional information, refer to Note 204190.

  • Tickbox for 'billing address same as delivery address'

    Hello everyone,
    on my eCommerce site, within the Shopping Cart Layout > Registration - Buy. is there a way of having a  tickbox that autofills the Billing Address with the Delivery Address when ticked?
    for example where a purchase is being delivered to the same address as the billing address.
    many thanks in advance

    THIS SHOULD HELP:
    Setting the billing address to be the same as the shipping address

  • Change delivery address in outbound delivery

    Dear Experts,
    SO created & Outbound delivery created via VL01N. Now I would like to change address in outbound delivery. Kindly assist me how may I change delivery address in outbound delivery & where should I make this changes take place. TQ
    rgds,
    nantha

    Hi,
    It is not possible to change the address in delivery. Assuming that Delivery Address have changed, but sold to party address is not changed, in that case create a new Ship-to-party with new Delivery address.
    Cancel the Delivery Document.
    In Change mode of Sales Order, Go to Partners Tab Page and replace the old ship-to-party code with new ship-to-party code.
    Now create delivery again and you will get the new delivery address.
    Regards,
    Rajesh Banka

  • Problem wih delivery address on print preview

    Dear experts,
    I have a problem with the delivery address on the print preview.
    When i create my PO and i attahced the storage location my delivery address in good in the PO and in the print preview.
    When i'm not attaching the storage location the delivery address in PO is the one of the plant but in the print preview i have the different address that i do not know where its comming from.
    Can you tell me which addreess in used by program as a delivery address when the storage location is not mentioned?
    I thinkits that program SAPFM06P.
    Thanks a lot for your help.

    in case of 3rd party order you have a account assignment which has the sales order number.
    execute VA03 und enter the sales order number. goto the partner tab at header level and obtain which customer number is the ship-to.
    the address for this customer number can be seen with XD03 transaction.
    you can as well check at KNA1 table to find the address number and with address number again get the address from ADRC table.

  • Query to get Salesorder Delivery Address in Purchase Order (ODLN Address2)

    This case looks a bit like a dropshipment situation:
    Our customer orders some products (salesorder = ORDR / RDR1).
    At the order-moment the salesdepartment cannot decide yet which businesspartner is going to deliver.
    At the purchase- and delivery-moment we create a purchase-order for the goods (OPOR / POR1).
    At that moment we want to lookup the customer's delivery address (name, street, zipcode,city and country) and put it as ONE field in the OPOR-Address2-field.
    We think it is at best when we can select this address2 field from the open orders ORDR.
    Who can help us to create the proper Query ? Thanks in advance !
    Jos Dielemans - www.dielemans.biz
    Edited by: J. Dielemans on May 25, 2009 3:26 PM
    I have already found this Query:
    SELECT DISTINCT T0.DocNum,T0.DocDate, T0.CardName, T0.Address2 FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.LineStatus ='o' or T1.Quantity > T1.OpenQty and T0.DocStatus ='o' ORDER BY T0.DocNum
    Now I want to select the ORDR-Address2-Field and copy it together with the customer's name to the OPOR-Address2 Field.
    I realize that we can at best use this Query as a Formatted Search on the OPOR-Address2-Field
    Jos Dielemans
    Edited by: J. Dielemans on May 25, 2009 3:26 PM

    We do not link Purchase Order to Sales Order.
    We want to copy the shipaddress from the Customer to the Purchase Order so that the Supplier can ship the goods directly to the right address.
    I thought it would be appropriate to select the right Customer from the Open Orders and then copy his CardName and Shipment Address to the Purchase Order.
    Can you help me with that Query ?
    Otherwise we should select the customer's Cardname and Shipment Address from the Business Partner's Masterdata.
    Jos Dielemans

  • Standard  report(for open PO order items) with estimated Delivery dates

    hi friends
    i would like to know if there is any standard  report(for open PO order items) with estimated Delivery dates on it.
    thanks
    alahari

    ME2M (by material)
    ME2L (by vendor)
    ME2N (by number)
    Use selection parameter WE101 for open GR
    and scope of list EINT (scheduling lines)

  • Subcontract Purchase Order with delivery address from Sales Order Ship-to?

    Hi
    My client has a Sales order for a subcontracted product.  The subcontractor should send the product directly to the customer that is on the sales order.  Currently, the delivery address on the PO is the home address of the client.
    My first option is to create a vendor address matching the ship-to and enter that manually in the Delivery Address field in the PO. But, i would like this to populate automatically.  Is this possible?
    thanks for your suggestions.
    Oll

    >
    Oll wrote:
    > Hi
    >
    > My client has a Sales order for a subcontracted product.  The subcontractor should send the product directly to the customer that is on the sales order.  Currently, the delivery address on the PO is the home address of the client.
    >
    > My first option is to create a vendor address matching the ship-to and enter that manually in the Delivery Address field in the PO. But, i would like this to populate automatically.  Is this possible?
    >
    > thanks for your suggestions.
    >
    > Oll
    a mixture of third party order (vendor ships directly to customer) and subcontract is not possible. third party order would need a S as item category in the PO, while subcontract order needs a L at the very same field.
    We created a storage location and a shipping point for the subcontractor. The sales order is created as a standard sales order that makes use of this storage location and shipping point.
    MRP run then creates a request to produce that material, based on the special procurement indicator in material master it is known that the material is to be procured via subcontract order.
    We then receive the finished good into this storage location that represents the subcontractor.
    Then we create a delivery in VL01N to ship this material to the customer.

  • Issue with Delivery Address in PO

    Hi All,
    I have an Issue with Purchase order. PO created with delivery address ( # 27856 ) on 2007. PO item got deleted and address # 27856 also deleted from table ADRC. When I try to change or display the PO we got the message Address # 27856 doesn't exit and not able to do anything. We came out fom the PO screen.
    Please any one guide me how to fix the Issue WITHOUT creating an New PO.
    Regards,
    Senthil

    Hi,
    PO item got deleted means Deletion indicator has been set for the PO. PO was not archived.
    When I execute the ADRC table with the address number 27856 i didn't get any output. It shows no table entries available.
    The exact message i got was
    Address doesn't exist 27856  4500178450 00010
    Message no. AM010
    I can't do anything in the PO.
    Please guide,
    Regards,
    Senthil

  • Need help with delivery address for iPhone 6

    I am trying to change the delivery address for my iPhone but UPS says I need to talk to Apple and Apple says its up to UPS. UPS says there is a dedicated line for Apple to call UPS to change the address and Apple says no such line exists. Has anyone successfully changed a delivery address for an Apple product? If I don't figure it out in the next few days my phone is going back to China.

    Minimize your iTunes, right click on your Desktop, click Properties, click the Settings tab. Increase your screen resolution to 1024 x 768. If it looks OK, click OK. You should be able to continue with your iPod.
    CG

  • SQL query: select billaddress if no delivery address exist.

    hi sql expert,
    The Query shall filter all invoices by date, articles and show the delivery address. Problem: Not every customer has deposited a delivery address. In this case the billing address is to be taken.
    How can this be done ?
    This query
    SELECT T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity] FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
    and T1.Itemcode = [%0] GROUP BY T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    UNION ALL
    SELECT T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], -T1.[Price], -(T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt], ('-' + substring(T1.Freetxt,0,5)) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", -T1.[Quantity] FROM ORIN T0  INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]' and T1.Itemcode = [%0]
    GROUP BY  T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    Thanks a lot!

    hi,
    I think I got it now :-)
    First: Show me priority all  delivery addresses . Otherwise billing addresses:
    SELECT T1.[CardCode], T2.[Street] FROM OCRD T1  INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode WHERE NOT EXISTS
      SELECT *
      FROM CRD1 as T2
      WHERE T2.[AdresType] = 's' and t1.CardCode = t2.Cardcode
    union
    SELECT T1.[CardCode], T2.[Street] FROM OCRD T1  INNER JOIN CRD1 T2 ON T1.CardCode = T2.CardCode
    where T2.[AdresType] = 's'
    secondly:
    Filter all invoices by date, articles and show priority the delivery address else billingaddress and subtract the credits:
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
    WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
    and T1.Itemcode = [%0] and not exists  (
      SELECT *
      FROM CRD1 as T3
      WHERE T3.[AdresType] = 's' and t2.CardCode = t3.Cardcode
    GROUP BY T0.[Cardcode], T0.[DocNum],T0.[CardCode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    union
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
    Where T3.[AdresType] = 's' and T1.Itemcode = [%0] and CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'
    -- ab hier werden die Gutschriften abgezogen
    union
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], -T1.[Price], -(T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt], ('-' + substring(T1.Freetxt,0,5)) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", -T1.[Quantity] FROM ORIN T0  INNER JOIN RIN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode WHERE CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]' and T1.Itemcode = [%0]
    and not exists  (
      SELECT *
      FROM CRD1 as T3
      WHERE T3.[AdresType] = 's' and t2.CardCode = t3.Cardcode
    GROUP BY  T0.[Cardcode], T0.[DocNum], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], T1.[FreeTxt], T1.[Quantity]
    union
    SELECT T0.[Cardcode], T0.[CardName], T3.[ZipCode],T3.[Street], T1.[ItemCode], T1.[Dscription], T1.[ShipDate], T1.[Price], (T1.[Price] * T1.[Quantity]) as "Gesamtpreis in €", T1.[FreeTxt],substring(T1.Freetxt,0,5) as "Grundpreis in €",substring(T1.Freetxt,9,6) as "TS-Wert in %", T1.[Quantity]
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN CRD1 T3 ON T2.CardCode = T3.CardCode
    Where T3.[AdresType] = 's' and T1.Itemcode = [%0] and CONVERT(nvarchar(8), T1.ShipDate, 112) BETWEEN '[%FromDate]' AND '[%ToDate]'

  • Standard PO with different delivery dates

    Hai All,
    Pls. clafiry my below query.
    e.g. my PR Qty may be 30 PC (in one line item)
    I want to create the PO in one line item with different delivery dates.
    Like: 10 PC 15.12.2008
            10 PC 20.12.2008
            10 PC 25.12.2008
    Rams

    Hi,
    In ME22N, on "Delivery Schedule" tab you can set manually on which dates the shipments should come.
    If you want to have the right date for the PO item, you should carry out your settings accordingly to get proper results after MRP run. However, you cannot set MRP (as per my best knowledge) to create several Delivery date for one PR - MRP will create a separate PR for each different date.
    Regards,
    Csaba

Maybe you are looking for

  • How to create editable forms to create yearbook?

    We are compiling a 200+ page yearbook and wanted to use an online form that we woudl mail out to classmembers to fill in and submit back. Ideally we woudl be creating teh template and they would enter short answers, text and images into teh pdf and s

  • What is the best practice to roll out ApEx to production?

    Hi, My first ApEx application :) What is the best practice to deploy an ApEx application to production? Also, I created end users account and use the end user's accountsto log in to ApEx via URL (http://xxx.xxx.xxx:8080/apex/f?p=111:1). However, how

  • ESS  I View Problems

    Hi We installed ESS and MSS Business Packages, i am not sure problem is with workset's or  iviews . Bcoz when i click on some worksets they are working fine but other worksets career job and employ time are not working, they are system error. So anyo

  • Equipment Serialno data segment inconsistency

    We have build a custom application where we tried to automate the Equipment sales process. Scenario : Trying to sell Equipment materials in sales order with multiple line items using a custom development. Each line item in Sales order is associated w

  • Why I can not change the width of a jbutton?

    I have a JPanel,a JLabel and a JButton.    panel.setLayout(new BorderLayout());    panel.add(label,BorderLayout.CENTER);    panel.add(button,BorderLayout.EAST);   I want to change the width of a jbutton.I use "button.setSize(...)",but it can't work.