Create Maintenance object in CC&B
Hii...
Can any one help me how to create the Maintenance object in CC&B for the Customized database tables.
Thnxs in advance..
Go to Framework Administration > User Interface Tools. This should get you started with creating new zones/portals etc.
Similar Messages
-
Create a business object for a Maintenance object
Hello,
I want to create a business object for a maintenance object to change all XML attributes to XML elements.
Should I have to change the whole XML Schema from attributes to elements one by one?
For example, I create the business object CM_Person_BO for the maintenance object Person, and use the business object to add user in a more standard way.
But it is a quite large job to rewrite the whole schema for the maintenance object Person, which has following elements, which are PersonIdentifiers, PersonNames, PersonPhones, PersonCharacteristics, Person and SeasAddress.
Is there any easy way to do it?
Thanks,
KerrShould I have to change the whole XML Schema from attributes to elements one by one?
Is there any easy way to do it?Unfortunately not, you will have to define the schema containing each field/element, once. The primary objective is that you should create a scaled down version of the BO having only the required fields or subset of available fields, you may not need all the fields of a MO. This increases performance as the IO is performed only for specified fields in the BO.
You can define separate Data Areas for each Person object's context, i.e. Identifiers, Names, Phones, etc. and include them (includeDA) within the Person BO (CM_Person_BO) for clarity. -
Object RESB within Critical Area - creating Maintenance Order
Hi All,
We are getting warning message while creating Maintenance Order. It says " Object RESB within Critical Area". After checking we found that 90% of the number range for reservation documents have been consumed and it is maintained in settings that the warning will come up when number range enters last 10%.
we have changed this setting to 5% but still the issue is not resolved. We are still facing the same warning message.
Kindly guide.
Regards
DMDM,
This maybe due to the buffering of the number range numbers on the application servers.once these numbers are exhausted and new block of numbers are picked up from the database server this should go off. Ideally you may want to adjust to a new number range so that this warning message doesn't irritate the end users.
Regards
Narasimhan -
Error in creating connection object
Dear Experts
When I am creating connection object using ES55 , I get Stop message saying : " Alternate ID not supported" and when i see Help it indicates : An alternative indicator is active in Customizing of the functional location. This functionality is not supported for connection objects and device locations
what could be going wrong
Plesae suggest me the solution
Thanking you in advance
warm regards
narasimhaHi,
Please check the following settings in SPRO:
Plant Maintenance & Customer Service - -Master Data in Plant Maintenance & Customer Service --Technical Objects --Functional Locations --Alternate Labeling of Functional Locations - - Activate Alternative Labeling --
In this setting pls inactive the setting for Alt.Label.Then go to ES55 and try.It will work.
Thanks,
Banasri Mitra -
Error in creating Connection Object and Device Location
Hi ,
When i am creating Connection Object and Device Location , system is giving dump . all other object are working fine.
the error is gievn below :
Error in reading table TE130.
i checked this the table , its have no entries ( mainly field ISTYP is blank ) and this is the cause of problem .
Could you please tell me that how to fill this table before creating Connection object and device location. i think some configuration should be needed for this but i dont know how .
thanks and regards
Deepak.Hi Deepak,
You can check standard configuration in client 000.
Meanwhile you can use this settings:
ISTYP TPLKZ FLTYP NUMKI NUMKE
C AO_GP A 01 OC
D AO_GP G 02 OC
This is where you define structure indicator for isu technical location category.
ISTYP correspond to the type of technical location in ISU, C for connection object and D for device location
The content of TPLKZ is defined in the following menu in SPRO.
Plant Maintenance and Customer Service
Master Data in Plant Maintenance and Customer Service
Technical Objects
Functional Locations
Create Structure Indicator for Reference Locations/Functional Locations
Hope it helps,
Regards,
Daniel Valenzuela
Edited by: Daniel Valenzuela on Feb 4, 2008 3:22 PM -
Error while creating info object
error while creating info object a character
Info object may be a maximum of 000060 digits...... what would be the error?
Thanks ALLHi,
The maximum length supported by one CHAR type infoobject is 60. Check whether you have assigned more.
If you have to load more length ( more than 60) split the total thing into different infoobjects. Create different infoobjects and split the total thing into them - like 1st 60 char in 1st infoobject, char 61-120 in 2nd infoobject and so on. Then you can again concatenate them.
Thanks,
Indrashis -
Error while creating Maintenance Plan
Hello,
When I am creating a Maint Plan, I am getting error
No packages have yet been assigned to the maintenance item 143
Message no. IP364
How do I solve this??
NarendraHi Narendra
While creating Task List, for all operations u have to maintain the maintenance packages. According to the Maint. Pack only it will schedule the operations and release the order for the particulaer interval...
under operation tab
left side bottom conner... click it and you cna assign...
For Creating maintenance package... TCODE : IP11
- Pithan -
What is the diffrence between extends and creating new object?
HI ALL,
what is the diffrence between extends and creating new object?
meaning
class base{
class derived extends base{
class base{
class derived {
derived(){
base var = new base();
can u people tell me diffence from the above examples.
THANKS.
ANANDAWhen you create a new object you have to supply the class to which that
object belongs. A class can extend from another class. If it does so
explicitly you can define the 'parent' class from which the class extends.
If you don't explicitly mention anything, the class will implicitly extend
from the absolute base class named 'Object'.
Your example is a bit convoluted: when you create a Derived object,
its constructor creates another object, i.e. an object from the class from
which the Derived class extends.
Extending from a class and creating an object don't have much in common.
kind regards,
Jos -
Creating Activity object for a Service Request object...
<b>[This thread was migrated from the On Demand Developer Forum in the old Siebel Community] </b>
drangineni
New Contributor
Ho do we use Activity object of a Service Request object. I am trying to
create an Activity object for a existing Service Request object.
I am looking for some sample code.
I greatly appreciate your help.
Product: CRM OnDemand
11-26-2006 12:40 PM
Re: Creating Activity object for a Service Request object...
BigSlick
Valued Contributor
drangineni, What programming language are you using?
BS
12-04-2006 10:56 AM
Re: Creating Activity object for a Service Request object...
drangineni
New Contributor
Hi, I am using C# .
12-04-2006 07:40 PM
Re: Creating Activity object for a Service Request object...
BigSlick
Valued Contributor
drangineni, assuming you know the service requestid or externalId of the
Sr you are dealin gwith you would first set that value.
ServiceRequest1[] objSRList =new ServiceRequest1[1];
objSRList[0] = new ServiceRequest1();
objSRList[0].ServiceRequestId = <YourSRId>;
Then you create an array of activities and initialize the first one:
objSRList[0].ListOfActivity = new Activity[1];
objSRList[0].ListOfActivity[0] = new Activity();
Now set the data fields
objSRList[0].ListOfActivity[0].Subject ="My Subject";
objSRList[0].ListOfActivity[0].Description ="My Description";
objSRList[0].ListOfActivity[0].Display = "Task"; //valid values are either
"Task" or "Appointment"
Then call the ServiceREquestInsertOrUpdate method on the ServiceRequest
WebService and pass in the above variable.
BS
12-06-2006 12:36 PM
Re: Creating Activity object for a Service Request object...
drangineni
New Contributor
Thank you BigSlick.
The following error is thrown when I use the
ServiceRequestInsertOrUpdate(objInput)
"No user key can be used for the Integration Component instance 'Service <br/>
Request_Action'.(SBL-EAI-04397)"
When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
thrown and the Activity gets added, but a new Service Request object is
created, but the Activity gets added to an existing Service Request
object. I greatly appreciate your help.
The following is the code:
int ActivityLength = 0;
WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
WSOD_ServiceRequest.ServiceRequest1[1];
ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
ServiceRequest[0].ListOfActivity = new
WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
ServiceRequest[0].ListOfActivity[ActivityLength].Description =
this.txtDescription.Text;
ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
WebSelfService.WSOD_ServiceRequest.ServiceRequest();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
objInput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
objOutput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
objInput.ListOfServiceRequest = ServiceRequest;
Session objSession;
objSession = (Session) Application["Session"];
prxySrvcRequest.Url = objSession.GetURL();
try
objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
catch(Exception e)
12-09-2006 09:53 AM
Re: Creating Activity object for a Service Request object...
drangineni
New Contributor
Thank you BigSlick.
The following error is thrown when I use the
ServiceRequestInsertOrUpdate(objInput)
"No user key can be used for the Integration Component instance 'Service <br/>
Request_Action'.(SBL-EAI-04397)"
When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
thrown and the Activity gets added, but a new Service Request object is
created, but the Activity gets added to an existing Service Request
object. I greatly appreciate your help.
The following is the code:
int ActivityLength = 0;
WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
WSOD_ServiceRequest.ServiceRequest1[1];
ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
ServiceRequest[0].ListOfActivity = new
WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
ServiceRequest[0].ListOfActivity[ActivityLength].Description =
this.txtDescription.Text;
ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
WebSelfService.WSOD_ServiceRequest.ServiceRequest();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
objInput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
objOutput = new
WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
objInput.ListOfServiceRequest = ServiceRequest;
Session objSession;
objSession = (Session) Application["Session"];
prxySrvcRequest.Url = objSession.GetURL();
try
objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
catch(Exception e)
12-10-2006 08:49 AM
Re: Creating Activity object for a Service Request object...
BigSlick
Valued Contributor
Ah yes, I forgot you also need to specify a unquie Id for the activity.
It's kinda strange.
Try adding this:
ServiceRequest[0].ListOfActivity[ActivityLength].ActivityId = "DummyId";
//OD will overwrite this with a real Id
Or if you have a unquie ID for your Activities you can use:
ServiceRequest[0].ListOfActivity[ActivityLength].ExternalSystemId = <Your
Unique Value>;
Hope that helps,
BS
12-11-2006 10:52 AM
Re: Creating Activity object for a Service Request object...
surgientweb
New Contributor
Hi all,
I have a similar problem, but mine is returning a message that field
"Display" is required. Looking at this post and the documentation it is
obvious that Display is a required field, but my WSDL did not include a
field called "Display", so my proxy did not generate one.
I tried adding a field called Display to the WSDL and the proxy class, but
I get a different error... I figure I maybe cannot add it manually like
that - but I think the bigger problem is it is not part of the WSDL that
Siebel OD generates for me in my admin account.
On top of that Display is not shown in the list of fields for Activity
through the admin interface.. is it possible my account is bugged? Am I
missing something simple here? BigSlick, I see you mention a .Display in
your code sample so I thought you might understand what is wrong. Here is
my code (I am trying to add a activity to a lead).
Thanks for any insight into this!
private void InsertLeadActivity(Session session, NameValueCollection data,
string leadID)
try
if (blnDebug)
Response.Write("Setting up Activity<br>";
// instantiate the proxy service
Activity_Service.Activity activityProxy = new Activity_Service.Activity();
// set up the target URL
activityProxy.Url = session.GetURL();
activityProxy.CookieContainer = session.GetCookieContainer();
// set up input argument
ActivityNWS_Activity_Insert_Input input = new
ActivityNWS_Activity_Insert_Input();
input.ListOfActivity = new Activity1[1];
input.ListOfActivity[0] = new Activity1();
if (blnDebug)
Response.Write("Getting Data<br>";
// dg note: name value
// input.ListOfActivity[0].MrMrs = data["MrMrs"];
input.ListOfActivity[0].LeadId = leadID.ToString();
input.ListOfActivity[0].Description = DataToString(data);
input.ListOfActivity[0].Subject = "Website Submission Activity";
input.ListOfActivity[0].Priority = "3-Low";
//input.ListOfActivity[0].DueDate =
DateTime.Now.AddDays(7).ToShortDateString();
input.ListOfActivity[0].Owner = this.defaultLeadOwner;
input.ListOfActivity[0].Type = "Call";
//input.ListOfActivity[0].Display = "Task";
input.ListOfActivity[0].ActivityId = "DummyId";
input.ListOfActivity[0].ExternalSystemId = "web";
activityProxy.Activity_Insert(input);
catch (Exception exInsertActivity1)
if (blnDebug)
Response.Write("<br>Error inserting activity.<br><br>" +
exInsertActivity1.ToString() + "<br>";
01-06-2007 05:05 PM
Re: Creating Activity object for a Service Request object...
surgientweb
New Contributor
Figured it out.. the field "Display" is also known as "Activity"........
Here are some notes for other people.. good luck and feel free to write me
at raskawa-at-gmail-com if you want a code sample.
Some unpublished nice to knows for Siebel On Demand Activities....
In summary:
- .Activity is also known as Display in documentation and on the error
messages coming back from the WS. Also, it appears based on these boards
some people actually have a .Display field. Maybe different accounts
generate different WSDL's.... buggy.
- If a error message is thrown saying "Description is required" it really
means "Subject is required" (make sure .Subject has a value)
- If a error message is thrown complaining that ActionType is not right..
that is really .Type.. make sure it's lookup value is valid for the
dropdown values in your CRM OD system.
My code/values that worked..
input.ListOfActivity[0].LeadId = leadID.ToString();
input.ListOfActivity[0].Description = DataToString(data);
input.ListOfActivity[0].Subject = "Website Submission Activity";
input.ListOfActivity[0].Priority = "3-Low";
//input.ListOfActivity[0].DueDate =
DateTime.Now.AddDays(7).ToShortDateString();
input.ListOfActivity[0].Owner = this.defaultLeadOwner;
input.ListOfActivity[0].Type = "Call";
input.ListOfActivity[0].ActivityId = "DummyId";
input.ListOfActivity[0].ExternalSystemId = "web";
//input.ListOfActivity[0].Display = "Task"; //doesn't work
input.ListOfActivity[0].Activity = "Task"; //does work.
01-06-2007 05:17 PM
Re: Creating Activity object for a Service Request object...
raskawa
First Time Contributor
Hi,
This is surgientweb (under my own login now..)
Anyway, I wanted to add that I figured out that there are two ways to add
a Activity to a Lead. Via the Lead object (by getting a ListOfActivities)
OR by creating a Activity directly and just adding your "LeadID" to it (or
you can also add a "ContactID" to relate the activity to a Contact.)
Feel free to email me for a code example (raskawa....at....gmail)
-David
01-09-2007 02:58 PMHi Stephane,
You can definitely read the categories using Tables in CRM. The logic is a bit complicated though.
Use the following steps to retrieve Categories using Std. CRM Tables:
1. Pass transaction GUID in field GUID of table CRMV_REPORT_SUBJ and get KATALOGART, CODEGRUPPE and CODE field values in lv_catalog, lv_codegrp and lv_code.
2. Now you need to concatenate these 3 fields values carefully like this:
CONCATENATE lv_catelog lv_codegrp ' ' lv_code into lv_category1.
Remember there are 4 spaces between lv_codegrp and lv_code.
3. Now pass this lv_category1 in field OBJEXT in table CRMC_ERMS_CAT_OK and get OBJGUID in field lv_objguid.
4. Pass this lv_objguid in field OBJ_GUID and LNK_TYPE = 'IS_CODE' in table CRMC_ERMS_CAT_LN and get value of CAT_GUID in lv_cat_guid.
5. Pass this lv_cat_guid in field CAT_GUID in table CRMC_ERMS_CAT_CA and get value of CAT_ID in field lv_cat_text.
Remember this lv_cat_text is the text value of your last level of category of transaction.
6. To get its upper cateogry level value, simply use table CRMC_ERMS_CAT_HI and get parent guid value and pass this as CAT_GUID again in table CRMC_ERMS_CAT_CA to get its text.
Alternatively, you can also use class method cl_crm_ml_category_util=>get_parse_all to get all levels of categories.
Hope this helps.
Thanks
Vishal -
When I try to open an embedded PDF file (Word doc) I get an error "The program used to create this object is AcroExch.exe. That program is either not installed on your computer, or is corrupt..." I've tried about everything from unchecking
protected mode at startup to removing & reinstalling Adobe. Nothing seems to fix this issue. Any other ideas?
This is happening on Adobe reader 9, 10 & 11 with MS Word 2010 & 2013. I've uninstalled, cleaned & reinstalled Reader 9, 10 & 11, as well as Acrobat 10 Pro & 11 Standard. Removed "Protected mode at startup, and changed
the default program for viewing from reader to Acrobat. This will not go away. It is affecting production at our company." Help > Troubleshooting Information > Profile Directory: Open Containing Folder" . i can't find open containing folder in profile directory. it does give me the option to open the places.sqlite file using graphic converter. when i try that, graphic converter gives me a window saying that it can't be opened because it is corrupted or is not a file type supported by graphic converter.
i appreciate your help with a workaround to get the old bookmarks. that works. however, the problem has morphed from that concern to why adobe reader [the default app.] won't open firefox .sqlite files. is the problem in adobe reader or firefox? also, how can i tell if the places.sqlite file is corrupt?
i'm getting in over my head here and do appreciate your help. -
How to create multiple objects within a class
I have a item.lvclass which has an item.ctl (contains a cluster of class private data). I need to add another object (item2.ctl) within that same class so that I can reuse the code for that class.
So how do you create additional objects within the same class?Well... right now... I've cornered myself going down this path: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/LVOOP-Interfaces/idc-p/1314637#M8918
Seems like the solution in the idea was not implemented yet....
Okay. I will try to describe the situation differently...
Let's say I have a Car.lvclass
I want to have two objects: sedan & roadster
both have similar properties, but also have different properties:
4 doors vs 2 doors
hardtop vs convertible
silver vs white (color)
I want the two objects to be of the same class so that they can share the same private and public VI's. As a matter of fact, I want to have both objects in the VI's within the Car.lvclass. -
How do I create multiple objects during runtime?
I don't know how to create multiple objects during runtime, here's my problem:
I get a String as input. Then I create an object called newobject. I put the object in a hashtable with the above string as key.
Then comes the problem, in order to create a new object, I have to rerun the same class, which uses the same name (newobject) to create a 2nd object. Now my hashtable doesn't reference to my 1st object anymore...
Is there anyway I can fill up the hashtable with different objects, and make each key point to each object it was supposed to?
For those who want to see a bit of the program:
public class PlayBalloon{
public Hashtable ht = new Hashtable();
for(){
Balloon pB = newBalloon;
newBalloon=new Balloon(pB);
ht.put("Some input from user", newBalloon);
for(){
ht.get(s).draw;<= s=string, draw=own meth. in Balloon
}I think i can see the problem that you are having. You have, in effect, duplicate keys in your hashtable - ie, two strings used as keys with the same name.
The way that a hashtable works is as follows...
When you ask for a value that is mapped to a key it will go through the table and return the first occurence it finds of the key you asked for. It does this by using the equals() method of whatever object the key is (in your case it is a String).
If you cant use different Strings for your keys in your hashtable then i would consider writing an ObjectNameKey class which contains the String value that you are trying to put in the hashtable and an occurrence number/index or something to make it unique. Remember to override the equals method in your ObjectNameKey object or else the hash lookup will not work. For example
class ObjectNameKey {
private String name;
private int occurence;
public ObjectNameKey(String name, int occ) {
this.name = name;
this.occurence = occ;
public String getName() {
return name;
public String getOccur() {
return occurence;
public boolean equals(Object o) {
if (!(o instanceof ObjectNameKey)) {
return false;
ObjectNameKey onk = (ObjectNameKey)o;
if (onk.getName().equals(name) && onk.getOccur() == occurence) return true;
return false; -
Can you create an object from a string
I have been working on creating a dynamic form, creating the
form items from an xml file. I am getting very close to conquering
this task. I will share it when it's complete.
However, I am stuck at the moment trying to create an object
from a string. For example, if the xml item is an HBox I want to
create an HBox. Like this: parentObject = new arrayOfFormItems[
index ]..type ()
This isn't working. First, is this possible using some syntax
I am unaware of in Flex? I don't want to use a large if or case
statement if possible.
Thanks in advance for your help!Thank you very much. Indeed that did solve the one problem. I
missed the casting as a Display Object. That is awesome!
I do still however, have to instantiate one of every item I
want to dynamically create or I get the following error when I try
to create a dynamic object that I have not instantiated before.
ReferenceError: Error #1065: Variable HBox is not defined.
at global/flash.utils::getDefinitionByName()
at MyForm/buildForm()
at DynamicForm/::onComplete()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
I read that you have no choice but to instantiate one of each
type to force the linker to link the code for that class into the
.swf. Unless you know another way to force it.
This is what I have in my Application mxml to get it to work:
<mx:HBox>
<mx:Text visible="false"/>
<mx:TextArea visible="false"/>
<mx:TextInput visible="false"/>
<mx:DateField visible="false"/>
</mx:HBox>
And those are the types I'm using to test with. . . I will
have to add all the others I want to use as well . . . -
How can I create a object for a note?
Hi experts,
I need to apply the note 501905 but when I try in the SNOTE transacction I receive this error:
Object REPS Z_MRM_DELETE_PP does not exist; create it
Diagnosis
The SAP Note that you want to implement contains changes to an object that does not yet exist in your system.
SAP Notes contain only changes to objects that already exist. This means that the the system cannot automatically create new objects during the implementation of this SAP Note.
Procedure
1. Cancel the SAP Note implementationl.
2. Create an empty object REPS Z_MRM_DELETE_PP with the corresponding object editor.
3. Restart the SAP Note implementation.
How can I create that Object??
Thanks for the help!Hi Carlos,
It says that you have to create a new program with a name Z_MRM_DELETE_PP.
Once you create and activate the program you can execute the SAP Note.
All this processure will be written in the SAP Note.
Please Go through the Note using below:
Step1: Use T.code SNOTE.
Step2: Use menu GOTO --> NOTE BROWSER. Provide the Note no and EXECUTE.
Step3: Double click on the displayed line.
Here you will get the information to do before implementing the note.
Go through all the documentation, and once you did all the development given in the note then you can implement the note.
Regards,
Sreekanth. -
Not able to create an object using dbms_metadata.put function
Hi,
I have the metadata of an object in one of my database table as xml. I failed to recreate the object in the other schema using metadata api. I developed a stored function to do the above job. My function doesn't throw any error meanwhile it doesn't create the object.
My code snippet is
CREATE OR REPLACE PROCEDURE DDI.move_table(
table_name in VARCHAR2,
from_schema in VARCHAR2,
to_schema in VARCHAR2 )
AUTHID CURRENT_USER
IS
-- Define local variables.
h1 NUMBER; -- handle returned by OPEN
h2 NUMBER; -- handle returned by OPENW
th1 NUMBER; -- handle returned by ADD_TRANSFORM for MODIFY
th2 NUMBER; -- handle returned by ADD_TRANSFORM for DDL
xml XMLTYPE; -- XML document
errs sys.ku$_SubmitResults := sys.ku$_SubmitResults();
err sys.ku$_SubmitResult;
result BOOLEAN;
BEGIN
SELECT REPOS INTO xml from ddi.ddi_repos_t where obj_id = '1801';
-- Specify the object type using OPENW (instead of OPEN).
h2 := DBMS_METADATA.OPENW('TABLE');
-- First, add the MODIFY transform.
th1 := DBMS_METADATA.ADD_TRANSFORM(h2,'MODIFY');
-- Specify the desired modification: remap the schema name.
DBMS_METADATA.SET_REMAP_PARAM(th1,'REMAP_SCHEMA',from_schema,to_schema);
-- Now add the DDL transform so that the modified XML can be
-- transformed into creation DDL.
th2 := DBMS_METADATA.ADD_TRANSFORM(h2,'DDL');
-- Call PUT to re-create the object.
result := DBMS_METADATA.PUT(h2,xml,0,errs);
DBMS_METADATA.CLOSE(h2);
IF NOT result THEN
-- Process the error information.
FOR i IN errs.FIRST..errs.LAST LOOP
err := errs(i);
FOR j IN err.errorLines.FIRST..err.errorLines.LAST LOOP
dbms_output.put_line(err.errorLines(j).errorText);
END LOOP;
END LOOP;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE_APPLICATION_ERROR(-20510,'No xml is available as metadata');
END;
Could you tell me where is the probelm?
The schema where i created and execute my function having dba privilege also.
Regards,
Madhavi.Hi Madhavi,
The below code works for me:
SQL> conn sys as sysdba
Connected.
SQL> select count(*) from dba_objects where object_name = 'DEPT' and owner = 'OE';
COUNT(*)
0
SQL> CREATE OR REPLACE PROCEDURE move_table(
2 table_name in VARCHAR2,
3 from_schema in VARCHAR2,
4 to_schema in VARCHAR2 )
5 AUTHID CURRENT_USER
6 IS
7 -- Define local variables.
8 h1 NUMBER; -- handle returned by OPEN
9 h2 NUMBER; -- handle returned by OPENW
10 th1 NUMBER; -- handle returned by ADD_TRANSFORM for MODIFY
11 th2 NUMBER; -- handle returned by ADD_TRANSFORM for DDL
12 xml clob; -- XML document
13 errs sys.ku$_SubmitResults := sys.ku$_SubmitResults();
14 err sys.ku$_SubmitResult;
15 result BOOLEAN;
16 BEGIN
17
18 select DBMS_METADATA.GET_XML('TABLE','DEPT','SCOTT') into xml from dual;
19
20 -- Specify the object type using OPENW (instead of OPEN).
21 h2 := DBMS_METADATA.OPENW('TABLE');
22
23 -- First, add the MODIFY transform.
24 th1 := DBMS_METADATA.ADD_TRANSFORM(h2,'MODIFY');
25
26 -- Specify the desired modification: remap the schema name.
27 DBMS_METADATA.SET_REMAP_PARAM(th1,'REMAP_SCHEMA',from_schema,to_schema);
28
29 -- Now add the DDL transform so that the modified XML can be
30 -- transformed into creation DDL.
31 th2 := DBMS_METADATA.ADD_TRANSFORM(h2,'DDL');
32
33 -- Call PUT to re-create the object.
34 result := DBMS_METADATA.PUT(h2,xml,0,errs);
35
36 DBMS_METADATA.CLOSE(h2);
37 IF NOT result THEN
38
39 -- Process the error information.
40 FOR i IN errs.FIRST..errs.LAST LOOP
41 err := errs(i);
42 FOR j IN err.errorLines.FIRST..err.errorLines.LAST LOOP
43 dbms_output.put_line(err.errorLines(j).errorText);
44 END LOOP;
45 END LOOP;
46 END IF;
47 EXCEPTION
48 WHEN NO_DATA_FOUND THEN
49 RAISE_APPLICATION_ERROR(-20510,'No xml is available as metadata');
50 END;
51 /
Procedure created.
SQL> exec move_table('DEPT','SCOTT','OE');
PL/SQL procedure successfully completed.
SQL> select count(*) from dba_objects where object_name = 'DEPT' and owner = 'OE';
COUNT(*)
1
SQL> spool off;The xml returned by the get_xml function contains the tablespace name and storage parameters of the schema in which the object is present.
Check these parameters for both your schemas.
Maybe you are looking for
-
Search no longer works in Bridge CS6, after upgrading computer.
I recently upgraded computers and reinstalled CS6. I can no longer search my files based on keywords or file name. What has happened? When I click on a file, the keywords are check, searching produces no results, just "no items to diplay". I even tri
-
I am trying to send data from an SAP system to a non-SAP system using the HTTP adapter. The url is using port 9082 and am using a certificate for authentication. I have opened a hole in our firewall for the transmission. I set up SM59 with the url
-
Trying to access Music Store and iTunes shuts down...
I've been trying to open the Music Store for days with no luck. I get an error message "The exception Privileged instruction 0xc0000096 occurred in the application at location 0x1003527a" and when I click "ok" iTunes closes abruptly. Sometimes I don'
-
What is the current status of the GMA 950/SL issues described in this (archived) thread: http://discussions.apple.com/thread.jspa?threadID=2132473&start=0&tstart=0 ? I've been going crazy with my 2007 Macbook which stopped playing fullscreen video sm
-
eMac G4 1200 running 10.5.7, standard internal cd burner I don't think its the OS, tho I'm not sure if the PPC G4 was intended to run the most current version... bought it used. Reads cds & DVDs ok. Read the other posts here with similar problems, Cl