Set operator NE in Database View creation in join condition
Hi Experts,
I have a requirement to set NE(not equal) operator in join condition of Database View creation. Could you please help me how to set in operator.
Join condition :
Ex : BSAK-AUGBL NE BSAK-BELNR.
You know that by default operator is '='. i want to set NE in place of '='.
Thanks,
Hi Chinna,
Check whether if there is any possibility or not to include more key fields like bukrs, lifnr, gjahr etc in the where condition, so that you query may result faster. Then, there won't be any necessary to create the view.
Hope this helps.
Please reward if useful.
Thanks,
Srinivasa
Similar Messages
-
Problem in Database View Creation
Hi,
I was creating a view on few base tables and need to build a datasource on that view to extract the current(Today's) data using a Remote cube onto a report. The selection to be used in the view is SY-DATUM. I could not give this value in the database view but when i am using the Maintanence view it says the cardinality is not established ie there is a problem with joins,i could not have all the required joins with base tables. But while creating database view i could get relations to all necessary base tables but only problem is using of SY-DATUM in selection condition of view.
Could any one of you suggest some solution to overcome this.
Thanks,
RajuSiva,
While creating the view, you mentiond the tables, right?
Instead of mentioning the table name, mention the view name.
Regards,
Ravi
Note : Please reward the posts that help you. -
Queston about database view creation
I would like to ask whether I can view including 2 tables with left outer join relationship?
i.e. a outer join b on ....
thanks!You can use only projection view or database view in your ABAP program.
<b>Projection view</b>
Just retrieves some fields from only one table.
<b>Help view</b>
This is used for search help.
<b>Database view</b>
This is inner join view.
Views in the ABAP Dictionary are implemented as inner joins. If you want to include all of the data from the outer table, you can program a left outer join in ABAP.
See http://help.sap.com/saphelp_nw04/helpdata/en/aa/47349a0f1c11d295380000e8353423/content.htm for more reference.
Ps: Reward points if helpful. -
Diff between database view and inner join
Hello,
I need to select data from multiple tables. I need to choose between 2 options.
1) create a database view and use this view for select.
2) write an inner join in abap prorgam.
In which cases we should create a view and in which cases we should use a inner join?
What are the factors which decide these?
Pls advice.
Thanks,
Rupali.Hi,
Both are same..
But if you use regulary and used view in Multiple programs then create view..
If inner join in abap prorgam between two or more table used in less Programs and do not want to
create View (Means not to create transport request) then go for JOin in Program.
Prabhudas -
Creation of Database View , Projection View
Hi ABAP EXPERTS,
Can anyone plz send me the step by step creation of DATABASE and PROJECT VIEWS. Just steps by step explanation will do , screen shots will be more than appreciated.
Kind Regards,
Sunil Ranal.Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set. In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
Check this link for database view creation.
http://help.sap.com/saphelp_40b/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm
Projection View
Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed. A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
Check this link for Projection view creation.
http://help.sap.com/saphelp_nw70/helpdata/en/cf/21ed20446011d189700000e8322d00/content.htm
Regards,
Maha -
How to set key fields in a Database view
Hi guru's
iam balaji,plz guide me with how to set key fields in a view.......that field is a non key field in the base table....
thanks in advance,
Balaji.Stake a look at this:
Diagnosis
In the view, not all of the mandatory fields were included as key
fields. The key of the view therefore is not unique.
System Response
All the fields are regarded as key fields in order to guarantee that th
key lengths are unique.
Procedure
For views with a large number of fields, this could have a negative
effect on the performance for the language construction described below
In this case, all the mandatory key fields should be included in the
view.
regards -
HR transactions and functionality and creation of Database view
Hi Guys
I am new to HR module . can anybody send me the list of transaction codes with HR functionalities.
I also have to made a database view from hrp1001 and hrp1010 table to list all chief positions who are head of business group , Business unit , Site etc .
Could you help me in creating this databse view.Hi,
These are HR Infotypes
0000 Events
0001 Org assignment
0002 Personal info
0003 Payroll data
0007 Work time
0008 Basic pay
0014 Reoccurring pay
0015 1 X pay
0027 Cost Center
0041 Event Dates
0057 Membership dues
0165 Over ride to limits on deductions
0167 Health
0168 Insurance
0169 Savings
0170 Spending
0194 Garnishment reduction
0195 Garnishment order
0207 Residence Tax
0208 Work Tax
0209 Unemployment Tax
0210 Withholding
0216 Garnishment adjustment
0221 Adjustment
0267 Off cycle
2005 OT
2010 Catts direct to cluster
1000 Infotypes 1000 1999 are PD Relationship infotypes
Logical Database (PNP) ·
Programming with Infotypes ·
Processing Time infotypes/Cluster ·
Processing Payroll infotypes/Cluster
In OM level hrp 1001 and 1010 will be there.
If u want total transactions goto SE11->TSTC Table.
****POINTS TO BE CONSIDERD
Thanks
P.SRIKANTH -
would anyone please explain how to create views in SE11 with screen shots
Thanks in advanceHi sunnype,
First you read the below then you can see SE11.
Here i explained shortly.
View
Definition
A view describes the layout and behavior of a rectangular area of a user interface.
Use
Every Web Dynpro application has at least one view. The layout of a view is made up of different user interface elements, which can be nested in each other. The positioning of interface elements in one view is supported by the supplied layout variants.
In addition to the visible part, the layout, a view also contains a controller and a context. The data to which the elements of the view can be bound are stored and managed in the view context, enabling them to be represented or used on the screen. The view controller can contain methods for data retrieval or for processing user input.
Multiple views can be classified in view sets.
A view also has inbound and outbound plugs so that views can connected with each other, or so that a view can be linked with an interface view. These plugs can be linked with each other using navigation links.
Empty View
The empty view is a special type of view. It is always generated automatically in a window or a view set area, provided that no view has been embedded manually. It may also be preferable to embed an empty view in a non-empty window as well. Just like a normal view, the empty view occupies a certain area of a window at runtime and can be used to hide a different view, for example, using specific controls.
When you create an empty view, an inbound plug with the default name ShowEmptyView is created.
And read the below these views also
Views
Data about an application object is often distributed on several tables. By defining a view, you can define an application-dependent view that combines this data. The structure of such a view is defined by specifying the tables and fields used in the view. Fields that are not required can be hidden, thereby minimizing interfaces. A view can be used in ABAP programs for data selection.
The data of a view is derived from one or more tables, but not stored physically. The simplest form of deriving data is to mask out one or more fields from a base table (projection) or to include only certain entries of a base table in the view (selection). More complicated views can comprise several base tables, the individual tables being linked with a relational join operation. See also Join, Projection and Selection.
The base tables of the view must be selected in the first step of a view definition. In the second step, these tables must be linked by defining the join conditions. It is also possible to use the join condition from a foreign key defined between the tables (see Foreign Key Relationship and Join Condition). In the third step, you must select the fields of the base tables to be used in the view. Selection conditions that restrict the records in the view can be formulated in the fourth step.
Four different view types are supported. These differ in the way in which the view is implemented and in the methods permitted for accessing the view data.
Database views are implemented with an equivalent view on the database.
Projection views are used to hide fields of a table (only projection).
Help views can be used as selection method in search helps.
Maintenance views permit you to maintain the data distributed on several tables for one application object at one time.
Database views implement an inner join. The other view types implement an outer join (see Inner and Outer Join).
The join conditions for database views can be formulated using equality relationships between any base fields. The join conditions for the other view types must be obtained from existing foreign keys. Tables therefore can only be combined in a maintenance view or help view if they are linked to one another with foreign keys.
The maintenance status defines whether you can only read data with the view or whether you can also insert and change data with it.
See also:
Example for Views
Creating Views
Deleting Views
if any doubts then see the below links
http://help.sap.com/saphelp_nw04/helpdata/en/b3/b3243ee9399a0be10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec5d446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
if it is useful kindly reward me -
Hi to all.
Currently, i am trying to install patches for portal server.
The server OS is Sun Solaris 8.
We are using Oracle9iAS.
Now, we are installing 9.0.1.4.0 patch set for the Oracle Database Server.
We managed to install the patch, but have problem with the Post Install Action.
We managed to run
-ALTER SYSTEM ENABLE RESTRICTED SESSION;
-@rdbms/admin/catpatch.sql
-ALTER SYSTEM DISABLE RESTRICTED SESSION;
-CONNECT / AS SYSDBA
-update obj$ set status=5 where type#=29 and owner#!=0;
-commit;
But, when we come to the next command, which is to shutdown, it gives us like
this..
SQL> update obj$ set status=5 where type#=29 and owner#!=0;
1402 rows updated.
SQL> commit;
Commit complete.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORA-00604: error occurred at recursive SQL level 1
ORA-01219: database not open: queries allowed on fixed tables/views only
We tried to startup the database..it gives us this error..
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
So, we tried to shutdown again..
SQL> shutdown immediate
ORA-01089: immediate shutdown in progress - no operations are permitted
I been informed that this is maybe a Database problem related. Any ideas?
Best Wishes,
Rushdan Md Saad.Patchsets could be obtained (only) from http://metalink.oracle.com
You need to have valid CSI for access.
P.S: Sorry Werner, I didn't see you post.
Message was edited by:
Ivan Kartik -
Hi all Gurus,
I am trying to create a database view for joining STKO, STPO, MAST.
I am getting duplicate records., How to avoid that ?
Very CRITICAL situation . If any one of u have view for these table, please gimme the TABLE JOIN CONDITIONS.
Hoping for the reply please
Regards
karthikHi,
From SE11 create the DB view and join the tables with the key fields
Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
Please have a look at below link. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
Reward points for useful Answers
Regards,
Raj. -
Using a Database View and Untyped Dataset
Post Author: kramer9802
CA Forum: .NET
Product:Crystal Reports XI Release 2
Version:
Patches Applied:
Operating System(s):XP
Database(s):Oracle
Error Messages: Steps to Reproduce: Normally, the reports we create are designed based on Oracle tables. Then the data source is set to a dataset I populate in code from a SQL statement. I know this isn't necessarily how it is done in the documentation, but it has been working. What I am trying to do now is use a database view to design the report and then populate the my dataset based on a query on the view for VB code. When I do that my dataset only has one row, but my report is building based on all the rows returned by the view (Thousands). The sql is something like this Select * From xyz_view where record_id= ('The record the user wants to see') The view basically pulls back the data from several tables and also pulls back a few lookup tables that have description of value fields. I would use formula fields for the description but there is a lot records. I know that you can't pass a parameter into a view, so that is why I use select statement against the view to filter it down to the specific record I want. So I guess my question is why does build the report based on all the records from the view rather than all the one record in the Dataset? If I do the same thing but design the report based on a table or serveral tables, then the report only contains records from the dataset. I think I kind of know that the report is ignoring the dataset, but I guess I just need to know if there is an easy way to make this work or do I need to reconsider how I design and populate the reports. The reports are non-embedded based on a business requirement. let me know if this doesn't make sense or you need more details. Thanks KramerPost Author: Argan
CA Forum: .NET
Honestly I do not know.
This question is more of a design issue and would be better suited to Crystal Reports forum
http://technicalsupport.businessobjects.com/cs/forums/13/ShowForum.aspx
As an aside, technically speaking if you are using datasets then you should be designing the report against the schema of the dataset you are going to be passing, not the tables or storeprocs or views themselves. -
Difference among the Help view,Database view and Maintanance View
hi,
can Anyone pls let me know the Difference among the Help view,Database view and Maintanance View
thanks®ards
ramaThe followings are different types of views:
Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
Help View ( SE54)
Help views are used to output additional information when the online help system is called.
When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
Go thru this link plzz
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
Difference between "Help View" and "Search Help"
Projection View
Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
Maintenance View ( SE54 )
Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
Please have a look at below link. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
1.Go to se11
2. select view radiobutton and give a name
3. Create
4. select type of view you want to create. Such as database view.
5. give short description
6. give a table name such as mara
7. press the pushbutton relationship. here you will find all the tables which are allowed to create view with mara.
8. select one or mane tables.
8 copy
9.save , check and activate.
The followings are different types of views:
Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
Help View ( SE54)
Help views are used to output additional information when the online help system is called.
When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
Go thru this link plzz
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
Difference between "Help View" and "Search Help"
Projection View
Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
Maintenance View ( SE54 )
Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
Please have a look at below link. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
Go thru this link plzz
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
Difference between "Help View" and "Search Help"
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
Hope this is helpful, Do reward -
Snowflake dimension: named query vs. database view
A test question features a Product table with a Product Size code; Product Size description is taken from ProductSize table. As far as I can tell, the question asks me to choose between (a) setting up a database view joining Product and ProductSize, and
(b) doing the join in a data-source-view named query. I don't see a clear winner. (My thinking is as follows. Yes, he view would speed up the processing, even if not materialized. On the other hand, with a small dataset, the performance gain would be
minor in absolute terms. Do I want to have an extra database object in the picture?) Yet the question's author does. Can anyone advise please?Hi Demyan,
According to your description, you want to know which is better, using named query in datasource view or using database view, right?
Based on my research, there is no performance differences between using named query in datasource view and using database view because they both result in SQL query being sent to the source system. Here is a blog which discuss this issue.
Consistency: If you already have logic in database views, I would continue to use them. As long as you know that you go to one spot to view/change the logic. Putting the logic in 2 different spots could lead to confusion.
Security Permissions: often you may not have permission to alter the source databases, in this case you have no choice but to setup named queries in the dsv.
Reference
http://geekswithblogs.net/darrengosbell/archive/2006/09/05/90278.aspx
http://bennyaustin.wordpress.com/2013/07/16/dbview/
Regards,
Charlie Liao
TechNet Community Support -
Personalized view creation in OA Framwork
HI ,
I am developing a search Trasaction in OAF using Query Region (AtuoCustomization Mode ). I developed the simple search and advanced search with dyamanic where caluse (I am setting the where clause and not using the where caluse genrate by Search Framwork ) . now i have to develope the personalized View page . i am using same method used in simple search and advance search for genrating where caluse dayanamiclly . but problem is that in personiazied view i am not able to invoke that method as i am not getting the how to handle the apply and apply & view result button in view panal . if anyone work on personalized View creation or know anything about creation of personalized view , please share your knowladge . its urgent , please help me
regards,
VishalLooks like you are running a page which is part of a multipage transaction. Check the page function and make sure that page is not expecting any parameter, all the corresponding class files are present in the myclasses folder.
--Shiv -
Progammatic update a table with a database view in the page
Hi All,
I am using JDev 11g. With FOD database schema, I have one database view Products which comes from two tables Products_Base and Product_Transactions. I created three EOs (ProductEO, ProductsBaseEO, ProductTransactionsEO) and three VOs (ProductVO, ProductsBaseVO, ProductTransactionsVO) based on their EOs respectively.
Here is my scenario. I have an ADF form which is based on the database view Products and is dragged and dropped from Data Controls->ProductVO. When an existing record is submitted, a backing bean method will be called to update the data against the table Products_Base (and the table Product_Transactions at the same time) programmatically. An update method updateProductPrice() is added into the Application Module and published it to UI Client. The submit button in the page is created by directly dragging and dropping Data Controls->updateProductPrice into the page. When I run it, I got the following error message,
Failed to post data to database during "Update": SQL Statement "UPDATE PRODUCTS ProductEO SET COST_PRICE=:1 WHERE PRODUCT_ID=:2".
What I don't understand here is that, in my update method updateProductPrice(), it supposes to update the table Products_Base. But from the error, it appears that it is trying to update the view Products. Can anyone give me a help on what I did wrong here? When I try to debug it, it throws an exception to this line in the method updateProductPrice(),
getDBTransaction().commit();
Here are my codes,
The method which got called in the backing bean
public String cb6_action() {
DCBindingContainer bc = (DCBindingContainer)getBindings();
FacesCtrlAttrsBinding ProductId = (FacesCtrlAttrsBinding)bc.get("ProductId");
FacesCtrlAttrsBinding CostPrice = (FacesCtrlAttrsBinding)bc.get("CostPrice");
JUCtrlActionBinding action =
(JUCtrlActionBinding)bc.findCtrlBinding("updateProductPrice");
DCDataControl dc = action.getDataControl();
ApplicationModule am = (ApplicationModule)dc.getDataProvider();
AppModule service = (AppModule)am;
service.updateProductPrice(new Long(ProductId.toString()), CostPrice.toString());
return null;
public BindingContainer getBindings() {
return BindingContext.getCurrent().getCurrentBindingsEntry();
The update method defined in the Application module (AppModuleImpl.java)
public void updateProductPrice(long productId, String costPrice) {
ProductsBaseEOImpl product = retrieveProductById(productId);
if (product != null) {
try {
product.setCostPrice(new Number(costPrice));
getDBTransaction().commit();
catch (JboException ex) {
getDBTransaction().rollback();
throw ex;
catch (SQLException ex1) {
getDBTransaction().rollback();
private ProductsBaseEOImpl retrieveProductById(long productId) {
EntityDefImpl productDef = ProductsBaseEOImpl.getDefinitionObject();
Key productKey = ProductsBaseEOImpl.createPrimaryKey(new DBSequence(productId));
return (ProductsBaseEOImpl)productDef.findByPrimaryKey(getDBTransaction(),productKey);
Edited by: john wang on Oct 27, 2009 7:14 AMor
merge into test
using (select rowid rid
, id
, sub_id
, startdate
, lead (startdate) over (order by id, sub_id) - 1 ed
from test) x
on (x.rid = test.rowid)
when matched then
update set end_date = x.ed
;
Maybe you are looking for
-
Step by step complete setup for WRT54G ver.6 with Laptop and XBOX 360
Hello. I am sorry to post this, I am sure it is a juevenile and redundent question...but I have tried to look for the set up cd (I can find where to download it...though I can find the firmware upgrade or whatever). My friend at work said it would
-
Scheduling Crystal report from Infoview portal doesn't show up data
"The crystal report is based on a SAP BI query. The parameters of the report are basically the parameters(SAP variables) of the SAP BI query. When we run the crystal report in the CR Report Designer tool, it runs fine showing all the data correctly.
-
Two questions about ATI RADEON HD 3870
I've been in touch with macsales.com and they recommend the ATI RADEON HD 3870 for the Mac Pro Xeon (late 2006-2007) running 10.5. But they were unable to answer w/ 100% certainty: 1. That all I need to connect this card (it has 2 DVI ports) to my Sa
-
I tried to launch iPhoto, the icon bounces, the application opens but none of the photos are visible. The colour wheel shows up and loads indefinitely. You can't select any of the options on the top bar in other words, you have to force quit the ap
-
Dears , When I am trying to edit a worksheet , it is unable to edit it because the folder that this sheet use appears as active but you can't expand its items and if you choose to select the all folder items then the error "Model manipulation via sta