Creating records in DOKTL table
Hello Everyone,
I have to create new records for table DOKTL.
I have the required data to be entered, but i didnt see a table maintenance generator for this table.
I would like to know how should I go about to enter values in it?
Is there some Function Module etc. ?
Using an Insert statement would be the last thing in this case.
Thanks
Hi,
Please follow this steps
Please go to SE16N,
Give the table name
Press Enter
In the transaction code bar enter '&SAP_EDIT' and press enter.
SAP editing function is activated.
now click on execute.
The table will open in EDIT mode. But, please make sure that you are editing correctly the totals.
1. Use SE09 to
Either create a new workbench request
or goto the old request (Objects Tab)
2. Press Edit button
3. Enter the following in the row:
Prog Id = R3TR
Obj Type = TABU
Obj Name = MyTableName
Then Press ENTER
4. A Key Button will come on the Right column.
Press it. A New screen will come.
5. In table name enter : MyTableName
In Table Keys enter : KeyFields*
Save the request and transport.
Hope it helps.
Regards
Hiren K.Chitalia
Similar Messages
-
Problems in creating records in z table
Dear All
I have created a z table, initially i created some records in it, using SM30. But now i am not able to create any record. Kindly help me in this.
Regards
Deeptiwhat message your getting....
Please let me know . so that can suggest you the right appraoch..
one reason might be you have done the changes for the table...
so check the table is active in dictionory or not... if active
goto utilities -- > databaslity and activate and adjust database.
also regenerate the table maintaince generator...
Please let me know if you need further information
Regards
Satish Boguda -
Unable to create records in database using PHP Data Service
Hello, I've been stuck on this for a few days and search up and down for this on the net, no response I've found has worked, so I come to you...
Here are the steps I've taken, I think it's pretty standard
1. I have a macbook pro running osx 10.7.3
2. I installed MAMP all default (I've acually reinstalled this because someone suggested this might fix it)
3. Thru phpMyAdmin I created a database called my_test
4. In that database I created a table, this is the export of that table: (I've also tried this with InnoDB which is the default)
CREATE TABLE `customer` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`email` varchar(150) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
5. I created a new Flx Project (Running Flash Builder 4.5.1 Premium)
Project Name: PHPTest
Application Type: Desktop (Although I've done the same thing with Web and got the same results)
>> Next
Application Server Type: PHP
Web Root: /Applications/MAMP/htdocs/
URL Root: http://localhost:8888/
Clicked 'Validate Configuration' and that worked
Output Folder: /Applications/MAMP/htdocs/PHPService (default by Flash Builder)
>> Finished
6. On the Data/Services tab on the bottom I click 'Connect to Data/Service...'
Select 'PHP'
>> Next
Select 'Click here to generate a sample'
Select 'Generate from database' radio button
Username: root
Password: root (default for MAMP)
Host name: localhost
Server port: 8889 (default for MAMP MySQL port, the HTTP port default is 8888 which in both cases seem to work but every video I've seen that uses MAMP on youtube uses 8889)
Database: my_test
Click 'Test Connection' (works)
Table: customer
Primary Key: id (this field is greyed out and Flash Builder selects 'id' which it figures out from the SQL table)
>> Click OK
7. Then if I don't have the Zend Framework folder in my /Applications/MAMP/htdocs/ folder it tells me its going to create that and I say alright. Then Flash Builder says stuff about how this is really only for testing and not production server ready and I say alright.
8. Then it takes me back to the Form from Step 6 when I get the chance to select 'Click here to generate a sample'
These fields are now filled with this data automaticly:
PHP Class: /Applications/MAMP/htdocs/PHPTest/services/CustomerService.php
Service name: CustomerService
Service package: services.customerservice
Data type package: valueObjects
>> Click Next (shows all the functions that will be now availible)
>> Click Finished (End of the forms and it opens Dreamweaver to the php file it created CustomerService.php which I have no need to edit so I close that down)
9. Back in Flash Builder I switch to design view and drag a datagrid onto the big white area in the middle, whatever that is called.
10. Then below in Data/Services tab on the bottom I click drag the function 'GetAllCustomer' on top of the datagrid.
I say yes to rebound and click ok and the view of the datagrid is updated with the colums from the 'customer' table in mySQL.
(Now let me say that when I hit save and compile this, if I actually had records in this table that I insert thru phpMyAdmin, this does show in the datagrid. So for the whole CRUD thing I am able to get the R which is Read)
11. Now going back to the design view in Flash Builder I will create a form to create records in the table... (I guess this isn't really a step)
12. In the Data/Service tab on the bottom I select 'createCustomer' function and then there is an icon called 'Generate Form' that looks like a white piece of paper with a gear on the bottom of it.
13. This opens up a new form and since I don't have a crazy bunch of fields in my table I just click Finished (If you click next you can specify which fields you want to exclude from the form but this time I don't need to)
14. This actually creates 2 forms if you look at the code, the second just shows the return type from when you click 'CreateCustomer' button on the first form. Because they overlap in design view I drag the form out of the way so you can see the input form, the return form, and the datagrid
15. Then I save and compile...
(Also if your actually reading this I didn't remove the id form field, I get the same result either way, but if you do remove the form field in the code/design you also have to update the button function to not deal with the id before it gets sent off to the php page since in this case the MySQL table is set to auto_increment the id, sorry this doesn't make much sence but this little area doesn't matter much either way)
16. Now fill in whatever data you want for name and email, try differnt numbers in the id field like 0, nothing, 1, 1000 and click 'CreateCustomer'
(For me nothing happens, no return is put in the return field, no error pops up and the datagrid is not updated with the new record, also going over to phpMyAdmin and checking out the table browse doesn't show any changes either, I know the button is calling the function because if I add a state change in that function it changes, it would seem that the line:
createCustomerResult.token = customerService.createCustomer(customer2); doesn't do anything)
So any idea what is wrong here, I'm convenced it's something stupid easy simple I just can't see it.In case you need more info, here is a code dump on a mxml project that has this problem:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:customerservice="services.customerservice.*"
xmlns:valueObjects="valueObjects.*"
currentState="State1">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
getAllCustomerResult.token = customerService.getAllCustomer();
protected function button_clickHandler(event:MouseEvent):void
var customer2:Customer = new Customer();
customer2.id = parseInt(idTextInput.text);
customer2.name = nameTextInput.text;
customer2.email = emailTextInput.text;
currentState = "Test";
createCustomerResult.token = customerService.createCustomer(customer2);
]]>
</fx:Script>
<s:states>
<s:State name="State1"/>
<s:State name="Test"/>
</s:states>
<fx:Declarations>
<s:CallResponder id="getAllCustomerResult"/>
<customerservice:CustomerService id="customerService"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
<valueObjects:Customer id="customer"/>
<s:CallResponder id="createCustomerResult"/>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:DataGrid id="dataGrid" includeIn="State1" x="330" y="10" width="392"
creationComplete="dataGrid_creationCompleteHandler(event)" requestedRowCount="4">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="id" headerText="id"></s:GridColumn>
<s:GridColumn dataField="name" headerText="name"></s:GridColumn>
<s:GridColumn dataField="email" headerText="email"></s:GridColumn>
</s:ArrayList>
</s:columns>
<s:typicalItem>
<fx:Object id="id1" email="email1" name="name1"></fx:Object>
</s:typicalItem>
<s:AsyncListView list="{getAllCustomerResult.lastResult}"/>
</s:DataGrid>
<s:Form includeIn="State1" defaultButton="{button}">
<s:FormItem label="Id">
<s:TextInput id="idTextInput" text="{customer.id}"/>
</s:FormItem>
<s:FormItem label="Name">
<s:TextInput id="nameTextInput" text="{customer.name}"/>
</s:FormItem>
<s:FormItem label="Email">
<s:TextInput id="emailTextInput" text="{customer.email}"/>
</s:FormItem>
<s:Button id="button" label="CreateCustomer" click="button_clickHandler(event)"/>
</s:Form>
<s:Form includeIn="State1" x="0" y="204">
<s:FormItem label="CreateCustomer">
<s:TextInput id="createCustomerTextInput" text="{createCustomerResult.lastResult as int}"/>
</s:FormItem>
</s:Form>
</s:WindowedApplication> -
How to add record in Qualified table using MDM Java API
Hi experts,
I am trying to add a record into a Table.
but I am facing the problem in setFieldValue method.
//Getting Field-ID to pass in setFieldValue() method.
FieldId[] fields = new FieldId[6];
fields[0] = repSchema.getFieldId("GTINs", "Description");
fields[1] = repSchema.getFieldId("GTINs", "Unit_Descriptor");
fields[2] = repSchema.getFieldId("GTINs", "GTIN");
fields[3] = repSchema.getFieldId("GTINs", "Alternate_Item_Classifications");
fields[4] = repSchema.getFieldId("GTINs", "Country_Of_Origin");
fields[5] = repSchema.getFieldId("GTINs", "Bar_Coded");
Record rec = RecordFactory.createEmptyRecord(mainTableId);
rec.setFieldValue(fields, );
but I am not getting how to assign the value to these fields using MDMvalue Interface.
Can anyone provide me the code sample or Code flow so that I can do this.
Plz help me it'll be great help for me.
Thanks
Tarun
Edited by: Tarun Sharma on Feb 4, 2008 11:39 AM
==========================================================================================
Hi Gurus
I found the way to add the MDMValue in setFieldValue Method.
we can set like this:
setFieldValue(<fieldId object like fieldId[], <MdmValue like this> new StringValue("ABC"));
Now I am facing problem in adding value to lookup flat table.
According to the setFieldValue method we can assign the loookup like this:
setFieldValue(<fieldId[0]>, new LookpValue(<here we have to pass the recordID of lookup table>);
so I want to know how I can pass the recordId of lookup table here.
Please suggest.
Thanks
Tarun Sharma
Edited by: Tarun Sharma on Feb 4, 2008 3:15 PM
Edited by: Tarun Sharma on Feb 4, 2008 3:25 PM
Edited by: Tarun Sharma on Feb 8, 2008 6:58 PMHi Andrea,
I tried your suggestion but now i am getting Type Mismatch Error.
Please suggest me what I can do?
//TableId for Lookup[Flat].
TableId lookupTableId = repSchema.getTableId("Return_Goods_Policies");
FieldId[] ReturnGoodsPolicyTableIdFields = new FieldId[1];
ReturnGoodsPolicyTableIdFields[0] = repSchema.getFieldId("Return_Goods_Policies", "Name");
Record recLookup = RecordFactory.createEmptyRecord(lookupTableId);
try{
recLookup.setFieldValue(ReturnGoodsPolicyTableIdFields[0], new StringValue("New_Brand"));
}catch(Exception ex){
System.out.println(ex);
//Creating Record in Qualified Table - Request Details
CreateRecordCommand createLookupcommand = new CreateRecordCommand(simpleConnection);
createLookupcommand.setSession(session);
createLookupcommand.setRecord(recLookup);
createLookupcommand.execute();
//Getting the recordId of Lookup record.
RecordId lookupRecordId = createLookupcommand.getRecord().getId();
//Table Id for Qualified table.
TableId qualifiedTableId = repSchema.getTableId("Ext_Hardlines");
FieldId[] ExtHardlinesFields = new FieldId[3];
ExtHardlinesFields[0] = repSchema.getFieldId("Ext_Hardlines", "Name");//Text
ExtHardlinesFields[1] = repSchema.getFieldId("Ext_Hardlines", "Pieces_Per_Trade_item");//Integer
ExtHardlinesFields[2] = repSchema.getFieldId("Ext_Hardlines","Return_Goods_Policy");
Record recQualified = RecordFactory.createEmptyRecord(qualifiedTableId);
try{
recQualified.setFieldValue(ExtHardlinesFields[0], new StringValue("Qualified Value"));
recQualified.setFieldValue(ExtHardlinesFields[1], new StringValue("Qualified Description"));
recQualified.setFieldValue(ExtHardlinesFields[2], new LookupValue(lookupRecordId));
}catch(Exception ex){
System.out.println(ex);
//Creating Record in Qualified Table - Request Details
CreateRecordCommand createQualifiedCommand = new CreateRecordCommand(simpleConnection);
createQualifiedCommand.setSession(session);
createQualifiedCommand.setRecord(recQualified);
createQualifiedCommand.execute(); I am getting this Type match here, but i m not getting what mistake i did.
RecordId qualifiedRecordId = createQualifiedCommand.getRecord().getId();
//Adding to Main Table
TableId mainTableId = repSchema.getTableId("GTINs");
FieldId[] gtinsFields = new FieldId[1];
gtinsFields[0] = repSchema.getFieldId("GTINs","Ext_Hardlines");
Record recMain = RecordFactory.createEmptyRecord(mainTableId);
//Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
QualifiedLookupValue qualifiedLookupValue = new QualifiedLookupValue();
qualifiedLookupValue.createQualifiedLink(qualifiedRecordId);
try{
recMain.setFieldValue(gtinsFields[0], new QualifiedLookupValue(qualifiedLookupValue));
}catch(Exception ex){
System.out.println(ex);
CreateRecordCommand createCmd = new CreateRecordCommand(simpleConnection);
createCmd.setSession(session);
createCmd.setRecord(recMain);
createCmd.execute();
Could you help me out?
Thanks
Tarun -
How To Display Recently Created Records
Hi
I want to display the recently created records into a table in sapui5.
Is there any control to display the recently created records.
Please suggest me if any control is there.
Thanks
SathishSQL> WITH T AS (
2 SELECT 'SANKAR' NAME, 10 NO FROM DUAL
3 UNION ALL
4 SELECT 'BALAJI', 20 FROM DUAL
5 UNION ALL
6 SELECT 'SANKAR', 10 FROM DUAL
7 UNION ALL
8 SELECT 'MANI', 30 FROM DUAL
9 UNION ALL
10 SELECT 'BALAJI', 20 FROM DUAL
11 UNION ALL
12 SELECT 'MANI', 30 FROM DUAL
13 UNION ALL
14 SELECT 'BALA', 10 FROM DUAL
15 UNION ALL
16 SELECT 'KALA', 20 FROM DUAL)
17 SELECT NAME, NO
18 FROM (SELECT NAME,
19 NO,
20 SUM(RNO) OVER(PARTITION BY NAME,NO) SNO
21 FROM (SELECT T.*,
22 ROW_NUMBER() OVER(PARTITION BY NAME,NO ORDER BY 1) RNO
23 FROM T))
24 WHERE SNO > 1
25 /
NAME NO
BALAJI 20
BALAJI 20
MANI 30
MANI 30
SANKAR 10
SANKAR 10
6 rows selected.Thanks,
Karthick -
Creating records over mutliple pages
I am trying to create a database record over multiple pages - wizard style.
Firstly, I wondered what the usual way to do this would be? I currently create a new row and set it to current in the first step, and then use bound attributes on the intermediate steps. I then save this row on the last step. However, I'm concerned about how and when these rows get removed from memory if they are abandoned before the commit step.
Secondly, I have the situation where the third step creates records in another table, but the fourth step needs to use primary key details from the third step in order to make entries into the primary table. Think Orders/Rows. As I don't want to commit to either table until the final step of my wizard is reached, how do I get hold of these PKs?
(Apologies - I presume this has been asked before but I wasn't sure which terms to search for....)
TIA
BenBenjamin,
Pop on over to http://www.oracle.com/technology/documentation/jdev/B25947_01/index.html to get the BC version of SRDemo
Good luck,
John -
How to update multiple records in a table created in view (web dynpro)
Here is my coding......
*coding to get the district value
DATA lo_nd_district TYPE REF TO if_wd_context_node.
DATA lo_el_district TYPE REF TO if_wd_context_element.
DATA ls_district TYPE wd_this->element_district.
DATA lv_district_txt LIKE ls_district-district_txt.
navigate from <CONTEXT> to <DISTRICT> via lead selection
lo_nd_district = wd_context->get_child_node( name = wd_this->wdctx_district ).
get element via lead selection
lo_el_district = lo_nd_district->get_element( ).
get single attribute
lo_el_district->get_attribute(
EXPORTING
name = `DISTRICT_TXT`
IMPORTING
value = lv_district_txt ).
*coding to diplay records when clicking a button(Submit)
DATA lo_nd_table TYPE REF TO if_wd_context_node.
DATA lo_el_table TYPE REF TO if_wd_context_element.
DATA ls_table TYPE wd_this->element_table.
DATA lv_district LIKE ls_table-district.
navigate from <CONTEXT> to <TABLE> via lead selection
lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
get element via lead selection
lo_el_table = lo_nd_table->get_element( ).
get single attribute
lo_el_table->set_attribute(
EXPORTING
name = `DISTRICT`
" IMPORTING
value = lv_district_txt ).
The above coding updates only one record to that
table created in view.
If i enter 2nd district value means then the first record
in the table is overwritten.
So my need is the record should not be overwritten.
it(2nd record ) should be displayed after the 1st record.
Any one can help me and send the coding plz....instead of using set attribute you should use bind table method to display/update the records in table view.
step1 ) collect all the data in a local table
step2 ) and the bind that lacal table with your node
search1 = wd_context->get_child_node( name = `TABLE1` ).
search1->bind_table( lt_detail)
here lt_detail is your local table and TABLE1 is node which is bound with table ui element. -
Creating new record in Results Table giving Error
Hi All,
On update page there is a Results Table with Add button to create a new row.
While creating a new record on Results Table gives error
Attribute set for AccessId in view object XXLCUpdVariablesVO1 failed
I have checked EO and VO attributes, everything seems to be right.
Also Updatable is set to 'Always'.
Still don't know why this error is coming up.
Plz help to resolve this error.
Thanks,
SKAjay,
XML code
<?xml version='1.0' encoding='windows-1252' ?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
<Entity
Name="XXLCVarAssignmentsEO"
DBObjectType="table"
DBObjectName="XXLCOKC_VARIABLE_ASSIGNMENTS"
AliasName="XXLCVarAssignmentsEO"
BindingStyle="OracleName"
UseGlueCode="false"
RowClass="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEOImpl"
DefClass="oracle.apps.fnd.framework.server.OAEntityDefImpl"
CollClass="oracle.apps.fnd.framework.server.OAEntityCache" >
<DesignTime>
<Attr Name="_isCodegen" Value="true" />
<Attr Name="_version" Value="10.1.3.41.57" />
<AttrArray Name="_publishEvents">
</AttrArray>
<Attr Name="_panelSchema" Value="table|alias" />
<Attr Name="_codeGenFlag2" Value="Init|Delete|Access|Val" />
</DesignTime>
<Attribute
Name="AssignmentId"
IsNotNull="true"
ColumnName="ASSIGNMENT_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS"
PrimaryKey="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="AssignmentAccess"
IsNotNull="true"
Precision="30"
ColumnName="ASSIGNMENT_ACCESS"
Type="java.lang.String"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="30" />
</DesignTime>
</Attribute>
<Attribute
Name="VariableId"
IsNotNull="true"
ColumnName="VARIABLE_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="ListValueId"
IsNotNull="true"
ColumnName="LIST_VALUE_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="OrganizationId"
IsNotNull="true"
Precision="15"
Scale="0"
ColumnName="ORGANIZATION_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="TemplateId"
IsNotNull="true"
ColumnName="TEMPLATE_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="AuctionHeaderId"
IsNotNull="true"
ColumnName="AUCTION_HEADER_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="PoHeaderId"
IsNotNull="true"
ColumnName="PO_HEADER_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="CreatedBy"
IsNotNull="true"
ColumnName="CREATED_BY"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="CreationDate"
IsNotNull="true"
ColumnName="CREATION_DATE"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
SQLType="DATE"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="7" />
</DesignTime>
</Attribute>
<Attribute
Name="LastUpdateDate"
IsNotNull="true"
ColumnName="LAST_UPDATE_DATE"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
SQLType="DATE"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="7" />
</DesignTime>
</Attribute>
<Attribute
Name="LastUpdatedBy"
IsNotNull="true"
ColumnName="LAST_UPDATED_BY"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="LastUpdateLogin"
IsNotNull="true"
ColumnName="LAST_UPDATE_LOGIN"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="AccessId"
ColumnName="ACCESS_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Key
Name="SysC00329905" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AssignmentAccess" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""ASSIGNMENT_ACCESS" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329905" />
</DesignTime>
</Key>
<Key
Name="SysC00329906" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.VariableId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""VARIABLE_ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329906" />
</DesignTime>
</Key>
<Key
Name="SysC00329907" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.ListValueId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""LIST_VALUE_ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329907" />
</DesignTime>
</Key>
<Key
Name="SysC00329908" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.OrganizationId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""ORGANIZATION_ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329908" />
</DesignTime>
</Key>
<Key
Name="SysC00329909" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.TemplateId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""TEMPLATE_ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329909" />
</DesignTime>
</Key>
<Key
Name="SysC00329910" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AuctionHeaderId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""AUCTION_HEADER_ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329910" />
</DesignTime>
</Key>
<Key
Name="SysC00329911" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.PoHeaderId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""PO_HEADER_ID" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329911" />
</DesignTime>
</Key>
<Key
Name="SysC00329912" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.CreatedBy" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""CREATED_BY" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329912" />
</DesignTime>
</Key>
<Key
Name="SysC00329913" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.CreationDate" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""CREATION_DATE" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329913" />
</DesignTime>
</Key>
<Key
Name="SysC00329914" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdateDate" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""LAST_UPDATE_DATE" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329914" />
</DesignTime>
</Key>
<Key
Name="SysC00329915" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdatedBy" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""LAST_UPDATED_BY" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329915" />
</DesignTime>
</Key>
<Key
Name="SysC00329916" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdateLogin" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value=""LAST_UPDATE_LOGIN" IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329916" />
</DesignTime>
</Key>
<Key
Name="SysC00329917" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AssignmentId" />
</AttrArray>
<DesignTime>
<Attr Name="_isPrimary" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329917" />
</DesignTime>
</Key>
</Entity>
XXLCVarAssignmentsEOImpl Code
package xxlc.oracle.apps.okc.schema.articles.variables.server;
import oracle.apps.fnd.framework.OAAttrValException;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.server.OAEntityDefImpl;
import oracle.apps.fnd.framework.server.OAEntityImpl;
import oracle.jbo.AttributeList;
import oracle.jbo.Key;
import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.server.EntityDefImpl;
// --- File generated by Oracle ADF Business Components Design Time.
// --- Custom code may be added to this class.
// --- Warning: Do not modify method signatures of generated methods.
public class XXLCVarAssignmentsEOImpl extends OAEntityImpl
public static final int ASSIGNMENTID = 0;
public static final int ASSIGNMENTACCESS = 1;
public static final int VARIABLEID = 2;
public static final int LISTVALUEID = 3;
public static final int ORGANIZATIONID = 4;
public static final int TEMPLATEID = 5;
public static final int AUCTIONHEADERID = 6;
public static final int POHEADERID = 7;
public static final int CREATEDBY = 8;
public static final int CREATIONDATE = 9;
public static final int LASTUPDATEDATE = 10;
public static final int LASTUPDATEDBY = 11;
public static final int LASTUPDATELOGIN = 12;
public static final int ACCESSID = 13;
private static OAEntityDefImpl mDefinitionObject;
/**This is the default constructor (do not remove)
public XXLCVarAssignmentsEOImpl()
/**Retrieves the definition object for this instance class.
public static synchronized EntityDefImpl getDefinitionObject()
if (mDefinitionObject == null)
mDefinitionObject =
(OAEntityDefImpl)EntityDefImpl.findDefObject("xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO");
return mDefinitionObject;
/**Add attribute defaulting logic in this method.
public void create(AttributeList attributeList)
super.create(attributeList);
OADBTransaction transaction = getOADBTransaction();
Number asgId = transaction.getSequenceValue("XXLC_VAR_ASG_SEQ");
setAssignmentId(asgId);
/**Add entity remove logic in this method.
public void remove()
super.remove();
/**Add Entity validation code in this method.
protected void validateEntity()
super.validateEntity();
/**Gets the attribute value for AssignmentId, using the alias name AssignmentId
public Number getAssignmentId()
return (Number)getAttributeInternal(ASSIGNMENTID);
/**Sets <code>value</code> as the attribute value for AssignmentId
public void setAssignmentId(Number value)
if (value != null)
OADBTransaction transaction = getOADBTransaction();
Object[] varKey = {value};
EntityDefImpl varDefinition = XXLCVarAssignmentsEOImpl.getDefinitionObject();
XXLCVarAssignmentsEOImpl variable =
(XXLCVarAssignmentsEOImpl)varDefinition.findByPrimaryKey(transaction, new Key(varKey));
if (variable != null)
throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
getEntityDef().getFullName(), // EO name
getPrimaryKey(), // EO PK
"AssignmentId", // Attribute Name
value, // Attribute value
"AK", // Message product short name
"FWK_TBX_T_EMP_ID_UNIQUE"); // Message name
setAttributeInternal(ASSIGNMENTID, value);
/**Gets the attribute value for AssignmentAccess, using the alias name AssignmentAccess
public String getAssignmentAccess()
return (String)getAttributeInternal(ASSIGNMENTACCESS);
/**Sets <code>value</code> as the attribute value for AssignmentAccess
public void setAssignmentAccess(String value)
setAttributeInternal(ASSIGNMENTACCESS, value);
/**Gets the attribute value for VariableId, using the alias name VariableId
public Number getVariableId()
return (Number)getAttributeInternal(VARIABLEID);
/**Sets <code>value</code> as the attribute value for VariableId
public void setVariableId(Number value)
setAttributeInternal(VARIABLEID, value);
/**Gets the attribute value for ListValueId, using the alias name ListValueId
public Number getListValueId()
return (Number)getAttributeInternal(LISTVALUEID);
/**Sets <code>value</code> as the attribute value for ListValueId
public void setListValueId(Number value)
setAttributeInternal(LISTVALUEID, value);
/**Gets the attribute value for OrganizationId, using the alias name OrganizationId
public Number getOrganizationId()
return (Number)getAttributeInternal(ORGANIZATIONID);
/**Sets <code>value</code> as the attribute value for OrganizationId
public void setOrganizationId(Number value)
setAttributeInternal(ORGANIZATIONID, value);
/**Gets the attribute value for TemplateId, using the alias name TemplateId
public Number getTemplateId()
return (Number)getAttributeInternal(TEMPLATEID);
/**Sets <code>value</code> as the attribute value for TemplateId
public void setTemplateId(Number value)
setAttributeInternal(TEMPLATEID, value);
/**Gets the attribute value for AuctionHeaderId, using the alias name AuctionHeaderId
public Number getAuctionHeaderId()
return (Number)getAttributeInternal(AUCTIONHEADERID);
/**Sets <code>value</code> as the attribute value for AuctionHeaderId
public void setAuctionHeaderId(Number value)
setAttributeInternal(AUCTIONHEADERID, value);
/**Gets the attribute value for PoHeaderId, using the alias name PoHeaderId
public Number getPoHeaderId()
return (Number)getAttributeInternal(POHEADERID);
/**Sets <code>value</code> as the attribute value for PoHeaderId
public void setPoHeaderId(Number value)
setAttributeInternal(POHEADERID, value);
/**Gets the attribute value for CreatedBy, using the alias name CreatedBy
public Number getCreatedBy()
return (Number)getAttributeInternal(CREATEDBY);
/**Sets <code>value</code> as the attribute value for CreatedBy
public void setCreatedBy(Number value)
setAttributeInternal(CREATEDBY, value);
/**Gets the attribute value for CreationDate, using the alias name CreationDate
public Date getCreationDate()
return (Date)getAttributeInternal(CREATIONDATE);
/**Sets <code>value</code> as the attribute value for CreationDate
public void setCreationDate(Date value)
setAttributeInternal(CREATIONDATE, value);
/**Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
public Date getLastUpdateDate()
return (Date)getAttributeInternal(LASTUPDATEDATE);
/**Sets <code>value</code> as the attribute value for LastUpdateDate
public void setLastUpdateDate(Date value)
setAttributeInternal(LASTUPDATEDATE, value);
/**Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
public Number getLastUpdatedBy()
return (Number)getAttributeInternal(LASTUPDATEDBY);
/**Sets <code>value</code> as the attribute value for LastUpdatedBy
public void setLastUpdatedBy(Number value)
setAttributeInternal(LASTUPDATEDBY, value);
/**Gets the attribute value for LastUpdateLogin, using the alias name LastUpdateLogin
public Number getLastUpdateLogin()
return (Number)getAttributeInternal(LASTUPDATELOGIN);
/**Sets <code>value</code> as the attribute value for LastUpdateLogin
public void setLastUpdateLogin(Number value)
setAttributeInternal(LASTUPDATELOGIN, value);
/**getAttrInvokeAccessor: generated method. Do not modify.
protected Object getAttrInvokeAccessor(int index,
AttributeDefImpl attrDef) throws Exception
switch (index)
case ASSIGNMENTID:
return getAssignmentId();
case ASSIGNMENTACCESS:
return getAssignmentAccess();
case VARIABLEID:
return getVariableId();
case LISTVALUEID:
return getListValueId();
case ORGANIZATIONID:
return getOrganizationId();
case TEMPLATEID:
return getTemplateId();
case AUCTIONHEADERID:
return getAuctionHeaderId();
case POHEADERID:
return getPoHeaderId();
case CREATEDBY:
return getCreatedBy();
case CREATIONDATE:
return getCreationDate();
case LASTUPDATEDATE:
return getLastUpdateDate();
case LASTUPDATEDBY:
return getLastUpdatedBy();
case LASTUPDATELOGIN:
return getLastUpdateLogin();
case ACCESSID:
return getAccessId();
default:
return super.getAttrInvokeAccessor(index, attrDef);
/**setAttrInvokeAccessor: generated method. Do not modify.
protected void setAttrInvokeAccessor(int index, Object value,
AttributeDefImpl attrDef) throws Exception
switch (index)
case ASSIGNMENTID:
setAssignmentId((Number)value);
return;
case ASSIGNMENTACCESS:
setAssignmentAccess((String)value);
return;
case VARIABLEID:
setVariableId((Number)value);
return;
case LISTVALUEID:
setListValueId((Number)value);
return;
case ORGANIZATIONID:
setOrganizationId((Number)value);
return;
case TEMPLATEID:
setTemplateId((Number)value);
return;
case AUCTIONHEADERID:
setAuctionHeaderId((Number)value);
return;
case POHEADERID:
setPoHeaderId((Number)value);
return;
case CREATEDBY:
setCreatedBy((Number)value);
return;
case CREATIONDATE:
setCreationDate((Date)value);
return;
case LASTUPDATEDATE:
setLastUpdateDate((Date)value);
return;
case LASTUPDATEDBY:
setLastUpdatedBy((Number)value);
return;
case LASTUPDATELOGIN:
setLastUpdateLogin((Number)value);
return;
case ACCESSID:
setAccessId((Number)value);
return;
default:
super.setAttrInvokeAccessor(index, value, attrDef);
return;
/**Gets the attribute value for AccessId, using the alias name AccessId
public Number getAccessId()
return (Number)getAttributeInternal(ACCESSID);
/**Sets <code>value</code> as the attribute value for AccessId
public void setAccessId(Number value)
setAttributeInternal(ACCESSID, value);
/**Creates a Key object based on given key constituents
public static Key createPrimaryKey(Number assignmentId)
return new Key(new Object[]{assignmentId});
Thanks,
SK -
Using combination of insert into and select to create a new record in the table
Hello:
I'm trying to write a stored procedure that receives a record locator parameter
and then uses this parameter to locate the record and then copy this record
into the table with a few columns changed.
I'll use a sample to clarify my question a bit further
-- Create New Amendment
function create_amendment(p_mipr_number in mipr.mipr_number%TYPE, p_new_amendment_number in mipr.amendment_number%TYPE)
return integer is
new_mipr_id integer;
begin
THIS is causing me grief See comments after this block of code
insert into mipr
(select mipr_id from mipr where mipr_number=p_mipr_number),
(select fsc from mipr where mipr_number=p_mipr_number),
45,
(select price from mipr where mipr_number=p_mipr_number),
practical,
(select part_number from mipr where mipr_number=p_mipr_number);
THe above will work if I say the following
insert into mipr
(select * from mipr where mipr_number=p_mipr_number);
BUt, Of course this isn't what I want to do... I want to duplicate a record and change about 3 or 4 fields .
How do I use a combination of more than one select and hard coded values to insert a new record into the table.
/** Ignore below this is fine... I just put a snippet of a function in here ** The above insert statement is what I need help with
select (mipr_id) into new_mipr_id from mipr where mipr_number=p_mipr_number + amendment_number=(select max(amendment_number) + 1);
return new_mipr_id;
end;
THANK YOU IN ADVANCE!
KTfunction create_amendment(p_mipr_number in mipr.mipr_number%TYPE)
return integer is
new_mipr_id integer;
tmp_number number;
tmp_mipr_id integer;
begin
tmp_number :=(select max(amendment_number) from mipr where mipr_number=p_mipr_number);
Question:
tmp_number :=1; works..
tmp_number doesn't work with the select statement?
Obviously I'm a novice! I can't find anything in my book regarding tmp variables... What should I look under is tmp_number a
variable or what? In my Oracle book, variable means something different.
Thanks!
KT
I have the following code in my stored procedure:
Good luck,
Eric Kamradt -
Can we create a cursor that can hold records of any table
DECLARE
CURSOR cr_tablenames IS
SELECT tname
FROM tab;
v_tablename tab.tname%TYPE;
BEGIN
OPEN cr_tablenames;
LOOP
FETCH cr_tablenames INTO v_tablename;
EXIT WHEN cr_tablenames%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('Table: '||v_tablename);
-- HERE, I WANT TO PERFORM SELECT * OPERATION ON
-- EACH TABLE WHOSE NAME COMES INTO v_tablename
-- AND DISPLAY THE RECORDS
END LOOP;
END;
I want to perform SELECT * operation on each table whose name comes into the variable and display the records. How to achieve it? I am clueless.
Can this be achieved by something like... using cursors which can be defined dynamically and which can hold records of any table?
Or, do I need to have some different approach to this problem?
Edited by: kartins on Nov 5, 2009 11:41 PMsomething like
SQL> create or replace
2 function getContent (p_tn in varchar2)
3 return sys_refcursor
4 is
5 retval sys_refcursor;
6 begin
7 open retval for
8 'select * from '||p_tn;
9 return retval;
10 end;
11 /
Function created.
SQL>
SQL> var rc refcursor
SQL>
SQL> begin
2 :rc := getContent ('emp');
3 end;
4 /
PL/SQL procedure successfully completed.
SQL>
SQL> print rc
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 900 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1700 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1350 500 30
7566 JONES MANAGER 7839 02-APR-81 3075 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1350 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2950 30
7782 CLARK MANAGER 7934 09-JUN-81 2551 10
7788 SCOTT ANALYST 7566 19-APR-87 3100 20
7839 KING PRESIDENT 17-NOV-81 5100 10
7844 TURNER SALESMAN 7698 08-SEP-81 1600 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1200 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 1050 30
7902 FORD ANALYST 7566 03-DEC-81 3100 20
7934 MILLER CLERK 7782 23-JAN-82 1400 10
14 rows selected.
SQL>
SQL> begin
2 :rc := getContent ('dual');
3 end;
4 /
PL/SQL procedure successfully completed.
SQL>
SQL> print rc
D
X -
Create infopath form contain all records of particular table
Hi,
It has resolved my above issue.
I want to create one sharepoint list connected with database and when i click on add new item, it should display infopath form.
I am able to show infopath form on click of 'Add new item' but sharepoint list not containing all records of that particular table.So how can i get all the records of my table.It is possible using external list. But in that case, can i show infopath form?
Please suggest.
Please help to solve the issue.
Thanks & Regards
RajniHi Stark,
Thanks for your response.
Actually here i am talking about rows in the particular table.
I want to show all rows in sharepoint list.
So,is it possible in sharepoint?
Please guide.
Thanks in advance!
Regards
Rajni -
OC4j10.1.2CMP bean not updating field after creating a record in the table.
I have a simple table in Oracle 9i database:
SQL> desc temp_tbl
Name Null? Type
OPER_ID NOT NULL NUMBER(5)
OPER_STS_TM_DT NOT NULL DATE
OPER_STS_CD NUMBER(2)
First 2 fields are the Primary Key. last field is standalone. No FK references.
I generate a CMP bean using Jdeveloper 10.1.2 for this table.
Then I try to insert a record into this table and update the oper_sts_cd field.
Problem: CMP inserts the record correctly, but does not update the field: oper_sts_cd, even though trace indicates that the field has been updated.
( shown in pgm below).
THE SAME CODE WORKED in OC4J9.0.4 Container.
Since we upgraded to 10g Rel2 ( OC4J10.1.2) , it does not.
Code:
Session Bean:
package model;
import java.rmi.RemoteException;
import java.sql.Timestamp;
import java.util.Calendar;
import javax.ejb.CreateException;
import javax.ejb.FinderException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class SessionEJBBean implements SessionBean
public void ejbCreate()
public void ejbActivate()
public void ejbPassivate()
public void ejbRemove()
public void setSessionContext(SessionContext ctx)
private TempTblLocalHome getTempTblLocalHome() throws NamingException
final InitialContext context = new InitialContext();
return (TempTblLocalHome)context.lookup("java:comp/env/ejb/local/TempTbl");
public void createOperation() throws RemoteException
try
TempTblLocalHome tempHome = (TempTblLocalHome) this.getTempTblLocalHome();
System.out.println("Succcess loading Temp Entity EJB");
Timestamp currDate = new Timestamp(Calendar.getInstance()
.getTimeInMillis());
TempTblLocal tempLocal = tempHome.create(new Long("1294"),currDate,new Long("1") );
System.out.println("created Temp Op=" + tempLocal.getOperId() + " date=" + tempLocal.getOperStsTmDt() );
//tempLocal.setOperStsCd(new Long("" + 1) );
Long stsTypeCd = new Long("1");
System.out.println("Putting long value in db=" + stsTypeCd + "-");
tempLocal.setOperStsCd(stsTypeCd);
System.out.println("Stored value in db=" + tempLocal.getOperStsCd() );
catch( NamingException ne)
throw new RemoteException(ne.getMessage());
catch(CreateException ce)
throw new RemoteException(ce.getMessage());
ejb-jar (generated)
<entity>
<description>Entity Bean ( CMP )</description>
<display-name>TempTbl</display-name>
<ejb-name>TempTbl</ejb-name>
<local-home>model.TempTblLocalHome</local-home>
<local>model.TempTblLocal</local>
<ejb-class>model.TempTblBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>model.TempTblPK</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>TempTbl</abstract-schema-name>
<cmp-field>
<field-name>operId</field-name>
</cmp-field>
<cmp-field>
<field-name>operStsTmDt</field-name>
</cmp-field>
<cmp-field>
<field-name>operStsCd</field-name>
</cmp-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params/>
</query-method>
<ejb-ql>select object(o) from TempTbl o</ejb-ql>
</query>
</entity>
<container-transaction>
<method>
<ejb-name>TempTbl</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
orion-ejb-jar.xml (generated):
<entity-deployment name="TempTbl" data-source="jdbc/Marcs_DS" table="MARCS.TEMP_TBL">
<primkey-mapping>
<cmp-field-mapping>
<fields>
<cmp-field-mapping name="operId" persistence-name="OPER_ID" persistence-type="NUMBER(5)"/>
<cmp-field-mapping name="operStsTmDt" persistence-name="OPER_STS_TM_DT" persistence-type="DATE"/>
</fields>
</cmp-field-mapping>
</primkey-mapping>
<cmp-field-mapping name="operId" persistence-name="OPER_ID" persistence-type="NUMBER(5)"/>
<cmp-field-mapping name="operStsTmDt" persistence-name="OPER_STS_TM_DT" persistence-type="DATE"/>
<cmp-field-mapping name="operStsCd" persistence-name="OPER_STS_CD" persistence-type="NUMBER(2)"/>
</entity-deployment>>
Srini.r wrote:
> I have added a new field in IT0006
> Srini R
Have you done this through PM01?
~Suresh -
Calculating the size of each record in a table?
Hi to all,
I trying to create histograms based on the unique record sizes in a particular table. However , in order to do that I need to calculate the size of each record in the table (in kilobytes preferably) and to get a list of unique record sizes.
Is there a function or easy way to calculate the size in Kbytes of a record in a table?
Thank you in advance!
TonyHi,
You can use the sum of the average of the vsizes of the fields in the table. For example:TEST.SQL>CREATE TABLE TEST
2 (
3 A VARCHAR2(50 CHAR),
4 B NUMBER
5 ) TABLESPACE TOOLS;
Table created.
TEST.SQL>INSERT INTO TEST VALUES('&1',&2);
Enter value for 1: A
Enter value for 2: 10
old 1: INSERT INTO TEST VALUES('&1',&2)
new 1: INSERT INTO TEST VALUES('A',10)
1 row created.
TEST.SQL>/
Enter value for 1: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Enter value for 2: 100000
old 1: INSERT INTO TEST VALUES('&1',&2)
new 1: INSERT INTO TEST VALUES('ABCDEFGHIJKLMNOPQRSTUVWXYZ',100000)
1 row created.
TEST.SQL>COMMIT;
Commit complete.
TEST.SQL>SELECT AVG(VSIZE(A)) + AVG(vSIZE(B)) FROM TEST;
AVG(VSIZE(A))+AVG(VSIZE(B))
15.5 The average line size - from the data in the table NOW - is 15.5 bytes.
HTH,
Yoann. -
How to Restore deleted records in other table in oracle database 10g...
Hi All,
i want to restore deleted records of a particular table in other table
suppose:
i perform a query
delete from emp
where deptno =30;
now i wont to restore deptno=30 records in other table, let say in emp1 table
can any one let me know how to do it?
Thanks..This is what flashback query is for:
orclz> conn scott/tiger
Connected.
orclz> select count(*) from emp;
COUNT(*)
14
orclz> delete from emp where deptno=30;
6 rows deleted.
orclz> commit;
Commit complete.
orclz> create table deleted30 as select * from emp as of timestamp(systimestamp - 5/1440) where deptno=30;
Table created.
orclz> select count(*) from deleted30;
COUNT(*)
6
orclz> -
How to insert some records in one table and some records in another table
Interview question
how insert records in two tables by using trigger
CREATE or REPLACE TRIGGER Emp_Ins_Upd_Del_Trig
BEFORE delete or insert or update on EMP
FOR EACH ROW
BEGIN
if UPDATING then
UPDATE emp2
SET
empno = :new.empno,
ename = :new.ename
--, job = :new.job
--, mgr = :new.mgr
--, hiredate = :new.hiredate
, sal = :new.sal
--, comm = :new.comm
--, deptno = :new.deptno;
sdate = :new.sdate,
edate = :new.edate
end if;
if INSERTING then
INSERT INTO emp2
VALUES
( :new.empno
, :new.ename
--, :new.job
--, :new.mgr
--, :new.hiredate
, :new.sal
--, :new.comm
--, :new.deptno
new.sdate,
new.edate);
end if;
if DELETING then
DELETE FROM emp2
WHERE empno = emp2.empno;
end if;
END;
it is working fine but he wants to insert some specific litimit on one table and some specified limit of records in one ..
In this senerio can i insert records by use count of records...
please help me..Can you be more specific on the "Limit"
Conditional insert can be used in this case.
Maybe you are looking for
-
How do i set up hp eprint to. print in black only
How do i set up hp eprint to pint in black only
-
Everytime i download an app, it asks for my password, i type it in and then it says "loading..." and then it just dissapears and i never get it. i've tried restarting my ipod, logging out and back in to my account and nothing works.
-
IPod data recovery- Help!!
I recently lost all of the songs, videos and pictures I had on my 80gb ipod video (at least over 3000 items) and don't have any of the files in my computer anymore. Now I've downloaded 3 trial versions of programs that claim to restore your iPod data
-
Can my mini provide ethernet for blu ray player?
i know you can share internet when connected to internet with ethernet, but i want to share my wireless network my mini connects to with my blu ray player. has anyone done this and had it work? is there a trick? thanks for any info....
-
Why wont my ipad connect to wifi ???
why wont my ipad connect to wifi ???