Table type mulit and auxiliary
difference between a table type auxiliary and table type multi ? where exactly we are using this ? can give some simple example plsT
auxiliary is used for one to one mapping where as multi can be used to create one to many and many to many mapping.
1) We use auxiliary when we want add single valued column,
eg. we need to add 'reward' property to profile and this field can have only one value.
In userProfile xml at appropriate item-descriptor level we create a table with type auxiliary and add reward property.so forach each profile, we will get reward option.
2) For One to Many mapping: We use multi, when want to add a multi valued(collection: set,map,list,array) column.
eg. we need to add secondary billing address to profile and this field can have more than one addresses.
In userProfile xml at appropriate item-descriptor level we create a table with type multi and add secondary billing address property as (collection:set,map,list,array)
.so forach each profile, we will get secondary billing address option, which can store more than one address.
3) For Many to Many mapping: We treat it as two one to many mapping.
For More details please repository guide or refer this blog Lakshya
Similar Messages
-
What is the need of Table Types,
when there is Tables.
Even when iam using in the Abap Programs in se38..
iam not getting any difference..
Even i want to about the use of Line type
when there is the structure..
iam sap 4.7 they gave that Table type describe the structure and
functional attributes of an internal table.Way: 1:
Go to SE84 --> Select ABAP Dict --> Table Types -->
Enter the short names like ORDER wih leading and ending * on the Table Types Field. ---> F8
This will bring all related entries of Table Types(Line Types) having ORDER has a part of its Name.
Way:2:
If you know the Table Name, then go SE11 --> Putch in the Table Name --> Press Display
Now put the cursor on the Table Name field, press CNTLSHFTF3, on the WHERE USED LIST Pop up, Select only the TABLE TYPE Option and press EXECUTE.
This will bring the Table Types and Line Types.
SAP Table Types
I. Transparent tables (BKPF, VBAK, VBAP, KNA1, COEP)
Allows secondary indexes (SE11->Display Table->Indexes)
Can be buffered (SE11->Display Table->technical settings) Heavily updated tables should not be buffered.
II. Pool Tables (match codes, look up tables)
Should be accessed via primary key or
Should be buffered (SE11->Display Table->technical settings)
No secondary indexes
Select * is Ok because all columns retrieved anyway
III. Cluster Tables (BSEG,BSEC) Should be accessed via primary key - very fast retrieval otherwise very slow
No secondary indexes
Select * is Ok because all columns retrieved anyway. Performing an operation on multiple rows is more efficient than single row operations. Therefore you still want to select into an internal table. If many rows are being selected into the internal table, you might still like to retrieve specific columns to cut down on the memory required.
Statistical SQL functions (SUM, AVG, MIN, MAX, etc) not supported
Can not be buffered
IV. Buffered Tables (includes both Transparent & Pool Tables)
While buffering database tables in program memory (SELECT into internal table) is generally a good idea for performance, it is not always necessary. Some tables are already buffered in memory. These are mostly configuration tables. If a table is already buffered, then a select statement against it is very fast. To determine if a table is buffered, choose the 'technical settings' soft button from the data dictionary display of a table (SE12). Pool tables should all be buffered.
Table Types : A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command
DATA : itab TYPE TTYP.
Reafer these links below for clear ideas.
http://help.sap.com/saphelp_nw04/helpdata/en/fb/f14736a1f0ad1fe10000009b38f839/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/90/8d7304b1af11d194f600a0c929b3c3/frameset.htm
Thanks
Allot points if this helps! -
Hello,
i have table type any and i want to know in the loop for every field which type he have ,for instance for field type Date8.
what i the best way to do so , i guess that I need to use for instance cl_abap_elemdescr=>get_data_type_kind( <lv_field> ) but i dont know
how to use it and check every field in the loop ...
E.g.
loop at <lt_fields> assigning <ls_fields>
* check for every field in <ls_fields> which type he have and if the field is type date8
* handle it diffrently
endloop.
Regards
JoyYou can use Absolute Name to get the absolute type from the type descriptor.
DATA: lt_vbak TYPE STANDARD TABLE OF vbak.
DATA: lo_struct TYPE REF TO cl_abap_structdescr,
lt_comp TYPE cl_abap_structdescr=>component_table,
la_comp LIKE LINE OF lt_comp.
lo_struct ?= cl_abap_typedescr=>describe_by_name( 'VBAK' ).
lt_comp = lo_struct->get_components( ).
WRITE: /(30) 'Field' , (40) 'Absolute Type'.
DATA: lv_abs_name TYPE string.
LOOP AT lt_comp INTO la_comp.
WRITE: /(30) la_comp-name, (40) la_comp-type->absolute_name.
ENDLOOP.
Regards,
Naimesh Patel -
Initial line number in Table type
Hi,
What does Initial line number signifies in the Table type-->Initialization and Access tab. No help documentation is present for this tab. is it allocates initial memory or is there any other functionality of initial line number.
thanks,
tanmayaI believe it is the equivalent of the OCCURS keyword when you define an internal table in ABAP. In structure DD40V, the field is called OCCURS!
matt -
How to display name of the table and the description and the table type
Hi,
Can you people tell me how to display the name of the table and the description and the table type (View, structure, etc...) used in the program.
I want to display in a list.
Kind Regardsuse this program
TABLES : TSTC, tstct.
TABLES : DD03l, DD02l.
DATA : Program like sy-repid.
DATA : BEGIN OF I_FINAL OCCURS 0,
tabname LIKE dd02l-tabname,
TABCLASS LIKE dd02l-tabCLASS,
TEXT LIKE DD02T-DDTEXT,
END OF I_FINAL.
DATA : BEGIN of ITAB Occurs 0,
name like dd02l-tabname,
END OF ITAB.
DATA : TCD(100) TYPE C.
DATA : var1 LIKE dd02l-tabname.
DATA : DESC LIKE TSTCT-TTEXT.
selection-screen skip.
SELECTION-SCREEN : BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : r1 RADIOBUTTON GROUP r DEFAULT 'X'.
Parameters : Tcode like sy-tcode.
selection-screen skip.
PARAMETERS : r2 RADIOBUTTON GROUP r.
Parameters : Prog like sy-repid.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
select-options : Type for dd02l-tabclass .
SELECTION-SCREEN END OF BLOCK B1 .
at selection-screen.
if r1 = 'X' and Tcode is initial.
message e001(00) with 'Enter Transaction Code' .
elseif r2 = 'X' and Prog is initial.
message e001(00) with 'Enter Program Name' .
endif.
START-OF-SELECTION.
if r1 = 'X'.
Prog = ' '.
select single * from TSTC where tcode = tcode.
if sy-subrc = 0.
program = TSTC-PGMNA.
select single TTEXT from tstct into desc where tcode = tcode and SPRSL = 'E'.
else.
Write :/ 'Invalid Transaction Code'.
exit.
endif.
elseif r2 = 'X'.
Tcode = ' '.
program = Prog.
endif.
CALL FUNCTION 'GET_TABLES'
EXPORTING
PROGNAME = Program
TABLES
TABLES_TAB = itab.
if itab is initial.
skip.
skip.
skip.
skip.
skip.
WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
ELSE.
PERFORM : categorize.
endif.
END-OF-SELECTION.
LOOP AT I_FINAL.
WRITE :/4 I_FINAL-tabname COLOR 2 INTENSIFIED OFF NO-GAP HOTSPOT ON, 35 I_FINAL-TABCLASS COLOR 2 INTENSIFIED OFF NO-GAP,
50 I_FINAL-TEXT COLOR 2 INTENSIFIED OFF NO-GAP.
ENDLOOP.
AT LINE-SELECTION.
TCD = SY-LISEL.
var1 = TCD+3(30).
set parameter id 'DTB' FIELD VAR1.
call transaction 'SE11' and skip first screen.
TOP-OF-PAGE.
WRITE :/45 'TABLE DETAILS RELATED TO THE TRANSACTION CODE' COLOR 7 .
WRITE :/2 'DATE : ' COLOR 1, SY-DATUM COLOR 1 INTENSIFIED OFF NO-GAP.
WRITE :/2 'TRANSACTION CODE : ' COLOR 1, Tcode COLOR 1 INTENSIFIED OFF NO-GAP.
WRITE :/2 'TCODE DESCRIPTION : ' COLOR 1, desc COLOR 1 INTENSIFIED OFF NO-GAP.
WRITE :/2 'PROGRAM NAME : ' COLOR 1, PROGRAM COLOR 1 INTENSIFIED OFF NO-GAP.
SKIP 1.
WRITE :/1(140) SY-ULINE.
WRITE :/4 'TABLE NAME' COLOR 5 INTENSIFIED OFF NO-GAP,35 'TABLE TYPE' COLOR 5 INTENSIFIED OFF NO-GAP,
55 'DESCRIPTION' COLOR 5 INTENSIFIED OFF NO-GAP.
WRITE :/1(140) SY-ULINE.
*& Form categorize
text
--> p1 text
<-- p2 text
FORM categorize .
SELECT dd02ltabname dd02ltabCLASS DD02T~DDTEXT
FROM dd02l INNER JOIN DD02T ON dd02ltabname = dd02Ttabname
INTO TABLE I_FINAL
FOR ALL ENTRIES IN itab
WHERE DD02L~TABNAME = ITAB-NAME AND TABCLASS IN TYPE AND DDLANGUAGE = 'E'.
if sy-subrc <> 0.
skip.
skip.
skip.
skip.
skip.
WRITE :/40 'No Data Found' color 6 INTENSIFIED OFF.
endif. -
Creating abap program to develop and activate a global table type and global structure.
Hi friends,
I want to create and activate a global structure and global table type by coding in ABAP editor only. so can I do that anyhow.
Please help me.
Thanks in advance.Thanks guys for your fruitful replies, as most of you asked the main purpose of my question, the answer is as follows:
in fact my purpose to do so is to create a function module that can fetch data dynamically from different database tables based on the codings in different abap program.
for example: in one abap program i am coding as follows:
tables: kna1.
types: begin of itab,
kunnr type kna1-kunnr,
name1 type kna1-name1,
end of itab.
data: it_tab type standard table of itab,
wa_tab type itab.
similarly in other program i am coding as follows:
tables: vbrp.
types: begin of itab,
posnr type vbrp-posnr,
matnr type vbrp-matnr,
arktx type vbrp-arktx,
end of itab.
data: it_tab type standard table of itab,
wa_tab type itab.
so now for both programs i want to call the same function module and fetch data as required in relative programs as mentioned above. in that case how to create that function module? -
Calling Oracle Stored proc with record type and table Type
I have a oracle SP which takes record type and table Type which are used for order management.
Is there anay way to populate parameters with these datatypes and call the stored procedure using ODP.NET?
Please help.
Thanks in advanceHi,
ODP supports associative arrays and REF Cursors. There is no support for PLSQL table of records.
Jenny -
How does a record type and table type works
Hi,
How a record type and table type work for the ref cursor,
below i m giving an example but its giving me errors
can any one help me for this?
declare
type empcurtyp is ref cursor;
type rectype is record (veid t.emp_id%type, vename t.ename%type);
TYPE tabtype IS TABLE OF rectype;
empcv empcurtyp;
vtab tabtype;
begin
open empcv for select emp_id,ename from t;
loop
fetch empcv into vtab;
exit when empcv%notfound;
dbms_output.put_line(vtab.vename||vtab.veid);
end loop;
close empcv;
end;
here we hav table t and i m taking only two fields of the table t which r emp_id and ename.Hi,
What errors are you getting with this? From experience you don't need a loop to put the records into the ref cursor its usually done on block.
HTHS
L :-) -
Table types and internal table
Hi all,
What is the relationship between table type in ABAP dictionary and internal table?
Moderator message : Search for available information OR read ABAP documentation. Thread locked.
Edited by: Vinod Kumar on Jul 16, 2011 11:16 AMYou can INCLUDE TYPE.
Types: begin of itab,
field1 type string,
field2 type string,
* More Fields in here.
Field30 type string,
End of itab.
Data: lt_itab type table of itab.
TYPES BEGIN OF new_itab.
INCLUDE type itab.
TYPES: field31 type string,
field32 type string,
END OF new_itab.
Regards,
Rich Heilman -
Calrification of structure and table type
hai experts,
what is the difference between STRUCTURE AND TABLE TYPE?Refer this for TABLE TYPE
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm
STRUCTURE
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2d74358411d1829f0000e829fbfe/content.htm
SE11, In structre u <b>cant maintain any values</b>. Its just used as a refernce.
In tables u can maintain values. -
Type 1 and Type 2 dimension in the same table
Assuming a table with both Type 1 and Type 2 dimensions how do you engineer an ETL load?
Please correct my options below if I am wrong
Option 1: Inside a Slowly changing dimension set all 3, fixed attributes, Historical attributes and changing attributes. Since historical attributes is Type 2 and changing attributes is Type 1. We get what we want, Correct?
Option 2: writing a merge statement, but not sure how exactly i would be code that.
Please suggest a way if you think both the options are wrong. Thanks in advance.
svkHi, Please refer to the
msdn blog.
Hope this helps..............
Ione -
How to create and add table type to a DDIC Structure in sap 3.1H
How to create and add table type to a DDIC Structure in sap 3.1H
How to create and add table type to a DDIC Structure in sap 3.1H
-
Can you input records to a COLLECTION TYPE object and use it as a table??
My PL/SQL stored procedure creates a list of employee number and phone number records. I don't want to store them in a table. I will be passing this list from one procedure to another in my package.
I created the object type (record) and collection type (table) using this statements.
CREATE TYPE obj_emp_phone_rec AS OBJECT
emp_number NUMBER,
emp_phone VARCHAR2(100)
CREATE TYPE obj_emp_phone_recs_table AS TABLE OF obj_emp_phone_rec
/Thing is, can I use the obj_emp_phone_recs_table "table type" as a table?
I.e. can I insert records to this in the package procedure and pass reference to it in called sub-procedures.
i.e. something like this
PACKAGE BODY abc IS
PROCEDURE kdkddk IS
BEGIN
-- Insert records to the obj_emp_phone_recs_table
obj_emp_phone_recs_table(1).emp_number := '1';
obj_emp_phone_recs_table(1).emp_phone := '0774949494';
obj_emp_phone_recs_table(2).emp_number := '234';
obj_emp_phone_recs_table(2).emp_phone := '285494';
-- Pass the table to the sub procedure
xyx(obj_emp_phone_recs_table);
END kdkddk;
END abc;If so how to insert to the obj_emp_phone_recs_table ???
Nothing on the net. In the Net I found only where u define a normal table's column as an object type and then inserting records to it.
Any help would be greatly appreciated.
Edited by: user12240205 on Oct 6, 2011 2:08 AMmhouri > drop type obj_emp_phone_recs_table;
Type dropped.
mhouri > drop type obj_emp_phone_rec ;
Type dropped.
mhouri > CREATE TYPE obj_emp_phone_rec AS OBJECT
2 (
3 emp_number NUMBER,
4 emp_phone VARCHAR2(100)
5 )
6 /
Type created.
mhouri > CREATE TYPE obj_emp_phone_recs_table AS TABLE OF obj_emp_phone_rec
2 /
Type created.
mhouri > create or replace procedure p1(pin_tab IN obj_emp_phone_recs_table)
2 is
3 begin
4 for j in 1..pin_tab.count
5 loop
6 dbms_output.put_line('record number '||j ||'-- emp number --'||pin_tab(j).emp_number);
7 end loop;
8
9 end p1;
10 /
Procedure created.
mhouri > create or replace procedure p2
2 is
3 lin_tab obj_emp_phone_recs_table := obj_emp_phone_recs_table();
4 begin
5 FOR i IN 1 .. 5
6 LOOP
7 lin_tab.extend;
8 lin_tab(i) := obj_emp_phone_rec(i, 'i-i-i');
9 END LOOP;
10
11 p1(lin_tab);
12
13 end p2;
14 /
Procedure created.
mhouri > set serveroutput on
mhouri > exec p2
record number 1-- emp number -- 1
record number 2-- emp number --2
record number 3-- emp number --3
record number 4-- emp number --4
record number 5-- emp number --5
PL/SQL procedure successfully completed.Best Regards
Mohamed Houri -
Definitions of record and table type
Im confused with the definition of record and table type. Below is my understanding, Please correct me if anything wrong. Thanks in advance!
Record type can only hold one record with multiple fields.
Table type is an array (multiple records) with only one field
Table type defined with %rowtype (table of records) is an array of multiple records with multiple fields.I am not sure that I understand what you are asking. I have not heard the term table type before.
However, I think a record type is more closely aligned to the %rowtype declaration. Maybe a collection is what you are looking for with the term table type.
From the Oracle 10g documentation:
%ROWTYPE
In PL/SQL, records are used to group data. A record consists of a number of related fields in which data values can be stored. The %ROWTYPE attribute provides a record type that represents a row in a table. The record can store an entire row of data selected from the table or fetched from a cursor or cursor variable.
Columns in a row and corresponding fields in a record have the same names and datatypes. In the example below, you declare a record named dept_rec. Its fields have the same names and datatypes as the columns in the dept table.
DECLARE
dept_rec dept%ROWTYPE; -- declare record variable -
How could I retrieve metadata about Array Type and Table Type?
I use DatabaseMetaData.getUDTs() method for obtain metadata about Object Types, but this method doesn't work with Array Type and Table Type.
JJ,
Go into the diagrams of the DBTools List Columns and DBTools Get Properties respectively. When you inspect this diagram, you will see the raw ActiveX properties and methods called to get the size information. The value of -1 means the requested recordset is already closed. This is the sort of thing that is controled by the driver (ODBC, OLE DB, Jet, etc) you are using. Notice that you can right click on the property and invoke nodes and get more information about these specific items directly from the ADO online help.
Crystal
Maybe you are looking for
-
Opportunity Product Revenue report using Narrative option
Hi, I have created quote report using "Opportunity product revenue report" with the use of narrative option and its working fine but the problem here is if opportunity has multiple product revenue items it shows in multiple quotes. For me it should s
-
How to hide fields in product master data
Hi gurus, could you please tell if it's possible to hide fields in Product maintenance (tr. COMMPR01). It's necessary to hide some fields in a standard Set type. Thanks in advance, Sunny.
-
Unexpected error, program closing
I can barely listen to a full song let alone do anything else as my itunes keeps crashing. it says itunes has stopped working and windows is checking for a solution. then says no solution the program must close. this happens every time what can i do?
-
Hello, Just I installed Oracle EBS HR Foundation User Management 9.1.0.5.0 on OIM11g, not configured and provisioned anything and now requirements are changed to TCA Foundation, how can I uninstall HR Foundation connector? Cheers
-
How to set tolerance exchange rate?
Hi all, I am looking for customizing in order to set tolerance exchange rate in case of translation when creating FI document. Eg: using transaction FB01. 40 100 GBP 55,54 USD (55,52 to 55,55 accepted) 50 100 GBP 55,54 USD (55,52 to 55,55 accepted) S