1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Invoice_to_location details of Sales order

Discussion in 'Oracle Apps Technical' started by sabin, Dec 9, 2010.

  1. sabin

    sabin Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    Hi,

    I am new to Oracle Apps.I have a requirement.I need to retrieve the Bill_to_location(or Invoice_to_location) address for a particular purchase order from sales order tables.
    Please Help.




    Thanks in Advance.
     
  2. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Your question is not clear. Are you talking about the Custmer's Bill To Location? Because Purchase Order Bill To Location and Sale Order Bill To Location are two different things.
     
  3. sabin

    sabin Active Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    55
    I want to display the address of the customer where the invoice has to be sent (in a sales order)

    It appears as Bill_to_location in front end
     
  4. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    The Bill to Location is picked up from the HZ_CUST_SITE_USES_ALL table where SITE_USE_CODE is BILL_TO

    You need to join this table with the OE_ORDER_HEADERS_ALL.

    Hope it helps.
     
  5. a_kamalraj

    a_kamalraj Forum Advisor

    Messages:
    121
    Likes Received:
    23
    Trophy Points:
    280
    You can get the Full Address information from HZ_LOCATIONS, the location id is available hz_party_sites.
    party_site_id is used in all the other tables like hz_cust_account_sites, hz_cust_site_uses_all too
     
  6. shashismb

    shashismb Active Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    75
    SELECT P.PARTY_ID,
    P.PARTY_NAME,
    CA.CUST_ACCOUNT_ID,
    CA.ACCOUNT_NAME,
    P.ADDRESS1,
    P.CITY,
    P.STATE,
    P.COUNTRY,
    SU.SITE_USE_CODE
    FROM hz_parties p,
    hz_cust_accounts_all ca,
    hz_cust_acct_sites_all cs,
    hz_cust_site_uses_all su
    --ece_tp_headers etd
    WHERE p.party_id = ca.party_id
    AND p.status = 'A'
    AND ca.cust_account_id = cs.cust_account_id
    AND ca.status = 'A'
    AND cs.cust_acct_site_id = su.cust_acct_site_id
    AND cs.status = 'A'
    AND su.site_use_code = 'BILL_TO'
    AND su.status = 'A'
    --AND su.site_use_id = p_invoice_to_org_id