6 Replies Latest reply: Sep 19, 2011 1:32 PM by 862824 RSS

    Getting an error while updating csi_item_instances

    633004
      Hi,

      I am trying to update system_id in csi_item_instances table using the following script



      DECLARE
      v_instance_rec csi_datastructures_pub.instance_rec;
      v_ext_attrib_values_tbl csi_datastructures_pub.extend_attrib_values_tbl;
      v_party_tbl csi_datastructures_pub.party_tbl;
      v_account_tbl csi_datastructures_pub.party_account_tbl;
      v_pricing_attrib_tbl csi_datastructures_pub.pricing_attribs_tbl;
      v_org_assignments_tbl csi_datastructures_pub.organization_units_tbl;
      v_asset_assignment_tbl csi_datastructures_pub.instance_asset_tbl;
      v_txn_rec csi_datastructures_pub.transaction_rec;
      v_instance_id_lst csi_datastructures_pub.id_tbl;
      v_status_code VARCHAR2(100);
      t_output varchar2(1000);
      v_return_status varchar2(1000);
      v_msg_dummy varchar2(1000);
      v_msg_count number;
      v_msg_data varchar2(1000);
      Begin
      v_instance_rec.INSTANCE_ID:='52067786';
      v_instance_rec.system_id:='15350';
      v_instance_rec.object_version_number := 5;

      csi_item_instance_pub.update_item_instance (1,
      fnd_api.g_false,
      fnd_api.g_false,
      fnd_api.g_valid_level_full,
      v_instance_rec,
      v_ext_attrib_values_tbl,
      v_party_tbl,
      --,p_party_tbl IN OUT csi_datastructures_pub.party_tbl
      v_account_tbl,
      --,p_account_tbl IN OUT csi_datastructures_pub.party_account_tbl
      v_pricing_attrib_tbl,
      --,p_pricing_attrib_tbl IN OUT csi_datastructures_pub.pricing_attribs_tbl
      v_org_assignments_tbl,
      --,p_org_assignments_tbl IN OUT csi_datastructures_pub.organization_units_tbl
      v_asset_assignment_tbl,
      --,p_asset_assignment_tbl IN OUT csi_datastructures_pub.instance_asset_tbl
      v_txn_rec,
      --,p_txn_rec IN OUT csi_datastructures_pub.transaction_rec
      v_instance_id_lst,
      -- ,x_instance_id_lst OUT csi_datastructures_pub.id_tbl
      v_return_status,
      v_msg_count,
      v_msg_data
      );
      -- Output the results
      if v_msg_count > 0 then
      for j in 1 .. v_msg_count
      loop
      fnd_msg_pub.get ( j , FND_API.G_FALSE , v_msg_data , v_msg_dummy );
      t_output := ( 'Msg' || To_Char ( j ) || ': ' || v_msg_data );
      dbms_output.put_line ( SubStr ( t_output , 1 , 255 ) );
      end loop;
      end if;
      dbms_output.put_line('v_return_status = '||v_return_status);
      dbms_output.put_line('v_msg_count = '||TO_CHAR(v_msg_count));
      dbms_output.put_line('v_msg_data = '||v_msg_data);
      end;


      ------------------------------------------------------------

      iam getting the following error message


      Msg6: API programming Error ( &API_NAME):The Create Transaction API failed. The transaction Id parameter (9.990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E+125) is invalid.
      v_return_status = E
      v_msg_count = 6
      v_msg_data = API programming Error ( &API_NAME):The Create Transaction API failed. The transaction Id parameter (9.990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E+125) is invalid.

      --------------------------------------------------------------------

      kindly help to resolve this problem
        • 1. Re: Getting an error while updating csi_item_instances
          Hussein Sawwan-Oracle
          Hi,

          Have a look at the following document and see if it helps.

          Note: 364478.1 - Receive The Transaction Id Parameter Error When Creating System
          https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=364478.1

          Regards,
          Hussein
          • 2. Re: Getting an error while updating csi_item_instances
            633004
            hi,

            The link that you provided is creating new system record.

            i want to update the records.

            kindly help

            thanks,
            Dorristas
            • 3. Re: Getting an error while updating csi_item_instances
              Hussein Sawwan-Oracle
              Hi,

              Sorry, I cannot be of further help.

              You may check other threads in the forum for a sample code (same API) (search for [csi_item_instance_pub.update_item_instance|http://forums.oracle.com/forums/search.jspa?threadID=&q=csi_item_instance_pub.update_item_instance&objID=c3&dateRange=all&userID=&numResults=15]), and see if it helps. Or log a SR, I believe Oracle support should be able to help.

              Regards,
              Hussein
              • 4. Re: Getting an error while updating csi_item_instances
                501447
                Hi,

                Check out the following thread. You do need to provide data in the v_txn_rec, regarding the change that you're making to the IB record.

                Issue in updating Install Base Owner account


                HTH,
                Alka
                • 5. Re: Getting an error while updating csi_item_instances
                  633004
                  Hi Alka,

                  Thanks for your suggestion. there was some problem with txn_rec. I am attaching the code, as it might be useful for someone.



                  DECLARE
                  v_instance_rec csi_datastructures_pub.instance_rec;
                  v_ext_attrib_values_tbl csi_datastructures_pub.extend_attrib_values_tbl;
                  v_party_tbl csi_datastructures_pub.party_tbl;
                  v_account_tbl csi_datastructures_pub.party_account_tbl;
                  v_pricing_attrib_tbl csi_datastructures_pub.pricing_attribs_tbl;
                  v_org_assignments_tbl csi_datastructures_pub.organization_units_tbl;
                  v_asset_assignment_tbl csi_datastructures_pub.instance_asset_tbl;
                  v_txn_rec csi_datastructures_pub.transaction_rec;
                  v_instance_id_lst csi_datastructures_pub.id_tbl;
                  v_status_code VARCHAR2(100);
                  t_output varchar2(1000);
                  v_return_status varchar2(1000);
                  v_msg_dummy varchar2(1000);
                  v_msg_count number;
                  v_msg_data varchar2(1000);
                  Begin
                  v_instance_rec.INSTANCE_ID:='5937102';
                  v_instance_rec.system_id:='15347';
                  v_instance_rec.object_version_number := 3;
                  -- v_tXn_rec.transaction_id:=3;--FND_API.G_MISS_NUM;

                  v_txn_rec.transaction_id := NULL;
                  v_txn_rec.transaction_date := sysdate; --TO_DATE('');
                  v_txn_rec.source_transaction_date := sysdate; --TO_DATE('');
                  v_txn_rec.transaction_type_id := 1; --NULL;
                  v_txn_rec.txn_sub_type_id := NULL;

                  csi_item_instance_pub.update_item_instance (1,
                  fnd_api.g_false,
                  fnd_api.g_false,
                  fnd_api.g_valid_level_full,
                  v_instance_rec,
                  v_ext_attrib_values_tbl,
                  v_party_tbl,
                  --,p_party_tbl IN OUT csi_datastructures_pub.party_tbl
                  v_account_tbl,
                  --,p_account_tbl IN OUT csi_datastructures_pub.party_account_tbl
                  v_pricing_attrib_tbl,
                  --,p_pricing_attrib_tbl IN OUT csi_datastructures_pub.pricing_attribs_tbl
                  v_org_assignments_tbl,
                  --,p_org_assignments_tbl IN OUT csi_datastructures_pub.organization_units_tbl
                  v_asset_assignment_tbl,
                  --,p_asset_assignment_tbl IN OUT csi_datastructures_pub.instance_asset_tbl
                  v_txn_rec,
                  --,p_txn_rec IN OUT csi_datastructures_pub.transaction_rec
                  v_instance_id_lst,
                  -- ,x_instance_id_lst OUT csi_datastructures_pub.id_tbl
                  v_return_status,
                  v_msg_count,
                  v_msg_data
                  );
                  -- Output the results
                  if v_msg_count > 0 then
                  for j in 1 .. v_msg_count
                  loop
                  fnd_msg_pub.get ( j , FND_API.G_FALSE , v_msg_data , v_msg_dummy );
                  t_output := ( 'Msg' || To_Char ( j ) || ': ' || v_msg_data );
                  dbms_output.put_line ( SubStr ( t_output , 1 , 255 ) );
                  end loop;
                  end if;
                  dbms_output.put_line('v_return_status = '||v_return_status);
                  dbms_output.put_line('v_msg_count = '||TO_CHAR(v_msg_count));
                  dbms_output.put_line('v_msg_data = '||v_msg_data);
                  end;
                  • 6. Re: Getting an error while updating csi_item_instances
                    862824
                    Thank you for the correction, worked like a charm

                    Regards.