Ship To Address Query

Hi Gurus,
I am trying to add a oe_order_lines_all table to the following Ship to Address Query but joining the table is giving duplicate results. Could you please let me know the right joins
select distinct ooh.order_number,hl.address1,hl.address2,hl.address3,hl.city,
hl.state,hl.postal_code,poh.segment1 po_number,poh.approved_date,
hpz.party_number,hca.account_number,ool.fulfillment_date,
ooh.booked_date,ooh.booked_flag,ooh.ship_to_org_id
from apps.oe_order_headers_all ooh,
apps.oe_order_lines_all ool,
apps.hz_cust_site_uses_all hcsu,
apps.hz_cust_acct_sites_all hcas,
apps.hz_cust_Accounts_all hca,
apps.hz_parties hpz,
apps.hz_party_sites hps,
apps.hz_locations hl,
apps.oe_drop_ship_sources odss,
apps.po_headers_all poh
where odss.header_id = ooh.header_id
AND odss.line_id = ool.line_id
AND odss.po_header_id = poh.po_header_id
and hcsu.site_use_id = ooh.ship_to_org_id
AND hca.party_id = hpz.party_id
and hcas.cust_acct_site_id = hcsu.cust_acct_site_id
and hca.cust_account_id = hcas.cust_account_id
and hps.party_site_id = hcas.party_site_id
and hpz.party_id = hps.party_id
and hl.location_id = hps.location_id
Regards

Hi Sandeep,
I am not getting any duplicates when i remove ool field from the SELECT statement
Regards

