Best query to get customer name

Hi all,
I am writing query to get some from ra_customer_trx_all in oracle receivables. I found here customer_id
Which query can give me customer name against customer id?
Thanks

Hi.
Link BILL_TO_CUSTOMER_ID in table RA_CUSTOMER_TRX_ALL to column CUSTOMER_ID in view RA_CUSTOMERS and take CUSTOMER_NAME from RA_CUSTOMERS.
Octavio

Similar Messages

  • What is Best Way to Get Table Name in Oracle Applications : 12.1.1 (web)

    Hello Friends..
    I need your Help My Friends...
    we are working currently on Oracle Applications : 12.1.1
    i would like to know the best way to get Table name from Web Based Form..
    Regards
    Yas.

    Hi Yas;
    Please follow below 2 thread i belive you will find some hint in those thread
    table name for a jdeveloper page
    Re: EBS, 11.5.10, table name
    Hope it helps
    Regard
    Helios

  • Query to get Customer details

    Hi,
    Can any body please provide me the query by which I can get all the details of customer entered in customer form. I know there is a standard report available but my client want it in excel format. Only best way I feel is, I have to use a query to get all the details from back end.
    Thanks in advance.
    Reagrds,
    Suren

    Hello. Here's the query of the report.
    SELECT substrb ( PARTY . PARTY_NAME , 1 , 50 ) CUSTOMER_NAME , DECODE ( upper
    (:P_ORDER_BY ) , 'PHONETIC' , DECODE ( party.party_type , 'PERSON' ,
    SUBSTR ( per_prof.person_name_phonetic , 1 , 50 ) , SUBSTR ( party .
    organization_name_phonetic , 1 , 50 ) ) , null ) ALTERNATE_NAME , RACU .
    ACCOUNT_NUMBER CUSTOMER_NUMBER , RALU1.MEANING STATUS , RACU .
    ORIG_SYSTEM_REFERENCE REFERENCE , ARCPC.NAME CREDIT_PROFILE_CLASS , RACU
    .TAX_CODE TAX_CODE , ARVT.TAX_RATE TAX_RATE , PARTY.TAX_REFERENCE
    TAX_REFERENCE , RALU9.MEANING SHIP_PARTIAL_MAIN , RALU8.MEANING FOB ,
    RALU7.MEANING GSA_INDICATOR_MAIN , RALU6.MEANING CATEGORY , RALU5 .
    MEANING CUSTOMER_CLASS , RALU3.MEANING CUSTOMER_TYPE , SOOT.NAME
    ORDER_TYPE , SOPL.NAME PRICE_LIST , DECODE ( PARTY.PARTY_TYPE ,
    'ORGANIZATION' , PARTY.SIC_CODE , NULL ) SIC_CODE , SOLU1.MEANING
    SALES_CHANNEL , SOLU2.MEANING FREIGHT_TERMS , RASR.NAME
    PRIMARY_SALESPERSON , RACU.CUST_ACCOUNT_ID CUSTOMER_ID , ORGD .
    ORGANIZATION_NAME WAREHOUSE_MAIN , ORGF.DESCRIPTION CARRIER , PARTY .
    JGZZ_FISCAL_CODE JGZZ_FISCAL_CODE
    FROM
    HZ_CUST_ACCOUNTS_ALL RACU , HZ_PARTIES PARTY , AR_LOOKUPS RALU1 , AR_LOOKUPS
    RALU3 , AR_LOOKUPS RALU5 , AR_LOOKUPS RALU6 , AR_LOOKUPS RALU7 , AR_LOOKUPS
    RALU8 , AR_LOOKUPS RALU9 , HZ_CUSTOMER_PROFILES ARCP ,
    HZ_CUST_PROFILE_CLASSES ARCPC , SO_ORDER_TYPES SOOT , RA_SALESREPS RASR ,
    SO_PRICE_LISTS SOPL , SO_LOOKUPS SOLU1 , SO_LOOKUPS SOLU2 ,
    ORG_ORGANIZATION_DEFINITIONS ORGD , AR_VAT_TAX ARVT , ORG_FREIGHT ORGF ,
    HZ_PERSON_PROFILES PER_PROF WHERE RALU1.LOOKUP_CODE = RACU.STATUS AND
    RALU1.LOOKUP_TYPE = 'CODE_STATUS' AND PARTY.PARTY_NAME >=
    <customer_name_low> AND PARTY.PARTY_NAME <= <customer_name_high> AND
    PARTY.PARTY_ID = PER_PROF.PARTY_ID (+) AND ARCP.CUST_ACCOUNT_ID (+) =
    RACU.CUST_ACCOUNT_ID AND RACU.PARTY_ID = PARTY.PARTY_ID AND ARCP .
    SITE_USE_ID IS NULL AND ARCPC.PROFILE_CLASS_ID (+) = ARCP .
    PROFILE_CLASS_ID AND RALU3.LOOKUP_CODE (+) = RACU.CUSTOMER_TYPE AND
    RALU3.LOOKUP_TYPE (+) = 'CUSTOMER_TYPE' AND RALU5.LOOKUP_CODE (+) =
    RACU.CUSTOMER_CLASS_CODE AND RALU5.LOOKUP_TYPE (+) = 'CUSTOMER CLASS'
    AND RALU6.LOOKUP_CODE (+) = PARTY.CATEGORY_CODE AND RALU6.LOOKUP_TYPE
    (+) = 'CUSTOMER_CATEGORY' AND RALU7.LOOKUP_CODE (+) = DECODE ( PARTY .
    PARTY_TYPE , 'ORGANIZATION' , PARTY.GSA_INDICATOR_FLAG , 'N' ) AND RALU7
    .LOOKUP_TYPE (+) = 'YES/NO' AND RALU8.LOOKUP_CODE (+) = RACU.FOB_POINT
    AND RALU8.LOOKUP_TYPE (+) = 'FOB' AND RALU9.LOOKUP_CODE (+) = RACU .
    SHIP_PARTIAL AND RALU9.LOOKUP_TYPE (+) = 'YES/NO' AND ORGD .
    ORGANIZATION_ID (+) = RACU.WAREHOUSE_ID AND ARVT.TAX_CODE (+) = RACU .
    TAX_CODE AND TRUNC ( SYSDATE ) BETWEEN NVL ( ARVT.START_DATE , TRUNC (
    SYSDATE ) ) AND NVL ( ARVT.END_DATE , TRUNC ( SYSDATE ) ) AND SOOT .
    ORDER_TYPE_ID (+) = RACU.ORDER_TYPE_ID AND RASR.SALESREP_ID (+) = RACU
    .PRIMARY_SALESREP_ID AND SOPL.PRICE_LIST_ID (+) = RACU.PRICE_LIST_ID
    AND SOLU1.LOOKUP_CODE (+) = RACU.SALES_CHANNEL_CODE AND SOLU1 .
    LOOKUP_TYPE (+) = 'SALES_CHANNEL' AND SOLU2.LOOKUP_CODE (+) = RACU .
    FREIGHT_TERM AND SOLU2.LOOKUP_TYPE (+) = 'FREIGHT_TERMS' AND ORGF .
    FREIGHT_CODE (+) = RACU.SHIP_VIA AND ORGF.ORGANIZATION_ID (+) =
    :ITEM_FLEX_STRUCTURE ORDER BY DECODE ( upper ( 'Customer' ) , 'CUSTOMER
    NUMBER' , RACU.ACCOUNT_NUMBER , 'CUSTOMER' , PARTY.PARTY_NAME ,
    'PHONETIC' , DECODE ( party.PARTY_TYPE , 'PERSON' , PER_PROF .
    PERSON_NAME_PHONETIC , PARTY.ORGANIZATION_NAME_PHONETIC ) , PARTY .
    PARTY_NAME )
    Hope this helps.
    Octavio

  • Query to get  customer details in oracle istore

    Hi all ,
    Please help me how to get the customer contact(bill to and ship to), customer name , and address, from database using query in oracle istore.
    Thanks

    I have not worked on istore, but you can access this information using TCA tables.
    These tables are under AR schema and start with HZ
    -- FOLLOWING IS A QUERY TO GET CUSTOMERS
    SELECT
    hp.party_id,
    hp.party_name,
    hp.party_number registry_id,
    hl.address1,
    hl.address2,
    hl.address3,
    hl.city,
    hl.county,
    hl.state,
    hl.postal_code,
    hl.country
    FROM
    hz_locations hl ,
    hz_party_sites hps ,
    hz_cust_accounts_all hca,
    hz_parties hp
    WHERE 1 = 1
    AND hl.location_id = hps.location_id
    and hca.party_id = hp.party_id
    and hp.party_id = hps.party_id
    and hps.identifying_address_flag = 'Y'
    and party_type='ORGANIZATION'
    following query is for contacts and you will have twik these queries as per your env
    SELECT 'a' sort,
    hp.party_id,
    hp.party_number "registry id",
    hp.party_name,
    HZ_PARTIES.party_name "contact name",
    HZ_ORG_CONTACTS.job_title,
    hz_org_contacts.job_title_code,
    RelationshipParty.email_address email,
    HzPuiRelationshipsEO.start_date,
    REL_GROUP_CODE,
    HzPuiRelationshipsEO.STATUS,
    decode(nvl(RelationshipParty.primary_phone_country_code, 'N'), 'N','',
    '+ '||RelationshipParty.primary_phone_country_code)||
    decode(nvl(RelationshipParty.primary_phone_area_code, 'N'), 'N', '', ' ('||RelationshipParty.primary_phone_area_code||') ')||
    RelationshipParty.primary_phone_number||
    decode(nvl(RelationshipParty.primary_phone_extension,'N'), 'N','', ' Ext. '||RelationshipParty.primary_phone_extension)||
    decode(nvl(RelationshipParty.primary_phone_line_type,'N'), 'N', '', ' ('||RelationshipParty.primary_phone_line_type||')') phone
    FROM HZ_RELATIONSHIPS HzPuiRelationshipsEO,
    HZ_RELATIONSHIP_GROUPINGS_V,
    HZ_PARTIES,
    HZ_PARTIES HP,
    HZ_PARTY_SITES,
    HZ_ORG_CONTACTS,
    HZ_PARTIES RelationshipParty,
    fnd_lookup_values fnd1
    WHERE 1=1
    AND HzPuiRelationshipsEO.relationship_type = HZ_RELATIONSHIP_GROUPINGS_V.relationship_type
    AND HzPuiRelationshipsEO.relationship_code = HZ_RELATIONSHIP_GROUPINGS_V.backward_rel_code
    AND HzPuiRelationshipsEO.directional_flag = 'B'
    AND HZ_PARTIES.party_id = HzPuiRelationshipsEO.object_id
    AND HZ_PARTY_SITES.party_id(+) = HzPuiRelationshipsEO.subject_id
    AND HZ_PARTY_SITES.identifying_address_flag(+) = 'Y'
    AND hp.party_id = HzPuiRelationshipsEO.subject_id
    and hp.status = 'A'
    and hz_parties.status = 'A'
    AND HzPuiRelationshipsEO.relationship_id = hz_org_contacts.party_relationship_id(+)
    AND HzPuiRelationshipsEO.subject_id <> HzPuiRelationshipsEO.object_id
    AND HzPuiRelationshipsEO.object_type = HZ_RELATIONSHIP_GROUPINGS_V.subject_type
    AND HzPuiRelationshipsEO.subject_type = HZ_RELATIONSHIP_GROUPINGS_V.object_type
    AND HzPuiRelationshipsEO.party_id = RelationshipParty.party_id
    AND fnd1.view_application_id(+) = 222
    AND fnd1.language(+) = USERENV ('LANG')
    AND fnd1.lookup_type(+) = 'RESPONSIBILITY'
    AND HzPuiRelationshipsEO.end_date > sysdate
    AND fnd1.lookup_code(+) = HZ_ORG_CONTACTS.job_title_code
    and rel_group_code='PARTY_REL_GRP_CONTACTS'

  • Query to get parameter name and value after ran the conccurent program

    Hi All,
    Query to get the parameter name and value for completed concurrent program using the request id. can any one help me in this regard.
    Thanks,
    Red.

    Red,
    I have tried the same query and it works properly here.
    I have submitted "Purge Signon Audit data" concurrent program with "Audit Date" parameter set to 01-06-2009, and here is the query output:
    SQL> select request_id, phase_code, status_code,
    argument_text, argument1
    from fnd_concurrent_requests
    where request_id = '739664';
    REQUEST_ID P S ARGUMENT_TEXT        ARGUMENT1
        739664 C C 2009/06/01 00:00:00  2009/06/01 00:00:00Regards,
    Hussein

  • How to get customer name automatically in table maintainance generator

    Hi all,
    I am having a table maintainance generator in which ship to party is the primary key, i need to add another column customer name
    fetched from KNA1, i tried using the event
    5.new entries creation, creating a new perform
    but the code which i am writing gives an error "Statement in accessible".
    Kindly help.

    Hi Manohar,
    Thanks for your help, Its working now.
    Issue resolved.

  • Query to get the name of the tables used in a View?

    Hi,
    Could you please help me in getting the name of the tables used in a perticular view?
    Please help me out...
    thnx in advance.
    Thnx,
    Bits
    Edited by: Bits on Sep 14, 2009 2:15 PM

    There is no data dictionary table that stores this directly.
    - You could get the DDL used to create the view and parse that SQL. Depending on how complex the view might be, this could be relatively easy or highly complex.
    - You could get a recursive list of the objects that the view depends on (from ALL_/USER_/DBA_DEPENDENCIES) and trace those dependencies back to all the tables that the view depends on. If your view calls functions, however, this may or may not be what you're looking for. If you are selecting from just one table in the FROM clause but you are calling a function that references a dozen tables, do you want one row? Or thirteen? What about tables referenced in a correlated subquery in the WHERE clause?
    Justin

  • Query to get Vendor Name who is Customer also

    Hi,
    Can any one send me the query to find the Supplier/Vendor who is Customer also and vice versa.
    I am in 10g.
    Please suggest me some query to find out dis.
    This is very imp for me.
    Thanks

    Hi,
    I think you can use this table to cross reference between vendor and customer FV.FV_CUST_VEND_XREFS.In 11.5.10 this table act as cross reference between vendor and customer

  • Query to get file name of field

    Hi folks,
    I have one field in SQL table with whole file names:
    e.g
    C:\Directory1\File 1.txt
    C:\Drirectory2\SubDirectory1\Image 33.jpg
    I need one query to show only the file names:
    e.g
    File 1.txt
    Image 33.jpg 
    What I need to do to get only the file names as result of query? 

    create table test (filenames varchar(100))
    insert into test values ('C:\Directory1\File 1.txt'),('C:\Drirectory2\SubDirectory1\Image 33.jpg'),('aaa'),(null)
    select Reverse(stuff(reverse(filenames)
    , Case when Charindex('\',reverse(filenames))>0 then Charindex('\',reverse(filenames)) else len(filenames) end
    , Case when Charindex('\',reverse(filenames))>0 then len(filenames) else 0 End
    ,'')) fileCol from test
    --Or
    SELECT Distinct Coalesce(S.a.value('(/H/r)[4]', 'VARCHAR(100)'), S.a.value('(/H/r)[3]', 'VARCHAR(100)'), S.a.value('(/H/r)[2]', 'VARCHAR(100)'), S.a.value('(/H/r)[1]', 'VARCHAR(100)') ) AS fileCol
    FROM
    SELECT *,CAST (N'<H><r>' + REPLACE(filenames, '\', '</r><r>') + '</r></H>' AS XML) AS [vals]
    FROM test) d
    CROSS APPLY d.[vals].nodes('/H/r') S(a)
    drop table test

  • Select query to get table names

    Hi,
    Can i retrieve a table name from a select query if i know value of one of the columns in the table?
    Glen

    Can't you take a look at the source code and see what table those values are coming from? That's likely the easiest solution.
    Barring that, you could use dynamic SQL, but it's going to be awfully inefficient. Something like
    FOR x IN (SELECT * FROM user_tab_cols WHERE data_type = 'VARCHAR2')
    LOOP
      EXECUTE IMMEDIATE
        'SELECT COUNT(*) FROM ' || x.table_name ||
        ' WHERE ' || x.column_name || ' = <<literal value>>'
        INTO l_cnt;
      IF( l_cnt > 1 )
      THEN
        DBMS_OUTPUT.PUT_LINE( 'Found the value' );
      END IF;
    END LOOP;This assumes that you know at least what data type the value is stored in. It's also going to generate a tremendous number of full table scans, so it'll be slow as molasses on a system of any size.
    Justin

  • Best query to get the latest version

    Hi,
    I have a table as below:
    col1 col2 col3.... col_ver col7
    I have a combination od values for col1 to col6. I have values in col7 which is different for each value in col_ver. col_ver is a version column.
    For a particular combination (col1 to col6) I want to get the rows with the maximum version. Can anyone suggest the best sql for this ?
    I have 2 options as below, please suggest from performance point of view which would be better (i don't have enough rows to test) and if there is a any other better way
    option 1:
    SELECT col1, col2, col3, col4, col5, col6, col_ver, col7
    FROM
    (SELECT col1, col2, col3, col4, col5, col6, col_ver, col7, MAX(col_ver) OVER (PARTITION BY col1, col2, col3, col4,
    col5, col6) MVER
    FROM tabA )
    WHERE col_ver = MVER;
    option2:
    SELECT col1, col2, col3, col4, col5, col6, col_ver, col7
    FROM tabA A
    WHERE col_ver = (SELECT MAX(col_ver) FROM tabA B
    WHERE
    B.col1 = A.col1
    AND B.col2 = A.col2
    AND B.col3 = A.col3
    AND B.col4 = A.col4
    AND B.col5 = A.col5
    AND B.col6 = A.col6);
    Thanks a lot in adavnce

    SQL> with t as
      2  (select 'a1' col1, 'b1' col2, 'c1' col3, 'd1' col4, 1 col_ver,  100 col7
      3     from dual
      4   union all
      5   select 'a1' col1, 'b2' col2, 'c1' col3, 'd1' col4, 1 col_ver,  101 col7
      6     from dual
      7   union all
      8   select 'a1' col1, 'b2' col2, 'c2' col3, 'd1' col4, 1 col_ver,  102 col7
      9     from dual
    10   union all
    11   select 'a1' col1, 'b2' col2, 'c2' col3, 'd2' col4, 1 col_ver,  103 col7
    12     from dual
    13   union all
    14   select 'a2' col1, 'b1' col2, 'c1' col3, 'd1' col4, 1 col_ver,  104 col7
    15     from dual
    16   union all
    17   select 'a2' col1, 'b2' col2, 'c1' col3, 'd1' col4, 1 col_ver,  105 col7
    18     from dual
    19   union all
    20   select 'a2' col1, 'b2' col2, 'c2' col3, 'd1' col4, 1 col_ver,  106 col7
    21     from dual
    22   union all
    23   select 'a2' col1, 'b2' col2, 'c2' col3, 'd2' col4, 1 col_ver,  107 col7
    24     from dual
    25   union all
    26   select 'a1' col1, 'b1' col2, 'c1' col3, 'd1' col4, 2 col_ver,  108 col7
    27     from dual
    28   union all
    29   select 'a1' col1, 'b2' col2, 'c2' col3, 'd1' col4, 2 col_ver,  109 col7
    30     from dual
    31   union all
    32   select 'a1' col1, 'b2' col2, 'c2' col3, 'd2' col4, 2 col_ver,  110 col7
    33     from dual
    34   union all
    35   select 'a2' col1, 'b2' col2, 'c1' col3, 'd2' col4, 2 col_ver,  111 col7
    36     from dual
    37   union all
    38   select 'a2' col1, 'b2' col2, 'c2' col3, 'd2' col4, 2 col_ver,  112 col7
    39     from dual
    40   union all
    41   select 'a1' col1, 'b2' col2, 'c2' col3, 'd2' col4, 3 col_ver,  113 col7
    42     from dual
    43   union all
    44   select 'a2' col1, 'b1' col2, 'c1' col3, 'd1' col4, 3 col_ver,  114 col7
    45     from dual)
    46  select * from t;
    CO CO CO CO    COL_VER       COL7
    a1 b1 c1 d1          1        100
    a1 b2 c1 d1          1        101
    a1 b2 c2 d1          1        102
    a1 b2 c2 d2          1        103
    a2 b1 c1 d1          1        104
    a2 b2 c1 d1          1        105
    a2 b2 c2 d1          1        106
    a2 b2 c2 d2          1        107
    a1 b1 c1 d1          2        108
    a1 b2 c2 d1          2        109
    a1 b2 c2 d2          2        110
    a2 b2 c1 d2          2        111
    a2 b2 c2 d2          2        112
    a1 b2 c2 d2          3        113
    a2 b1 c1 d1          3        114
    15 rows selected.
    SQL> -- from here we only need to get those with the lastest value for the col_ver
    SQL> with t as
      2  (select 'a1' col1, 'b1' col2, 'c1' col3, 'd1' col4, 1 col_ver,  100 col7
      3     from dual
      4   union all
      5   select 'a1' col1, 'b2' col2, 'c1' col3, 'd1' col4, 1 col_ver,  101 col7
      6     from dual
      7   union all
      8   select 'a1' col1, 'b2' col2, 'c2' col3, 'd1' col4, 1 col_ver,  102 col7
      9     from dual
    10   union all
    11   select 'a1' col1, 'b2' col2, 'c2' col3, 'd2' col4, 1 col_ver,  103 col7
    12     from dual
    13   union all
    14   select 'a2' col1, 'b1' col2, 'c1' col3, 'd1' col4, 1 col_ver,  104 col7
    15     from dual
    16   union all
    17   select 'a2' col1, 'b2' col2, 'c1' col3, 'd1' col4, 1 col_ver,  105 col7
    18     from dual
    19   union all
    20   select 'a2' col1, 'b2' col2, 'c2' col3, 'd1' col4, 1 col_ver,  106 col7
    21     from dual
    22   union all
    23   select 'a2' col1, 'b2' col2, 'c2' col3, 'd2' col4, 1 col_ver,  107 col7
    24     from dual
    25   union all
    26   select 'a1' col1, 'b1' col2, 'c1' col3, 'd1' col4, 2 col_ver,  108 col7
    27     from dual
    28   union all
    29   select 'a1' col1, 'b2' col2, 'c2' col3, 'd1' col4, 2 col_ver,  109 col7
    30     from dual
    31   union all
    32   select 'a1' col1, 'b2' col2, 'c2' col3, 'd2' col4, 2 col_ver,  110 col7
    33     from dual
    34   union all
    35   select 'a2' col1, 'b2' col2, 'c1' col3, 'd2' col4, 2 col_ver,  111 col7
    36     from dual
    37   union all
    38   select 'a2' col1, 'b2' col2, 'c2' col3, 'd2' col4, 2 col_ver,  112 col7
    39     from dual
    40   union all
    41   select 'a1' col1, 'b2' col2, 'c2' col3, 'd2' col4, 3 col_ver,  113 col7
    42     from dual
    43   union all
    44   select 'a2' col1, 'b1' col2, 'c1' col3, 'd1' col4, 3 col_ver,  114 col7
    45     from dual)
    46  select a.col1, a.col2, a.col3, a.col4, a.col_ver, a.col7
    47    from (select t.col1, t.col2, t.col3, t.col4, t.col_ver, t.col7,
    48                 row_number() over (partition by t.col1, t.col2, t.col3, t.col4
    49                                    order by t.col_ver desc) rn
    50            from t) a
    51   where a.rn = 1;
    CO CO CO CO    COL_VER       COL7
    a1 b1 c1 d1          2        108
    a1 b2 c1 d1          1        101
    a1 b2 c2 d1          2        109
    a1 b2 c2 d2          3        113
    a2 b1 c1 d1          3        114
    a2 b2 c1 d1          1        105
    a2 b2 c1 d2          2        111
    a2 b2 c2 d1          1        106
    a2 b2 c2 d2          2        112
    9 rows selected.
    SQL>

  • How to create function module for getting customer name

    Hi Experts,
                   How to create function module?  when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
    how to write the logic in source code....
    Regards,
    Thiru. R

    1. First of all create function group.
    2. Create function module using this function group.
    3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
    4. Fetch name1 for each kunnr from KNA1 table.
    "->> if many kunnr
    if not t_kunnr[] is initial.
    select kunnr as kunnr name1 as name1
    into table t_kunnr_name1
    from kna1
    for all entried in table t_kunnr
    where kunnr = t_kunnr-kunnr.
    endif.       
    sort t_kunnr_name1 by kunnr name1.
    delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
    table t_kunnr_name1 will contain kunnr and its name1.
    I hope logic is clear for you now.
    Regards,
    Aparna

  • Whats the best way to get the server name in a servlet deployed to a cluster?

              Hi,
              I have a servlet in a web application that is deployed to a cluster, just
              wondering what is the best way to get the name of the node that the server is
              running on at run time??
              Thanks
              

              Please try to modify the following code and test for your purpose: (check Weblogic
              class document for detail)
              import javax.naming.*;
              import weblogic.jndi.*;
              import weblogic.management.*;
              import weblogic.management.configuration.*;
              import weblogic.management.runtime.*;
              MBeanHome home = null;
                   try{
                        //The Environment class represents the properties used to create
                             //an initial Context. DEfault constructor constructs an Environment
                             //with default properties, that is, with a WebLogic initial context.
                             //If unset, the properties for principal and credentials default to
                             //guest/guest, and the provider URL defaults to "t3://localhost:7001".
                             Environment env = new Environment();
                             //Sets the Context.PROVIDER_URL property value to the value of
                             //the argument url.
                             if(admin_url!=null){
                                  env.setProviderUrl(admin_url);
                                  //Sets the Context.SECURITY_PRINCIPAL property to the value of
                                  //the argument principal.
                                  env.setSecurityPrincipal(username);
                                  //Sets the value of the Context.SECURITY_CREDENTIAL property to
                                  //the value of the argument cedentials
                                  env.setSecurityCredentials(password);
                                  //Returns an initial context based on the properties in an Environment.
                                  ctx = env.getInitialContext();
                             }else ctx = new InitialContext();
                             home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                             ctx.close(); //free resource
                             // or if looking up a specific MBeanHome
                             //home = (MBeanHome) ctx.lookup(MBeanHome.JNDI_NAME + "." + serverName);
                             DomainMBean dmb = home.getActiveDomain(); //Get Active Domain
                             ServerMBean[] sbeans = dmb.getServers(); //Get all servers
                             if(sbeans!=null){
                                  for(int s1=0; s1<sbeans.length; s1++){
                                       String privip = sbeans[s1].getListenAddress();
                                  sbeans[s1].getName();
                             sbeans[s1].getListenPort();
                                                 WebServerMBean wmb = sbeans[s1].getWebServer();
                   }catch(Exception ex){
              "Gao Jun" <[email protected]> wrote:
              >Is there any sample code? Thanks
              >
              >Best Regards,
              >Jun Gao
              >
              >"Xiang Rao" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Sure. You can use the Weblogic management APIs to query ServerBean.
              >>
              >>
              >> "Me" <[email protected]> wrote:
              >> >
              >> >Thanks for your reply, i was hoping to find a better way for example
              >> >a class in
              >> >weblogic API.
              >> >
              >> >Thanks
              >> >
              >> >"Xiang Rao" <[email protected]> wrote:
              >> >>
              >> >>Physical: InetAddress.getLocalHost().getHostName()
              >> >>Weblogic: System.getProperty("weblogic.Name");
              >> >>
              >> >>
              >> >>"Me" <[email protected]> wrote:
              >> >>>
              >> >>>Hi,
              >> >>> I have a servlet in a web application that is deployed to a
              >cluster,
              >> >>>just
              >> >>>wondering what is the best way to get the name of the node that
              >the
              >> >>server
              >> >>>is
              >> >>>running on at run time??
              >> >>>
              >> >>>Thanks
              >> >>
              >> >
              >>
              >
              >
              

  • Query to get batch GLBATCH name for the invoices of AP and AR

    Please provide a query to get GLBatch name for an invoice of AR and AR.
    From one cursor iam getting invoice number and invoiceID of AP and AR.
    I have written query but it is taking much time
    select distinct gjb.NAME
    from gl_je_headers gjh,
    gl_je_lines gjl,
    gl_je_batches gjb
    where gjl.REFERENCE_2=to_char(:p_invoiceid)
    and gjh.JE_HEADER_ID=gjl.JE_HEADER_ID
    and gjh.JE_BATCH_ID=gjb.JE_BATCH_ID
    so iam getting performance problem.
    Please suggest if iam wrong.
    Waiting for your valuable suggestion.
    Thanks
    ganesh

    Hi,
    the version of Oracle E-Business Suite is R12
    and ORacle Database IS 11I
    Thanks & Regards
    ganesh

  • How to display customer name in sales analysis report (item) layout

    Hi,
    Currently I try to run the sales analysis report by item with secondary selection on customer from & customer to.
    Is it possible for the layout to display the customer from & customer to.
    I try to look for the table name OFLT, but I cannot find it.
    My main concern is to display the customer name in the layout for sales analysis by item.
    Thanks

    Hi,
    The table OFLT stores selection criteria for all form. If there is no customer name/code in system PLD, it is very hard to find table or system variable.
    Tried to get customer name, not successful.
    Alternatively can try to create customized query to get additional field in sales analysis report.
    Thanks & Regards,
    Nagarajan

Maybe you are looking for

  • Is there any way to transfer non-itunes store music to your iTunes?

    I kind of killed my macbook, and it had to go to mac support and in order to make it happy and shiny again they had to wipe all of its memory. Now, I've restored the song purchased on itunes to my itunes, but 1. The iTunes/MacBook doesn't seem to be

  • Mac book pro cut off

    Mac book pro cut off and will not come back on at all...tried all the options in the manual and nothing works..plugged up to battery adapter and the green indicator light is very dim. Any suggestions?

  • How to find code behind application

    Hi All I am working with iRecruitment Recruiter responsibility. Here I can create new vacancies. After creating vacancies they should approved by one manager When I create vacancy and submit that vacancy for approval It stored in one table hr_api_tra

  • Cannot proces shell variable

    Hi All, I am trying to write a BASH shell script, where I need to process the value of a database column. I am having trouble processing this value, and would like to know what your thoughts are. The part of the script I am having difficulty with has

  • Freight on percent basis in the marketing documents in SBO 2007 SP 0 PL7

    Dear All, Can I calculate a freight on percent basis in the marketing documents in SBO 2007 SP 0 PL7?