How to get the primarykey columns of the table in SAP BI Java SDK

Hi, I'm new to sap BI Java SDK. I'm not getting how to get the primarykey columns, using BI JDBC Connector (for relational data sources). If anybody knows, please let me know. its very very urgent task to be done in my project. In the below following code.... I have written a code to connect to the database through resource bundle, reading table names, once user select table name, i need to show the primary key columns of that table to the user. here i'm not getting how to get the primary key columns . Please send me the code if there is any method to find out the primarykey columns or a logic to get them. I will be greatful to you.... if you can do this favour.
Please check out the following code ........
ManagedConnectionFactory mcf;
IConnectionFactory cf;
IConnectionSpec cs;
mcf = new JdbcManagedConnectionFactory();
cf = (IConnectionFactory) mcf.createConnectionFactory();
cs = cf.getConnectionSpec();
ResourceBundle rbLocal = ResourceBundle.getBundle( "xxxx");
Enumeration propnames = rbLocal.getKeys();
while (propnames.hasMoreElements())
String key = (String) propnames.nextElement(); //out.print(key); //out.println("="rbLocal.getString(key)"");
cs.setPropertyValue(key, rbLocal.getString(key));
// Establishing the connection. // The IBIRelational interface provides an entrypoint to access // metadata and execute queries.
IBIConnection connection = (IBIConnection) cf.getConnectionEx(cs); I
BIRelational rel = connection.getRelational();
IBIQuery query = rel.createQuery();
String sqlStatement = "SELECT * FROM " + "BICQPERSON where type='pk'"; ResultSet rs = IBIDataSet dataset = query.execute();
Thanks SreeKanth

Hi,
looks like you are on Infomation Builders, correct? If yes through which adapter and to what DB are you connecting?? in an R3/BW system you can do the folowing:
"(ABAP)
SELECT DISTINCT FIELDNAME
FROM DD03L
WHERE TABNAME = '/BIC/QPERSON'
  AND AS4LOCAL = 'A'
  AND KEYFLAG = 'X'
ORDER BY 1
Another option is goto directly to the RDBMS; in this case let me which one are you using
hope this helps...
Olivier.
Message was edited by:
        Olivier Cora