Similar Messages

  • Query to get intermediate ship to address in r12

    Hi ALL,
    How to get intermediate ship to address in R12.
    Thnaks

    Hi;
    Please review:
    Question Regarding Creating Intermediate Ship To Address Using Api [ID 1269646.1]
    Intermediate Ship-To Address Functionality [ID 603168.1]
    Regard
    Helios

  • Help Required in Ship To Address in Purchase Order

    Hi all,
    Is it not possible to have multiple ship to address made available as drop down list in Logistics tab of Purchase order.. It is possible in Sales order. I require the same as i need to ship the product from different location...
    In business partner it does allow the vendor to have multiple ship to address so would it not be possible to select any ship to address in purchase order...?
    Regards,
    Jona

    Hi Jona,
    The system does not provide this functionality. You could create an add-on that adds this drop-down list and populates the address field based on the address that the user chooses. However, you could use a formatted search to achieve the same kind of function.
    The following query could be set up as a formatted search on the address field:
    select
         case
              when Street = '' then ''
              when Street is not null then Street + char(13)
         end +
         case
              when Block = '' then ''
              when Block is not null then Block + char(13)
         end +
         case
              when City = '' then ''
              when City is not null then City + char(13)
         end +
                  case
              when County = '' then ''
              when County is not null then County + char(13)
         end +
                  case
              when Country = '' then ''
              when Country is not null then Country
         end +
                  case
              when ZipCode = '' then ''
              when ZipCode is not null then '  ' + ZipCode
         end
    from
         CRD1
    where
         AdresType = 'S'
                 and CardCode = $[$4.0.0]
    You should modify the script to fit your own address format requirements.
    Hope this helps,
    Owen

  • List of cutomer ship to addresses.

    Hi,
    How can I get all the ship to addresses of a cutomer from prod system.
    We are in the process of updating the addresses of particular cutomer. So I have to back up all the addresses of the same cutomer.
    Please give me an idea of how to do it.
    Thanks,
    Veni

    Get the adress number of the customer from KNA1 table(KNA1-ADRNR) using KUNNR. Using the adress number, you can query the table ADRC (ADDRNUMBER) to get the adress details.
    Regards,
    Ravi

  • Ship To addresses Template

    Hi,
    Although there are several post threads on this issue, i got confused to actually use which template. I want to add the ship to address to my existing BP database. Previously, i only upload the bill to address. My question is, which template shud i use? BPaddress or BusinessPartner? If l use BPAddress, how the system link to which custcode? If i use BusinessPartner, where do i specify the ship to?
    Hopefully can get a clearer picture on how is it done. Bcoz, most of the methods that was suggested, i unable to execute.
    Thanks.
    Harith

    Dear,
    The template for BP address (either shipto or billto) should be BPAddresses.xlt. if the BP already exists, please follow the steps below:
    In you BP header file, the CardCode is the key of the OCRD table so it is all that is needed to perform the update.
    In your BPAddresses template the column LineNum is needed . The line number here corresponds to the column Row Number from CRD1. The 1st address that appears in the BP master data is the BillTo so this will have a row number of zero - this is blank in the table CRD1, but the subsequent
    addresses have a row number that is visible in CRD1.
    Please kindly run the following query to see what you need to use in LineNum column to update an existing address:
    SELECT CardCode, Address, LineNum FROM CRD1 WHERE CardCode = '???'
    To add a new shipto address, the linenum should be the biggest number retrieved from above query plus 1.
    DTW will use recordkey to match the header BusinessPartner and BPAddress.
    Hope the above helps.
    Xiaodan AN
    SAP Business One Forum Team
    Edited by: Xiaodan An on May 26, 2008 11:22 AM

  • Intermediate ship to address queries

    Hi All,
    I need to fetch the intermediate ship to address by linking the wsh_delivery_details table and hz_locations table for a order.
    I tried by using below query :
    SELECT ship_party.party_name ,
    ship_cust_acct.account_number,
    DECODE (ship_loc.CITY,NULL, NULL,ship_loc.CITY || ',') || DECODE (ship_loc.STATE,NULL, ship_loc.PROVINCE || ',',ship_loc.STATE || ',')
    || DECODE (ship_loc.postal_code, NULL, NULL,ship_loc.postal_code || ','
    || DECODE (ship_loc.country, NULL, NULL, ship_loc.country)) address5
    FROM hz_cust_acct_sites_all ship_acct_site,
    hz_party_sites ship_party_site,
    hz_locations ship_loc,
    hz_cust_site_uses_all ship_site,
    hz_parties ship_party,
    hz_cust_accounts ship_cust_acct,
    hr_all_organization_units ship_ou,
    wsh_delivery_details wdd,
    OE_ORDER_HEADERS_ALL h
    WHERE SHIP_LOC.LOCATION_ID=WDD.intmed_ship_to_location_id
    and h.header_id=WDD.source_header_id
    AND ship_site.cust_acct_site_id = ship_acct_site.cust_acct_site_id
    AND ship_acct_site.party_site_id = ship_party_site.party_site_id
    AND ship_party_site.location_id = ship_loc.location_id
    AND ship_acct_site.status = 'A'
    AND ship_acct_site.cust_account_id = ship_cust_acct.cust_account_id
    AND ship_cust_acct.party_id = ship_party.party_id
    AND ship_cust_acct.status = 'A'
    AND ship_site.status = 'A'
    AND ship_site.org_id = ship_ou.organization_id
    AND H.ORDER_NUMBER='788'
    This query is returning two rows for the same header_id , so my question is for a particular order having multiple items the intermediate_ship_to address also come multiple times? or for a order the intermediate_ship_to address should be one every time. please help me to understand thsi.
    Thanks

    Hi;
    Please review:
    Question Regarding Creating Intermediate Ship To Address Using Api [ID 1269646.1]
    Intermediate Ship-To Address Functionality [ID 603168.1]
    Regard
    Helios

  • Error in SRM 7.01,Trace showing Partner Ship-To Address not found in FEH.

    Hi Gurus,
    Please throw some light on my isssue.
    We are developing Plan Driven Procurement Business Scenario in SRM.
    Current System details are ECC 6.0 EHP4, PI 7.1 & SRM 7.01.
    We have done all the configuration settings in ECC, PI & SRM.
    PR created in ECC 6.0 and External source of Supply tab generated in PR, processed through SAP PI successfully to SRM 7.01. In SRM it showing an error trace as *Partner Ship-To address not found* . We are using ABAP Proxies and standard content for this PDP Scenario.Using PurchaseRequestERPSourcingRequest_Out as an outbound interface and PurchaseRequestERPSourcingRequest_In as Inbound interface. shopping cart is not getting created in SRM system. FEH is enabled in SRM system to trace the error.
    Please provide inputs to resolve the issue.
    Ashok

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • Standard Ship To Address modified

    Hi,
    We have a requirement as -
    While creating a Shopping Cart, the Ship To address (Delivery Point - Partner Fct - 27) is getting picked up from the Standard
    Ship to Address maintained against the Purchasing data. Now if a user modifies the Ship To Address while creating the Shopping Cart, we should be able to catch that when we use the standard Function Module BBP_PD_SC_GETDETAIL to retrieve the Shopping Cart data.
    My query is - how can I understand whether an user has modified the standard Ship To Address through BBP_PD_SC_GETDETAIL or using transaction BBP_PD?
    Thanks in advance.

    yes . there is one field there in adrc tale i will update you shortly.
    it makes difference manual entry or not.
    BBP1 - is manually you entered address. for eg. you create a sc and you entered manually ship to address ao this address recorded as BBP1 .
    ADRC - ADDR_GROUP value BBP1 manually entered .
    other wise it picked from address which already maintained. for eg. you can monitor the business document addresses entered by manually by the user or fixed value.
    br
    muthu
    Muthu

  • How to get the Customer detials in Purchase order Ship To Address

    Hi Friends,
    While doing the back-to-back order, when raising the PO, I want populate the Customer Name, Contatct Person and Address in Ship To address box. Can anyone please suggest a good query which can do that. I looking to create a formatted search based pon that.
    Regards
    Shiva

    Shiva,
    You can start with this:
    SELECT T0.CardName, T1.Name, T0.Address2
    FROM ORDR T0 INNER JOIN OCPR T1 ON T0.CntctCode = T1.CntctCode
    WHERE T0.DocEntry = $[POR1.BaseEntry] AND T0.ObjType = $[POR1.BaseType]
    Please bear in mind, it is a FS based on the rows so will run only on row level.
    Regards,
    Nat

  • Table holding Delivery shipping/billing address information

    All,
    Which table holds the shipping and billing addresses for a delivery?
    In my query below, I have retrieved the shipping / billing address attached to the order line referenced on any one of the delivery detail lines. But there are multiple delivery detail lines on any delivery, and they may reference order lines from different orders.
    Questions are:
    1. Does Oracle ensure that all delivery lines on a delivery reference the same hz_locations.location_id values (alias used below is ship_loc / bill_loc)?
    2. Does Oracle store the shipping and billing information for a delivery in one record in one single table? If so, what table is it? Or is retreiving this information from the below SQL via an order line the only way to get that information? (that would mean you have to retrieve this information for only one delivery detail under the delivery).
    SELECT ood.organization_code site, ood.organization_name org_unit, wnd.confirm_date ship_date, oh.order_number,
    NVL(wdd.cust_po_number, oh.cust_po_number) cust_po_number, wdd.source_line_number, bill_party.party_name bill_to_name,
    bill_loc.country bill_to_country, ship_party.party_name ship_to_name, ship_loc.country ship_to_country,
    wnd.confirmed_by end_user_name, msi.segment1 shipped_item_number, wdd.item_description shipped_item_description,
    wdd.shipped_quantity, ol.unit_selling_price unit_price, ROUND((wdd.shipped_quantity * ol.unit_selling_price), 2) total_price, wdd.currency_code,
    wnd.name delivery_name, wdd.delivery_detail_id
    FROM hz_locations ship_loc,
    hz_parties ship_party,
    hz_party_sites ship_ps,
    hz_cust_acct_sites_all ship_cas,
    hz_cust_site_uses_all ship_su,
    hz_locations bill_loc,
    hz_parties bill_party,
    hz_party_sites bill_ps,
    hz_cust_acct_sites_all bill_cas,
    hz_cust_site_uses_all bill_su,
    oe_order_headers_all oh,
    mtl_system_items msi,
    oe_order_lines_all ol,
    wsh_delivery_details wdd,
    wsh_delivery_assignments wda,
    org_organization_definitions ood,
    wsh_new_deliveries wnd
    WHERE ood.organization_id = wnd.organization_id
    AND wda.delivery_id = wnd.delivery_id
    AND wdd.delivery_detail_id = wda.delivery_detail_id
    AND ol.line_id = wdd.source_line_id
    AND msi.inventory_item_id = ol.inventory_item_id
    AND msi.organization_id = ol.ship_from_org_id
    AND oh.header_id = ol.header_id
    AND bill_su.site_use_id = ol.invoice_to_org_id
    AND bill_cas.cust_acct_site_id = bill_su.cust_acct_site_id
    AND bill_ps.party_site_id = bill_cas.party_site_id
    AND bill_party.party_id = bill_ps.party_id
    AND bill_loc.location_id = bill_ps.location_id
    AND ship_su.site_use_id = ol.ship_to_org_id
    AND ship_cas.cust_acct_site_id = ship_su.cust_acct_site_id
    AND ship_ps.party_site_id = ship_cas.party_site_id
    AND ship_party.party_id = ship_ps.party_id
    AND ship_loc.location_id = ship_ps.location_id

    Ok Thanks, I can see that.
    For my original question on table information -
    Does the shipping and billing address for a delivery get stored within shipping tables (WSH%) or somewhere else? There is a ultimate_dropoff_location_id on wsh_new_deliveries. Is that the 1 single delivery location ID for each delivery?
    For billing, I assume that the delivery will be billed per what each referenced order line states?

  • Endereço Ship to Address em itens vindos de requisições de compras

    Olá amigos.
    Estamos usando o SRM 5 no cenário clássico extendido e estamos enfrentando um problema durante a migração de requisições de compras proveniente de um backend para o SRM:
    O procedimento é referente ao endereço Ship to Address e acontece no seguinte caso:
    (01) Criamos uma requisição de compra (PR) no R/3 e enviamos para o SRM;
    (02) O endereço de entrega dos itens (Ship to Address) é sempre preenchido com o endereço da Organização de Compras definido na aba de endereço da Organização de Compras no PPOMA_BBP (este endereço também pode ser visto como o endereço principal da Organização na BP);
    (05) Quando nós criamos um pedido (PO) para a PR através do Portal e tentamos mudar o endereço de entrega (Ship to Address) para algum já existente (usando o search help disponível  na tela), as únicas opções de endereço são aqueles que estão listadas como endereço de entrega (Ship to Address) para a Organização de Compras na transação BP. O problema é que mesmo depois de escolher o novo endereço, quando voltamos para a tela de parceiros, o nome do endereço ainda aponta para o endereço antigo.
    Levando em consideração que:
    (01) Nós não estamos usando ADDR_SHIPT atributo de PPOMA_BBP;
    (02) Utilizamos a transação BP para manter quatro endereços de entrega (Ship to Address) para a Organização de Compras.
    temos dois problemas:
    (01) Como devemos proceder para preencher o endereço de entrega (Ship to Address) do item no SRM com o mesmo endereço preenchido para o item na PR? É possível por configuração ou só por customização?
    (02) É possível corrigir o erro relatado no item 5 acima realizando alguma configuração ou somente através de customização?
    Por favor nos ajudem com essas questões que nos são críticas.
    Obrigado,
    Evandro Miasato

  • Monitor the changes of Ship to address in Sales Order

    Hi,
    My client has an requirment which they would like to monitor whether the ship-to-address has been modified after the order were save. 
    e.g. 
    Sold-to 12345
    Ship-to 12356
    SAVE the order
    After the order are sale and sometime later, the user went in VA02 and update the ship-to-address to 23456
    now
    sold-to 12345
    ship-to 23456
    It there anyway we can have a report to check if the ship-to has been changes? 
    thanks,
    Rebella

    Hello Rebella,
    The best option of monitering the changes incurred fro the Ship-to-Party details of a SALES ORDER are as follows:
    If you are interested to pick up the information of changes values of Ship-To-Party from a Sales Order then i think you can use the table VBPA. This table will contain the updated value of Ship-To-Party partner function of a Sales Order.
    Second option would be to use a program which actually run when you open a Sales Order in VA03 --> Environment --> Changes. You can develop a t-code which shall call this program.
    You can also use the T-code AUT10 for tracking changes for a Sales Order.
    Hope these infotmation helps you in resolving your issue and please don't forget to mark your thread as closed.
    Regards,
    Sarthak

  • Error while updating Ship to Address on Sales Order form

    hi ,
    A user is trying to update the ship to address on a standard sales orders screen, this is pretty common and never caused any issues. However with one particular order the user gets the following error :
    "You cannot update Ship To Location; the standard value rule set prevents override. "
    This is an Oracle shipped message and not custom code. The message name is OE_SEC_UPDATE_VIOLATION whose text is : You cannot update &ATTRIBUTE; &REASON
    Seems like REASON is the message : OE_SEC_SV_VIOLATION, whose text is
    " the standard value rule set prevents override. "
    This is a message shipped by Oracle Order entry. I am not able to locate this message since the oracle shipped files are not available to us and this is not in any database code(i searched the code)
    Does anyone know when this message is thrown. It seems like some value set error but am not able to figure out where it is being set.
    Any help in this will be appreciated.
    Thanks

    Did you check if any Processing rule is defined for Ship to location update :
    Setup> Rules > Security > Processing constraint ?
    Maybe this order matches condition that prevents this field from being updated.

  • User Unable to change Ship to address in SC while creating

    Hi All,
    When user is trying to change the ship to address which was defaulted is unable to make change.
    USer is trying to make manual entry in the NAME field change so that the other field would automatically gets changed withrespect to NAME in the SHIP to address tab.
    We have informed user that there exist Find option for other ship to address to choose.
    But user has insisted that it is easier to make manual change in NAME filed of the SHIP to address tab so that evrything should automatcially gets changed ,This will avoid search time .
    All other fields like CC & GL  are able to make change
    Please let me know what needs to be done to change the ship to address.
    Thanks
    Prasanna
    Message was edited by:
            PRASANNA HAVINAL

    Hi Ravish,
    I am already changing the UOM in the same include and in the subroutine "USEREXIT_MOVE_FIELD_TO_VBAP".  But it is again over writing in the standard program.  What I need to do, to remain same UOM.
    Thanks,
    srinivas.

  • Multiple Ship To Address in a Purchase Order

    Can we have multiple ship to adresses in a Purchase Order in SAP Business one.

    SAP does not give you an option to select different ship to addresses in purchase orders unless you are using a drop ship warehouse.
    Thanks
    Murtuza

Maybe you are looking for

  • Use internal table in Smartform

    Hi All, I want to use the internal table in program in smartform. For that i have declare that table in TABLES attribute of the function module and trying to declare that table in form interface in smartform.I have created one stucture in data dictio

  • Inserting static text in between rows returned from a pivot table

    Is there a way to type static text (eg. "Note that the data for Land has an accuracy of 98%") in between rows returned from the dataset in the rtf template. The alternative would be to break the BI analysis report (which is the source of the template

  • ResourceBundle loading algorithm.

    Hi folks, I do have a problem/question with the resource bundle loading algorithm. Here is my setup: I have written a taglib which retrieves the user locale from the request and returns a message in the user's language, if the resource bundle does no

  • Setting plan version as default

    Dear Expert, How to setting 'plan version', for example: plan version 1 as default in tcode : s_alr_87013613 (Plan/Actual comparison)? What is the effect to others reports then? Thanks in advance.

  • Please, please help, aim problems

    hey, i downloaded aol instant messenger for mac and stuff, and i can get on it but only for a few minutes, and then a message pops up that says "The application AIM quit unexpectedly. Mac OS X and other applications are not affected. Click Reopen to