OPEN SQL (SELECT DATA)
Hi, everybody!
Recent i found a few code but i don't know this mean of code. fllows as.
SELECT BMATNR BWERKS E~MTARP AS MTART
CSPART DMAKTX
APPENDING CORRESPONDING FIELDS
OF TABLE LT_PMAT
FROM STPO AS A
INNER JOIN MAST AS B
ON BSTLNR = ASTLNR
INNER JOIN MARA AS C
ON CMATNR = BMATNR
INNER JOIN MARC AS E
ON EMATNR = BMATNR
AND EWERKS = BWERKS
LEFT OUTER JOIN MAKT AS D
ON DMATNR = BMATNR
AND D~SPRAS = C_E
FOR ALL ENTRIES IN LT_CMAT
WHERE A~STLTY EQ C_M "Material Bom
AND A~IDNRK EQ LT_CMAT-MATNR
AND B~WERKS IN R_WERKS
AND B~STLAN IN R_STLAN
AND B~STLAL IN R_STLAL
%_HINTS ORACLE
'LEADING(T_00) USE_NL(T_00 T_01 T_02 T_03 T_04)'.
look bold-face!
I don't know what is "%" and code of last-line !
Please help me!
Thanks Advanced!
%_HINTS ORACLE means you are giving hints/instructions to oracle database, for the sole purpose of database optimization.
The DB optimizer follows certain rules to decided use of index, buffer etc. %_HINTS overrides it by giving specific instruction to oracle.
See OSS Note 129385 for furthur information on using %_HINTS
Similar Messages
-
Cannot Open SQL from Data Prep Editor (SQL Interface)
Hi,
When I Open SQL in Data Prep Editor: "There are no data sources defined. Please create one to continue."
I create a ODBC connections using the drivers bellow and I obtain always the same message ("There are no data sources defined.."):
Oracle in OraDb10g_home2
Microsoft ODBC for Oracle
MERANT OEM 5.2 32-BIT Oracle
I have installed and configured Essbase, release 11.1.1.2
Is posible that the SQL interface is not installed and configured with the Essbase Server?
How I can install and configure the SQL Interface? I need to do somethink else?
Thanks!
AssiaThrough EAS select the server and right click and select properties. then go to the environment tab(I think) it should show everything you are licensed for. If this is a System 9 or higher, you should have it automatically. If it is 7X or below,then yoes it has to be licensed
-
Parsing an OPEN SQL select statement
Hi all,
I want to parse an open SQL select statement to get the list of tables and the corresponding fields in the select statement.
Is there some ABAP-internal syntax from the SAP Database Interface that does this? or is the only option to do this is to manually break the statement?
Thanks.
GirishHi,
I doubt if there is something like that available to use. It think you will have to write a parser for yourself.
Regards -
How do I concatenate 2 fields in an Open SQL Select
Hi,
I have an internal table (simplified) that looks like this:
BEGIN OF t_konv,
kwert_vprs TYPE kwert,
knumv_kposn type char16,
END OF t_konv.
From an Open SQL Select statement I need to put kwert into kwert and I need to combine knumv and kposn into knumv_kposn.
Here is my select, but I do not know how to specify the last 2 fields as being concatenated into kmunv_kposn in my internal table.
SELECT hkwert hknumv h~kposn
INTO TABLE it_konv
FROM konv AS h
FOR ALL ENTRIES IN it_bil_sal
WHERE h~knumv = it_bil_sal-knumv
AND h~kposn = it_bil_sal-posnr.
Any help is much appreciated!
Thx,
AndyRight now, concatenating them is my solution to some other issue, so yea, I'd like to make it work this way, if possible.
That's a thought...I could do as you try. It just sucks that I can't do it in the select...it's so simple in ANSI SQL:
Select fielda || fieldb from...
Thanks alot for your help, Rob.
Andy -
Adding columns in a open sql select query
Hi Everyone,
I would like to add the values of n columns of a table and place them in one column, how can i achieve this in open sql.
In oracle native sql the query will look like this:
Select col1 + col2 + col3 AS col
from tab1;
On a similar grounds, i would like to concatenate the contents of n columns into one column. The oracle native sql will look like this:
select col1 || col2 || col3
from tab1;
How can I do this in Open SQL.
Thanks in advance.
Prabhu.Hi Prabhu,
I'm afraid what you're trying to do is not possible using the Open SQL. You will have to get the data from all the three columns into an internal table and then write your own logic to accomplish the same.
data : begin of itab occurs 0,
col1 type i,
col2 type i,
col3 type i,
col4 type i,
end of itab.
field-symbols: <fs_itab> like line of itab.
SELECT COL1
COL2
COL3
INTO TABLE ITAB.
LOOP AT ITAB assigning <fs_itab>.
<fs_itab>-col4 = <fs_itab>-col1 + <fs_itab>-col2 + <fs_itab>-col3.
ENDLOOP.
Regards,
Anand Mandalika. -
Open SQL , Selecting Values Problem
Hello,
I have a table like the following
Book ID Min Value
5705 10.00
5705 15.00
5705 22.00
5706 10.00
5706 50.00
If I have a value, such as 8.00, how can I use a single select to bring back just one record, in this case it would be the Minimum Value 10.00 only, ie it has to be less than or equal to the minimum value , and the lowest figure?
Thankshi ,
u can use following select query to get the Desired OUTPUT.
TABLES : DBTAB.
DATA: l_book_id,l_minvalue.
SELECT book_id minvalue INTO l_book_id l_minvalue FROM DBTAB WHERE minvalue = select min( minvalue ) from DBTAB.
ENDSELECT
Regards
vikas. -
How to get different field in two are more different table using open sql
Dear all,
This SenthilMani am very new into sap abap am having doubt in reports how get the different fields from different tables like mara,marc,mard using open sql and native sql program give me some tips to get the data .
with regards,
senthilHI ,
1) If u want to select data from more the two table then u can use FOR ALL ENTRIES.
EX ..Open sql
select matnr from mara into table t_mara.
select matnr werks from marc into table t_marc for all entries in t_mara where matnr = t_mara-matnr.
2) U can join more than one table.
ex:
select mara~matnr
marc~werks
from mara join marc into table t_maramarc
on maramatnr = marcmatnr
3) Using native sql ...only u can use JOIN statement -
SQL Developer Data Modeler - MAC Version 2.0.0 Build 570 - Issues
In no particular order
- The Help, About box displays a different version information set then the SQL Developer Data Modeler, About SQl Developer Data Modeler.
- Not able to move any portion of the connection between entities. Thus there is no current way to align the lines as wanted.
- There is no way to scroll all the way to the right side if you have more then approximately 5 entities horizontally.
- Open SQl Developer data Modeler, Click on File, Open, select an XML file and a dialog box is displayed.
- The checkbox needs to be moved to the right as it is partially cut off.
- the text next to the checkbox is cutoff and only displays "Don't show this dialog agai".
- Printing Diagrams does not print correctly unless you have the entities displayed such that you can "read" them. If you have diminished the display so that you are not able to see the table or
field names then the Print Diagrams does not display the entity or field names.
- File, Recent Designs, does not retain the last or any design having been opened and/or saved.
- VarChar2 is not a displayed data type for Oracle 10G.
- There does not appear to be a way to create a set of fields which you would like to have added quickly and easily to selected tables.
- DDL Editor displays the Macintosh HD. It should display my User Directory
Thanks,
Lester
[email protected]Sorry to dredge up an old thread.
I just downloaded data modeler and tried to start, but got an error regarding bad version:
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
I have JRE 1.5, but that seems to be the latest per the Software Udpate utility, and when prompted, I set my java directory to /usr, since my java bin was under /usr/bin.
Let me know if I should start a different thread.
Thanks.
Chi -
Hi experts, how to use open sql to read data from one " maintenance view"?
i want to use this part of data within report ,so how to use open sql statement to read data from one " maintenance view"?
Hi
You can't use OPEN SQl statements to fetch data from maintenance view
You have to use only Database views
see the different types of views and the difference
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.
- 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&
Reward points for useful Answers
Regards
Anji -
How to get the opening balances for lessthan selected date in cubes.
Hi All,
my task is to get the opening balances for the selected date.
Ex: If I select date say 31-1-2013, I should get the sum of values which are less than the selected date.
in sql:
select sum(balance) from banktrans where banktrans.transdate < 31-1-2013;
BankTable BankTrans
BankId BankId
balance
transdate
BankTable (records):
SCB
BankTrans(records):
a) SCB, 15000, 10-02-2013
b) SCB, 20000, 31-01-2014
c) SCB, 50000, 21-09-2012
If I select date as 31-01-2014, I should get the value as 65000
If I select date as 10-02-2013, I should get the value as 50000
Date will be dynamic selection from years months days hirearchy ( time dimension)
How can i achieve this?
any help is much appreciated.
Thanks,
RakeshDear David,
I've tried the below with static date but i'm not getting the values which are sum of less than the given date.
I've given 1st jan 2013 as static date and I need to get the sum of values which are less than the 1st jan date.
CREATE
MEMBER
CURRENTCUBE.[Measures].[OPENBALANCE]
AS
Sum({Null:[Time].[Years
Quarters Months Weeks Days].[Days].&[2013-01-01T00:00:00]},[Measures].[AmountCur]]),
FORMAT_STRING
= "Standard",
VISIBLE
= 1
can you plz check the above once and guide me.
Thankyou,
Rakesh -
"Open sql" report no data sourced defined in windows
when I want to import data from sql database, the Open sql window report error
"There are no data sourced defined. Please create one to continue",
but I have defined the odbc data source using windows 's odbc administrator, why the error?
chuliangA couple of possibilities.
First are you licensed for Sql interface? If not, you might get that message.
Second, where did you create the ODBC connection on your computer or the server. It has to be on the server.
Third, did you create the odbc as a system driver? it needs to be so
Fourth, what operating system? If it's unix or AIX there is a hole bunch more you need to do to get odbc connections working. If it's windows, it's pretty easy.
Fifth, did you test the connection before trying it in Essbase? -
How to select data from a PL/SQL table
Hi,
I am selecting data from database after doing some screening i want to store it in a PL/SQL table (temporary area) and pass it to oracle reports.
Is there any way to select the data from a PL/SQL table as a cursor. Or is there any other way of holding the temporary data and then pass it back as a cursor.
Regards
KamalA PL/SQL "table" is anything but a table. Whoever came up with this term in PL/SQL to describe what is known as dynamic arrays (the correct programming terminology that existed since the 70's if not earlier and what is used in all other programming languages I'm familiar with)... well, several descriptions come to mind and none of them are complimentary.
You cannot "select" from a PL/SQL dynamic array as it is not a table within the Oracle context of tables.
Thus you need to convert (cast) a PL/SQL dynamic array into a temporary Oracle data set/table in order to select from it. This is in general a Bad Idea (tm). Oracle tables and SQL and concurrency controls and all that are especially designed for processing data. PL/SQL arrays is a very simplistic data structure with very limited usage. Why would you want to use that in SQL via a SELECT statement when you can use Oracle tables (or proper temp tables) instead? Besides that, it is also slow to cast a dynamic PL/SQL array into an Oracle SQL data set structure (context switching, copying of memory, etc).
The proper way to use PL/SQL to generate data sets for use via the SQL engine is pipelined table functions.
This is not to say that you should never use PL/SQL arrays and casting in SQL.. simply that you need to make sure that this is the correct and scalable way to do it. And that will also always be an exception to the rule when you do. -
Error while opening SQL source for a Data Load Rules File
Hi ,I have created Data Laod rules file.When I try to open a SQL source for this rules file (File->Open SQL) , I get an error saying "Your server does not have a SQL connection Option, Please check with your system administrator"Further I get a message "There are no data sources defined. PLease create one to continue.".I have created DSN on my Essbase server.What is the problem.What needs to done to open SQL files.Thanks.
I have Essbase 7.1 I guess for version 7.1 the SQL interface option is intalled with the Analytic server itself .Am I right?I have setup the DSN also.Please help to resolve this issue.Thanks .
-
Opening a System-Form with selected Data
Hi,
i´m looking for a way to open a System-Form, e.g. Orders with
selected Data.
In the moment i do the following:
application.ActivateMenuItem("2050"); // orders
SAPbouiCOM.Form belegForm = application.Forms.ActiveForm;
belegForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
SAPbouiCOM.EditText edDocNum = (SAPbouiCOM.EditText)belegForm.Items.Item("8").Specific;
edDocNum.Value = "4711";
belegForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
This works, but the screen is blinking, because first the form ist opened and shown with
empty values and then filled.
Is there a way to activate the form and do the search-Operation and afterwards show it ?
I think ist must be possible, because when clicking on the link-Button near CardCode, the Contacts-Form
is opened in this way.
regards MatthiasHi Ibai,
i have tested both: freeze and form.visible = false in
the form_load-Event. It doesn´t work here.
Also neither the call
application.ActivateMenuItem("1281"); // find
nor the call
oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
work in the form_load-Event.
After the form-Load-Event the et_FORM_ACTIVATE-Event is called.
Here the functions work, but here the screen is already visible.
regards Matthias -
SQL Developer Data Modeler - Version 3.0.0.665 - Open older project fail
Hi,
I just downloaded latest version of SQL Developer Data Modeler (3.0.0.665) and there is no "File" -> "Open" menu item. There is only "Save", "Save as", "Compare with" and "Exit".
I try to drag`n`drop project file to the Data Modeler window. This operation leads to opening project file as XML. I got the same result when I try to open the file with windows context menu "Open with".
How can I open older Data Modeler project? My previous version was 3.0.0 and project file was created there.
Maybe I need disable "Start Page'? But how? I cann`t find appropriate param in Tools -> PreferencesHi,
See this thread: Re: 30EA2 problem: Menu items not available
Ivan
Maybe you are looking for
-
How do I use 2 iPhones with one computer (iTunes)
My wife & I each have an iPhone. Everytime I sync we both end up with the same songs, apps, etc. Is there a way that we can use the same computer for syncing but have our own separate libraries on our phones?
-
Error while Adding the PlaceHolder to Home Page using Jdev,UCM
Hi, I am Using UCM and Jdev 11g. I was creating a website using Oracle® Fusion Middleware Developer's Guide for Site Studio for External Applications 11g Release 1 (11.1.1). I worked fine till creating the place Holder Definition , I was trying to ad
-
Combining pdfs using FrameMaker 12...cue some spooky music!
1a. The original pdf is an outline drawing from google maps done in Generic CAD. As part of that process, the original pdf also had a title, a ruler to measure the map in increments, and some notes at the bottom. 1b. This drawing was cropped using Ad
-
Revision: 1418 Author: [email protected] Date: 2008-04-25 11:16:16 -0700 (Fri, 25 Apr 2008) Log Message: Remove the optimization that was added as part of the fix for BLZ-133. We cannot depend on isRequestedSessionIdFromCookie reliably, instead we sh
-
Hello - I wanted to ask for some advice on how to use the iWeb more efficiently. I am webmaster of a fanfiction site that naturally involves uploading a LOT of text from submitted stories. So far what Ive been doing is creating pages that will allow