Joins between DATA COLLECTIONS and TABLES
I would like to know if is there any way to create one data collection with a query result, but I must join this data collection with an exist table, I cant use the GLOBAL TEMPORARY TABLE because I cant create a table in the module. I would like to do just what the SQL Server do with the @.
sql>create type tnumbercollection as table of number;
2 /
Type created.
sql>declare
2 c tNumberCollection;
3 begin
4 select employee_no bulk collect
5 into c
6 from mrt_user_master
7 where rownum <= 5; -- build collection of 5 employee numbers
8
9 for r in (select um.last_name
10 from user_master um, table(cast(c as tNumberCollection)) t
11 where um.employee_no = t.column_value) loop -- join the collection to the table
12
13 dbms_output.put_line( r.last_name);
14
15 end loop;
16 end;
17 /
PL/SQL procedure successfully completed.
Similar Messages
-
Difference between Data staging and Dimension Table ?
Difference between Data staging and Dimension Table ?
Data Staging:
Data extraction and transformation is done here.
Meaning that, if we have source data in flat file, we extract it and load into staging tables, we take care of nulls, we change datetime format etc.. and after such cleansing/transformation at then end, load it to Dim/Fact tables
Pros: Makes process simpler and easy and also we can keep track of data as we have data in staging
Cons: Staging tables need space hence need memory space
Dimension Table:
tables which describes/stores the attribute about specific objects
Below is star schema which has dimension storing information related to Product, Customer etc..
-Vaibhav Chaudhari -
Difference between Database view and Table
Hi there,
Can anyone tell me the difference between Database view and Table.
Will the Database view query be more faster than a database table?Tables and database views can be defined in the ABAP Dictionary.
These objects are created in the underlying database with this definition. Changes in the definition of a table or database view are also automatically made in the database.
Data from several tables can be combined in a meaningful way using a view (join).
You can also hide information that is of no interest to you (projection) or only display
those data records that satisfy certain conditions (selection).
Database views implement an inner join. You only get those records which have an
entry in all the tables included in the view.
in views db modifications are not possible
views only contain data at run time
when they consult the database
in case of views the join definitions are already sstored in the database itself
whereas join as open sql is a query to oracle database as similar select statements
Views are optimized by SAP and stored in the repository while Joins
are in reports that needs to be compiled at every execution
Reward if helps
Regards,
Senthil
Message was edited by: senthil kumar -
Relation between different GUID and tables in RPM
Hi All,
can you tell me the relation between different GUID and tables in RPM. Many thanks.
Regards,
J BHi Deepesh,
Try the foll. join :
SELECT fragment_guid INTO (some internal Table)
FROM comm_pr_frg_rod
WHERE product_guid = (your product guid list)
This should give u a complete match of the products.
Hope this helps.
Regards,
Raviraj -
Difference between line type and table type
hi,
can any one explain the difference between line type and table type . and how to declare a internal table and work area in BSP'shi,
Go through this blog, this might help you.
/people/tomas.altman/blog/2004/12/13/sdn-blog-how-to-do-internal-tables-in-bsp
People who have worked with ABAP for a while sometimes forget that the internal table concept is rather different than what exists in most programming languages. It is very powerful, but at the same time can be confusing.
In SAP it is possible to have a table which is the rows and a headerline which is the working area or structure which can then be commited to the table.
With a BSP, if we try to create an internal table within the BSP event or layout we will get the following error: mso-bidi-
"InternalTableX" is not an internal table - the "OCCURS n" specification is mso-bidi- missing.
class="MsoNormal"><![if !supportEmptyParas]>The problem we are seeing as an inconsistency has to do with the difference between classic ABAP and ABAP Objects. When SAP introduced ABAP Objects they decided to clean up some of the legacy syntax and create stricter rules. However they didn't want to break the millions of line of code that already existed, so they only implemented these stricter checks when OO is being used. Therefore you can declare a table with a header line in a regular ABAP program or Function Module but you can't have one with a header line in OO.
Because everything in BSP generates ABAP OO classes behind the scenes, you get these same stricter syntax checks. My suggestion is that you have a look in the on-line help at the section on ABAP Objects and always follow the newer syntax rules even when writing classic ABAP programs.
In a BSP when we need to work with a table we must always do the following:
1, in the Types definitions create a structure:
types : begin of ts_reclist,
mso-bidi- style='mso-tab-count:2'> receiver type somlreci1-receiver,
mso-bidi- style='mso-tab-count:2'> style='mso-tab-count: 1'> rec_type type somlreci1-rec_type,
mso-bidi- style='mso-tab-count:2'> end of ts_reclist.
mso-bidi- <![if !supportEmptyParas]> <![endif]>
but we must remember this is only a structure definition and we cannot store anything in it, although we can use it elsewhere as a definition for Structures(WorkAreas)
2, in our Types definitions (this is the best place for this one as we can then access it from many areas without having to create it locally) so in the Types definitions we must create a TableType:
class="MsoNormal"> types : tt_reclist type table of ts_reclist.
class="MsoNormal"><![if !supportEmptyParas]> <![endif]> this TableType is our table definition and again we cannot store anything in it, but we can use it elsewhere as a definition for InternalTables
3, now that you have laid the foundations you can build and in the event handler, it is now simply a case of creating the InternalTable based upon the Table definition:
data: t_reclist type tt_reclist.
and creating the structure based upon the structure definiton:
<![if !supportEmptyParas]> <![endif]> data: s_reclist type ts_reclist.
as described above, the structure becomes the work area and this is where you assign new values for elements of the table eg:<![endif]>
s_reclist-receiver = '[email protected]'. "<-- change address
mso-bidi- <![if !supportEmptyParas]> <![endif]>
mso-bidi- s_reclist-rec_type = 'U'.
and then once the data is in the elements of the structure, the structure can be appended to the internal table as follows: class="MsoNormal">
append s_reclist to t_reclist.
<![if !supportEmptyParas]> <![endif]>
the internal table will then be readable for the ABAP function and can be applied for example as follows: class="style1"> style='mso-tab-count:1; font-family: "Courier New", Courier, mono;'>
class="style1">CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
style='mso-tab-count:2'> document_data = docdata
style='mso-tab-count:2'> DOCUMENT_TYPE = 'RAW'
style='mso-tab-count:2'> PUT_IN_OUTBOX = 'X'
style='mso-tab-count:2'> COMMIT_WORK = 'X' "used from rel.6.10
TABLES
mso-bidi-font-size: style='mso-tab-count:2'> receivers = t_reclist
class="style1"> <![if !supportEmptyParas]> <![endif]>
<![if !supportEmptyParas]>F inally, a comment from Thomas Jung,
<![if !supportEmptyParas]> when defining my work area for an internal table I like to use the like line of statement. That way if I change the structure of my table type, I know that my work area will still be OK. Second, your types and table types don't have to just be declared in your code. You can create a table type in the data dictionary and use it across multiple programs(also great for method and function parameters). I really push hard for the other developers at my company to use the Data Dictionary Types more and more.
Hope this helps, Do reward. -
Difference between Data Provider and extractor.
Hi
Can someone help me in understanding difference between data providers and data extractor.
I have gone through some documents but not able to get the exact difference between them.
What is the exact role of data provider and extractor with respect to sap solution manager.
Is data provider== Data extractor?
Thanks,
VijayHello Vijaya,
From my perspective the Data Providers are responsible for collecting metric values from the monitored objects on the managed sources systems and sending these to the Solution Manager Monitoring and Alerting Infrastrucure.
Data extractors on the other hand are the reporting objects which are defined on the BW part of Solution Manager and can be enabled by configuring some monitoring scenario's. Once these data extractors are enabled, they will use the data from the "Data Providers" (see above) to setup nice BW reportings on the Solution Manager monitoring dashboards.
I hope this answer helps you. -
Difference between Info structure and Table
Hi Friends
I need to know difference between info structure and table (updating a table using a scheduled program),Which one of this is better and why?
Please help me to get the Pros and Cons of the two available approach.
Thanks
MiteshHi,
No different, these are just transparent tables like any other. You can select data from them the same as any other transparent table.
Refer
https://forums.sdn.sap.com/click.jspa?searchID=4342729&messageID=1424611
https://forums.sdn.sap.com/click.jspa?searchID=4342729&messageID=3609095
Regards -
Difference between Data Grid and Data Forms
Hi all,
What is the difference between data grid and data forms.Data entry forms are pre defined and are generally used to manually input data into reporting (financial statement) schedules.
They can also be used for reviewing purposes and it gives users a presentable / and consistent format to view data in Hyperion.
Data grids are the equivalent of pivot tables in excel. It should be used for ad hoc purposes to view / analyse data in whatever form you choose. The user has the flexibility to choose what they see in the rows, columns and page dimensions.
One of the main differences between data entry forms and data grids is that you can’t export data grids to excel whereas you can with data entry forms. Other differences are:
1. Run consolidation, translation, promotion from data grids but not in data entry forms.
2. You can link other data entry forms to a data entry form
3. Data entry forms offer greater formatting options than in data grids i.e. colours, fonts, bold, italics.
At the end of the day, they are similar and there is no reason why you can’t have (use) both. It all depends on your local needs on how best you use both.
I hope above information helps. -
Differences between DATA TYPE and DATA OBJECTS
I am new to ABAP,I want to know the differences between DATA TYPE and DATA OBJECTS with some examples.
please help me regarding this.Hi Ashish,
Data Types: Are pure descriptions.
No memory is associated with data types.
Describes the technical properties of data objects.
EX.
1. C-CHARACTER
2. D-DATE
3. F-FLOAT
4. I-INTEGER
5. N-NUMERIC TEXT
6. T-TIME
7. P-PACKED NUMBER
8. X-HEXADECIMAL
9. STRING-Variable length string.
10. XSTRING-Variable length byte string.
Data Objects: Are created during runtime.
They cannot exist without the data Types.
Occupies memory space.
EX:
1. INTERNAL DATA OBJECT- Internal Data objects
LITEERAL- A literal has a fixed value.Ex: WRITE:u201DWORK HARDu201D.
VARIABLES: Data statement is used to create variables.
EX.DATA: NUM TYPE I.
NUM: VARIABLE defined by data statement.
EX: DATA: PRICE LIKE NUM.
CONSTANT-It is a data object, which contains a constant value throughout the program.
Can be declared in program by using CONSTANT statement.
EX:CONSTANT: INT TYPE I VALUE 15.
2. EXTERNAL DATA OBJECT: Are defined in tables i.e In ABAP/4 dictionary you can access this data from table.
EX: TABLES: SFLIGHT
DATA: SEATS LIKE SFLIGHT-SEATSMAX.
3. SYSTEM DEFINED DATA OBJECTS:Space & system variables like SY-UNAME,SY-DATUM, SY-REPID.
4. SPECIAL DATA OBJECTS:
PARAMETERS: Are Variables ,which can accept value from user.
SELECTION SCREEN : Are special internal tables to accept value ranges from user.
3 APPROACHES TO DEFINE DATA OBJECTS.
1. ELEMENTARY TYPES
DATA: Customer _Name (25) TYPE C,
Vendor_Name (25) TYPE C.
2. REFRENCE TO AN EXISTING FIELD:
DATA: Customer _Name2 (25) TYPE C,
Vendor_Name2 (25) LIKE Customer_Name2
3. REFRENCE TO NON-ELEMENTARY TYPE:
TYPES: T_NAME (25) TYPE C
DATA: CUSTOMER_NAME TYPE T_NAME
VENDOR_NAME TYPE T_NAME
4. RECORD-Information in rows & columns.
DATA: BEGIN OF BOOKING,
ID (4) TYPE C,
FLIGHT_DATE TYPE D,
NAME LIKE CUSTOMER_NAME,
END OF BOOKING.
You can also look into SAP help for more information.
Regards,
Indu. -
Purchase Order released date field and table name
Hi,
Please tell me the Purchase Order released date field and table name.
Regards
DeepakHi,
Table : EKKO.
Fields : FRGKE,FRGZU.
You can get release date of PO from CDHDR table.
give object value as your po number and check.dont forget to give leading zeros.
The udate will be date field and transaction will be me29n for relaesed po. -
Connection between data services and BWA
Hi,
I want to make a connection between Data Services 3.2 and BWA. Since we use RFC connection in between in order to have them talk with eachother but i wonder if there is any documentation that describes the RFC connection and configuration required particularly in this scenario. I have gone through the documentation that explains RFC connection between Data Services and BW and what configuration we have to do, so i wonder if there are any functions we have to export to BWA from Data Services like we do in case of BW connection to Data Services or some specific configuration we have to do. If someone help who has done connection between Data Services and BWA can help or if somebody can provide documentaton on it.Hi,
You should ask this question over here: http://scn.sap.com/community/data-services
Regards,
H -
What is the Join Between structures (sdpartnerlist) and (vbak or komv )
Hi Dear ,
can anyone tell me that " what is the Join Between structures (sdpartnerlist) and (vbak or komv ) "
or how can i join these structures .Please do your own research before asking others.
Thread locked.
Thomas -
Passing variables between data tag and Java
Hello all,
I have a question about using variables between data tag and java.
Let me explain.
I would like to populate variable "Test" with
the information returned by jbo data tag library.
<code>
<% String Test = "%><jbo:ShowValue datasource="ds" dataitem="Cod" /><%";%>
or
<% String Test = "<jbo:ShowValue datasource="ds" dataitem="Cod" />";%>
</code>
This code did not work.
Some suggestions
Thanks
Humberto
nullHumberto,
I'm afraid I do not know the specific answer
to your question (perhaps Juan the Data Tag
Wizard will reply ;-). I vaguely recall
struggling with teh same issue when I was
playing with the tags for a demo. Here
is a hack-around lifted from my demo
that might help:
<jbo:Row id="privRow" action="CURRENT" datasource="privileges" />
<%
String privName = (String)privRow.getAttribute("Privilegename");
%>
In other words, I ended up using the Row
tag to get a local Java variable bound to the
row instance and then used its methods
to extract the value. I presume the class
of the row instance is oracle.jbo.Row
and you can lookup its supported methods
in the reference doc.
I'd be interested to hear if their is a more
elegant way - the one suggested above is
pretty tedious.
Regards,
Bill
---- -
Difference between Data Class and Delivery Class
What is the Difference between Data Class and Delivery Class , what happens Phisically to the Data .
Moderator message: what is the difference between your question and a question that we'd welcome here in the forums?
[Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
Edited by: Thomas Zloch on Nov 22, 2010 1:17 PMWhat is the Difference between Data Class and Delivery Class , what happens Phisically to the Data .
Moderator message: what is the difference between your question and a question that we'd welcome here in the forums?
[Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
Edited by: Thomas Zloch on Nov 22, 2010 1:17 PM -
Difference Between data target and infoprovider
Hi Experts,
I am new to BW
What is the difference between data target and infoprovider
Thanks and Regards,
saveenHi Saveen,
InfoProvider is an object on which BEx queries are created. It provides information (data) to the queries when they are executed. InfoProviders may contain data (like cube) or may not contain data (like multiproivder and InfoSet).
Data Target is an object to which you will load the data, like cube, ODS or InfoObject. But it is not necessary that each data target is an InfoProvider...like you may have ODS objects that are not enabled for reporting, but you are loading data to them for staging purpose.
Hope this helps...
Maybe you are looking for
-
I need/want answers to how to STOP being treated (for the most part, there ARE exceptions). If needed how to end my contract without going through the ringer and see what other "actions" others are doing. Thank you.
-
HI All, My user created a process order. It had three operations and it had been confirmed. Due to some mistakes, he had cancelled two confirmations. But he cant able to do cancellation for the final confirmation. For the final operation Milestone in
-
Searching problems when implementing my own repository manager
Hi there, i've serious problems to get the search fuctionality for my own repository manager running. I'm using the 'new', Netweaver-based api. Always if I'm launching a search I receive a ClassNotFoundException in the follwing context: #1.5#172.16.1
-
i was doing an in-app puchase and it said to contact apple support and another said purchased failed cannot connect to itunes store, how do i fix it?
-
I have deleted the thumbnails and now all I have are icon thumbnails. (.jpg) Help? Thanks!!