Csi_item_instance_pub.update_item_instance not updating the serial no

HI all,
csi_item_instance_pub.update_item_instance not updating the serial no. for Sales order transaction.
Actyally we have multiple error transaction for hte same serial no. for that i am planning to process the last transaction i.e. Sales order issue transaction.
While updating the serial no. with latest transaction i am getting "Msg1: Invalid Party location provided. The Location (38916) passed for the Instance Location Type "HZ_PARTY_SITES" is invalid or does not exists in TCA tables."
Even i had check for a customer this is the correct locaiton_id.
Below is my code:
which i took from one of the thread and pass my instance value.
=================
DECLARE
ln_order_num NUMBER;
lc_p_sno VARCHAR2(30); -- Variable for printer serial no.
LC_COMMIT VARCHAR2(5) := 'T';
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
t_output varchar2(2000);
t_msg_dummy number;
l_loc_id number :=38916;
--x_msg_count NUMBER;
CURSOR ib_cur IS
SELECT cii.instance_id
,cii.serial_number
,cii.inventory_item_id
,cii.object_version_number
FROM csi_item_instances cii
WHERE cii.instance_id = 734113452;--instance_id
--ORDER BY 1;
TYPE ib_rec_tbl_type IS TABLE OF ib_cur%ROWTYPE;
ib_rec_tbl ib_rec_tbl_type;
-- Variables needed to call the Item Instance update API
l_api_version CONSTANT NUMBER := 1.0;
--l_msg_count             NUMBER;
--l_msg_data              VARCHAR2(2000);
l_msg_index NUMBER;
l_instance_id_lst csi_datastructures_pub.id_tbl;
l_instance_header_rec csi_datastructures_pub.instance_header_rec;
l_party_header_tbl csi_datastructures_pub.party_header_tbl;
l_party_acct_header_tbl csi_datastructures_pub.party_account_header_tbl;
l_org_unit_header_tbl csi_datastructures_pub.org_units_header_tbl;
l_instance_rec csi_datastructures_pub.instance_rec;
l_party_tbl csi_datastructures_pub.party_tbl;
l_account_tbl csi_datastructures_pub.party_account_tbl;
l_pricing_attrib_tbl csi_datastructures_pub.pricing_attribs_tbl;
l_org_assignments_tbl csi_datastructures_pub.organization_units_tbl;
l_asset_assignment_tbl csi_datastructures_pub.instance_asset_tbl;
l_ext_attrib_values_tbl csi_datastructures_pub.extend_attrib_values_tbl;
l_pricing_attribs_tbl csi_datastructures_pub.pricing_attribs_tbl;
l_ext_attrib_tbl csi_datastructures_pub.extend_attrib_values_tbl;
l_ext_attrib_def_tbl csi_datastructures_pub.extend_attrib_tbl;
l_asset_header_tbl csi_datastructures_pub.instance_asset_header_tbl;
l_txn_rec csi_datastructures_pub.transaction_rec;
l_install_location_id NUMBER;
l_return_status VARCHAR2(5);
lc_init_msg_lst VARCHAR2(1) := 'T';
ln_validation_level NUMBER;
lc_error_text VARCHAR2(4000);
l_install_location_type_code csi_item_instances.install_location_type_code%TYPE;
j BINARY_INTEGER := 0;
l_party_tbl_idx BINARY_INTEGER;
BEGIN
--Create a savepoint
-- SAVEPOINT dcrd_csi_upd_ib_snm;
OPEN ib_cur;
FETCH ib_cur BULK COLLECT
INTO ib_rec_tbl;
CLOSE ib_cur;
IF ib_rec_tbl.COUNT > 0
THEN
--fnd_file.put_line(fnd_file.log, 'Begin loop');
dbms_output.put_line('Begin loop');
FOR i IN ib_rec_tbl.FIRST .. ib_rec_tbl.LAST
LOOP
--Set savepoint before processing record.
--SAVEPOINT dcrd_csi_upd_ib_snm;
l_instance_header_rec.instance_id := ib_rec_tbl(i).instance_id;
csi_item_instance_pub.get_item_instance_details(p_api_version => l_api_version
,p_commit => fnd_api.g_false
,p_init_msg_list => fnd_api.g_false
,p_validation_level => fnd_api.g_valid_level_full
,p_instance_rec => l_instance_header_rec
,p_get_parties => fnd_api.g_true
,p_party_header_tbl => l_party_header_tbl
,p_get_accounts => fnd_api.g_true
,p_account_header_tbl => l_party_acct_header_tbl
,p_get_org_assignments => fnd_api.g_true
,p_org_header_tbl => l_org_unit_header_tbl
,p_get_pricing_attribs => fnd_api.g_false
,p_pricing_attrib_tbl =>l_pricing_attribs_tbl
,p_get_ext_attribs => fnd_api.g_false
,p_ext_attrib_tbl => l_ext_attrib_tbl
,p_ext_attrib_def_tbl => l_ext_attrib_def_tbl
,p_get_asset_assignments => fnd_api.g_false
,p_asset_header_tbl => l_asset_header_tbl
,p_resolve_id_columns => fnd_api.g_false
,p_time_stamp => SYSDATE
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data
lc_error_text := NULL;
l_instance_rec.instance_status_id :=510;
l_instance_rec.instance_id := l_instance_header_rec.instance_id;
l_instance_rec.install_date := sysdate;--'13-APR-2011';--sysdate;--'12-MAR-2008';
l_txn_rec.transaction_type_id := 33;
l_instance_rec.instance_usage_code :='OUT_OF_ENTERPRISE';
-- l_instance_rec.INV_SUBINVENTORY_NAME :='STAGE';
l_instance_rec.install_location_type_code := 'HZ_PARTY_SITES';
--l_instance_rec.install_location_id := 38916;
l_instance_rec.location_id := l_loc_id;--38916;
l_instance_rec.location_type_code := 'HZ_PARTY_SITES';
l_instance_rec.object_version_number := l_instance_header_rec.object_version_number;
l_txn_rec.transaction_id := fnd_api.g_miss_num;
l_txn_rec.transaction_date := SYSDATE;
l_txn_rec.source_transaction_date := SYSDATE;
l_txn_rec.transaction_type_id := 8; --Id for DATA_CORRECTION transaction type
--Change Owner party details
--FOR i IN l_party_header_tbl.FIRST..l_party_header_tbl.LAST
-- LOOP
-- IF l_party_header_tbl(i).relationship_type_code = 'OWNER'
--THEN
l_party_tbl(j).instance_party_id := l_party_header_tbl(i).instance_party_id;
l_party_tbl(j).relationship_type_code := l_party_header_tbl(i).relationship_type_code;
l_party_tbl(j).party_id := 167048;
l_party_tbl(j).contact_flag := 'N';
l_party_tbl(j).object_version_number := l_party_header_tbl(i).object_version_number;
l_party_tbl_idx := j;
j := j + 1;
--END IF;
--END LOOP;
dbms_output.put_line('l_party_tbl count is '||l_party_tbl.COUNT);
j := 0;
dbms_output.put_line('l_party_acct_header_tbl count is '||l_party_acct_header_tbl.COUNT);
--Change Owner party account details
--FOR i IN l_party_acct_header_tbl.FIRST..l_party_acct_header_tbl.LAST
-- LOOP
-- IF l_party_acct_header_tbl(i).relationship_type_code = 'OWNER'
-- THEN
l_account_tbl(j).ip_account_id := l_party_acct_header_tbl(i).ip_account_id;
l_account_tbl(j).instance_party_id := l_party_acct_header_tbl(i).instance_party_id;
l_account_tbl(j).party_account_id := 133045;--61217;
l_account_tbl(j).object_version_number := l_party_acct_header_tbl(i).object_version_number;
l_account_tbl(j).bill_to_address := 37729;--77370;
l_account_tbl(j).ship_to_address := 37730;--77648;
l_account_tbl(j).parent_tbl_index := l_party_tbl_idx;
j := j + 1;
-- END IF;
-- END LOOP;
dbms_output.put_line('l_account_tbl count is '||l_account_tbl.COUNT);
--j := 0;
--Change Operating Unit details
FOR i IN l_org_unit_header_tbl.FIRST..l_org_unit_header_tbl.LAST
LOOP
IF l_org_unit_header_tbl(i).relationship_type_code = 'SOLD_FROM'
THEN
l_org_assignments_tbl(j).instance_ou_id := l_org_unit_header_tbl(i).instance_ou_id;
l_org_assignments_tbl(j).instance_id := l_org_unit_header_tbl(i).instance_id;
l_org_assignments_tbl(j).relationship_type_code := l_org_unit_header_tbl(i).relationship_type_code;
l_org_assignments_tbl(j).active_start_date := sysdate;--'13-APR-2011';--sysdate;
--l_org_assignments_tbl(j).operating_unit_id := 86;
l_org_assignments_tbl(j).object_version_number := l_org_unit_header_tbl(i).object_version_number;
END IF;
END LOOP;*/
-- Call instance update API if a serial no. is to be updated
/*fnd_file.put_line(fnd_file.log
,'Updating IB record for IB# ' || ib_rec_tbl(i).instance_id);*/
dbms_output.put_line('Updating IB record for IB# ' || ib_rec_tbl(i).instance_id);
csi_item_instance_pub.update_item_instance(p_api_version => l_api_version
,p_commit => LC_COMMIT --Handled outside API
,p_init_msg_list => lc_init_msg_lst
,p_validation_level => ln_validation_level
,p_instance_rec => l_instance_rec
,p_ext_attrib_values_tbl => l_ext_attrib_values_tbl --Null
,p_party_tbl => l_party_tbl --Null
,p_account_tbl => l_account_tbl --Null
,p_pricing_attrib_tbl => l_pricing_attrib_tbl --Null
,p_org_assignments_tbl => l_org_assignments_tbl --Null
,p_asset_assignment_tbl => l_asset_assignment_tbl --Null
,p_txn_rec => l_txn_rec
,x_instance_id_lst => l_instance_id_lst
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data);
dbms_output.put_line('API STATUS# ' || l_return_status);
if l_msg_count > 0
then
for j in 1 .. l_msg_count loop
fnd_msg_pub.get
( j
, FND_API.G_FALSE
, l_msg_data
, t_msg_dummy
t_output := ( 'Msg'
|| To_Char
( j
|| ': '
|| l_msg_data
dbms_output.put_line
( SubStr
( t_output
, 1
, 255
end loop;
end if;
IF l_return_status = 'S'
THEN
commit;
/*fnd_file.put_line(fnd_file.log
, 'Error updating the install base for IB# ' || ib_rec_tbl(i)
.instance_id);*/
dbms_output.put_line('Error updating the install base for IB# ' || ib_rec_tbl(i)
.instance_id);
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get(p_msg_index => -1
,p_encoded => 'F'
,p_data => l_msg_data
,p_msg_index_out => l_msg_index);
lc_error_text := lc_error_text || (substr(l_msg_data, 1, 255));
END LOOP;
dbms_output.put_line(lc_error_text);
--Rollback the transaction if error occured.
--ROLLBACK TO dcrd_csi_upd_ib_snm;
ELSE
/*fnd_file.put_line(fnd_file.log
, 'Install base update successful for IB# ' || ib_rec_tbl(i)
.instance_id);*/
dbms_output.put_line('Install base update successful for IB# ' || ib_rec_tbl(i)
.instance_id);
lc_error_text := 'SUCCESS!';
END IF;
--Update the temporary table record status
--update_status(ib_rec_tbl(i).snm_id, l_return_status, lc_error_text);
END LOOP;
--Commit transactions.
COMMIT;
END IF;
commit;
EXCEPTION
WHEN no_data_found THEN
--fnd_file.put_line(fnd_file.log, 'No records to process');
dbms_output.put_line('No records to process');
WHEN OTHERS THEN
/* fnd_file.put_line(fnd_file.log, 'Error in update_ib procedure');
fnd_file.put_line(fnd_file.log, to_char(SQLCODE) || ' - ' || SQLERRM);
dbms_output.put_line('Error in update_ib procedure');
dbms_output.put_line(to_char(SQLCODE) || ' - ' || SQLERRM);
END;
================================================
Thanks,
Raj
Edited by: user13275176 on Apr 14, 2011 7:07 AM

That is a wrong way to do that (I am not sure of the business needs and the situation in you are in that is forcing you to do that).
If you want the instance as if it is in Inventory, perform inventory receipt transaction. You should not just change the ownership (rather I should say you 'cannot' since the API should not allow you change the instance usage code to INVENTORY and location to Inventory just like that) and location details as inventory without performing the transaction in inventory.
What about your inventory, you do not want quantity back in inventory?
Thanks
Nagamohan

Similar Messages

  • Customize Movement Type : Reverse is not update the Serial No Status

    Hi All,
    Customize Movement Type : Reverse is not update the Serial No Status from ECUS to ESTO when reverse Delivery Order movement document.
    Mind to guide where to check this configuration problems.
    Thank you.

    Hi All,
    For the Customization Movement Type, Initial plan is copy from 602 but found out below different on Trans./ev serial no. Not sure the problems is from this site > How to change the configuration.

  • I just updated to XI, but it will not accept the serial number [Was: Penny - secretary]

    I just updated to XI, but it will not accept the serial number

    Hi there
    If you have purchased an Acrobat XI upgrade you will be prompted to enter the Acrobat XI serial number first then the serial number for the prior version.
    Which serial number isn't being accepted?  Please provide more details and send me a private message with both serial numbers so I can check further.
    Thanks
    Bev

  • Mobile Sync not update the client or remote store  after first sync

    Subject: OracleLite 9i does not update the client or remote store during synchronization with a Windows CE device
    After the first synchronization, neither the client or remote stores are updated on future synchronization when the publication is created with the fast refresh option. If the publication is created with the complete refresh option, the server will update the client, but the client cannot update the server after the first synchronization. That is once the database (.odb) file is downloaded from the server on the first connect, no updates to either the client, or server are performed for a publication created with the fast refresh option, and only the client store is updated when the publication is created with the complete refresh option. These result are obtained whether I use MSync via Microsoft Active Sync, or I use the Embedded VC++ program I wrote to initiate the synchronization from the Windows CE device.
    I am 99% sure the JAVA code that I am programmatically creating the publications with, and the Embedded VC++ code for initiating the synchronization from the Windows CE device are correct. Both programs adhere exactly to the example code provided either in the documentation, or in the sample code shipped with OracleLite 9i Release 5.0.1. My conclusion is that there is a problem with Oracles replication programs either on the Windows CE, or Server side, or both. This conclusion on my part is strongly supported by the fact that MSync operating with Microsoft Active Sync behaves exactly the same as my code that initiates the replication from the Windows CE device. Also, by looking through the discussion forum, I gather that others are experiencing similar, if not identical, replication problems.
    To support my contention that it is a Oracle problem, I have prepared a simplified version of the Embedded VC++ code to initiate the synchronization for the CE device, and the JAVA code for creating the publication. This code duplicates the problem and is easy to follow. You may download the zip file containing code via the link https://Yggdrasill.cfr.msstate.edu:4443/SyncProblem.htm or the link http://Yggdrasill.cfr.msstate.edu:7778/SyncProblem.htm. This zip contains the Embedded VC++ project files, that will compile and run correctly on a PocketPC with an Arm processor, or the PocketPC x86 emulator when you have the required include files, and libraries in the path. It also includes the JAVA code I used to create the publication. If you extend the VC++ code to run on additional platforms be sure to add the compile flag (directive) /D SQL_NOUNICODEMAP , and the library files olod2040.lib, and ocapi.lib in the library box from Project settings. On my system the paths to the Arm, and x86 libraries are C:\ORALITE501\MOBILE\SDK\WINCE\POCKET_PC\Arm\LIB, and C:\ORALITE501\MOBILE\SDK\WINCE\POCKET_PC\X86EM\LIB, respectively
    I am using a NT 4.0 SP6a server with Database 9i Release 2 Enterprise edition, and OracleLite 9i Mobile Server Release 5.0.1. The Windows CE test device is an iPac running Pocket PC, connected to a system running Windows 2000 Professional SP2, and Microsoft Active Sync 3.1.
    Please review this problem documentation, and tell me what I am doing wrong, or point me to a location where I can get a patch to fix the problem.
    Thanks,     
    Thomas G.Matney
    [email protected]
    (662)325-2791

    Hi,
    I'm also facing a similar problem. I'm using Mobile server as stand alone config with Oracle 8i as server database. After the first download, the data updated at the server is not getting downloaded to client(PDA).
    How did u overcome this problem? Is there any work around?
    I want to do synch using both serial and dial up.
    Thanks in advance,
    Sri

  • Problem with ios certificate server not updating the CRL

    Hi all,
    The background is that i'm currently setting up a DMVPN solution with the ipsec tunnels between the spokes created using certificates.
    I'm using a cisco 877 as the CA server (its running 12.4(6)T5) to provide the certificates to the spoke routers. This part is working fine - the spokes can request a certificate and get one issue all well and good.
    The problem is on the CA, the CRL lifetime is set to 24 hours but the CA is not updating the CRL so when the spokes look for the revocation list (as set in their trustpoint) they are reporting an error that the CRL is out of date and won't connect.
    If is do a '#sh crypto pki server' it lists a 'CRL NextUpdate timer. this has a timestamp that is 24 hours after the last certificate was revocked. The only way i can get the CRL to be re-generated is to revoke a certificate.
    So, my question is, have i missed something here? I thought the CA would automatically generat a new CRL file every 24hours.
    Can anyone help?
    thanks.

    Hi Mark (?)
    this seems to match this bug:
    CSCsy95838    IOS CA: CRL not updated, update timer no started
    However it does not mention if 12.4(6)T5 is affected, only that it was found in 12.4(15)T3 and resolved in 12.4(15)T10 and other more recent releases.
    I would suggest trying the latest 12.4(15)Tx, 15.0(1)Mx or 15.1(4)Mx release if you can.
    I supposed you've though of it, but just in case: as a workaround you can disable the CRL check on all the DMVPN routers, obviously they will still allow connections from routers with a revoked spoke.
    As a (temporary?) replacement for a CRL, you could use a "certificate ACL" with which you can kind of create a "manual local CRL" :
      crypto pki certificate map certACL 10
       serial-number ne
       serial-number ne
       etc.
      crypto pki trustpoint myTP
       match certificate certACL
    (note the "ne" stands for "not equal" so you are permitting any certificate whose serial number is not listed)
    Obviously you would have to configure (and maintain!) this on each router participating in the DMVPN so this is cumbersome, but I suppose if you don't often revoke certs it might be an option.
    hth
    Herbert
    If this post answers your question, please click the "Correct Answer" button

  • I have the right serial number to install arabic onto Ai, but the installer will not accept the serial number

    I have the right serial number to install arabic onto Ai, but the installer will not accept the serial number

    I'm also getting the "invalid serial number", but I'm wanting to upgrade my 5.1 to 5.1.4 to take advantage of HDV 720p/24 support. Is the 5.1.4 update even an option still? I really don't want to be forced to upgrade to FCS2 and shell out $500, just to get this one feature that was included in a patch.
    I went to the Registration page and it actually allowed me to register the serial number... (which I'm pretty sure I already had), but it still won't let me in to download any updates. Also, the email confirmation that was supposed to be sent has not arrived 20+ minutes later.
    Very strange. I called Apple support and they estimated a wait time of 15 mins... ugh.
    Anyone have other suggestions?

  • HT1529 Where do i find the serial No on a IMac 4.1 please? I have looked on the "about this Mac" but it does not have the serial No on it!

    Where do i find the serial No on a IMac 4.1 please? I have looked on the "about this Mac" but it does not have the serial No on it!

    Until last July, the model identifier on every Intel Mac would tell you exact minimum and maximum expansion in terms of RAM, retail operating system, and any system specific required firmware updates, video and audio expansion capabilities, and patches for Wifi available.  The serial number is only of consequence if you wish to date a Mac down to the week.  This can help in determining system specific disks, available warranty, and exchange/repair program eligibility.  Outside of that the year and month can usually be narrowed down to a six month period with model identifier alone on all except MacPros.  So my question is, is it really that relevant for your needs?

  • Adobe photoshop cs2 download on adobe website does not work-  the serial number does not work?

    photoshop cs2 download on adobe website does not work - the serial number given isn't recognised when you enter it when trying to install. the live chat at adobe cannot help and suggested that I may find the answer here. Can anyone help with this?

    Adobe has decommissioned the CS2 activation servers, so your old serial number is no longer usable.
    If you download the special non-activating version of CS2 that Adobe has made available to licensed CS2 users, you MUST also use the new serial number provided by Adobe on that download page:
    https://www.adobe.com/cfusion/entitlement/index.cfm?e=cs2_downloads
    That S/N does work.  I double checked.

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Outcome: Unknown Error

    Received this error (The workflow could not update the item, possibly because one or more columns for the item require a different type of information.) recently on a workflow that was
    working fine and no changes were made to the workflow.
    I have tried a few suggestions, i.e. adding a pause before any ‘Update’ action (which didn’t help because the workflow past this action without incident); checked the data type being written
    to the fields (the correct data types are being written); and we even checked the list schema to ensure the list names and the internal names are aligned (they
    are), but we still cannot figure out why the workflow is still throwing this error.
    We located the area within the workflow step where it is failing and we inserted a logging action to determine if the workflow would execute the logging action but it did not, but wrote the same error message.
    The workflow is a Reusable Approval workflow designed in SharePoint Designer 2010 and attached to a content type. 
    The form associated with the list was modified in InfoPath 2010. 
    Approvers would provide their approval in the InfoPath form which is then read by the workflow.
    Side note - items created after the workflow throws this Unknown Error some seem to be working fine. 
    We have deleted the item in question and re-added it with no effect. 
    Based on what we were able to determine there don’t seem to be any consistency with how this issue is behaving.
    Any suggestions on how to further investigate this issue in order to find the root cause would be greatly appreciated?
    Cheers

    Hi,
    I understand that the reusable workflow doesn’t work properly now. Have you tried to remove the Update list item action to see whether the workflow can run without issue?
    If the workflow runs perfectly when the Update list item action is removed, then you need to check whether there are errors in the update action. Check whether the values have been changed.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information using Update Item action

       I got error  "The workflow could not update the item, possibly because one or more columns for the item require a different type of information "I  found out the cause is  Update Item action       
    I need to update item in another List call Customer Report ,the field call "Issues"  with data type  "Choice"   to yes
    then the error arise .   please help..

    Thanks for the quick response Nikhil.
    Our SPF 2010 server is relatively small to many setups I am sure. The list with the issue only has 4456 items and there are a few associated lists, eg lookups, Tasks, etc see below for count.
    Site Lists
    Engagements = 4456 (Errors on this list, primary list for activity)
    Tasks = 7711  (All workflow tasks from all site lists)
    Clients = 4396  (Lookup from Engagements, Tslips, etc)
    Workflow History = 584930 (I periodically run a cleanup on this and try to keep it under 400k)
    Tslips = 3522 (Engagements list can create items here, but overall not much interaction between lists)
    A few other lists that are used by workflows to lookup associations that are fairly static and under 50 items, eg "Parters Admin" used to lookup a partners executive admin to assign a task.
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

  • Not Updating the Values in the JComboBox and JTable

    Hi Friends
    In my program i hava Two JComboBox and One JTable. I Update the ComboBox with different field on A Table. and then Display a list of record in the JTable.
    It is Displaying the Values in the Begining But when i try to Select the Next Item in the ComboBox it is not Updating the Records Eeither to JComboBox or JTable.
    MY CODE is this
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.DefaultComboBoxModel.*;
    import javax.swing.table.*;
    import java.sql.*;
    import java.util.*;
    public class SearchBook extends JDialog implements ActionListener
         private JComboBox comboCategory,comboAuthor;
         private JSplitPane splitpane;
         private JTable table;
         private JToolBar toolBar;
         private JButton btnclose, btncancel;
         private JPanel panel1,panel2,panel3,panel4;
         private JLabel lblCategory,lblAuthor;
         private Container c;
         //DefaultTableModel model;
         Statement st;
         ResultSet rs;
         Vector v = new Vector();
         public SearchBook (Connection con)
              // Property for JDialog
              setTitle("Search Books");
              setLocation(40,110);
              setModal(true);
              setSize(750,450);
              // Creating ToolBar Button
              btnclose = new JButton(new ImageIcon("Images/export.gif"));
              btnclose.addActionListener(this);
              // Creating Tool Bar
              toolBar = new JToolBar();
              toolBar.add(btnclose);
              try
                   st=con.createStatement();
                   rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
                   while(rs.next())
                        v.add(rs.getString(1));
              catch(SQLException ex)
                   System.out.println("Error");
              panel1= new JPanel();
              panel1.setLayout(new GridBagLayout());
              GridBagConstraints c = new GridBagConstraints();
              c.fill = GridBagConstraints.HORIZONTAL;
              lblCategory = new JLabel("Category:");
              lblCategory.setHorizontalAlignment (JTextField.CENTER);
              c.gridx=2;
              c.gridy=2;
              panel1.add(lblCategory,c);
              comboCategory = new JComboBox(v);
              comboCategory.addActionListener(this);
              c.ipadx=20;
              c.gridx=3;
              c.gridwidth=1;
              c.gridy=2;
              panel1.add(comboCategory,c);
              lblAuthor = new JLabel("Author/Publisher:");
              c.gridwidth=2;
              c.gridx=1;
              c.gridy=4;
              panel1.add(lblAuthor,c);
              lblAuthor.setHorizontalAlignment (JTextField.LEFT);
              comboAuthor = new JComboBox();
              comboAuthor.addActionListener(this);
              c.insets= new Insets(20,0,0,0);
              c.ipadx=20;
              c.gridx=3;
              c.gridy=4;
              panel1.add(comboAuthor,c);
              comboAuthor.setBounds (125, 165, 175, 25);
              table = new JTable();
              JScrollPane scrollpane = new JScrollPane(table);
              //panel2 = new JPanel();
              //panel2.add(scrollpane);
              splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
              splitpane.setDividerSize(15);
              splitpane.setDividerLocation(190);
              getContentPane().add(toolBar,BorderLayout.NORTH);
              getContentPane().add(splitpane);
         public void actionPerformed(ActionEvent ae)
              Object obj= ae.getSource();
              if(obj==comboCategory)
                   String selecteditem = (String)comboCategory.getSelectedItem();
                   displayAuthor(selecteditem);
                   System.out.println("Selected Item"+selecteditem);
              else if(obj==btnclose)
                   setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
              else if(obj==comboAuthor)
                   String selecteditem1 = (String)comboAuthor.getSelectedItem();
                   displayavailablity(selecteditem1);
                   //System.out.println("Selected Item"+selecteditem1);
                   System.out.println("Selected Author"+selecteditem1);
         private void displayAuthor(String selecteditem)
              try
              {     Vector data = new Vector();
                   rs= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
                   System.out.println("Executing");
                   while(rs.next())
                        data.add(rs.getString(1));
                   //((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
                   comboAuthor.setModel(new DefaultComboBoxModel(data));
              catch(SQLException ex)
                   System.out.println("ERROR");
         private void displayavailablity(String selecteditem1)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        rs= st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        //DefaultTableModel model = new DefaultTableModel(data1,columnNames);
                        //table.setModel(model);
                        rs.close();
                        st.close();
                   catch(SQLException ex)
    }Please check my code and give me some Better Solution
    Thank you

    You already have a posting on this topic:
    http://forum.java.sun.com/thread.jspa?threadID=5143235

  • Work order should not update the fields in PR

    Hi  Gurus
    My requirements is that workorder should not updates the purchasing data fields in PR  do not go to the shoping cart. How can make it possible.
    Thanks in Advance

    Hi,
          I am not sure of your requirement clearly but check up the below user exits :-
    COZF0001 Change purchase req. for externally processed operation
    COZF0002 Change purchase req. for externally procured component
    or BADI :- IWO1_PREQ_BADI BAdI for Manipulation of P.Reqs from Orders + Networks ,SE18
    regrds
    pushpa

  • Login settings will not update the local testing server files

    When uploading to web server from local testing server, changing login settings in the control panel does not update the local testing server Restrict Access to page files. Causing login on website not to function.
    It does however update the Connections file and the login wizard form.
    What is the best way to change login settings before uploading site to web server?
    Thanks
    Dan

    Dan - I am having the same exact problem. I'm using the restrict access and user registration and login - when attempting to use the Update Record wizard to allow users to change their password or email address, it doesn't change the record.

  • DYNP_VALUES_UPDATE not Updating the Field on my Dynpro

    Hi.
    I want to create a dynpro where two fields are. Field 1 allows the user to enter a customer number, field two shall come up with a number that is calculated somehow. The calculation can last up to 20 seconds, so I dont want to make the user waite for this number.. .he shall be able to work with the rest of the dynpro.
    Therefore I called the function that does the calcuiation like that:
    MODULE user_command_0100 INPUT.
      DATA: lv_guid_16 TYPE guid_16.
      IF kna1-kunnr IS NOT INITIAL AND kna1-kunnr <> gv_kunnr
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_16 = lv_guid_16.
        gv_taskid = lv_guid_16+8(8).
        CALL FUNCTION 'YDETERMINE_DEPOTDISTANCE' 
          STARTING NEW TASK gv_taskid
          PERFORMING receive_depent ON END OF TASK
          EXPORTING
            i_kunnr = kna1-kunnr.
      ENDIF.
    ENDMODULE. 
    The next piece of code shall get the returning value if the function wants to return its results.
    FORM receive_depent USING i_task TYPE clike.
      TABLES: d020s.
      DATA: dyname LIKE d020s-prog,
            dynumb LIKE d020s-dnum.
      DATA: BEGIN OF dynpfields OCCURS 1.
              INCLUDE STRUCTURE dynpread.
      DATA: END OF dynpfields.
      IF i_task = gv_taskid.
        RECEIVE RESULTS FROM FUNCTION 'YDETERMINE_DEPOTDISTANCE'
        IMPORTING
          e_depent         = kna1-yydepent
          e_accuracy       = gv_accuracy.
        MOVE 'KNA1-YYDEPENT' TO dynpfields-fieldname.
        MOVE kna1-yydepent TO dynpfields-fieldvalue.
        APPEND dynpfields.
        dyname = sy-cprog.
        dynumb = '0100'.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = dyname
            dynumb               = dynumb
          TABLES
            dynpfields           = dynpfields
          EXCEPTIONS
            invalid_abapworkarea = 01
            invalid_dynprofield  = 02
            invalid_dynproname   = 03
            invalid_dynpronummer = 04
            invalid_request      = 05
            no_fielddescription  = 06
            undefind_error       = 07.
        ASSERT sy-subrc = 0.
      ENDIF.
    Problem is: The DYNP_VALUES_UPDATE does not update the field on my dynpro at all. If I hit enter another time, then the field is provided by the value as another PBO will be processed. What is my mistake here?
    Regards
    Manfred
    Edited by: Rob Burbank on Oct 29, 2010 12:07 PM

    Hi Manfred,
    Replace all the DYNP_VALUES_UPDATE-related content by the following statement:
    SET USER-COMMAND 'xxx'.
    While DYNP_VALUES_UPDATE does update the fields, a roundtrip is not triggered so the content of the fields will not be refreshed. The SET USER-COMMAND does that.
    Hope this helps you!
    Cheers, Roel

  • New tabs are not updating the names of the sites they have loaded. When I open a new tab and load a site, the tab simply stays named "New Tab". When I open a link in a new window, it shows "Connecting..." even while its fully loaded.

    New tabs are not updating the names of the sites they have loaded. When I open a new tab and load a site, the tab simply stays named "New Tab". When I open a link in a new window, it shows "Connecting..." even while its fully loaded.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

Maybe you are looking for

  • Is it possible to reconfigure the Iphone 4 from a PC to a Mac

    I just recently purchased a MacBook Pro and moved all of my music to the Mac from my desktop PC. How can I reconfigure my IPhone from the PC to my Mac?

  • Vendor Return Goods

    Hi guys , please tell me the process for Vendor return goods in MM.pls let me know the Transaction codes followed for the process of Vendor Return Goods.. step by step process will be so helful for me. Regards Jino

  • Jumpy Video on Chat

    The people I am trying to chat with are on PC's, I don't know if that has anything to do with it or not. The problem is, they can hear me & see me - but the video that they see of me jumps around and gets really distorted. It does the same thing with

  • Upgrading with QTM Reading/Looking for Plug-In Folder

    I am upgrading my QTM Reader to hopefully solve my dropped frames issue, but I am having trouble finding the plug-in folder inside of my FCP application folder. FCP simply opens when I click on it, I can't seem to find any type of folder assoicated w

  • List of Query by Author

    Hi, I want to search the queries by specific user (Author). Is there any table or Transaction for that. Please help.