Help to read a table with data source and convert time stamp
Hi Gurus,
I have a req and need to write a ABAP prog. As soon as i excute ABAP program it should ask me enter a data source name, then my ABAP prog has excute teh code, in ABAP code i have to read a table with this data source as key, sort time stamp from table and should display the data source and time stamp as output.
As follows:
Enter Data Source Name:
Then user enters : 2lis_11_vahdr
Then out put should be "Data source :" 10-15-2008.
The time stamp format in table is 20,050,126,031,520 (YYYYMMDDhhmmss). I have to display as 05-26-2005. Any help would be apprciated.
Thanks,
Ram
Hi Jayanthi Babu Peruri,
I tried to extract YEAR, MONTH, DAY separately and using
EDIT MASK written it.
Definitely there will be some STANDARD CONVERSION ROUTINE will be there. But no idea about it.
DATA : V_TS TYPE TIMESTAMP,
V_TS_T TYPE CHAR16,
V_YYYY TYPE CHAR04,
V_MM TYPE CHAR02,
V_DD TYPE CHAR02.
START-OF-SELECTION.
GET TIME STAMP FIELD V_TS.
V_TS_T = V_TS.
CONDENSE V_TS_T.
V_YYYY = V_TS_T.
V_MM = V_TS_T+4(2).
V_DD = V_TS_T+6(2).
V_TS_T(2) = V_MM.
V_TS_T+2(2) = V_DD.
V_TS_T+4(4) = V_YYYY.
SKIP 10.
WRITE : /10 V_TS," USING EDIT MASK '____-__-________'.
/10 V_YYYY,
/10 V_MM,
/10 V_DD,
/10 V_TS_T USING EDIT MASK '__-__-__________'.
If you want DATE alone, just declare the length of V_TS_T as 10.
Regards,
R.Nagarajan.
We can -
Similar Messages
-
Table for Data source and Transfer rule mapping
Hi all,
Do we have any table where in we can know the different transfer rules(for different source systems) assigned to the same Data source.
thanks and regards,
Rk.thank you all,
the table RSDS does not have 3.x data sources, it has only 7.0 Data sources also it does not have the field mapping.
RSOSFIELDMAP and RSTSRULES have the field mapping of the datasources, do we have any similiar tables for 7.0 Datasources.
regards,
RK -
Generic Data Source Delta on Time Stamp Issue
HI,
I had a Z datasource on a Z table with Time stamp
The Generic delta of the Data source is based on Time stamp with Upper Saftey Intreval 1Sec
When i extract delta consutively with 1 Hr gap i am getting an delta evn tough the table is updated with etries
How to investigate & resolve the issue
ThanksHi
please elaborate question is not clear.
Ashish -
File Adapter : read XML file with data validation and file rejection ?
Hello,
In order to read a XML file with the file adapter, I have defined a XSD that I have imported to my project.
Now the File Adapter reads the file correctly but it does not give an error when:
- the data types are not valid. Ex: dateTime is expected in a node and a string is provided
- the XML file has invalid attributes.
How can I manage error handling for XML files ?
Should I write my own Java XPath function to validate the file after is processed ? (here is an example for doing this : http://www.experts-exchange.com/Web/Web_Languages/XML/Q_21058568.html)
Thanks.one option is to specify validateXML on the partnerlink (that describes the file adapter endpoint) such as shown here
<partnerLinkBinding name="StarLoanService">
<property name="wsdlLocation"> http://<hostname>:9700/orabpel/default/StarLoan/StarLoan?wsdl</property>
<property name="validateXML">true</property>
</partnerLinkBinding>
hth clemens -
Error with data source and jndi
Dave,
I am using weblogic 6.1 now and I am still getting the same problem.
Error:
The DataSource name with the JNDI name: Organization can not be located. Please
ensure that the DataSource has been deployed successfully and that the JNDI name
in your EJB Deployment descriptor is correct.
The Entity Bean files that I have used for JBoss are:
* GangsterBean.java
* Copyright (c) 2002 Sempire, Inc.
* All rights reserved.
* This software is the confidential and proprietary information
* of Sempire, Inc
* @ version 1.0
package com.sempire.builder.business_component;
import java.util.Collection;
import java.util.Set;
import javax.ejb.CreateException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.FinderException;
public abstract class GangsterBean implements EntityBean
private static int idgen = 1;
private EntityContext context;
public Integer ejbCreate( String Name, String Nickname, Integer Badness) throws
CreateException
setID(new Integer(idgen++));
setName(Name);
setNickname(Nickname);
setBadness(Badness);
return null;
public void ejbPostCreate( String Name, String Nickname, Integer Badness)
throws CreateException
// CMP Field Accessors -----------------------------------------------------
public abstract Integer getID();
public abstract void setID(Integer ID);
public abstract String getName();
public abstract void setName(String Name);
public abstract String getNickname();
public abstract void setNickname(String Nickname);
public abstract Integer getBadness();
public abstract void setBadness(Integer Badness);
// CMR Field Accessors -----------------------------------------------------
public abstract Collection getJobs();
public abstract void setJobs(Collection Jobs);
public abstract Organization getOrganization();
public abstract void setOrganization(Organization Organization);
// EJB callbacks -----------------------------------------------------------
public void setEntityContext(EntityContext ctx)
context = ctx;
public void unsetEntityContext()
context = null;
public void ejbRemove() {}
public void ejbLoad() {}
public void ejbStore() {}
public void ejbPassivate() {}
public void ejbActivate() {}
What are the changes to be made in this file so that the files work in weblogic
too?
Also, my ejb-jar.xml file has been changed to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>Business Component CMP 2.0</display-name>
<enterprise-beans>
<entity>
<display-name>Gangster Entity Bean</display-name>
<ejb-name>GangsterEJB</ejb-name>
<local-home>com.sempire.builder.business_component.GangsterHome</local-home>
<local>com.sempire.builder.business_component.Gangster</local>
<ejb-class>com.sempire.builder.business_component.GangsterBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>GangsterEJB</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>nickname</field-name></cmp-field>
<cmp-field><field-name>badness</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<resource-ref>
<res-ref-name>jdbc/GangsterDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM GangsterEJB AS a]]>
</ejb-ql>
</query>
</entity>
<entity>
<display-name>Organization Entity Bean</display-name>
<ejb-name>OrganizationEJB</ejb-name>
<local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
<local>com.sempire.builder.business_component.Organization</local>
<ejb-class>com.sempire.builder.business_component.OrganizationBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>OrganizationEJB</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>description</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<resource-ref>
<res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM OrganizationEJB AS a]]>
</ejb-ql>
</query>
</entity>
<entity>
<display-name>Job Entity Bean</display-name>
<ejb-name>JobEJB</ejb-name>
<local-home>com.sempire.builder.business_component.JobHome</local-home>
<local>com.sempire.builder.business_component.Job</local>
<ejb-class>com.sempire.builder.business_component.JobBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>JobEJB</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>score</field-name></cmp-field>
<cmp-field><field-name>setupCost</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<resource-ref>
<res-ref-name>jdbc/JobDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM JobEJB AS a]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>organization-memberGangsters</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>organization---memberGangsters</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>OrganizationEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>memberGangsters</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>memberGangsters---organization</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>GangsterEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>organization</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
<ejb-relation>
<ejb-relation-name>gangsters-jobs</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>gangsters---jobs</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>GangsterEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>jobs</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>jobs---gangsters</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>JobEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>gangsters</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
<ejb-relation>
<ejb-relation-name>organization-theBoss</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>organization---theBoss</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>OrganizationEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>theBoss</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>theBoss---organization</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>GangsterEJB</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
</relationships>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>GangsterEJB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>OrganizationEJB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>JobEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
My weblogic-ejb-jar.xml file has been changed to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>GangsterEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/GangsterDataSource</res-ref-name>
<jndi-name>jdbc.GangsterDB</jndi-name>
</resource-description>
</reference-descriptor>
<local-jndi-name>Gangster</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OrganizationEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
<jndi-name>jdbc.Organization</jndi-name>
</resource-description>
</reference-descriptor>
<local-jndi-name>Organization</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>JobEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/JobDataSource</res-ref-name>
<jndi-name>jdbcJob</jndi-name>
</resource-description>
</reference-descriptor>
<local-jndi-name>Job</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Please do let me know all the changes I need to make so that my application can
deploy in weblogic.
Thank You
RonakDave,
I am using weblogic 6.1 now and I am still getting the same problem.
Error:
The DataSource name with the JNDI name: Organization can not be located. Please
ensure that the DataSource has been deployed successfully and that the JNDI name
in your EJB Deployment descriptor is correct.
The Entity Bean files that I have used for JBoss are:
* GangsterBean.java
* Copyright (c) 2002 Sempire, Inc.
* All rights reserved.
* This software is the confidential and proprietary information
* of Sempire, Inc
* @ version 1.0
package com.sempire.builder.business_component;
import java.util.Collection;
import java.util.Set;
import javax.ejb.CreateException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.FinderException;
public abstract class GangsterBean implements EntityBean
private static int idgen = 1;
private EntityContext context;
public Integer ejbCreate( String Name, String Nickname, Integer Badness) throws
CreateException
setID(new Integer(idgen++));
setName(Name);
setNickname(Nickname);
setBadness(Badness);
return null;
public void ejbPostCreate( String Name, String Nickname, Integer Badness)
throws CreateException
// CMP Field Accessors -----------------------------------------------------
public abstract Integer getID();
public abstract void setID(Integer ID);
public abstract String getName();
public abstract void setName(String Name);
public abstract String getNickname();
public abstract void setNickname(String Nickname);
public abstract Integer getBadness();
public abstract void setBadness(Integer Badness);
// CMR Field Accessors -----------------------------------------------------
public abstract Collection getJobs();
public abstract void setJobs(Collection Jobs);
public abstract Organization getOrganization();
public abstract void setOrganization(Organization Organization);
// EJB callbacks -----------------------------------------------------------
public void setEntityContext(EntityContext ctx)
context = ctx;
public void unsetEntityContext()
context = null;
public void ejbRemove() {}
public void ejbLoad() {}
public void ejbStore() {}
public void ejbPassivate() {}
public void ejbActivate() {}
What are the changes to be made in this file so that the files work in weblogic
too?
Also, my ejb-jar.xml file has been changed to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>Business Component CMP 2.0</display-name>
<enterprise-beans>
<entity>
<display-name>Gangster Entity Bean</display-name>
<ejb-name>GangsterEJB</ejb-name>
<local-home>com.sempire.builder.business_component.GangsterHome</local-home>
<local>com.sempire.builder.business_component.Gangster</local>
<ejb-class>com.sempire.builder.business_component.GangsterBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>GangsterEJB</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>nickname</field-name></cmp-field>
<cmp-field><field-name>badness</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<resource-ref>
<res-ref-name>jdbc/GangsterDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM GangsterEJB AS a]]>
</ejb-ql>
</query>
</entity>
<entity>
<display-name>Organization Entity Bean</display-name>
<ejb-name>OrganizationEJB</ejb-name>
<local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
<local>com.sempire.builder.business_component.Organization</local>
<ejb-class>com.sempire.builder.business_component.OrganizationBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>OrganizationEJB</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>description</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<resource-ref>
<res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM OrganizationEJB AS a]]>
</ejb-ql>
</query>
</entity>
<entity>
<display-name>Job Entity Bean</display-name>
<ejb-name>JobEJB</ejb-name>
<local-home>com.sempire.builder.business_component.JobHome</local-home>
<local>com.sempire.builder.business_component.Job</local>
<ejb-class>com.sempire.builder.business_component.JobBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>JobEJB</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>score</field-name></cmp-field>
<cmp-field><field-name>setupCost</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<resource-ref>
<res-ref-name>jdbc/JobDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM JobEJB AS a]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>organization-memberGangsters</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>organization---memberGangsters</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>OrganizationEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>memberGangsters</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>memberGangsters---organization</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>GangsterEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>organization</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
<ejb-relation>
<ejb-relation-name>gangsters-jobs</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>gangsters---jobs</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>GangsterEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>jobs</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>jobs---gangsters</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source>
<ejb-name>JobEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>gangsters</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
<ejb-relation>
<ejb-relation-name>organization-theBoss</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>organization---theBoss</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>OrganizationEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>theBoss</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>theBoss---organization</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>GangsterEJB</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
</relationships>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>GangsterEJB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>OrganizationEJB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>JobEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
My weblogic-ejb-jar.xml file has been changed to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>GangsterEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/GangsterDataSource</res-ref-name>
<jndi-name>jdbc.GangsterDB</jndi-name>
</resource-description>
</reference-descriptor>
<local-jndi-name>Gangster</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>OrganizationEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
<jndi-name>jdbc.Organization</jndi-name>
</resource-description>
</reference-descriptor>
<local-jndi-name>Organization</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>JobEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/JobDataSource</res-ref-name>
<jndi-name>jdbcJob</jndi-name>
</resource-description>
</reference-descriptor>
<local-jndi-name>Job</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Please do let me know all the changes I need to make so that my application can
deploy in weblogic.
Thank You
Ronak -
Help on export sybase iq tables with data and import in another database ?
Help on export Sybase iq 16 tables with data and import into another database ?
Hi Nilesh,
If you have table/index create commands (DDLs), you can create them in Developper and import data using one of methods below
Extract/ Load table
Insert location method : require IQ servers to be entered in interfaces file
Backup/Restore : copy entire database content
If you have not the DDLs, you can generate them using IQ cockpit or SCC.
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01773.1604/doc/html/san1288042631955.html
http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01840.1604/doc/html/san1281564927196.html
Regards,
Tayeb. -
Even with parameters, reports reading entire data source and then filtering
I'm working with an Oracle database (read-only access) and Crystal Reports 2008. I have created a report and added three parameters for which I have already done all necessary steps in the select expert. But when I do a Print preview of the report, and after selecting the parameter values, the report tries to read all of the data source records before the parameters are utilized by the report. In other words, if the data source has 100,000 records, the report will return (in the background) all 100,000 records and then filter among these returned records to present/display the data according to the provided parameter values. Instead, I would like it to use the parameters first so that only those records that meet the parameter value criteria are read into the report from the "get go"...Since I only have read only access to the Oracle database, I cannot write a stored procedure either...(company policy)...Can parameters be used to read in only pertaining records instead of filtering already read in records in a given report? Is there some syntax that can be entered into a Command type connection to do this?
I've tried that but I'm now getting an error on line 6...
Crystal Reports Error:
Failed to retrieve data from the database.
Details: HYooo:[Oracle][ODBC][Ora]ORA-00911: invalid character
ORA-06512: at line 6
[Database Vendor Code: 911 ]
for the following syntax: (Not sure why...any help would be extremely appreciated!)
DECLARE
varCCN CHAR(7);
varMASLOC char(3);
varWO char(10);
BEGIN
EXECUTE IMMEDIATE '
SELECT Trim(DB.D_WO.SERIAL) AS Serial,
Trim(DB.WO.WO_NUM) AS WO,
DB.WO.WO_LINE AS Line,
DB.WO_HDR.WO_DESCRIPTION,
DB.WO.ITEM,
DB.WO.REVISION,
CASE WHEN DB.WO.ITEM=' || '''\''' || 'THEN DB.WONSD.DESC_ ELSE DB.ITEM.DESCRIPTION END AS Item_Description,
DB.WO.ORD_QTY,
DB.WO.START_DATE,
DB.WO.DUE_DATE,
DB.WO_RTG.OPERATION,
DB.D_OPERNM.D_OPER_NUM_SEQ,
DB.WC.DESCRIPTION AS WC_Description,
DB.WO.CCN,
DB.WO.MAS_LOC,
DB.D_WKINST.D_WORK_INSTRUCTION,
DB.D_WORTG.NA_OPER,
DB.D_WORTG.D_OPER_GROUP,
DB.GLOVCLB.CONTENT,
DB.D_WOHDR.D_J_MACHINE,
DB.D_WOHDR.D_H_MACHINE,
DB.D_WOHDR.D_STD_ASSEMBLY,
DB.D_WOHDR.D_T_C_A_ASSEMBLY,
DB.D_WOHDR.D_T_C_B_ASSEMBLY,
DB.D_WOHDR.D_B_S_ASSEMBLY
FROM DB.WO_HDR
LEFT JOIN DB.WO
ON DB.WO_HDR.CCN = DB.WO.CCN
AND DB.WO_HDR.MAS_LOC = DB.WO.MAS_LOC
AND DB.WO_HDR.WO_NUM = DB.WO.WO_NUM
LEFT JOIN DB.D_WO
ON DB.WO.WO_LINE = DB.D_WO.WO_LINE
AND DB.WO.WO_NUM = DB.D_WO.WO_NUM
AND DB.WO.MAS_LOC = DB.D_WO.MAS_LOC
AND DB.WO.CCN = DB.D_WO.CCN
LEFT JOIN DB.WONSD
ON DB.WO.WO_LINE = DB.WONSD.WO_LINE
AND DB.WO.WO_NUM = DB.WONSD.WO_NUM
AND DB.WO.MAS_LOC = DB.WONSD.MAS_LOC
AND DB.WO.CCN = DB.WONSD.CCN
LEFT JOIN DB.ITEM
ON DB.WO.REVISION = DB.ITEM.REVISION
AND DB.WO.ITEM = DB.ITEM.ITEM
LEFT JOIN DB.WO_RTG
ON DB.WO.WO_LINE = DB.WO_RTG.WO_LINE
AND DB.WO.WO_NUM = DB.WO_RTG.WO_NUM
AND DB.WO.MAS_LOC = DB.WO_RTG.MAS_LOC
AND DB.WO.CCN = DB.WO_RTG.CCN
LEFT JOIN DB.D_WORTG
ON DB.WO_RTG.OPERATION = DB.D_WORTG.OPERATION
AND DB.WO_RTG.WO_LINE = DB.D_WORTG.WO_LINE
AND DB.WO_RTG.WO_NUM = DB.D_WORTG.WO_NUM
AND DB.WO_RTG.MAS_LOC = DB.D_WORTG.MAS_LOC
AND DB.WO_RTG.CCN = DB.D_WORTG.CCN
LEFT JOIN DB.WC
ON DB.WO_RTG.WC = DB.WC.WC
AND DB.WO_RTG.CCN = DB.WC.CCN
LEFT JOIN DB.D_OPERNM
ON DB.WO_RTG.OPERATION = DB.D_OPERNM.OPERATION
AND DB.WO_RTG.WO_LINE = DB.D_OPERNM.WO_LINE
AND DB.WO_RTG.WO_NUM = DB.D_OPERNM.WO_NUM
AND DB.WO_RTG.MAS_LOC = DB.D_OPERNM.MAS_LOC
AND DB.WO_RTG.CCN = DB.D_OPERNM.CCN
LEFT JOIN DB.D_WKINST
ON DB.D_WORTG.D_WORK_INSTRUCTION = DB.D_WKINST.D_WORK_INSTRUCTION
LEFT JOIN DB.WOLN_TXT
ON DB.WO.WO_LINE = DB.WOLN_TXT.WO_LINE
AND DB.WO.WO_NUM = DB.WOLN_TXT.WO_NUM
AND DB.WO.MAS_LOC = DB.WOLN_TXT.MAS_LOC
AND DB.WO.CCN = DB.WOLN_TXT.CCN
LEFT JOIN DB.GLOVCLB
ON DB.WOLN_TXT.OBJECT_ID = DB.GLOVCLB.OBJECT_ID
LEFT JOIN DB.D_WOHDR
ON DB.WO.CCN = DB.D_WOHDR.CCN
AND DB.WO.MAS_LOC = DB.D_WOHDR.MAS_LOC
AND DB.WO.WO_NUM = DB.D_WOHDR.WO_NUM
WHERE DB.WO_HDR.CCN=' || varCCN || ';
AND DB.WO_HDR.MAS_LOC=' || varMASLOC || ';
AND TRIM(DB.WO_HDR.WO_NUM)=' || varWO || ';';
END;
Edited by: lirizarry on Nov 6, 2009 4:37 PM -
Rename the existing table with date suffix
Hi,
I'm trying to rename a table with date suffix at the end of the table name, and drop the date suffix table which is greater than 7 days. for that I have the below sql, I have not included the drop syntax in this.
I'm not able to rename with the date suffix in the below sql, syntax error at '+'
DECLARE
@TPartitionDate date
IF EXISTS (SELECT * FROM sysobjects WHERE Name = 'IIS_4')
BEGIN
SELECT
@TPartitionDate = MAX(PartitionDate)
FROM PartitionLog (NOLOCK)
EXEC sp_rename 'IIS_4','IIS_4_'+ @TPartitionDate
ENDcreate table Test(sno int)
DECLARE
@TPartitionDate date = getdate()
declare @a varchar(200)
IF EXISTS (SELECT * FROM sysobjects WHERE Name = 'Test')
BEGIN
select @a='TEST_'+ cast(@TPartitionDate as varchar(10))
EXEC sp_rename 'TEST',@a
END
drop table [test_2015-04-23]
Hope it Helps!! -
Trying to populate a table with data from WebRowset
Hi,
I want to be able to populate my tables with data from WebRowsets that have been saved to files. Everything goes good until I get to acceptChanges(). At which point I get a NullPointerException.
Here's the code...
WebRowSet wrs = new WebRowSetImpl();
FileReader reader = new FileReader(inputFile);
wrs.readXml(reader);
wrs.beforeFirst();
CachedRowSet crs = new CachedRowSetImpl();
crs.setSyncProvider("com.sun.rowset.providers.RIXMLProvider");
crs.populate(wrs);
crs.beforeFirst();
crs.acceptChanges(con);
Results in...
java.lang.NullPointerException
at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:867)
at com.sun.rowset.CachedRowSetImpl.acceptChanges(CachedRowSetImpl.java:919)
I'm using Java 1.5_02. I looked at the source code for CachedRowSetImpl, and the only thing I could think of is that maybe "provider.getRowSetWriter()" in the following snippet is returning null....
public void setSyncProvider(String s)
throws SQLException
provider = SyncFactory.getInstance(s);
rowSetReader = provider.getRowSetReader();
rowSetWriter = (TransactionalWriter)provider.getRowSetWriter();
Any ideas?? Thanks!I have the same problem after setting com.sun.rowset.providers.RIXMLProvider.
Looks like a bug to me.
By the way, why are you creating a new CachedRowSet and populate it with a WebRowset (which extends CachedRowSet)? -
Object Data Source and oracle connections.-Help please!!
I have a detailsview with objectdatasource as a Data source.
Every time, i Edit and save a row in the detailsview, upto 10 connections are created to Oracle. And because of this maximum no of connections is reached quickly.
I am closing/disposing the connection object in the update method.
What could be causing this behaviour?
Need help immediatley. Appreciate your time.
-Thanks.That helpes quite a bit. I still can't get the app to retrieve data, but I am getting a more useful message in the log:
[Error in allocating a connection. Cause: Connection could not be allocated because: ORA-01017: invalid username/password; logon denied]
As you suggested, I removed the <default-resource-principal> stuff from sun-web.xml and modified it to match your example. Additionally, I changed the <res-ref-name> in web.xml from "jdbc/jdbc-simple" to "jdbc/oracle-dev".
The Connection Pool "Ping" from the Admin Console is successful with the user and password I have set in the parameters. (it fails if I change them, so I am pretty sure that is set up correctly) Is there another place I should check for user/pass information? Do I need to do anything to the samples/database.properties file?
By the way, this is the 4th quarter 2004 release of app server. Would it be beneficial to move to the Q1 2005 beta?
Many thanks for your help so far... -
Issue with data source after deploying
We are experiencing an issue with our data source after deployment of a cube. On the datasource properties in Visual Studio 2012, we have the max connections set to 0 before the deployment. Once the cube is deployed, I can navigate to the <name>.0.ds.xml
file and open it and see that the <MaxActiveConnections>0</MaxActiveConnections> is indeed set to 0. At some point over the next couple days, a process of the cube or some other action causes that value to get updated to some number too large to
be converted to an int, and makes the datasource invalid. At that point we cannot view the datasource properties in SSMS, we cannot open the cube project from Visual Studio, and we’ve even had failures when trying to process the cube. Is there a config
somewhere that would cause this value to get overwritten, or some other behind the scenes process that we can look at?
Our server information is:
Microsoft SQL Server 2012 (SP1) - 11.0.3153.0 (X64)
Jul 22 2014 15:26:36
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
Chad Dotzenrod SWC | TECHNOLOGY PARTNERS 1420 Kensington Road, Suite 110 Oak Brook, Illinois 60523-2144 http://www.swc.comTypically you would import the metadata from the source location and either use that location as the data source (and so not need to redeploy), or deploy it to a separate target location.
The replace action is destructive as you've found, and effectively performs a drop table followed by create table. Hence any data in the table is lost.
If you just want the Control Center Manager to correctly display that the table is deployed, try setting the action to "Upgrade". This will try to upgrade the deployed object to match the definition in OWB, but as the two are identical this will result in no changes. However, it will update the deployment records to indicate that the object is deployed.
Nigel. -
Populate SQL table with data from Oracle DB in ODI
Hi,
I am trying to populate a source SQL table with fields from an Oracle db in ODI. I am trying to perform this using a procedure and I am am getting the following error:
ODI-1226: Step PROC_1_Contract_Sls_Person_Lookup fails after 1 attempt(s).
ODI-1232: Procedure PROC_1_Contract_Sls_Person_Lookup execution fails.
ODI-1228: Task PROC_1_Contract_Sls_Person_Lookup (Procedure) fails on the target MICROSOFT_SQL_SERVER connection Phys_HypCMSDatamart.
Caused By: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'C2C_APP.CON_V'.
My question is what is the best method to populate SQL db with data from an Oracle db? Using a procedure? A specific LKM?
I found threads referring to using an LKM to populate Oracle tables with data from a SQL table....but nothing for the opposite.
Any information would help.
thanks,
EricHi Eric,
If using an Interface, I would recommend the LKM SQL to MSSQL (BULK) knowledge module. This will unload the data from Oracle into a file, then bulk load the staging db on the target using a BULK INSERT.
Regards,
Michael Rainey -
How i can create table with data
How i can create table with data from dev to production?
How i can create table with data
[url=http://en.wikipedia.org/wiki/Black_Beast_of_Aa
aaarrrrrrggghhh]from dev to production?
[url=http://img2.travelblog.org/Photos/3800/14977/t
/64816-Col-Kurtz-0.jpg]The horror, the
horror.lol, you gonna scare somebody here.
Are we helping devil? -
Failed to acquire DAS with data sources that match the specified OCE
Please help, Thank you all.
We are migrating Oracle databases from Windows to Linux servers. Currently, I have no problem to use my desktop Hyperion Intelligence Designer 8.5 with new oce file to connect to Linux. However, I published the same oce file to Hyperion Performance Suite 8.5 then I got “Sever Error [2018]: Failed to acquire Data Access Service with data sources that match the specified OCE”.
I launched Service Configurator, in the “Local Service Configurator - DAS1_host”, the “Database JDBC URL is point to Linux server. Also, I added ODBC connection to Oracle database on Linux in the “Properties of Data Access Service: DAS1_host’s Data Source”. Database of JDBC URL in BI1_host, AZ1_host, PUB1_host, SM1_host, LS1_host, UT1_host, BPS1_host, AN1_host are also point to Linux server.
The “Remote Service Configurator” has ES1_host’s” Storage” with JDBC URL point to Linux server. The same for RM1_host’s and NS1_host’s “Storage” with JDBC URL point to Linux server.
Is there some missing configuration on the server? Thank you in advance.You should login to my oracle support to look into this ID.
This is the solution mentioned
Solution
1) In the .profile file, you will find the definition of the LD_LIBRARY_PATH variable. However, the path to 64 bit libraries is probably appended before the path to the 32 bit libraries(%ORACLE_HOME%/lib32). Therefore, please reverse the order in the definition so that the 32 bit libraries get loaded before the 64 bit libraries.
Then, restart all services.
2) Oracle 9.2 was the first Oracle release which defaults to using the 64 bit libraries in the 'lib' directory and the 32-bit libraries that we need are in the 'lib32' directory.
Therefore, please have the%ORACLE_HOME%/lib32 placed in front of the LD_LIBRARY_PATH environment variable definition.Then, restart all services.
3) Please check that users have read and write access to the files located in the %ORACLE_HOME%/lib32 folder.
4) Check the permissions of the libclntsh.a file(located in the %ORACLE_HOME%/lib32 folder) are set to rwxr-xr-x
5) Recreate the OCE connection in DAS and restart DAS in CMC.
6) Restart all the BIPlus Services and process the query. -
Moving tables with data from one client to another
Hello friends
I have 2 clients 001 and 002.
I have created a table with lots of data on client 001.
I have to get the same table on 002 also with the same data.
Is there an easier way of transfering this data from one table to another?
I would appreciate any feedback on this.
I know that mappings etc., can be done using the export and import of tpz file. So I want to know if there is any similar thing to transfer a table with data.
THanks
RamIf you do not have the client field in your table, then the table is cross-client.
IF you have the client field filled with 001, then you need to create the same entries with client 002, I dont think that you can do this with a transport.
You have to write an ABAP that reads and writes the data.
Maybe you are looking for
-
Can't mount iPod error message
Hi, I am trying to fix a feezing problem on my iPod (on startup the display shows a folder with an exclamation mark) and was trying to do a factory restore on it when I ran into the following error messages. Installing the latest version of Updater,
-
Reading a binary file (byte swapping?): HELP!
Hi, Below are 2 simple programs, one in C and the other in Java that read a binary file. The first 3 integer numbers read by the C program are: 910, 1024437292, 100002 The first 3 integer numbers read by the Java program are: -1912406016, 749473597,
-
How to display cusomized custom tooltip(jwindow) in jtable cell position
Hi, i am trying to display custom tooltip for jtable cell. i created custom tooltip(jwindow) and on mouseover of jtable cell i am trying to display the custom tooltip. But it is not display the position of jtable cell. How to display the exact positi
-
hi all i wonder if anyone knows a way to run a shell command using pl/sql other than java stored procedure as it seems not to be working in mycase thanx in advance
-
Hi I have just started using Crystal Reports recently and a whiloe ago purchased Crystal Reports 10 Developer edition. I have recently just finished creating my first report with the product. Now that I have finished it I want to allow other users to