How to force lang level 7.0 (diamond op.) for classes generated by JAXB xjc
I tried various JAXB maven plugins in the respective latest version and none uses the diamond operator in the generated code.
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
<groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId>
<version>1.1</version>
Is there a way to configure one of these to do so? Setting source/target in the config of the jvnet-plugin to 1.7 for example didn't do the trick unfortunately.
What would be the benefit of the diamond operator being used in the generated code? It is not code you should be messing with yourself and it has no influence on the compiled state of the class. Not using the diamond operator keeps the generated code compatible with any version of Java you are likely to find in use.
Similar Messages
-
How to Force the Good Plan present in dba_hist_sql_plan for an SQL_ID
Hi Folks
Here i have a question on how to fix the query execution plan for which we are facing the problem. The current execution plan of the SQL ID is bad , but the execution plan in dba_hist_sql_plan or v$sql_plan is showing good one's.
So how to force the plan_hash_value present in dba_hist_sql_plan or v$sql_plan to the current sql. Where in we cannot try using any kind of hints in the SQL so my question here , is there any way to update manually to update the plan_hash_value for the SQL_ID so that it can use the execution plan which we want to force.
Regards,
Phani.But my question is i have the good plan for the SQL_ID which is now running with the bad plan ( I am able to see the good plan in dba_hist_sql_plan view ) , my challenge here is how to force >the SQL_ID to take good plan PLAN_SQL_HASH_VALUE. Once the query is parsed and in memory I'm not aware of any way of changing the plan :(
A day later a similar situation came up with one of our clients. I'm still not aware of any way to manually change the execution plan of an already parsed SQL but suspect histograms and/or bind peeking may be a way to explain this phenemenon
Edited by: riedelme on Jun 18, 2010 6:13 AM -
How to block top-level domain names in rules for EOP?
Using EOP for email filtering to/from our on-premise Exchange server. How do I block entire top-level domains in the rules section under mail flow? For example, w need everything ending with .link blocked. Right now I
have only been able to block email addresses and full domain names. I know I can setup a transport rule in our exchange, but I'd prefer EOP handle this before like it should. Thanks in advance.If you're using EOP and your goal is to block stuff coming from a certain geographic area then you need to go to your exchange admin center select Protection>content filter>Default Policy>International Spam>Filter email messages sent from the
following countries or regions -
How to force Portal not to display item content for a custom item
Hi,
I've read in several places questions about rendering an Item in a custom way, without letting portal
display the item content, if you read along I've discovered a SIMPLE WAY to force portal not to
display the content item.
As per bugs and requests on metalink it seemed that in many versions of Oracle Portal (mine is 9.0.4.1)
this is impossible, since even if we remove the "Item Content" from the list of displayed attributes in the
region, Portal does display it anyway, just after every other Attribute.
- Re: using an item type procedure
- Metalink BUG # 3998251 "ENH: SHOULD BE ABLE TO HIDE "ITEM CONTENT" FOR TEXT ITEMS OR NEED A NEW ITEM TYP" and is being looked into internally whether it is feasible to include this in future releases.
- Metalink Doc ID: Note:290534.1 Subject: Unable to Hide the "Item Content" Attribute for a Text Item
Mine scenario was the usual one:
-oracle portal 9.4.0.1
-a custom item based on custom text (so as to have the RTE to edit HTML).
-A few attributes that help me define the class of an enclosing DIV tag that I wanted to put (a class and an ID)
-A plsql call associated to the custom item, with the flag "display inline" checked
-The dirty HTML generated by the built-in Oracle RTE (with BODY and HTML tags enclosing the actual HTML)
-The region that will contain the item is set so that just the "Function Call" is (or should be) displayed
I wanted to control entirely the display of the item text, while enclosing it in a custom DIV tag.
After a few tries, one of which involved forcing an HTML comment around the item content that Portal stubbornly
displayed, I've discovered this simple way. I don't know hom much this way is portable, but is done entirely with the APIs.
In the stored procedure that displays the item, that I encolose, i just do:
1) retrieved the ITEM querying WWSBR_ALL_ITEMS;
2) updated the ITEM via WWSBR_API.MODIFY_ITEM, passing as display_otpion the value WWSBR_API.FULL_SCREEN!!
Here I try a little explanation:
An item just created has FULLSCREEN=1 and INPLACE=0. This way the stored procedure is executed
AND the item content is displayed.
WIth the modify_item, the item gets FULLSCREEN=1 and INPLACE=2 !! This seems strange since the docs
tells that inplace can be 0 or 1. But this works.
I've played with the WWV_THINGS table directlry, and setting INPLACE to 0, 2 or 3 works as well, while
if it is set to 1, it behave the usual way.
The trick is to have FULLSCREEN to 1 while INPLACE is not set to 1.. and this was the easiest solution.
I'd like to receive a feedback from Oracle regarding this behaviour.
Bye
Walter
--- This is the procedure ---
CREATE OR REPLACE PROCEDURE show_item_mod(itemid in varchar2, styleid in varchar2,
styleclass in varchar2) IS
html CLOB;
idx1 number;
idx2 number := 0;
item portal.wwsbr_all_items%rowtype;
BEGIN
--retrieve item content
select * into item from portal.wwsbr_all_items where id=itemid;
html := item.text;
--check if text body contains "dirty" tags as put by Oracle RTE editor
--and strips text from <BODY> to </BODY>
idx1 := instr(html,'<BODY>');
if(idx1 > 0) then
--strip text of broken tags
idx2 := instr(html,'</BODY>');
html := substr(html,idx1+6,idx2-idx1-6);
end if;
--check if this is first time we enter this procedure
--or if text has changed
if(item.description is null or idx2 != 0) then
--update filename so next time we won't enter the IF branch
--update DIPLSAY OPTION to FUllSCREEN
--update text, if this was changed
idx1 := portal.wwsbr_api.modify_item(
p_master_item_id => item.masterid,
p_item_id => itemid,
p_caid => item.caid,
p_folder_id => item.folder_id,
p_display_name => item.display_name,
p_region_id => item.folder_region_id,
p_display_option => portal.WWSBR_API.FULL_SCREEN,
p_category_id => item.category_id,
p_category_caid => item.category_caid,
p_author => item.author,
--p_description => item.description ,
p_keywords => item.keywords ,
p_text => html ,
p_folderlink_id => item.folder_link_id ,
p_folderlink_caid => item.folder_link_caid ,
p_publish_date => item.publish_date ,
p_expire_mode => item.expiremode,
--p_file_filename => 'Changed!',
p_description=> 'changed!',
p_addnewversion => FALSE,
p_access_level => portal.wwsbr_api.FOLDER_ACCESS
-- process cache invalidation messages
portal.wwpro_api_invalidation.execute_cache_invalidation;
end if;
htp.prn('<div ');
if(styleclass is not null) then
htp.prn(' class="' || styleclass || '" ');
end if;
if(styleid is not null) then
htp.prn(' id="' || styleid || '" ');
end if;
htp.prn('>');
htp.p(html);
htp.p('</div>');
END show_item_mod;
/Hi,
I've read in several places questions about rendering an Item in a custom way, without letting portal
display the item content, if you read along I've discovered a SIMPLE WAY to force portal not to
display the content item.
As per bugs and requests on metalink it seemed that in many versions of Oracle Portal (mine is 9.0.4.1)
this is impossible, since even if we remove the "Item Content" from the list of displayed attributes in the
region, Portal does display it anyway, just after every other Attribute.
- Re: using an item type procedure
- Metalink BUG # 3998251 "ENH: SHOULD BE ABLE TO HIDE "ITEM CONTENT" FOR TEXT ITEMS OR NEED A NEW ITEM TYP" and is being looked into internally whether it is feasible to include this in future releases.
- Metalink Doc ID: Note:290534.1 Subject: Unable to Hide the "Item Content" Attribute for a Text Item
Mine scenario was the usual one:
-oracle portal 9.4.0.1
-a custom item based on custom text (so as to have the RTE to edit HTML).
-A few attributes that help me define the class of an enclosing DIV tag that I wanted to put (a class and an ID)
-A plsql call associated to the custom item, with the flag "display inline" checked
-The dirty HTML generated by the built-in Oracle RTE (with BODY and HTML tags enclosing the actual HTML)
-The region that will contain the item is set so that just the "Function Call" is (or should be) displayed
I wanted to control entirely the display of the item text, while enclosing it in a custom DIV tag.
After a few tries, one of which involved forcing an HTML comment around the item content that Portal stubbornly
displayed, I've discovered this simple way. I don't know hom much this way is portable, but is done entirely with the APIs.
In the stored procedure that displays the item, that I encolose, i just do:
1) retrieved the ITEM querying WWSBR_ALL_ITEMS;
2) updated the ITEM via WWSBR_API.MODIFY_ITEM, passing as display_otpion the value WWSBR_API.FULL_SCREEN!!
Here I try a little explanation:
An item just created has FULLSCREEN=1 and INPLACE=0. This way the stored procedure is executed
AND the item content is displayed.
WIth the modify_item, the item gets FULLSCREEN=1 and INPLACE=2 !! This seems strange since the docs
tells that inplace can be 0 or 1. But this works.
I've played with the WWV_THINGS table directlry, and setting INPLACE to 0, 2 or 3 works as well, while
if it is set to 1, it behave the usual way.
The trick is to have FULLSCREEN to 1 while INPLACE is not set to 1.. and this was the easiest solution.
I'd like to receive a feedback from Oracle regarding this behaviour.
Bye
Walter
--- This is the procedure ---
CREATE OR REPLACE PROCEDURE show_item_mod(itemid in varchar2, styleid in varchar2,
styleclass in varchar2) IS
html CLOB;
idx1 number;
idx2 number := 0;
item portal.wwsbr_all_items%rowtype;
BEGIN
--retrieve item content
select * into item from portal.wwsbr_all_items where id=itemid;
html := item.text;
--check if text body contains "dirty" tags as put by Oracle RTE editor
--and strips text from <BODY> to </BODY>
idx1 := instr(html,'<BODY>');
if(idx1 > 0) then
--strip text of broken tags
idx2 := instr(html,'</BODY>');
html := substr(html,idx1+6,idx2-idx1-6);
end if;
--check if this is first time we enter this procedure
--or if text has changed
if(item.description is null or idx2 != 0) then
--update filename so next time we won't enter the IF branch
--update DIPLSAY OPTION to FUllSCREEN
--update text, if this was changed
idx1 := portal.wwsbr_api.modify_item(
p_master_item_id => item.masterid,
p_item_id => itemid,
p_caid => item.caid,
p_folder_id => item.folder_id,
p_display_name => item.display_name,
p_region_id => item.folder_region_id,
p_display_option => portal.WWSBR_API.FULL_SCREEN,
p_category_id => item.category_id,
p_category_caid => item.category_caid,
p_author => item.author,
--p_description => item.description ,
p_keywords => item.keywords ,
p_text => html ,
p_folderlink_id => item.folder_link_id ,
p_folderlink_caid => item.folder_link_caid ,
p_publish_date => item.publish_date ,
p_expire_mode => item.expiremode,
--p_file_filename => 'Changed!',
p_description=> 'changed!',
p_addnewversion => FALSE,
p_access_level => portal.wwsbr_api.FOLDER_ACCESS
-- process cache invalidation messages
portal.wwpro_api_invalidation.execute_cache_invalidation;
end if;
htp.prn('<div ');
if(styleclass is not null) then
htp.prn(' class="' || styleclass || '" ');
end if;
if(styleid is not null) then
htp.prn(' id="' || styleid || '" ');
end if;
htp.prn('>');
htp.p(html);
htp.p('</div>');
END show_item_mod;
/ -
OS: Windows Server 2008 R2 Enterprise
Domain Level: 2008
Forest Level: 2000
We have Domain Administrators in our domain that reset passwords for user accounts, and the passwords the Administrators set them to are not being enforced follow our default domain password policy. For example, I log on the domain controller, as an administrator
and can reset a password for a user account to be blank.
Is there a reason Domain Administrator password resets for user accounts are not enforced by our default domain password policy? Is there a way to enforce this on password resets by Domain Admins?Do you have fine grant password policy? If not ; by default all the usrs are effected by domain level password policy even domain admins,
Regards~Biswajit
Disclaimer: This posting is provided & with no warranties or guarantees and confers no rights.
MCP 2003,MCSA 2003, MCSA:M 2003, CCNA, MCTS, Enterprise Admin
MY BLOG
Domain Controllers inventory-Quest Powershell
Generate Report for Bulk Servers-LastBootUpTime,SerialNumber,InstallDate
Generate a Report for installed Hotfix for Bulk Servers -
How to compile the Java classes generated in JAXB
I am using Windows 2000 Operating System. I found a xjc
batch file on the sun's java forum.
I used that to generate classes from XML. After generating
the classes I could not compile
the classes each depends on other AND THEY REQUIRE BOTH
CLASS FILES.
I will attach the schema file and dtd . Can you explaine me the problem.
#<transactions.dtd>
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT transactions (cardtocard*)>
<!ELEMENT cardtocard (tocard, fromcard, fromcardver, amount, transdate, transid)
>
<!ELEMENT tocard (#PCDATA)>
<!ELEMENT fromcard (#PCDATA)>
<!ELEMENT fromcardver (#PCDATA)>
<!ELEMENT amount (#PCDATA)>
<!ELEMENT transdate (#PCDATA)>
<!ELEMENT transid (#PCDATA)>
transactions.xjs
<xml-java-binding-schema>
<element name="transactions" type="class" root="true"/>
<element name="cardtocard" type="class"/>
</xml-java-binding-schema>
XML file
?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
<transactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\My Documents\Xml\SVTConcord.xsd">
<cardtocard>
<tocard>1111222233334444</tocard>
<fromcard>6666777788889999</fromcard>
<fromcardver>567</fromcardver>
<amount>100.00</amount>
<transdate>2002-06-04 00:00:00.000</transdate>
<transid>1111222202</transid>
</cardtocard>
</transactions>
the XJC compiler for windows is
@echo off
echo JAXB Schema Compiler
echo --------------------
if "%JAVA_HOME%" == "" goto errorJVM
if "%JAXB_HOME%" == "" goto errorJAXB
set JAXB_LIB=%JAXB_HOME%\lib
set JAXB_CLASSES=%JAXB_HOME%\classes
echo %JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
%JAVA_HOME%\bin\java.exe -jar %JAXB_LIB%\jaxb-xjc-1.0-ea.jar %1 %2 %3 %4 %5
goto end
:errorJVM
echo ERROR: JAVA_HOME not found in your environment.
echo Please, set the JAVA_HOME variable in your environment to match the
echo location of the Java Virtual Machine you want to use.
echo For example:
echo set JAVA_HOME=c:\jdk1.4.0_01
goto end
:errorJAXB
echo ERROR: JAXB_HOME not found in your environment.
echo Please, set the JAXB_HOME variable in your environment to match the
echo location of the JAXB installation directory.
echo For example:
echo set JAXB_HOME=c:\jdk1.4.0_01\jaxb-1.0-ea
:endWhen you compile the generated classes, be sure to put jaxb-rt-1.0-ea.jar in your classpath!
-
How to force the Netscape Browser to open the "Open or Save" dialog box?
Hi, I tried to force the browser to open the "Open or Save" dailog box for downloading a file.
response.setContentType(context.getMimeType(file.getName()));
response.setHeader("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"");
This works fine with IE for all file types( Even though he prompts twice to Open the file directly). but Netscape opens the file directly in the browser with showing any dialog box for text and html files. Anyone knows how to force the netscape in this case or for any file type? Any help will be appreciated.
Thanksany one has the solution for this issue ? I tried the search and I didnt find any answer.
when your trying to open a pdf file as attachment is seperate window, it works well in IE but in netscape it opens up in the same browser, it doesnt open a seperate window
res.setContentType( "application/pdf" );
res.setHeader("Content-Disposition","attachment; filename=\"" + cofcFileName+"\""); -
How to add Navigation Level to the Portal?
Hi All,
How to add Navigation Level to the Portal?
for example:
1st Level is the Role
2nd Level is Worksets/Folders
I want that the 3rd Level will contain more Worksets/Folders and will be under the 2nd level and not in the "Detailed Navigation".
I tried to change the "Number of display levels" in the framework page but it didn't help.
Attached a picture with the required result (of course, for my roles)
http://img457.imageshack.us/my.php?image=toplevelnavigation7xy.jpg
Thanks, OmriHi Omri,
in fact, almost one year ago we did something similar on a project basis, but as already stated here, this was done by modification. What we did was providing a dropdown box within the masthead, containing the first level, and the second and third level now have been displayed where normally the first and second level are. That was a ten days solutions, some very fine granulated work. But nice
Anyhow, nowadays this can be more easy using the LightFrameworkPage (if that's OK for your purpose) and the Navigation Tag Library, see http://help.sap.com/saphelp_nw04/helpdata/en/42/f35146a7203255e10000000a1553f7/frameset.htm for details.
Hope it helps
Detlev -
How can I create a line break in pages for iPad?
On the Mac you can hold the shift key while pressing the return key to creat a line break. Only pressing the return key will creat a new paragraph of course.
On the iPad you only can creat paragraphs. Pressing the shif key does not change that.
Does anybody know how to force a linebrek on the pages app for iPad?Tap and hold where you wish to insert the line break. Select Insert from the pop up menu, then Line break.
this might be helpful for future reference: http://help.apple.com/pages/ipad/1.7/ -
How to force refresh of data through browser or PDF?
We have the dashboard set to refresh every minute. We are pulling the data using XML from DB. When we are in browser and clear the browser cache and then reload the .swf... the data is updated. We haven't been able to figure out how to force the cache-clear and data refresh with either swf or pdf.
Your help is greatly appreciated.Hi Jeff,
Is the XML coming from a web page or a web server?
If yes then you can give this a go. To stop the caching mark your web page with extra tags to say it has expired.
HTML page example:
<HEAD>
< META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />
< META HTTP-EQUIV="EXPIRES" CONTENT="0" />
</HEAD>
JSP example:
<%
// Stop Internet Explorer from caching the results of this page.
// We do this so that every time Xcelsius calls this page it see the latest results.
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
Regards,
Matt -
Why is itunes blocking my and others accounts from buying diamonds and cash in the iron force game. I have been blocked for the past 3day April 28_29_30from being able to buy the diamond mine 1650 diamonds for $ 99.99 and another package of diamonds for $ 49.99' this looks like the old bait an d switch game where a great deal is offered and then you adore forced to buy something less expensive. I have been in computer business for over 30 yrs and all iyunes needs to do is reset the accounts on their system yet they don't want to do that. Also of note I was allowed to buy small amounts of diamonds only to see that some were taken from my account when I was signed and no message as to why this was done. I had 1230 diamonds and did. Not play the game an the next thing was I had only 1170 diamond?.? What's that all about. Itunes is not respecting customers or. Good business practices. And very. Stupid for not selling uds , the customers the products so itunes can really make more money. I have spent many hours on the phone to resolve this only. To get the run around
Nd. Come on itunes reset set our accoummnts and let us buy. We will all have more fun and you get more money. Can't remember ber the last group who turned their back on nmoney but itunes you are the best at doing that fix things pl easehttp://www.apple.com/support/itunes/contact/
Contact iTunes and ask them. This is just a user to user forum so no one here has any ability to answer your questions with anything but a guess. -
How to force a new password in portal with LDAP user? external users
With an external portal (used by agents that do not work for you or reside in your office), company policy is for password to be changed every qtr.
If the users are creating as LDAP users how to force them to change their password when required?
Is this a custom application that needs to be written so when they log into the portal if the qtr has expired the portal ask them to enter a new password that becomes valid for the next qtr.
Versus internally deleting and emailing all the users a new password?Hi Glenn,
We are getting one problem when we are creating user in LDAP and login with that user in Portal that time we are getting Password change screen , but when we create a user in LDAP and change the password of that user in LDAP then when the user tries to Login to portal that time we are not able to see the password change screen.
But again if we change the password of that user through Portal we are able to see change password screen.
can you help on this how we can force the user to change password when we are changing password in LDAP or in SAP System.
Regards
Trilochan -
Dear Lenovo Community, Happy Holidays to you all and wish you a great happy new year. Recently purchased a Bluetooth OBDII device and have difficulty making it to work with its provided software on my T61 (running original XP Home). My short story and question/problem is that I can open "My Bluetooth Places" and pair with the OBDII device as an "OBDII SPP Dev", but my T61 assigns serial port COM19 to it. The OBDII software which came with the device only can let user set to one of the COM1 to COM8 ports and in the properties of Bluetooth pairing, there is no way that I can select which COM port to use. I looked at the Device Manager and I do see these COM port assignments: COM4,5,6,7: Sierra Wireless (the HSDA modem in the laptop which I have never used BTW) COM 9,10,11,12,13,14,15,16,17: Bluetooth Serial Port COM 18, 19: Bluetooth Communications Port and I don't see anything for COM1,2,3, and 8 My question is how to force the computer/OS to assign one of the COM1 to COM8 ports to my device upon pairing? Can I disable the Sierra Wireless model from the COM ports list and hope this will happen? Thanks for your help and inputs beforehand. Regards, AL
Hi, AL_K
Have you attempted to change the port number in device manager itself? If you navigate to Device Manager and open the list of Ports, you can right-click on the device you wish to assign a different port number. After right-clicking, click Properties. There should be a tab called Port Settings. In here, you should find a setting to manually assign a port number.
Good luck, and let me know how it goes,
Adam
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution!" This will help the rest of the community with similar issues identify the verified solution and benefit from it. -
How to find the level of each child table in a relational model?
Earthlings,
I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
So: How to find the level of each child table in a relational model?
I have a relacional database (9.2), all right?!
O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
/↑\ Fks
O"O O" <-- level 2 for first table (circle)
/↑\ Fks
"o"o"o" <-- level 1 for middle table (circle)
↑ Fk
"º"Tips:
- each circle represents a table;
- red tables no have foreign key
- the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
I started thinking about the following:
First I have to know how to take the children:
select distinct child.table_name child
from all_cons_columns father
join all_cons_columns child
using (owner, position)
join (select child.owner,
child.constraint_name fk,
child.table_name child,
child.r_constraint_name pk,
father.table_name father
from all_constraints father, all_constraints child
where child.r_owner = father.owner
and child.r_constraint_name = father.constraint_name
and father.constraint_type in ('P', 'U')
and child.constraint_type = 'R'
and child.owner = 'OWNER') aux
using (owner)
where child.constraint_name = aux.fk
and child.table_name = aux.child
and father.constraint_name = aux.pk
and father.table_name = aux.father;Thinking...
Let's Share!
My thanks in advance,
Philips
Edited by: BluShadow on 01-Apr-2011 15:08
formatted the code and the hierarchy for readbilityJustin,
Understood.
Nocycle not work in 9.2 and, even that would work, would not be appropriate.
With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
-- 1
declare
type udt_roles is table of varchar2(30) index by pls_integer;
cRoles udt_roles;
begin
execute immediate 'create user philips
identified by philips';
select granted_role bulk collect
into cRoles
from user_role_privs
where username = user;
for i in cRoles.first .. cRoles.count loop
execute immediate 'grant ' || cRoles(i) || ' to philips';
end loop;
end;
-- 2
create table philips.root1(root1_id number,
constraint root1_id_pk primary key(root1_id)
enable);
grant all on philips.root1 to philips;
create or replace trigger philips.tgr_root1
before delete or insert or update on philips.root1
begin
null;
end;
create table philips.root2(root2_id number,
constraint root2_id_pk primary key(root2_id)
enable);
grant all on philips.root2 to philips;
create or replace trigger philips.tgr_root2
before delete or insert or update on philips.root2
begin
null;
end;
create table philips.node1(node1_id number,
root1_id number,
node2_id number,
node4_id number,
constraint node1_id_pk primary key(node1_id)
enable,
constraint n1_r1_id_fk foreign key(root1_id)
references philips.root1(root1_id) enable,
constraint n1_n2_id_fk foreign key(node2_id)
references philips.node2(node2_id) enable,
constraint n1_n4_id_fk foreign key(node4_id)
references philips.node4(node4_id) enable);
grant all on philips.node1 to philips;
create or replace trigger philips.tgr_node1
before delete or insert or update on philips.node1
begin
null;
end;
create table philips.node2(node2_id number,
root1_id number,
node3_id number,
constraint node2_id_pk primary key(node2_id)
enable,
constraint n2_r1_id_fk foreign key(root1_id)
references philips.root1(root1_id) enable,
constraint n2_n3_id_fk foreign key(node3_id)
references philips.node3(node3_id) enable);
grant all on philips.node2 to philips;
create or replace trigger philips.tgr_node2
before delete or insert or update on philips.node2
begin
null;
end;
create table philips.node3(node3_id number,
root2_id number,
constraint node3_id_pk primary key(node3_id)
enable,
constraint n3_r2_id_fk foreign key(root2_id)
references philips.root2(root2_id) enable);
grant all on philips.node3 to philips;
create or replace trigger philips.tgr_node3
before delete or insert or update on philips.node3
begin
null;
end;
create table philips.node4(node4_id number,
node2_id number,
constraint node4_id_pk primary key(node4_id)
enable,
constraint n4_n2_id_fk foreign key(node2_id)
references philips.node2(node2_id) enable);
grant all on philips.node4 to philips;
create or replace trigger philips.tgr_node4
before delete or insert or update on philips.node4
begin
null;
end;
-- out of the relational model
create table philips.node5(node5_id number,
constraint node5_id_pk primary key(node5_id)
enable);
grant all on philips.node5 to philips;
create or replace trigger philips.tgr_node5
before delete or insert or update on philips.node5
begin
null;
end;
-- 3
create table philips.dictionary(table_name varchar2(30));
insert into philips.dictionary values ('ROOT1');
insert into philips.dictionary values ('ROOT2');
insert into philips.dictionary values ('NODE1');
insert into philips.dictionary values ('NODE2');
insert into philips.dictionary values ('NODE3');
insert into philips.dictionary values ('NODE4');
insert into philips.dictionary values ('NODE5');
--4
create or replace package body philips.pck_restore_philips as
procedure sp_select_tables is
aExportTablesPhilips utl_file.file_type := null; -- file to write DDL of tables
aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
aExportIndexesPhilips utl_file.file_type := null; -- file to write DDL of indexes
aExportGrantsPhilips utl_file.file_type := null; -- file to write DDL of grants
aExportTriggersPhilips utl_file.file_type := null; -- file to write DDL of triggers
sDirectory varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02
cTables udt_tables; -- collection to store table names for the relational depth
begin
-- omits all referential constraints:
dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
-- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
-- append a SQL terminator (; or /) to each DDL statement:
dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
-- create/open files for export DDL:
aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
select d.table_name bulk collect
into cTables -- collection with the names of tables in the schema philips
from all_tables t, philips.dictionary d
where owner = 'PHILIPS'
and t.table_name = d.table_name;
-- execution
sp_seeks_ddl(aExportTablesPhilips,
aExportReferencesPhilips,
aExportIndexesPhilips,
aExportGrantsPhilips,
aExportTriggersPhilips,
cTables);
-- closes all files
utl_file.fclose_all;
end sp_select_tables;
procedure sp_seeks_ddl(aExportTablesPhilips in utl_file.file_type,
aExportReferencesPhilips in utl_file.file_type,
aExportIndexesPhilips in utl_file.file_type,
aExportGrantsPhilips in utl_file.file_type,
aExportTriggersPhilips in utl_file.file_type,
cTables in out nocopy udt_tables) is
cDDL clob := null; -- colletion to save DDL
plIndex pls_integer := null;
sTableName varchar(30) := null;
begin
for i in cTables.first .. cTables.count loop
plIndex := i;
sTableName := cTables(plIndex);
* Retrieves the DDL and the dependent DDL into cDDL clob *
* for the selected table in the collection, and writes to file.*
begin
cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
sp_writes_ddl(aExportTablesPHILIPS, cDDL);
exception
when dbms_metadata.object_not_found then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
sp_writes_ddl(aExportReferencesPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
sp_writes_ddl(aExportIndexesPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
sp_writes_ddl(aExportGrantsPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
begin
cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
sp_writes_ddl(aExportTriggersPhilips, cDDL);
exception
when dbms_metadata.object_not_found2 then
null;
end;
end loop;
end sp_seeks_ddl;
procedure sp_writes_ddl(aExport in utl_file.file_type,
cDDL in out nocopy clob) is
pLengthDDL pls_integer := length(cDDL);
plQuotient pls_integer := null;
plRemainder pls_integer := null;
begin
* Register variables to control the amount of lines needed *
* for each DDL and the remaining characters to the last row. *
select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
into plQuotient, plRemainder
from dual;
* Join DDL in the export file. *
* ps. 32766 characters + 1 character for each line break. *
-- if the size of the DDL is greater than or equal to limit the line ...
if plQuotient >= 1 then
-- loops for substring (lines of 32766 characters + 1 break character):
for i in 1 .. plQuotient loop
utl_file.put_line(aExport, substr(cDDL, 1, 32766));
-- removes the last line, of clob, recorded in the buffer:
cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
end loop;
end if;
* If any remains or the number of characters is less than the threshold (quotient = 0), *
* no need to substring. *
if plRemainder > 0 then
utl_file.put_line(aExport, cDDL);
end if;
-- record DDL buffered in the export file:
utl_file.fflush(aExport);
end sp_writes_ddl;
begin
-- executes main procedure:
sp_select_tables;
end pck_restore_philips;<font color="red">The problem is that I still have ...
When creating the primary key index is created and this is repeated in the file indexes.
How to avoid?</font> -
How to reduce the level of free text / direct purchasing
A common problem at all sites is how to reduce the level of free text / direct / non catalogue based purchasing. This is where users enter an account assignment and free text instead of using an existing material number.
This is often the case because it is too "dificult" for the user to search and find the correct material number.
How have other sites handled this?
has anyone found a solution that if a user enters lets say "paper" into the free text box, a pop up appears with a match on possible materials with the word "paper" in the short description? This sounds like a pretty easy function to implement? Does anyone have the code?
Cheerio>
Ravi.or.raj wrote:
> The search function you ask for is pretty much a standard functionality.
> In ME21N , click on "Personal Settings" , and select the check box "int search help on" .
Yes this works, but you have to tell that the user has to enter the text in the material number field, then SAP will search thru the database.
Maybe you are looking for
-
Hi , I am doing file to idoc scenario. I am getting the file in zip format. File adaptor poll the file in zip format, Now my requirement is to extract the file in text format before content conversion .... can we use the OS command option in sender f
-
Send an input form via CFMAIL?
I've created an input form (radio buttons, text input) on our site that uses CFMAIL to send the results to the business, then updates our SQL DB. The user/client gets to the form by clicking on a survey link in an email sent to them. Now, I've been a
-
Msg Struck to be Delivered Status in RWB
Hi All, In Adapter Engine it is specifing the message is Delivered Why messege get Struck with the Delivered Status in RWB and it taking lot of time to deliver. So Please any one help out for solution ASAP.
-
What to do about supplied artwork density 300%
I'm doing a mag that previous years I'd done all the ad design for, so I had control of the workflow from start to finish. This year I'm just putting it together and I've just exported the PDF for the first time and had a look at the total area cove
-
Probleme de clavier qui ne ce verrouille pas quand je suis en communication
bonsoir j'ai besoin d'aide en faite quand je telephone avec mon iphone 4 le clavier ne ce bloc pas et donc sa appui sur plein de bouton merci de vos reponse