Similar Messages

  • How to get invoice status column in ap_invoice_all table

    how to get the invoice_status column like "NEEDS RE VALIDATION"      in account payables tables.

    The invoice approval status does not come from any table / lookup.
    Instead, Oracle builds it by calling the ap_invoices_pkg.get_approval_status function.
    You can also call it by passing invoice_id, payment_status_flag and invoice_type_lookup_code.
    All these 4 columns are present on the ap_invoices_all record.
    Hope this helps
    Sandeep Gandhi
    Independent Consultant

  • How to get Number of columns in a table?

    Hi all, just starting with database connectivity.
    I was wondering if there is any method where I can get the no. of cols in table at run time. I tried the ResultSet rs; but rs doesn't seem to have any method that will get the no. of columns.
    Any pointers to this is greatly appreciated?
    NJU

    You can use the getColumnCount() supplied by
    the ResultSetMetaData class, an instance of
    which can be obtained using the getMetaData()
    method of the ResultSet instance itself.
    I hope this will help.
    ByeThanks a lot for the quick input. It really helped me a lot to create tables based on the no of cols retrieved.
    Thanks again!!
    -NJU

  • After updating to Firefox 5 on a Windows 7 PC the bookmarks icon won't stay on the toolbar and I can't click it to get a bookmarks column on the left side of the screen, how do I fix it?

    There was no bookmarks icon on the toolbar. I used View > Toolbars> customise to put various icons on the toolbar all of which were visible using "customise". On going back to Firefox all the other icons remained visible but the Bookmarks Icon disappeared leaving no means of getting a bookmarks column on the left of the screen when using Firefox.

    Check that you still have the "Bookmarks Toolbar items" placed on the Bookmarks Toolbar<br />
    If the menu bar is hidden then press F10 or hold down the Alt key, that should make the "Menu Bar" appear
    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
    * Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout" and check that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    * If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the toolbar palette in the customize window to the Bookmarks Toolbar
    * If you do not see the "Bookmarks Toolbar items" or other items that are missing in the toolbar palette or on a toolbar then click the "Restore Default Set" button
    Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout"
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • On calendar with ipad in day screen, when i sync with macbook pro i get a alert (time)in the left column on the ipad.

    when i'm on the calendar for the ipad, when i  sync with my macbook pro from what was put on that computer, when it transfers over to the ipad on the left column of the day screen, i always get an alert column-I dont get an alert column when i use the calendar in the ipad
    How can I delete the alert column on the ipad?
    Thx Randy

    If you can't boot in the usual way, try a safe boot. During startup, you’ll see a progress bar, and then the login screen, which appears even if you normally log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. If you have more than one user account, you must be logged in as an administrator to carry out these instructions. Safe mode is slower than normal, and some things won’t work at all. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the startup volume is on a software RAID, you can’t boot in safe mode. If you're able to boot, launch the Console application in any of the following ways: ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. ☞ Open LaunchPad. Click Utilities, then Console in the icon grid. Select the most recent panic log under the heading System Diagnostic Reports on the left. If you don't see that heading, select   View ▹ Show Log List   from the menu bar. Post the entire contents of the panic report — the text, please, not a screenshot. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header and body of the report, if it’s present (it may not be.) Please don't post shutdownStall, spin, or hang reports.

  • Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Although my ipod shows the number of steps, calories, and time, it no longer is saving it to the history. Also when I open the history it takes me to May 2010 instead of the current date. Any ideas on how to get it to start recording the history again?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar
    The missing apps could have been done by setting the Restrictions that can hid those apps. If the backup was made with those retrictions set the the Restrictions are also restored.
    Thus, if you get it to work restore to factory settings/new iPod, not from backup                               
    You can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I just need to know how you get an iTunes library off the original hard drive of a mac and onto an external hard drive and still have it work normally?

    I just need to know how you get an iTunes library off the original hard drive of an imac and onto an external hard drive and still have it work as it normally would?

    http://support.apple.com/kb/HT1449

  • My dad has itunes on his PC. I don't have my own but I recently have an iPad mini and an iPod. I don't know how to get songs onto itunes on the PC, using a different account or at least private/ separate..

    My dad has itunes on his PC. I don't have my own but I recently have an iPad mini and an iPod. I don't know how to get songs onto itunes on the PC, using a different account or at least private/ separate..
    So how do I create a separate I tunes on a PC which already has itunes... Or if not can I plug my iPad to the PC and use itunes on my iPad, and drag mp3s from a computer.
    I'm not sure what the equivalent of a desktop is on the iPad.. And I don't actually know how to use the icloud either...
    Can anyone start me off, given it have a iPad and use of a PC - not mine with existing iplayer
    I do have spotify soundcloud so I could potentially use these.. If there is a route of getting either mp3's etc to end up on my iPad or iPod.
    Kind Regards

    iTunes 11
    If you  have iTunes 11 turn on the Sidebar.  Go to iTunes>View and click on Show Sidebar. You can also do a Crtl+S to show the sidebar. The sidebar is where Devices appears. and Control+B to show the Menu bar
    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    To sync to your iPod go to iTunes>Help>iTunes Help>Sync your iPod....>Sync You Device and follow the instructions.

  • How to use one report column into the another report in obiee

    How to use one report column into the another report in obiee

    i dont want to use column as a filter for another report it should be report column for another report
    Thanks,
    Vivek

  • How can I remove the Location column from the search results in a .chm file?

    How can I remove the Location column from the search results in a .chm file?
    I generated the file in Robohelp HTML 9.
    As far as I know it's used when you've combined more than one source into the final help file. It is possible (though I don't remember doing it) that I did that once a couple of years ago but now I'm only using one source - the project that's generating the .chm.
    Can anyone tell me how I can remove it?
    Thanks
    Tom

    In Project Setup look at the Window properties. I think you will find Advanced Search is ticked.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • DATA TRANSFER - How to get a SINGLE SPACE in the downloaded file from UNIX?

    Hi Experts,
    Am sending data from SAP to UNIX/ Application server and text file on desk top as well.
    So, I am keeping a single character just SPACE at the END of each record.
    Then, When I see the downloaded text file, I found a SINGLE SPACE at the end of each record, fine.
    Then, by using CG3Y t code, I downloaded the UNIX file to my desk top.
    But, When I see this UNIX downloaded file from UNIX, I did NOT find any SPACE at the end of each record!!!
    Am doing every thing same in both cases.
    So,
    1 - Why its happening in case of UNIX file?
    2 - How to get a SINGLE SPACE  at the END in the downloaded file from UNIX?
    thanq

    Hi,
    I don't know if this works:
    perform SET_TRAIL_BLANKS(saplgrap) using 'X'.  
    perform SET_FIXLEN(saplgrap) using '0' '060'.   "put length of your line from-to
    ... download ...
    It will put space at the end of your line, according to the length.
    Hope it works,
    Chang

  • HT1222 My phone is telling me about a Software Update but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    My phone is telling me about a Software Update 7.1.1 but for the first time it is asking me for a passcode, I have never set up a passcode and do not know how to get around this to do the upgrade?

    See if this helps:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • How to get values/data stored in the database into a list-item.

    how to get values/data stored in the database into a list-item.
    i tried to make a list item without any values assigned to it...but i got the below error.
    FRM-30191: No list items defined for required poplist.
    or
    FRM-32082: Invalid value for given item type.
    List EMPNO
    Item: EMPNO
    Block: EMP
    Form: MODULE5
    FRM-30085: Unable to adjust form for output.
    then according to some docs, i tried the the following for the trigger
    when-new-form-instance
    declare
         rg_name varchar2(40) := 'emp_rec';
         status number;
         groupid recordgroup;
         it_id item;
    begin
         it_id := Find_Item('empno');
         groupid := create_group_from_query(rg_name, 'select empno from emp');
         status := populate_group(groupid);
         populate_list(it_id, groupid);
    end;
    but yet didnt work... :(
    so how the heck do i get values fetched from the database table into the list item?

    for list items you need to values in the record group, one is the shown value and one is the returned value.
    Check out the online help for the populate_list built-in.
    You'll need something like select ename,ename from emp as the record group query.

  • I'm french, my white Ipod4g 16gb has been stolen 2 days ago, I would like to know how to get it back thanks to the serial number! please

    I'm french, my white Ipod4g 16gb has been stolen 2 days ago, I would like to know how to get it back thanks to the serial number! please

    You can't.
    Change your iTunes (Apple ID) password along with any other password that was stored in the iPod.  If any passwords are associated with credit cards, contact the CC company and get your card replaced (with a new number).  If any passwords are associated with a bank or any other savings institution, contact them also and discuss approprate action with them.
    The only real protection you have is with the personal information on the device rather than the physical device itself.  This requires action before the device is lost/stolen.  If the device has significant personal information, it should have a strong 8-digit (or longer) password AND be configured for automatic wipe in the event of ten consecutive incorrect password entries.

Maybe you are looking for

  • How do I keep my contacts from syncing to another iphone on my apple id

    I updated my husbands phone a Iphone 4s and now are contacts are shared not sure how to undo this. we are both on the same icoud and apple id

  • Trying to setup an HP officejet 6500 printer wirelessly - The isue seems to be with my airport router

    I am able to create an ad hoc network using bonjour, but when I try to setup the printer in wireles mode, the wireless network is not recognized by my iMac.  Brand new printer - I can't set it up on my windows machine either so it ust be something wi

  • Watching  purchased iTune movies with no internet

    I bought a Lacinema external HD because they said you could watch MP4 movies with it. I purchased 3 seasons of TV shows and several movies only to find that it won't play movies from iTunes. Please help me. I have spent soooo much money at iTunes, an

  • Power Not Charging 100%

    Dear Support Tech Team, My computer is using: Lenovol G480. After My Lap had finished updating windows, My Adater not charging 100%. Ussually, Power charged at 50 ~ 60%. Plz check & feedback for me the way to Repair its. Tks & Best Regard. Huu Thuan

  • Select data from Table1 based on Table2

    Hi Guys, Can you guide me up on how to select data from Table1 based on Table2? I want to fetch data which is not there in table2 in my table1 select query. Is that I have to do it with the loops after I select data from both tables or can it be hand