Re : Hw to create a table and insert records using procedures
Hi..
I tried to run a procedure to create tables but is givin an error message "insufficient previlages" and when i tried to run it using a anonymous block i can create the tables..so can any one help me to resolve this issue.
Thanks in advance.
balveer.
You don't have the privilege on creating the procedures. Hence you are not able to create tables through procedures. where as you can create table from anonymous blocks..
Similar Messages
-
How to create a partner and header record using CRM_ORDER_MAINTAIN?
Hi any one knows how to create a partner and header record using the function module CRM_ORDER_MAINTAIN??
I tried to create a record, but i only managed to create a header record and the partner record is not reflected in the transaction. Why is that so? is there any indicator that i need to include?
Thanks..
JenHi Jen!
I use this FM and it works perfectly.
Use this to create a partner:
gs_partner-ref_handle = '0000000001'.
gs_partner-ref_kind = 'A'.
gs_partner-ref_partner_handle = '0001'.
gs_partner-partner_fct = '00000001'.
gs_partner-partner_no = NO_PARTNER. "number of the partner, bu_partner
gs_partner-display_type = 'BP'.
gs_partner-no_type = 'BP'.
gs_partner-kind_of_entry = 'C'.
* ls_partner_l-ref_handle = '1'.
gs_partner-ref_guid = '00000000000000000000000000000000'.
APPEND gs_partner TO gT_partner .
ls_input_field-ref_kind = 'A'.
ls_input_field-logical_key = '0001'.
ls_input_field-objectname = 'PARTNER'.
ls_input_field-ref_handle = '0000000001'.
ls_input_field_names-fieldname = 'DISPLAY_TYPE'.
INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
ls_input_field_names-fieldname = 'KIND_OF_ENTRY'.
INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
ls_input_field_names-fieldname = 'NO_TYPE'.
INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
ls_input_field_names-fieldname = 'PARTNER_FCT'.
INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
ls_input_field_names-fieldname = 'PARTNER_NO'.
INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
INSERT ls_input_field INTO TABLE gt_input_fields.
clear ls_input_field-field_names[].
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
* it_schedlin_i = gt_schedlin_i_com
it_partner = gt_partner
* it_sales = gt_sales
* it_orgman = gt_orgman
* it_appointment = gt_appointment
* it_ordprp_i = gt_ordprp_i
* it_product_i = gt_product_i
* it_activity_i = gt_activity_i
* it_pridoc = gt_pridoc_com
CHANGING
ct_orderadm_h = gt_orderadm_h
* ct_orderadm_i = gt_orderadm_i
ct_input_fields = gt_input_fields.
* ct_doc_flow = gt_doc_flow
* cv_log_handle = gv_log_handle.
Hope it helps u,
Regards,
Mon. -
How can i inserts record using procedure in adf
how can i insert record using procedure
hi i have the following i what to insert record using store procedure, i try this
am in JDeveloper Studio 11.1.2.1.0
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
xmlns="http://xmlns.oracle.com/bc4j"
Name="SmsPartyAddressView"
Version="11.1.2.60.81"
BindingStyle="OracleName"
CustomQuery="true"
PageIterMode="Full"
UseGlueCode="false"
RowClass="sms1100.SmsPartyAddressViewRowImpl"
ComponentClass="sms1100.SmsPartyAddressViewImpl"
DefClass="sms1100.SmsPartyAddressViewDefImpl"
RowInterface="sms1100.common.SmsPartyAddressViewRow"
ClientRowProxyName="sms1100.client.SmsPartyAddressViewRowClient">
<DesignTime>
<Attr Name="_isExpertMode" Value="true"/>
<Attr Name="_codeGenFlag2" Value="Access|Def|Coll|Prog|VarAccess"/>
<Attr Name="_isCodegen" Value="true"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="sms1100.SmsPartyAddressView_LABEL"/>
</SchemaBasedProperties>
</Properties>
<ViewAccessor
Name="Sub_lov1"
ViewObjectName="sms1100.Sub_lov"
RowLevelBinds="true"/>
<ListBinding
Name="LOV_Town"
ListVOName="Sub_lov1"
ListRangeSize="-1"
ComboRowCountHint="10"
NullValueFlag="none"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Town"/>
</AttrArray>
<AttrArray Name="DerivedAttrNames">
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="TowId"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="Id"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="DsdRegion"/>
<Item Value="ServiceDeliveryArea"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<SQLQuery><![CDATA[SELECT
SmsPartyAddress.ADDRESS_LINE1,
SmsPartyAddress.ID,
SmsPartyAddress.ADDRESS_LINE2,
SmsPartyAddress.ADDRESS_LINE3,
SmsPartyAddress.ADDRESS_LINE4,
SmsPartyAddress.ADDRESS_TYPE_IND,
SmsPartyAddress.PAR_ID,
SmsPartyAddress.PROP_ID,
SmsPartyAddress.START_DT,
SmsProperties.ERF_NO,
SmsProperties.ADDRESS_LINE,
SmsProperties.ZONE,
SmsProperties.GPS_LONGITUDE,
SmsProperties.GPS_LATITUDE,
SmsProperties.TOW_ID,
SmsProperties.WAR_ID,
DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
TOW.TOWN SUBURB,
POSTAL_CODE
FROM SMS_PARTY_ADDRESS SmsPartyAddress,
SMS_PROPERTIES SmsProperties,
SMS_TOWNS TOW
,SMS_TOWNS TOW1
,SMS_POSTAL_CODES PCOD
WHERE TOW.PCOD_ID = PCOD.ID
AND TOW.TOW_ID = TOW1.ID (+)
--and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
and TOW.ID = SMSPROPERTIES.TOW_ID
and SMSPARTYADDRESS.PROP_ID = SMSPROPERTIES.ID
CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
<EntityUsage
Name="SmsPartyAddress"
Entity="sms1100.SmsPartyAddress"/>
<ViewAttribute
Name="AddressLine1"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE1"
Expression="ADDRESS_LINE1"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="Id"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="java.math.BigInteger"
ColumnType="NUMBER"
AliasName="ID"
Expression="ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="AddressLine2"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE2"
Expression="ADDRESS_LINE2"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressLine3"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE3"
Expression="ADDRESS_LINE3"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressLine4"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE4"
Expression="ADDRESS_LINE4"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressTypeInd"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="java.math.BigInteger"
ColumnType="NUMBER"
AliasName="ADDRESS_TYPE_IND"
Expression="ADDRESS_TYPE_IND"
SQLType="NUMERIC"/>
<ViewAttribute
Name="ParId"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="PAR_ID"
Expression="PAR_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="PropId"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="java.math.BigInteger"
ColumnType="NUMBER"
AliasName="PROP_ID"
Expression="PROP_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="StartDt"
IsPersistent="false"
PrecisionRule="true"
Type="java.sql.Timestamp"
ColumnType="DATE"
AliasName="START_DT"
Expression="START_DT"
SQLType="DATE"/>
<ViewAttribute
Name="ErfNo"
IsPersistent="false"
PrecisionRule="true"
Precision="80"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ERF_NO"
Expression="ERF_NO"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="80"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressLine"
IsPersistent="false"
PrecisionRule="true"
Precision="120"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE"
Expression="ADDRESS_LINE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="120"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="Zone"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ZONE"
Expression="ZONE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="GpsLongitude"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="40"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="GPS_LONGITUDE"
Expression="GPS_LONGITUDE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="40"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="GpsLatitude"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="40"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="GPS_LATITUDE"
Expression="GPS_LATITUDE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="40"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="TowId"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="java.math.BigInteger"
ColumnType="NUMBER"
AliasName="TOW_ID"
Expression="TOW_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="WarId"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Type="java.lang.Integer"
ColumnType="NUMBER"
AliasName="WAR_ID"
Expression="WAR_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="Town"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="TOWN"
Expression="TOWN"
SQLType="VARCHAR"
LOVName="LOV_Town">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="combo_lov"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Suburb"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="SUBURB"
Expression="SUBURB"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="PostalCode"
IsPersistent="false"
PrecisionRule="true"
Precision="4"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="POSTAL_CODE"
Expression="POSTAL_CODE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="4"/>
</DesignTime>
</ViewAttribute>
<ResourceBundle>
<PropertiesBundle
PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
</ResourceBundle>
</ViewObject>my calling method is
public class SmsPartyAddressViewRowImpl extends ViewRowImpl implements SmsPartyAddressViewRow {
protected void callNewProperty(String stmt, Object[] bindVars) {
PreparedStatement st;
st = null;
try {
// 1. Create a JDBC PreparedStatement for
st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
if (bindVars != null) {
// 2. Loop over values for the bind variables passed in, if any
for (int z = 0; z < bindVars.length; z++) {
// 3. Set the value of each bind variable in the statement
st.setObject(z + 1, bindVars[z]);
// 4. Execute the statement
st.executeUpdate();
} catch (SQLException e) {
throw new JboException(e);
} finally {
if (st != null) {
try {
// 5. Close the statement
st.close();
} catch (SQLException e) {
protected void callInsertProcedure(TransactionEvent e) {
// String Addressline = null;
String Zone = "UNDERF";
Date StartDt = null;
// EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
// SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
new Object[] { getParId(), getAddressTypeInd(), getAddressLine1(),
getAddressLine2(), getAddressLine3(), getAddressLine4(),getAddressLine(),getSuburb(),getTown(),getPostalCode(),getTowId(),Zone,StartDt });
Edited by: ADF007 on 2012/08/13 6:59 PMthat solution was based on the hr schema now am inserting using my schema
inserting record in a view using procedure
hi i have the folowing view, i what to insert record using procedure,this is what i what ,i what to insert record using the view but pass those view variable to procedure. my view is
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
xmlns="http://xmlns.oracle.com/bc4j"
Name="smsproppartyview"
Version="11.1.2.60.81"
BindingStyle="OracleName"
CustomQuery="true"
PageIterMode="Full"
UseGlueCode="false"
RowClass="sms1100.smsproppartyviewRowImpl"
ComponentClass="sms1100.smsproppartyviewImpl"
RowInterface="sms1100.common.smsproppartyviewRow"
ClientRowProxyName="sms1100.client.smsproppartyviewRowClient">
<DesignTime>
<Attr Name="_isExpertMode" Value="true"/>
<Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
<Attr Name="_isCodegen" Value="true"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="sms1100.smsproppartyview_LABEL"/>
</SchemaBasedProperties>
</Properties>
<ViewAccessor
Name="Sub_lov1"
ViewObjectName="sms1100.Sub_lov"
RowLevelBinds="true"/>
<ListBinding
Name="LOV_Town"
ListVOName="Sub_lov1"
ListRangeSize="-1"
ComboRowCountHint="10"
NullValueFlag="none"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Town"/>
</AttrArray>
<AttrArray Name="DerivedAttrNames">
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="TowId"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="Id"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="DsdRegion"/>
<Item Value="ServiceDeliveryArea"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<SQLQuery><![CDATA[SELECT
SmsPartyAddress.ID,
SmsPartyAddress.ADDRESS_LINE2,
SmsPartyAddress.ADDRESS_LINE3,
SmsPartyAddress.ADDRESS_LINE4,
SmsPartyAddress.ADDRESS_LINE1,
SmsProperties.ADDRESS_LINE,
DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
TOW.TOWN SUBURB,
POSTAL_CODE,
SmsPartyAddress.PAR_ID,
SmsPartyAddress.PROP_ID,
SmsProperties.ID AS ID1,
SmsPartyAddress.ADDRESS_TYPE_IND,
SmsPartyAddress.START_DT,
SmsProperties.TOW_ID,
SmsProperties.ERF_NO,
SmsProperties.WAR_ID,
SmsProperties.ZONE
FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
SMS_TOWNS TOW
,SMS_TOWNS TOW1
,SMS_POSTAL_CODES PCOD
WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID
and TOW.PCOD_ID = PCOD.ID
AND TOW.TOW_ID = TOW1.ID (+)
--and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
and TOW.ID = SMSPROPERTIES.TOW_ID
and SmsPartyAddress.prop_id = SmsProperties.id
CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
<ViewAttribute
Name="Id"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="ID"
SQLType="NUMERIC">
<RecalcCondition><![CDATA[true]]></RecalcCondition>
<TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
</ViewAttribute>
<ViewAttribute
Name="AddressLine2"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE2"
Expression="ADDRESS_LINE2"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressLine3"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE3"
Expression="ADDRESS_LINE3"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressLine4"
IsPersistent="false"
PrecisionRule="true"
Precision="50"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE4"
Expression="ADDRESS_LINE4"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressLine1"
IsPersistent="false"
PrecisionRule="true"
Precision="100"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE1"
Expression="ADDRESS_LINE1"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="AddressLine"
IsPersistent="false"
PrecisionRule="true"
Precision="120"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ADDRESS_LINE"
Expression="ADDRESS_LINE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="120"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="Town"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="TOWN"
Expression="TOWN"
SQLType="VARCHAR"
LOVName="LOV_Town">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="combo_lov"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Suburb"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="SUBURB"
Expression="SUBURB"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="PostalCode"
IsPersistent="false"
PrecisionRule="true"
Precision="4"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="POSTAL_CODE"
Expression="POSTAL_CODE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="4"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="ParId"
IsPersistent="false"
PrecisionRule="true"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="PAR_ID"
Expression="PAR_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="PropId"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="PROP_ID"
Expression="PROP_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="Id1"
IsUpdateable="false"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="ID1"
SQLType="NUMERIC">
<RecalcCondition><![CDATA[true]]></RecalcCondition>
<TransientExpression><![CDATA[(new oracle.jbo.server.SequenceImpl("SMS_MAST1_SEQ",adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
</ViewAttribute>
<ViewAttribute
Name="AddressTypeInd"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="ADDRESS_TYPE_IND"
Expression="ADDRESS_TYPE_IND"
SQLType="NUMERIC"/>
<ViewAttribute
Name="StartDt"
IsPersistent="false"
PrecisionRule="true"
Type="java.sql.Timestamp"
ColumnType="DATE"
AliasName="START_DT"
SQLType="DATE">
<RecalcCondition><![CDATA[true]]></RecalcCondition>
<TransientExpression><![CDATA[adf.currentDate]]></TransientExpression>
</ViewAttribute>
<ViewAttribute
Name="TowId"
IsPersistent="false"
PrecisionRule="true"
Precision="38"
Scale="0"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="TOW_ID"
Expression="TOW_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="ErfNo"
IsPersistent="false"
PrecisionRule="true"
Precision="80"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ERF_NO"
Expression="ERF_NO"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="80"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="WarId"
IsPersistent="false"
PrecisionRule="true"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="WAR_ID"
Expression="WAR_ID"
SQLType="NUMERIC"/>
<ViewAttribute
Name="Zone"
IsPersistent="false"
PrecisionRule="true"
Precision="20"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="ZONE"
Expression="ZONE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="20"/>
</DesignTime>
</ViewAttribute>
<ResourceBundle>
<PropertiesBundle
PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
</ResourceBundle>
</ViewObject>this is what i have try
public class smsproppartyviewImpl extends ViewObjectImpl {
protected void callNewProperty(String stmt, Object[] bindVars) {
PreparedStatement st;
st = null;
try {
// 1. Create a JDBC PreparedStatement for
st = getDBTransaction().createPreparedStatement("begin " + stmt + ";end;", 0);
if (bindVars != null) {
// 2. Loop over values for the bind variables passed in, if any
for (int z = 0; z < bindVars.length; z++) {
// 3. Set the value of each bind variable in the statement
st.setObject(z + 1, bindVars[z]);
// 4. Execute the statement
st.executeUpdate();
} catch (SQLException e) {
throw new JboException(e);
} finally {
if (st != null) {
try {
// 5. Close the statement
st.close();
} catch (SQLException e) {
protected void callInsertProcedure(TransactionEvent e) {
String Addressline = null;
String Zone = "UNDERF";
String Town = null;
String Suburb = null;
String PostalCode = null;
String Addressline1 = null;
String Addressline2 = null;
String Addressline3 = null;
String Addressline4 = null;
Integer AddressTypeInd = null;
Integer parid = null;
//Date StartDt = null;
Integer towid = null;
ApplicationModuleHandle handle = null;
handle = Configuration.createRootApplicationModuleHandle
("sms1100.sms1100Moduleold", "sms1100ModuleShared");
ApplicationModule sam = handle.useApplicationModule();
sam.processChangeNotifications();
ViewObject svo = sam.findViewObject("smsproppartyview1");
svo.executeQuery();
Row row = svo.first();
if (svo != null){
Addressline = (String)row.getAttribute("AddressLine");
Zone = (String)row.getAttribute("Zone");
Town = (String)row.getAttribute("Town");
Suburb = (String)row.getAttribute("Suburb");
PostalCode = (String)row.getAttribute("PostalCode");
towid = (Integer)row.getAttribute("TowId");
Addressline1 = (String)row.getAttribute("Addressline1");
Addressline2 = (String)row.getAttribute("Addressline2");
Addressline3 = (String)row.getAttribute("Addressline3");
Addressline4 = (String)row.getAttribute("Addressline4");
AddressTypeInd = (Integer)row.getAttribute("AddressTypeInd");
parid = (Integer)row.getAttribute("ParId");
//EntityDefImpl SmsPropertiesDef = SmsPropertiesImpl.getDefinitionObject();
//SmsPropertiesImpl newSmsProperties = (SmsPropertiesImpl)SmsPropertiesDef.createInstance2(getDBTransaction(), null);
//newSmsProperties.setAddressLine(Addressline);
//newSmsProperties.setTowId(towid);
callNewProperty("Sms_Location.newProp(?,?,?,?,?,?,?,?,?,?,?,?)",
new Object[] { parid, AddressTypeInd, Addressline1,
Addressline2, Addressline3, Addressline4,Addressline,Town,Suburb,PostalCode,towid,Town,Suburb,PostalCode,towid,Zone });
}am in Jdeveloper 11.1.2.1.0 -
ORA-03113 error occurs when trying to insert record using procedure
I have a Database Block whose DML Data Target Type is Procedure. I have given the Insert Procedure Name, Insert Procedure Arguments and Insert Procedure ResultSet Columns. The procedure which is used to insert record into the table, resides in the database. The procedure for insert takes Table of records as argument. I am getting FRM-40735: INSERT-PROCEDURE trigger raised unhandled exception ORA-03113).
This exception does not occur if the Procedure is place under Program Units. But, I want the procedure to be under Database Block. I am working on Oracle Forms 6i.
Please help me out in resolving this.Hello,
I think you should call the support for this kind of error.
Francois -
How do I create a storedprocedure for inserting records using UserId?
micah D
Authentication and interaction are two seperate topics.
How are you managing your authentication? Via SQL Server? Inside your app? Using Active Directory?
The insert proc itself isn't a big deal. You'll have to provide the user a form within your app to submit the data, and probably pass it to your proc as variables:
CREATE PROC createCustomer (@firstName VARCHAR(30), @lastName VARCHAR(30), @phone VARCHAR(15), @address1 VARCHAR(30), @address2 VARCHAR(30), @city VARCHAR(30), @state VARCHAR(30), @zip VARCHAR(10), @userID BIGINT)
AS
BEGIN
INSERT INTO myCustomerTable (firstName, lastName, phone, address1, address2, city, state, zip, userID)
VALUES (@firstName, @lastName, @phone, @address1, @address2, @city, @state, @zip, @userID)
END
This is assuming of course, that the information will be passed from your app to the proc using something like:
createCustomer @firstName, @lastName, @phone, @address1, @address2, @city, @state, @zip, @userID -
Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?
Using Pages, I have created a document and inserted a Table for use logging an inventory. When I came to print this document the lines and boarders of the Table feature did not print however the text did print in the table format. How do I get the lines and boarders to print also?
-
Compare 2 tables and insert rows missing in each table.
I have a tough situation. I have two exact tables- one online and one offline database. I know that there are missing rows of data from each table, so I need to make a comparison of one table and insert rows that do not exist. I was thinking to try this, but it took over 3 hours to run and did not return anything:
insert into t
select * from t a
where not exists (select * from [email protected] b
where a.col1 != b.col1
and a.col2 != b.col2
and a.col3 != b.col3);
and it goes on for another 7columns.
The trouble I have is to include a date clause so that the query can be broken down into running only a few months of data comparisions at a time- the records go back 4 years to compare. Also is there a way to write this so that it will query both tables at the same time in order to speed things up- or is one table at a time the best advice? Each table has over 100 million records to compare, that's why I was hoping to use a date criteria since one column is date.
Let me know what you advise to make this work, I hope I was on the right track.Not sure if the MINUS operator will perform better with your data set but;
SQL> create table t1 (some_id number, some_date date)
Table created.
SQL> create table t2 (some_id number, some_date date)
Table created.
SQL> insert into t1 values (1, trunc(sysdate))
1 row created.
SQL> insert into t1 values (2, trunc(sysdate-5))
1 row created.
SQL> insert into t1 values (4, trunc(sysdate-90))
1 row created.
SQL> insert into t2 values (1, trunc(sysdate))
1 row created.
SQL> insert into t2 values (3, trunc(sysdate-10))
1 row created.
SQL> insert into t2 values (5, trunc(sysdate-100))
1 row created.
SQL> select * from t1
SOME_ID SOME_DAT
1 07-07-30
2 07-07-25
4 07-05-01
3 rows selected.
SQL> select * from t2
SOME_ID SOME_DAT
1 07-07-30
3 07-07-20
5 07-04-21
3 rows selected.
SQL> insert into t1 (
select some_id, some_date from t2 where some_date between sysdate-50 and sysdate
minus
select some_id, some_date from t1 where some_date between sysdate-50 and sysdate)
1 row created.
SQL> insert into t2 (
select some_id, some_date from t1 where some_date between sysdate-50 and sysdate
minus
select some_id, some_date from t2 where some_date between sysdate-50 and sysdate)
1 row created.
SQL> select * from t1
SOME_ID SOME_DAT
1 07-07-30
2 07-07-25
4 07-05-01
3 07-07-20
4 rows selected.
SQL> select * from t2
SOME_ID SOME_DAT
1 07-07-30
3 07-07-20
5 07-04-21
2 07-07-25
4 rows selected. -
Select from 2 tables and insert same data into 2 other tables(BPEL Process)
Hi All,
Please suggest me how to select from 2 tables and insert the same data into 2 tables. I am successful in selecting data from 2 tables, but i am not able to insert the same data into 2 other tables. There is foreign key constraint between 2 tables.
Thanks in Advance,
MAHI have created DB Adapter for selecting from 2 tables and also DB adapter for insert and i have created parent child relationship between 2 tables.
I am getting this error
<Faulthttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>env:Server</faultcode>
<faultstring>com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is 6f3fe20c1b031057:-6cc7dfb5:11b8bf5fbe1:-7fa4. Please check the process instance for detail.</faultstring>
</Fault> -
Read data from E$ table and insert into staging table
Hi all,
I am a new to ODI. I want your help in understanding how to read data from an "E$" table and insert into a staging table.
Scenario:
Two columns in a flat file, employee id and employee name, needs to be loaded into a datastore EMP+. A check constraint is added to allow data with employee names in upper case only to be loaded into the datastore. Check control is set to flow and static. Right click on the datastore, select control and then check. The rows that have violated the check constraint are kept in E$_EMP+ table.
Problem:
Issue is that I want to read the data from the E$_EMP+ table and transform the employee name into uppercase and move the corrected data from E$_EMP+ into EMP+. Please advise me on how to automatically handle "soft" exceptions in ODI.
Thank youHi Himanshu,
I have tried the approach you suggested already. That works. However, the scenario I described was very basic. Based on the error logged into the E$_EMP table, I will have to design the interface to apply more business logic before the data is actually merged into the target table.
Before the business logic is applied, I need to read each row from the E$EMP table first and I do not know how to read from E$EMP table. -
What is the best way to create E-Flyers and insert to Microsoft Outlook??
What is the best way to create E-Flyers and insert to Microsoft Outlook??
http://kb.mailchimp.com/article/how-to-code-html-emails
Once created, the HTML document cab be placed in the Stationery folder.
On a PC it's here.
"C:\Program Files\Common Files\Microsoft Shared\Stationery" -
Create a table and upload data in MS ACCESS from SAP ABAP programming?
Hi All,
How to create a table in MS ACCESS database and Upload SAP database table data into MS ACCESS table using ABAP programming?
Explain: My client requirement is " If he/she runs a ABAP Program, that will create a table and upload data into MS ACCESS Database table in background. "
Could you please give the solution or code? I know the program RIACCESS and I went through the SAP Note 583698.
Is this only solution for this? Or Any other possibilities?
Please give me solution.
Thanks in advance.Hi,
It is not possible to create tables in a non SAP schema from inside SAP.
The SAP-Oracle license also does not allow you to create the table (see note 581312):
the following actions, among other things, are therefore forbidden at database level:
Creating database users
Creating database segments
Querying/changing/creating data in the database
Using ODBC or other SAP external access methods
Please refer following link,
[Ckick Here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do]
You can also do it by LSMW,
If you are using Access 97, you can download directly into an access
database from SAP. See program RIACCESS for details. You have to establish
an RFC destination PS_ACCESS_1 and 2.
There are then a couple of function modules. Go to SE37 and put in
msaccess and hit PF4.
The following is from the readme file: sapgui/ps/readme.sap
For the MS-Access interface SAP delivers 4 files:
WDPSASTR.EXE This is an RFC server program that is called by SAP R/3
(PS module). This program creates a MS Access database. The structure
information of the tables is transferred from R/3. In addition to
these tables a table named DDIC is created. This table contains the
structure information and should in no case be modified or deleted.
WDPSATAB.EXE This is an RFC server program that is called by SAP R/3
after WDPSASTR. This program filles the tables of the database with data.
There must not be made any changes of the structure of
the tables between the calls of WDPSASTR and WDPSATAB.
WDPSAZET.EXE This is an RFC client program that triggers work/time
confirmations in the PS module of SAP R/3 (like transaction CN27 Collectiv
confirm).
WDPSAMAT.EXE This is an RFC client program that triggers material
confirmations in the PS module of SAP R/3 (like transaction MB1A - Goods
Please also refer following links,
[Click here|Upload data from MS Access tables, to SAP tables.;
Before using the program "RIACCESS", you need to install the PS utilities, which are part of SAPGUI install CD.
It is available in the "SAPGUIPS directory".
Then do the followings :
1. Select transaction code SALE -> Systems in network-> Define RFC Destination.
2. You will need two RFC destinations (TCP/IP connections for the front-end workstation).
Setup the two RFC destinations PS_ACCESS_1 and PS_ACCESS_2 and you'll have to get them to point to
wdpsastr.exe and wdpsatab.exe respectively.
3. Then execute RIACCESS and choose PS_ACCESS_1 to generate access tables.
The system must also be able to access the RFC-DLL files (librfc2.dll, librfc3.dll, librfc4.dll, librfc5.dll, librfc6.dll, vrfc.dll).
Please note that Access only supports tables with up to 255 fields. -
Creating Customized Table and Modify Table Maintenance Screen
Hi,
I have already created customized table and generate the table maintenance screen, however i encountered 1 problem which is i cannot add new PAI and PBO module in the flow logic. Every time i wanna add new module, i will be getting error message saying that my user currently editing the screen. Any suggestion ?
Thanks.
JonHi <b>Jonathan</b>,
Please close all the windows and relogin
For making PAI and PBO modules, Please activate all the Table and its maintainence view.
Now first make emptu file with <main filename>_PAI and <main filename>_PBO save and activate them.
Now put the logic in them and then activate now call these in the main prog.. it should work...
While activation all the sub program modules should be activated already... i suggest select all the prog and sub progs and activate them all at once...so the system automatically takes care of inner activations first...
If u have some more quereies... please feel free to contact me...
Regards,,
<b>Abhishek</b> -
Hi...
3....how to create table maintanence generator for a z table and how to use that for transfering a selected records to one server to another server.
thanks and regards,
k.swaminath reddyHi,
Table maintanance Generator is used to manually
input values using transaction sm30.The Table Maintenance Generator is used to create table maintenance program to add, modify or delete records in the database table. This can be accessed using transaction SE54 or in SE11 using the menu Utilities->Table Maintenance Generator
<b>
Follow below steps</b>
go to se11 check table maintanance check box under
attributes tab
utilities-table maintanance Generator->
create function group and assign it under
function group input box.
also assign authorization group default &NC& .
select standard recording routine radio in table
table mainitainence generator to move table
contents to quality and production by assigning
it to request.
select maintaience type as single step.
maintainence screen as system generated numbers
this dialog box appears when you click on create
button
save and activate table
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
One step, two step in Table Maintenance Generator
Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.
Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.
please check the link for getting information about table maintenance generator !
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=use%20of%20table%20maintenance%20generator&cat=sdn_all
http://www.sapdevelopment.co.uk/tips/tips_tabmaint_tcode.htm
http://www.sap-img.com/abap/create-a-table-maintance-program-for-a-z-table.htm
Regards,
Priyanka. -
Generate xml from a table and insert the xml into another table
I want to generate an xml file from a table and insert it into another table all in one tsql
insert into table B(xmlfile)
select * from tableA
FOR
XML
PATH('ac'),TYPE,ELEMENTS
XSINIL,ROOT('Accum')
Is not working any helpI have solved my issue all I did was to change my column datatype to xml
-
How can i create a new and tableless database using database configuration
How can i create a new and tableless database using database configuration
How can i create a new and tableless database using database configuration
Just don't install the sample schemas. See the installation guide
http://docs.oracle.com/cd/E11882_01/server.112/e10831/installation.htm
Using the Database Configuration Assistant
When you install Oracle Database with the Oracle Universal Installer, the sample schemas are installed by default if you select the Basic Installation option. Selecting the sample schemas option installs all five schemas (HR, OE, PM, IX, and SH) in the database. If you choose not to install the sample schemas at that time, you can add them later by following the instructions in section "Manually Installing Sample Schemas".
Choose a custom install and don't install the sample schemas.
All other schems/tables installed are REQUIRED by Oracle
Maybe you are looking for
-
Creating A Catalog of Video Clips
Need advice on this one. I have over 30 hours of old analog home video which I would like to catalog on my hard drives in the form of small event related video clips. I would like to import the video to my mac, create and name each clip and save it t
-
T.code to print Payment advice
Guru's I need to reprint my payment advice, the payment advice is not shown in the spool document, but I know my payment advice document, how do I print this, also for sending E-mail and Fax how do we automate this functionality for payment advice.
-
While trying to update my phone one photo is stopping the whole process and I've gone through all the online suggestions (check for updates,etc)
-
Iupdate G5 from OS 10.4.11 to a more current OS.
I need to update my Mac G5 OS from 10.4.11 to a more current OS. Can I go straight to the most current version 10., 10.7 or will I need to start at 10.5 and work my way up? Processor 4x2.5 GhZ PowerPC G5, Ram 2.5 G Also considering upgrading to Adobe
-
This is my first encounter installing oracle patches and i am having trouble finding an oracle patch. I am running oracle enterprise version 10.2.0.1.0 -64 bit on windows server 2003 x86 standard edition.When i search into metalink for patchsets it r