HR: Data source Append Feild
IS there some way to enchance HR data source :0HR_PT_2 other than wiriting a funtion module....I need to add append field
SUBTY (Subtype) from Table: PA2001 (HR Time Record: Info type 2001 (Absences))
thanks
Aman
Hi Aman,
Yes you can use following steps
1. You can create new append strcuture
2. You can add new field in that starting with ZZ say
3. you need toc reate above field same as that table field length and property
4. You can provide reference in the strcuture for the same table field
5. Post activation you can write logic in CMOD to populate that field with data from the table mentioned in your query.
6. You can replicarte datasource and create required combination and mapping
7. Since you are enhancing standard DS you need to have SAP key for development and modifications.You can get that through basis help.
Thanks and regards
Similar Messages
-
Append extract structure of CAPA data source
Hi,
I have created a COPA data source and need to append the extract structure with field 'ZZAUDAT'. Can anyone please suggest how to do this?
Thanks,
Kim.U will also need to write a user exit in CMOD to populate the values for that enhanced field.
See below thread..
Re: enhancements
cheers,
Vishvesh -
Adding new field to data source -can not see them
Experts,
I have added 4 fields to the data source 0FI_AA_11 .
I can able to see these fields in the append structure or in RSA2,but i can not able to see in RSA6.I reactivated append structure ,still i can not see these fields in RSA6.
Please advice me how can i see them in RSA6.Hi Manoj,
Have a look, similar post:
Re: not able to see new fields in datasource
Hope it Helps
Srini -
Fields Missing in the data source
Hello Friends ,
I have to Append structures in my data source , and there are few fields under each append , the fields existing in Dev are missing in QA under one of Append strcuture's in QA. I see the fields when I double click the extract str but dont get to see them in the data source in QA, has anyone had this earlier ?
Need yHi,
Go to transaction RSA6 -> datasource. You will see number of fields ( standard and appended). Check missing field there and checkbox in HIDE column against it. If box is checked it wont be shown in the datasource. It will hide the field in the datasource.
Hope this helps.
Regards,
Viren -
Regarding: Loading data from R/3 To BI for a Generic Data source
Hi Every,
Need Help Urgent
I had created a Generic data source with function Module as the data source, in Rsa3 it is working fine.
1-> I had replicated the data source to Bi then i had created a info package and then I executed the same. when it is getting the data and it is show in the request monitor (Number of records ) but the status is not changing from Yellow to Green.
Status in Step by step analysis is every step is green Except "Data selection successfully finished ?" (RED)
2-> Then I had seen the Back ground job in Source system which is executing still. I waited for it for a long time but nearly 30 min.
(I had done Steps one and 2 number of time by activating replicating the data source and so on, but still their is no change in it)
3-> Then I had canceled that back ground job with the help of BASIS (as i feel that it is something going wrong).
4-> I feel that their is some thing wrong in the Code of Extractor.
Please Help...............
""Local Interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZBI_MATGRIR OPTIONAL
*Need to get the data only for two Gl account which are fro material purchase while MIGO
*G/L Account Numbers: 0010502001 0010502002
data: E_T_DATA1 type table of ZBI_MATGRIR.
RANGES: R_BUKRS FOR BSIS-BUKRS,
R_BUDAT FOR BSIS-BUDAT,
R_GJAHR FOR BSIS-GJAHR,
R_HKONT FOR BSIS-HKONT.
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
S_COUNTER_DATAPAKID LIKE SY-TABIX,
S_CURSOR TYPE CURSOR.
*Declare
TYPES: BEGIN OF TY_FAGL,
RBURS TYPE FAGLFLEXA-RBUKRS,
RYEAR TYPE FAGLFLEXA-RYEAR,
DOCNR TYPE FAGLFLEXA-DOCNR,
BUZEI TYPE FAGLFLEXA-BUZEI,
DOCLN TYPE FAGLFLEXA-DOCLN,
PRCTR TYPE FAGLFLEXA-PRCTR,
SEGMENT TYPE FAGLFLEXA-SEGMENT,
END OF TY_FAGL.
DATA: GT_FAGL TYPE TABLE OF TY_FAGL,
GS_FAGL TYPE TY_FAGL.
IF I_INITFLAG = SBIWA_C_FLAG_ON.
CASE I_DSOURCE.
WHEN 'ZFI_GL_M4'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE.
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'BUKRS'.
MOVE-CORRESPONDING L_S_SELECT TO R_BUKRS.
APPEND R_BUKRS.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'GJAHR'.
MOVE-CORRESPONDING L_S_SELECT TO R_GJAHR.
APPEND R_GJAHR.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'BUDAT'.
MOVE-CORRESPONDING L_S_SELECT TO R_BUDAT.
APPEND R_BUDAT.
ENDLOOP.
*GRIR Inventory (RM/Stores/Spares/FG) 10502001
*GRIR Services & Others Payable 10502002
R_HKONT-SIGN = 'I'. "i_t_select-sign.
R_HKONT-OPTION = 'BT'." i_t_select-option.
R_HKONT-LOW = '0010502001'.
R_HKONT-HIGH = '0010502002'. "i_t_select-high.
APPEND R_HKONT.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT BUKRS
AUGBL
ZUONR
BELNR
GJAHR
BUZEI
BUDAT
HKONT
BLART
MONAT
BSCHL
SHKZG
DMBTR
WAERS
FROM BSIS
INTO TABLE E_T_DATA
WHERE BUKRS IN R_BUKRS
AND GJAHR IN R_GJAHR
AND BUDAT IN R_BUDAT
AND HKONT IN R_HKONT.
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA1
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
DELETE E_T_DATA WHERE BLART NE 'WE'.
SELECT BUKRS
AUGBL
ZUONR
BELNR
GJAHR
BUZEI
BUDAT
HKONT
BLART
MONAT
BSCHL
SHKZG
DMBTR
WAERS
FROM BSAS
into table E_T_DATA
WHERE BUKRS IN R_BUKRS
AND GJAHR IN R_GJAHR
AND BUDAT IN R_BUDAT
AND HKONT IN R_HKONT.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
append LINES OF e_t_data1 TO E_T_DATA.
DELETE E_T_DATA WHERE BLART NE 'WE'.
ENDIF. "First data package ?
DATA: F_YEAR TYPE BKPF-GJAHR.
DATA: F_PERI TYPE BAPI0002_4-FISCAL_PERIOD.
IF E_T_DATA[] IS NOT INITIAL.
SELECT RBUKRS
RYEAR
DOCNR
BUZEI
DOCLN
PRCTR
SEGMENT
FROM FAGLFLEXA
INTO TABLE GT_FAGL
FOR ALL ENTRIES IN E_T_DATA
WHERE RYEAR = E_T_DATA-GJAHR
AND DOCNR = E_T_DATA-BELNR
AND RLDNR = '0L'
AND RBUKRS = E_T_DATA-BUKRS
AND BUZEI = E_T_DATA-BUZEI.
WHERE RYEAR = E_T_DATA-GJAHR
AND DOCNR = E_T_DATA-BELNR
AND RBUKRS = E_T_DATA-BUKRS.
AND DOCLN = E_T_DATA-BUZEI.
ENDIF.
LOOP AT E_T_DATA.
IF E_T_DATA-SHKZG = 'H'.
E_T_DATA-DMBTR = E_T_DATA-DMBTR * -1.
ENDIF.
CLEAR: F_YEAR.
CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
EXPORTING
COMPANYCODEID = E_T_DATA-BUKRS
POSTING_DATE = E_T_DATA-BUDAT
IMPORTING
FISCAL_YEAR = F_YEAR
FISCAL_PERIOD = F_PERI.
DATA: V_DOC(6) TYPE C .
CLEAR: V_DOC.
V_DOC = E_T_DATA-BUZEI.
IF V_DOC IS NOT INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = V_DOC
IMPORTING
OUTPUT = V_DOC.
ENDIF.
aS PROFIT center is not updated in all the lines in Bsis
READ TABLE GT_FAGL INTO GS_FAGL WITH KEY RYEAR = E_T_DATA-GJAHR
DOCNR = E_T_DATA-BELNR
RBURS = E_T_DATA-BUKRS
BUZEI = E_T_DATA-BUZEI.
IF SY-SUBRC = 0.
E_T_DATA-PRCTR = GS_FAGL-PRCTR.
E_T_DATA-SEGMENT = GS_FAGL-SEGMENT.
ENDIF.
*As we are using the amount DMBTR in which the amount
*will be in company code currency that is Local currency
*group currency always in the main company code currency.
CONCATENATE F_YEAR '0' F_PERI INTO E_T_DATA-FISCPER.
MODIFY E_T_DATA. " from gs_bsis transporting dmbtr fiscper.
CLEAR: E_T_DATA.
ENDLOOP.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF.Hi,
Please check the log of same jobs for last week and check is today its taking more time,also check with basis is their any backup initited at same time.
Moreover until the background job failed automatically its difficult to imagine what is the exact issue.
Thanks, -
Hi All,
we have installed standard cubes and ODS from Business content. Now we want to load standard ODS but we are unable to identify standard data source.
0CPR_C03 - Infocube.
We have already checked in BI Content and help.sap.com but it doesnot display any data source name.
Kindly give input to find data source.
Regards,
SathvikHi,
Now you got some clue, i.e. some datasource names supports the cube.So in that you need to analyze what feilds you want to and in which datasource you have all that feilds in that way you need to use the DS. For any other information you need to check in sap help sites, here I'm giving some tables in BW, so it will help you.
RSISOSMAP Mapping Between InfoSources and DataSources (=OLTP Sources)
RSOSFIELDMAP Mapping Between DataSource Fields and InfoObjects
RSTS Transfer Structure in SAP BW
ROOSGEN Generated Objects for a DataSource
ROOSOURCE Header Table for SAP BW DataSources (SAP Source System/BW System)
RODELTAM BW Delta Procedure (SAP Source System)
RSOLTPSOURCE Replication Table for DataSources in BW
Thanks
Reddy -
Modify the data source of a data view web part
I have a dataView web part deployed in a template in multiple site collection. This dataView hasn't any query set up, so it loads a lot of items and this is slowing down my system.
Now I want to programmatically put a query overriding the existent (empty) one and I'm doing like this:
System.Web.UI.WebControls.WebParts.WebPart y = (System.Web.UI.WebControls.WebParts.WebPart)item;
Microsoft.SharePoint.WebPartPages.DataFormWebPart z = (Microsoft.SharePoint.WebPartPages.DataFormWebPart)item;
StringBuilder dataSourceString = new StringBuilder("<%@ Register TagPrefix=\"sharepoint\" Namespace=\"Microsoft.SharePoint.WebControls\" Assembly=\"Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" %>");
dataSourceString.Append("<%@ Register TagPrefix=\"WebPartPages\" Namespace=\"Microsoft.SharePoint.WebPartPages\" Assembly=\"Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\" %>");
dataSourceString.Append("<sharepoint:SoapDataSource runat=\"server\" SelectUrl=\"http://intranet.contoso.com/sites/spc/_vti_bin/lists.asmx\" InsertUrl=\"\" UpdateUrl=\"\" DeleteUrl=\"\" SelectAction=\"http://schemas.microsoft.com/sharepoint/soap/GetListItems\" InsertAction=\"\" UpdateAction=\"\" DeleteAction=\"\" SelectPort=\"ListsSoap\" InsertPort=\"\" UpdatePort=\"\" DeletePort=\"\" SelectServiceName=\"Lists\" InsertServiceName=\"\" UpdateServiceName=\"\" DeleteServiceName=\"\" AuthType=\"Basic\" AuthUserName=\"contoso\\administrator\" AuthPassword=\"pass@word1\" WsdlPath=\"http://intranet.contoso.com/sites/spc/_vti_bin/lists.asmx?WSDL\" XPath=\"\" ID=\"SoapDataSource3\">");
dataSourceString.Append("<SelectCommand><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><GetListItems xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\"><listName>Jobs</listName>");
dataSourceString.Append("<Query><Where><Eq><FieldRef Name=\"Title\" /><Value Type=\"Text\">2012_080_A_0</Value></Eq></Where></Query>");
dataSourceString.Append("<rowLimit>9999</rowLimit></GetListItems></soap:Body></soap:Envelope></SelectCommand><InsertCommand></InsertCommand><UpdateCommand></UpdateCommand><DeleteCommand></DeleteCommand></sharepoint:SoapDataSource>");
z.DataSourcesString = dataSourceString.ToString();
manager.SaveChanges(z);
In my code, I can see the DataSourceString changing, but if I refresh the page it is still loading all the data: why?!Hi,
According to your description, my understanding is that you want to change the data view web part datasource programmatically.
We need to override the databind method like below:
public class ExtendedDataFormWebPart : DataFormWebPart
public override void DataBind()
this.DataSource = your own data source;
base.DataBind();
Here is a detailed code demo for your reference:
http://jamestsai.net/Blog/post/How-to-query-cross-site-lists-in-DataFormWebPart-Part-1-Build-your-own-data-source-for-DataFormWebPart.aspx
Best Regards
Jerry Guo
TechNet Community Support -
We are adding field GAMNG ( Target Quantity ) in the Data Source 2LIS_04_P_ARBPL ( Work Center View from PP/PP-PI )
The field GAMNG is available in the communication structure maintainace.
The problem is- We are not able to drag & drap field GAMNG from the Communication structure LBWE. Getting the error - End phase 002 ***********************************************************
Message no. D0322 ..
We deleted Setup table , Meins field already exist in comm str.
1. How we able to drag the field from the communication structure as getting the above error. We searched SDN & try to follow that method but not working.
2. We can add the field in SE11 - Structure -Manually, then we have to write ABAP code.
Kindly suggest correct answer.
Edited by: sk kamaruzzaman on Dec 20, 2011 2:08 PMHi,
There could be a number of reasons why you are getting the error:
1. Fields are not assigned to datatypes.
- Check structure in SE11 and assign to datatypes.
2. There are inactive appends in the extract structure.
- Double-click one of the includes. You will get a new screen with the INCLUDE structure. Click the button append-structure. Check if the append is inactive.
3. The appended structure is in a different development class from the one of the structure it is being appended to.
Please review and apply the following notes carefully :
766603 Activation problems with extract structures
623411 LBWE: Gener. terminates with D0 322 (end phase 002)
757923 LBWE: Generation terminates with D0 322 (end phase
600708 D0 322: End phase 002
It is not possible to enhance the datasource 2lis_04_MATNR with the field GAMNG (so its possible that its the same for 2LIS_04_P_ARBPL) because GAMNG has the reference field AMEIN, which has a STATE F (forbidden) in table TMCEXCFS .
Check to see if this is the same on your system.
Rgds,
Colum -
Hello Forum,
I have a question regarding usage of a MySQL-Data-Source in combination with JPA
on the SAP NetWeaver Application Server, Java EE 5 Edition.
I have setup a custom datasource like explained in paper:
"Working with Database Tables, DataSources and JMS Resources"
- registered the database driver via telnet (Using mysql-connector-java-5.0.3-bin.jar)
- created the data-sources.xml file underneath the META-INF dir of the EAR project
[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data-sources SYSTEM "data-sources.dtd" >
<data-sources>
<data-source>
<data-source-name>titan_cruises_ds</data-source-name>
<driver-name>mysql-connector-java-5.0.3-bin.jar</driver-name>
<init-connections>1</init-connections>
<max-connections>10</max-connections>
<max-time-to-wait-connection>60</max-time-to-wait-connection>
<expiration-control>
<connection-lifetime>600</connection-lifetime>
<run-cleanup-thread>60</run-cleanup-thread>
</expiration-control>
<sql-engine>native_sql</sql-engine>
<jdbc-1.x>
<driver-class-name>com.mysql.jdbc.Driver</driver-class-name>
<url>jdbc:mysql://ourHost.internal.com:3306/practise_titan_cruises</url>
<user-name>myUser</user-name>
<password>myPass</password>
</jdbc-1.x>
</data-source>
</data-sources>
[/code]
After that I manually created the persistence.xml underneath the META-INF dir of the EJB project.
[code]
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="titan_cruises_pu">
<jta-data-source>titan_cruises_ds</jta-data-source>
</persistence-unit>
</persistence>
[/code]
After that I created the Entity named "Cabin" and the corresponding table within the db.
Entity code:
[code]
package de.collogia.beans.pojo.ship;
import java.io.IOException;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
This persisted POJO class models the cabin data.
<p>
In this class persistence annotations are placed on the getter methods
of the attributes. This tells the persistence manager to access them
via the corresponding get- and set-Methods.</p>
(Unfortunately this does not work on NetWeaver and I had to place them
on field level aggain...)
@author Henning Malzahn ([email protected])
svn-revision: $Rev:: 670 $:
svn-lasted-edited-by: $Author:: henning $:
svn-last-changed: $Date:: 2007-02-21 21:49:51 +0100 (Wed, 21 Feb 2007) $:
@Entity
@Table(name = "cabin")
public class Cabin implements Serializable {
/** The generated serial version UID used for serialization. */
private static final long serialVersionUID = -8522497314498903378L;
/** The actual version number of this class used for serialization. */
private static int actualVersion = 1;
/** The cabin's id. */
@Id
@GeneratedValue
@Column(name = "id")
private long id;
/** The cabin's name */
@Column(name = "name")
private String name;
/** The cabin's deck level */
@Column(name = "deck_level")
private int deckLevel;
/** The cabin's ship id */
@Column(name = "ship_id")
private int shipId;
/** The cabin's bed count */
@Column(name="bed_count")
private int bedCount;
/---- Serialization/ Deserialization methods -/
Method that is responsible for deserialization of the object.
@param in The <code>ObjectInputStream</code> object to read
the data from.
@throws IOException That may occur when reading from the
<code>ObjectInputStream</code> object
@throws ClassNotFoundException That may occur when invoking the default
deserialization mechanism.
private void readObject(final java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException {
/* Invoke default deserialization mechanism. */
in.defaultReadObject();
/* Read the actual version number of the class. */
actualVersion = in.readInt();
} // End of readObject()
Method that is responsible for serialization of the object.
@param out The <code>ObjectOutputStream</code> object to write
the data to.
@throws IOException That may occur when writing to the
<code>ObjectOutputStream</code> object.
private void writeObject(final java.io.ObjectOutputStream out)
throws IOException {
/* Invoke default serialization mechanism. */
out.defaultWriteObject();
/* Write the actual version number of the class. */
out.writeInt(actualVersion);
} // End of writeObject()
/---- Defining constructors -/
Private default constructor.
private Cabin() {
} // End of default constructor
Full constructor.
@param name The cabin's name.
@param deckLevel The cabin's deck level.
@param shipId The cabin's ship id.
@param bedCount The cabin's bed count.
public Cabin(final String name,
final int deckLevel,
final int shipId,
final int bedCount) {
this.name = name;
this.deckLevel = deckLevel;
this.shipId = shipId;
this.bedCount = bedCount;
} // End of full constructor
/---- Overridden class methods -/
Returns a string representation of the cabin's data.
@see java.lang.Object#toString()
@Override
public String toString() {
StringBuffer strBuf = new StringBuffer();
strBuf.append(this.name);
strBuf.append("\n");
strBuf.append(this.deckLevel);
strBuf.append("\n");
strBuf.append(this.shipId);
strBuf.append("\n");
strBuf.append(this.bedCount);
return strBuf.toString();
} // End of toString()
/---- Defining instance methods -/
Get method for the member "<code>id</code>".
@return Returns the id.
public long getId() {
return this.id;
Set method for the member "<code>id</code>".
HTDODO hm: Check whether it is possible to have setId method
using private accesss level with NetWeaver JPA-Provider!
@param id The id to set.
private void setId(final long id) {
this.id = id;
Get method for the member "<code>name</code>".
@return Returns the name.
public String getName() {
return this.name;
Set method for the member "<code>name</code>".
@param name The name to set.
public void setName(final String name) {
this.name = name;
Get method for the member "<code>deckLevel</code>".
@return Returns the deckLevel.
public int getDeckLevel() {
return this.deckLevel;
Set method for the member "<code>deckLevel</code>".
@param deckLevel The deckLevel to set.
public void setDeckLevel(final int deckLevel) {
this.deckLevel = deckLevel;
Get method for the member "<code>shipId</code>".
@return Returns the shipId.
public int getShipId() {
return this.shipId;
Set method for the member "<code>shipId</code>".
@param shipId The shipId to set.
public void setShipId(final int shipId) {
this.shipId = shipId;
Get method for the member "<code>bedCount</code>".
@return Returns the bedCount.
public int getBedCount() {
return this.bedCount;
Set method for the member "<code>bedCount</code>".
@param bedCount The bedCount to set.
public void setBedCount(final int bedCount) {
this.bedCount = bedCount;
} // End of class Cabin
[/code]
After that I created the TravelAgentBean, a Stateless Session Bean, implementing
a remote interface that allows construction and persisting of new Cabin objects:
[code]
package de.collogia.beans.session.stateless;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import de.collogia.beans.pojo.ship.Cabin;
Class that implements the <code>TravelAgentRemote</code> interface
and defines the business methods of the TravelAgent service.
@author Henning Malzahn ([email protected])
svn-revision: $Rev:: 670 $:
svn-lasted-edited-by: $Author:: henning $:
svn-last-changed: $Date:: 2007-02-21 21:49:51 +0100 (Wed, 21 Feb 2007) $:
@Stateless
public class TravelAgentBean implements TravelAgentRemote {
/** The <code>Log</code> object for this class. */
// private static final Log LOGGER;
/** The <code>PersistenceManager</code> object. */
@PersistenceContext(unitName = "titan_cruises_pu")
EntityManager em;
/---- Static initializer -/
// static {
// LOGGER = LogFactory.getLog(TravelAgentBean.class);
// } // End of static initializer block
/---- Implementing remote interface methods -/
{@inheritDoc}
public void createCabin(final Cabin cabin) {
this.em.persist(cabin);
} // End of createCabin()
} // End of class TravelAgentBean
[/code]
After that I created a Controller class containing a main method that looks up the remote
interface of the TravelAgentBena like explained in document "Accessing Enterprise JavaBeans Using JNDI
in SAP NetWeaver Application Server, Java EE 5 Edition" written by Validimir Pavlov of SAP NetWeaver
development team.
Unfortunately I receive an Exception after invoking the createCabin(...) method.
On the console of the NWDS I receive:
[code]
javax.ejb.EJBException: Exception in getMethodReady() for stateless bean sap.com/test2Earannotation|test2Ejb.jarannotation|TravelAgentBean;
nested exception is: com.sap.engine.services.ejb3.util.pool.PoolException: javax.ejb.EJBException: Cannot perform injection over bean instance
Caused by: java.lang.RuntimeException: The persistence unit is inconsistent:
The entity >>de.collogia.beans.pojo.ship.Cabin<< is mapped to the table >>cabin<<, which does not exist.
[/code]
But if I look at the log file located in "C:\NWAS_JAVAEE5\JP1\JC00\j2ee\cluster\server0\log\defaultTrace.0.trc"
I see the real reason is:
[code]
[EXCEPTION]
#6#1064#42000#You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
to use near '"cabin"' at line 1#collnx02.collogia.de:3306:null:practise_titan_cruises#select * from "cabin"#com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"cabin"' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
at com.sap.sql.jdbc.basic.BasicPreparedStatement.executeQuery(BasicPreparedStatement.java:99)
at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:307)
at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:264)
at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:274)
[/code]
My goodness - what a long post - sorry for this - I hope I provided all information
necessary to deal with the issue.
Am I thinking in the right direction to blame attribute [code]<sql-engine>native_sql</sql-engine>[/code]
of file data-sources.xml for the beaviour? Are there any other argument options than native_sql?
Thanks in Advance!
Henning MalzahnHi Henning,
> Despite the fact it's working now I have to do some
> changes to my code currently
> developed using JBoss/ Hibernate combination.
> Hibernate allows you to have the
> default no-arg constructor with private visibility -
> any special reason for the fact that
> only protected is allowed on NetWeaver?
Here we strictly implemented the checks according to the requirements of the JPA specification. Technically, we could do with private constructors as well. But the JPA specifications requires the constructor to be protected to allow a JPA implementation to subclass entities if needed.
> The entities in the project are final classes
> so declaring a ctor protected doesn't really make
> sense...
For the same reason, your entities should not be final. Are we missing a check here ?
> Also the persistence.xml parameter
>
hibernate.hbm2ddl.auto
with the value of
> create-drop is very useful while
> developing the app - everytime you deploy the project
> you get a fresh database.
> Is there a comparable option for NetWeaver?
No, unfortunately, there is no comparable option in SAP JPA (yet). We understand that there is a need for forward mapping. We would have liked to delegate this task to the JPA design time (i.e. Dali). However, we had to discover that Dali does not perform this task properly and we can't recommend using it any more.
Consequently, there is no automatic schema generation in SAP JPA 1.0.
>
> Another thing is the extra TMP_SEQUENCE table which
> isn't necessary using JBoss and
> Hibernate - what's the reason for that?
With Hibernate Entity Manager, the id generation strategy in use with GenerationType.AUTO depends on the database dialect. This means that depending on the database dialect, IDENTITY columns, SEQUENCES or generator tables (TableHiLo) are required. As Hibernate has the before mentioned schema generation property this fact can be hidden to the user.
In SAP JPA, we are always using a table generator if GenerationType.AUTO is used. This allows for better portability across databases. It requires the table TMP_SEQUENCE. As we unfortunately do not have a schema generation capability, the user must create this table.
Best regards,
Adrian -
Re-replicate data source in QAS system doesn't work
I've transported extract. structures from DEV ECC to QAS ECC and done data source replications on BI side.
After that I done some changes (added several fields) on extraction structure CUSTOMER_ATTR on ECC side in dev env. and transported it to QAS ECC. Then I replicate CUSTOMER_ATTR on BI QAS nothing happens. It remains with the same field list.
My QAS system is read-only. How can I re-replicate this CUSTOMER_ATTR to get new added fields?Gediminas
Datasource, extract structure and append structure(if any) not transported properly.
Try to collect again and retransport and replicate.
Check at RSA3 in QA system, now fields are visible or not.
Srini -
Do not Extract from PSA but Access Data Source (for Small Amounts of Data)
Hi Experts,
In the DTP, the above option is available for Full Loads for certain extractors but not for others, particularly, certain HR extractors?
Is there a way to make it available for HR extractors? Is there a setting that needs to be updated in ECC or in BI?
Thank you for your help!Hi,
There is no special setting for this, Please see the detail description:
Data is not extracted from the PSA for the DataSource; it is requested from the data source directly at DTP runtime.
Use
You use this mode for small data sets and full uploads, for example, small sets of master data. With file source systems, note that the file has to be available on the application server.
Dependencies
You do not have to create an InfoPackage in order to extract data from the source.
Data in the data source is accessed in "direct access mode". This has certain consequences, especially if you are extracting data from SAPI systems:
Data is extracted synchronously. This places a particular demand on the main memory, especially in remote systems.
The SAPI extractors may respond differently than during asynchronous load since they receive information by direct access.
SAPI customer enhancements are not processed. Fields that have been added using the append technology of the DataSource remain empty. The exits RSAP0001, exit_saplrsap_001, exit_saplrsap_002, exit_saplrsap_004 do not run.
If errors occur during processing in BI, you have to extract the data again since the PSA is not available as a buffer. This means that deltas are not possible.
In the DTP, the filter only contains fields that the DataSource allows as selection fields. With an intermediary PSA, you can filter in the DTP by any field.
Regards,
Kams -
Problem with R/3 Data Source based on Function module in SAP BI
Hi,
We have a data source based on functional module. When we load data from R/3 to BI we face the following error.
" No end-confirmation arrived in the Warehouse from the source system."
We are getting data but due to no end confirmation from the source system, the load become timed-out and status becomes "RED". When we change the status to be "GREEN" and proceed tha load further, load is fine.
Please suggest us a suitable solution.
Thanks in Advance,
GeethaHi Geetha Devi Ramalingam.
I faced the same problem since yesterday. I just resolve the issue.
So here is my solution :
try this code :
FETCH NEXT CURSOR s_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE e_t_data
PACKAGE SIZE s_s_if-maxsize.
IF sy-subrc <> 0.
CLOSE CURSOR s_cursor.
RAISE no_more_data.
ENDIF.
if you add your
bold
IF sy-subrc <> 0.
CLOSE CURSOR s_cursor.
RAISE no_more_data.
ENDIF.
bold
than the sy-subrc may be equal and than your CLOSE CURSOR s_cursor. will have no effect
it work for me hope it will for u
Hard luck!
Salah
Edited by: idrissi salaheddine on Jan 19, 2012 12:24 PM -
Need functional consultant help in having data source for report
Hi Experts,
My Client needs to have report with following fields:
Sales order, date of sales order created , Purchase order number/Work Order number/Contract Number ,date of Purchase order number/Work Order number/Contract Number, curve out, product/material description, created by, created on, invoice/bill number,invoice/bill date,invoice value,currency,exchange rate to USD for the date of invoicing,bill type,bill description,date of posting invoice,reference document number,company code,customer name,customer account number.
As we dont had functinal consulatnt it is very hectic for me to get table name and feilds
sales order u2013,
date of sales order created -,
Purchase order number/Work Order number/Contract Number-? ,
date of Purchase order number/Work Order number/Contract Number-?,
curve out-?
product description-?
created by -?
created on-?
currency-?,
exchange rate to USD for the date of invoicing,-?
bill type-?,
bill description-?,
date of posting invoice-?
reference document number-?,
company code-?,
Customer name-?,
Customer account number-?.
Please let me know if any standard data source is there for above fields.
Anything is appreciable. I am waiting for your valuable reply.
Thanks Regards,
narasimha.Hello,
Check these DS and tables list for SD. You will get all the required info
SD
Data sources Tables
2LIS_11_VAKON VBUK, VBUP, VBAK, VBAP, VBKD, KOMV, T001.
2LIS_11_VAHDR VBAK, VBUK, T001
2LIS_11_VAITM VBAP, VBUP, VBAK, VBKD, VBAJP, T001, VBUK, PRPS.
2LIS_11_VASCL VBAP, VBUP, VBAK, VBEP, VBKD, T001, PRPS
2LIS_11_VASTH VBUK
2LIS_11_VASTI VBUP, VBUK
2LIS_11_V_ITM VBAP, VBAK, VBKD, VBUP, T001, PRPS, VBUK.
2LIS_11_V_SCL VBUP, VBEP, VBKD, VBAP, VBAK, T001, PRPS.
2LIS_11_V_SSL VBAP, VBEP, LIPS, WVBEP, VBUP
2LIS_13_VDKON VBUK, VBRP, KOMV, T001, VBRK.
Also check the below link;
http://help.sap.com/saphelp_nw70/helpdata/en/29/79eb3cad744026e10000000a11405a/frameset.htm
Lo Datasources for SD
Thanks,
VA
Edited by: Vishwa Anand on Sep 20, 2010 4:26 PM -
Hai Gurus
I am having one requirement from the Client.
The requirement is
In LO -
2LIS_02_ITM
when the PSTYP (Item Category In Purchasing Document) = 2 then I should get Net Price from Table EINE.
Can anybody help me to write the code to satisfy the condition.
Awaiting ur Replies
Regards
MahiHey Mahi,
Go thru this PPT.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5.
If you still have queries get back to SDN.
Following are the steps to enhance the Structure.
1. go to RSA6.--- all DS which are already active
2. Select Your Data Source, which you want to enhance.
3. Select display Data Source (Ctr+F2)
4. Double click on the Extract structure.
5. Click on the Append Structure.
6. Add the required fieds starting with ZZ*.
7. Avtivate the Append Structure.
CMOD....
1. Enter the Project name and click on create
2. go to components select the required function module.
EXIT_SAPLRSAP_001 for Transactional DS
EXIT_SAPLRSAP_002 for Master DS
Goto SE37 and enter the Respective Function module (ex . EXIT_SAPLRSAP_001) and click on the include zxxxxx. then write the code to populate the extra fields added to the DS.
please assign points if its helpful to u .
Regards,
BVC
Message was edited by: BVC -
How to make enhanced fields of data source delta enabled?
Hi ,
I have a scenario, in which we are using the DS 0CUSTOMER_ATTR to load the master data.There are some fields added to this data source but this fields are not delta enabled. I have tested these fields from R/3 side using BDCP, CDPOS tables. All the fields are writing the changes correctly. But when extracting them using delta they are not capturing.If we load the full,it is capturing all the changes.
So running full load every week is taking more time.
Can any one suggest how to make this fileds delta enabled to capture the change in BW side as well to extract only changed records?
Any help will be greatly appriciated !
Thanks & Regards,
VishnuHI,
It is not possible to load delta this data. Your datasource only detects changes in the customer table and when any customer has been modified the record is loaded to BW. In this moment the datasource fill the append extructure.
The problem is that if you modifies some record from the append extructure the datasources doesn't detects the changes. When you does a full load you are filling the append extructure for the entire records and it works.
If you want to catch this deltas you should make a delta datasource for CDPOS but depending on the number of records of the tables it won't be possible.
You could check if there is any event to detects the modification and create a delta queue datasource for the append extructure.
Then, you can mix both datasources in a DSO in BW.
You can look for a " how to create generic datasources which use delta queue"
I hope it helps
Maybe you are looking for
-
How can I store and view a pdf file ?
I have an iphone 3GS 32Gb and want to store a pdf file on my phone so that I can view it later. Email is the only way I have been able to view my pdf file, but I dont really want to do it this way. On previous phones I could save a file on the phones
-
Firefox comes on, I go to a site rich w/ visual content & then the screen goes black & then white w/ with a bubble from the bottom bar saying recovery from igfx display failure..this used to happen on my Chrome browser (the Chr browser recovered spon
-
Hi ABAPers, I was trying to develop a report for which query is something like this. *& Report ZT_SERIAL REPORT ZT_SERIAL. TABLES : SER01,SER03,OBJK,LIKP,LIPS. " LIKP - SD invoice header table, LIPS - SD invoice details table TYPE-POOLS: SLIS. DATA
-
Reoccuring Problem with Router
Every once in a while, my router will disconnect for no reason. When I try to reconnect, Windows says it can not connect, and when I diagnose the problem, it says the connection was cancelled. I'm using Windows Vista Home Edition, and my router Model
-
Issue about BI JAVA SDK-SOAP request failed with return message 2147483653
Dear Experts, I'm trying to use BI JAVA SDK to connect BW by using XMLA connector. But there's an error messaet said : SOAP request failed with return message 2147483653 ( Invalid MDX command with INCLUDING) I'm really new to this JAVA SDK, and after