TABLE in a class
I am new to ABAP, however I'd prefer to use ABAP objects if possible. Do I understand that a class cannot contain the TABLES keyword!!! If so what strategy do I use such that a class or instanciated object may own it's own data. In other words the class would query the database and the resultset would be exposed through an interface. I looked at persistence, but I don't think that would always be appropriate. What is the "best practice" in this case?
Message was edited by: EvilWonka
Hi,
some comments;
the TABLES statement is obsolete and should not be used any more, except for one single reason: as interface work area for exchanging data with Dynpros. For technical reasons, it is still necessary there.
Also outside ABAP Objects, TABLES should not be used to declare work areas for Open SQL statements and the short forms of Open SQL statements as shown in Nablan's answer (no INTO clause) should not be used either!
The reason is, that the TABLES statement is about eightfold overloaded and serves too much different purposes. It allows implicit behavior of many different statements, that make a program quiet obscure.
As for Open SQL, you shold always create work areas explicitly with DATA and fill them with the INTO clause.
The recommendation is, to put functional coding only into methods, because syntax constructs, that are declared as obsolete, are forbiddem there. The only reason, that the syntax is allowed outside classes is the downward compatibility of ABAP.
Regards
Horst
PS: Since ABAP is historically grown as a procedural language and ABAP Objects is an addon, we have in fact less object oriented concepts for things like strings or collections. Where Jave uses classes, ABAP mostly uses statements and concepts built in to the language. Instead of collections, ABAP offers internal tables (complex data objects with dynamic size).
Similar Messages
-
What is the field and Table for "Batch Class" and "Class Type" in QM.
Hi All,
What is the field and Table for "Batch Class" and "Class Type" in QM.
Thanks,Hi,
For batch class the class type value is '023' . This you can find from KLAH table and the fileld for class type is KLART..
And also all the data related to batch class are found in tables INOB, KLAH,KKSK and for the characeteristics of batch materials you can refer AUSP table.
In INOB table, for batch class, you need to give 023 in KLART field and value MCH1 in OBTAB filed.
Please check this and let me know if this you need any more details? -
Problems using different tables for base class and derived class
I have a class named SuperProject and another class Project derived from
it. If I let SchemaTool generate the tables without specifying a "table"
extension, I get a single TABLE with all the columns from both classes and
everything works fine. But if I specify a "table" for the derived class,
SchemaTool generates the derived class with just one column (corresponds
to the attribute in derived class). Also it causes problems in using the
Project class in collection attributes.
JDO file:
<jdo>
<package name="jdo">
<class name="Project" identity-type="application"
persistence-capable-superclass="SuperProject">
<extension vendor-name="kodo" key="table" value="PROJECT"/>
</class>
<class name="SuperProject" identity-type="application"
objectid-class="ProjectId">
<field name="id" primary-key="true"/>
</class>
</package>
</jdo>
java classes:
public class Project extends SuperProject
String projectSpecific
public class SuperProject
BigDecimal id;
String name;
tables generated by SchemaTool:
TABLE SUPERPROJECTSX (IDX, JDOCLASSX, JDOLOCKX, NAMEX);
TABLE PROJECT(PROJECTSPECIFICX)
Thanks,
Justine ThomasJustine,
This will be resolved in 2.3.4, to be released later this evening.
-Patrick
In article <aofo2q$mih$[email protected]>, Justine Thomas wrote:
I have a class named SuperProject and another class Project derived from
it. If I let SchemaTool generate the tables without specifying a "table"
extension, I get a single TABLE with all the columns from both classes and
everything works fine. But if I specify a "table" for the derived class,
SchemaTool generates the derived class with just one column (corresponds
to the attribute in derived class). Also it causes problems in using the
Project class in collection attributes.
JDO file:
<jdo>
<package name="jdo">
<class name="Project" identity-type="application"
persistence-capable-superclass="SuperProject">
<extension vendor-name="kodo" key="table" value="PROJECT"/>
</class>
<class name="SuperProject" identity-type="application"
objectid-class="ProjectId">
<field name="id" primary-key="true"/>
</class>
</package>
</jdo>
java classes:
public class Project extends SuperProject
String projectSpecific
public class SuperProject
BigDecimal id;
String name;
tables generated by SchemaTool:
TABLE SUPERPROJECTSX (IDX, JDOCLASSX, JDOLOCKX, NAMEX);
TABLE PROJECT(PROJECTSPECIFICX)
Thanks,
Justine Thomas
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com -
How to improve speed of queries that use ORM one table per concrete class
Hi,
Many tools that make ORM (Object Relational Mapping) like Castor, Hibernate, Toplink, JPOX, etc.., have the one table per concrete class feature that maps objects to follow structure:
CREATE TABLE ABSTRACTPRODUCT (
ID VARCHAR(8) NOT NULL,
DESCRIPTION VARCHAR(60) NOT NULL,
PRIMARY KEY(ID)
CREATE TABLE PRODUCT (
ID VARCHAR(8) NOT NULL REFERENCES ABSTRACTPRODUCT(ID),
CODE VARCHAR(10) NOT NULL,
PRICE DECIMAL(12,2),
PRIMARY KEY(ID)
CREATE UNIQUE INDEX iProduct ON Product(code)
CREATE TABLE BOOK (
ID VARCHAR(8) NOT NULL REFERENCES PRODUCT(ID),
AUTHOR VARCHAR(60) NOT NULL,
PRIMARY KEY (ID)
CREATE TABLE COMPACTDISK (
ID VARCHAR(8) NOT NULL REFERENCES PRODUCT(ID),
ARTIST VARCHAR(60) NOT NULL,
PRIMARY KEY(ID)
there is a way to improve queries like
SELECT
pd.code CODE,
abpd.description DESCRIPTION,
DECODE(bk.id,NULL,cd.artist,bk.author) PERSON
FROM
ABSTRACTPRODUCT abpd,
PRODUCT pd,
BOOK bk,
COMPACTDISK cd
WHERE
pd.id = abpd.id AND
bk.id(+) = abpd.id AND
cd.id(+) = abpd.id AND
pd.code like '101%'
or like this:
SELECT
pd.code CODE,
abpd.description DESCRIPTION,
DECODE(bk.id,NULL,cd.artist,bk.author) PERSON
FROM
ABSTRACTPRODUCT abpd,
PRODUCT pd,
BOOK bk,
COMPACTDISK cd
WHERE
pd.id = abpd.id AND
bk.id(+) = abpd.id AND
cd.id(+) = abpd.id AND
abpd.description like '%STARS%' AND
pd.price BETWEEN 1 AND 10
think in a table with many rows, then exists something inside MaxDB to improve this type of queries? like some anotations on SQL? or declare tables that extends another by PK? on other databases i managed this using Materialized Views, but i think that this can be faster just using PK, i'm wrong? the better is to consolidate all tables in one table? what is the impact on database size with this consolidation?
note: with consolidation i will miss NOT NULL constraint at database side.
thanks for any insight.
ClóvisHi Lars,
i dont understand because the optimizer get that Index for TM at execution plan, and because dont use the join via KEY column, note the WHERE clause is "TM.OID = MF.MY_TIPO_MOVIMENTO" by the key column, and the optimizer uses an INDEX that the indexed column is ID_SYS, that isnt and cant be a primary key, because its not UNIQUE, follow the index columns:
indexes of TipoMovimento
INDEXNAME COLUMNNAME SORT COLUMNNO DATATYPE LEN INDEX_USED FILESTATE DISABLED
ITIPOMOVIMENTO TIPO ASC 1 VARCHAR 2 220546 OK NO
ITIPOMOVIMENTO ID_SYS ASC 2 CHAR 6 220546 OK NO
ITIPOMOVIMENTO MY_CONTA_DEBITO ASC 3 CHAR 8 220546 OK NO
ITIPOMOVIMENTO MY_CONTA_CREDITO ASC 4 CHAR 8 220546 OK NO
ITIPOMOVIMENTO1 ID_SYS ASC 1 CHAR 6 567358 OK NO
ITIPOMOVIMENTO2 DESCRICAO ASC 1 VARCHAR 60 94692 OK NO
after i create the index iTituloCobrancaX7 on TituloCobranca(OID,DATA_VENCIMENTO) in a backup instance and get surprised with the follow explain:
OWNER TABLENAME COLUMN_OR_INDEX STRATEGY PAGECOUNT
TC ITITULOCOBRANCA1 RANGE CONDITION FOR INDEX 5368
DATA_VENCIMENTO (USED INDEX COLUMN)
MF OID JOIN VIA KEY COLUMN 9427
TM OID JOIN VIA KEY COLUMN 22
TABLE HASHED
PS OID JOIN VIA KEY COLUMN 1350
BOL OID JOIN VIA KEY COLUMN 497
NO TEMPORARY RESULTS CREATED
JDBC_CURSOR_19 RESULT IS COPIED , COSTVALUE IS 988
note that now the optimizer gets the index ITITULOCOBRANCA1 as i expected, if i drop the new index iTituloCobrancaX7 the optimizer still getting this execution plan, with this the query executes at 110 ms, with that great news i do same thing in the production system, but the execution plan dont changes, and i still getting a long execution time this time at 413516 ms. maybe the problem is how optimizer measure my tables.
i checked in DBAnalyser that the problem is catalog cache hit rate (we discussed this at [catalog cache hit rate, how to increase?|;
) and the low selectivity of this SQL command, then its because of this that to achieve a better selectivity i must have an index with, MF.MY_SACADO, MF.TIPO and TC.DATA_VENCIMENTO, as explained in previous posts, since this type of index inside MaxDB isnt possible, i have no choice to speed this type of query without changing tables structure.
MaxDB developers can develop this type of index? or a feature like this dont have any plans to be made?
if no, i must create another schema, to consolidate tables to speed queries on my system, but with this consolidation i will get more overhead, i must solve the less selectivity because i think if the data on tables increase, the query becomes impossible, i see that CREATE INDEX supports FUNCTION, maybe a FUNCTION that join data of two tables can solve this?
about instance configuration it is:
Machine:
Version: '64BIT Kernel'
Version: 'X64/LIX86 7.6.03 Build 007-123-157-515'
Version: 'FAST'
Machine: 'x86_64'
Processors: 2 ( logical: 8, cores: 8 )
data volumes:
ID MODE CONFIGUREDSIZE USABLESIZE USEDSIZE USEDSIZEPERCENTAGE DROPVOLUME TOTALCLUSTERAREASIZE RESERVEDCLUSTERAREASIZE USEDCLUSTERAREASIZE PATH
1 NORMAL 4194304 4194288 379464 9 NO 0 0 0 /db/SPDT/data/data01.dat
2 NORMAL 4194304 4194288 380432 9 NO 0 0 0 /db/SPDT/data/data02.dat
3 NORMAL 4194304 4194288 379184 9 NO 0 0 0 /db/SPDT/data/data03.dat
4 NORMAL 4194304 4194288 379624 9 NO 0 0 0 /db/SPDT/data/data04.dat
5 NORMAL 4194304 4194288 380024 9 NO 0 0 0 /db/SPDT/data/data05.dat
log volumes:
ID CONFIGUREDSIZE USABLESIZE PATH MIRRORPATH
1 51200 51176 /db/SPDT/log/log01.dat ?
parameters:
KERNELVERSION KERNEL 7.6.03 BUILD 007-123-157-515
INSTANCE_TYPE OLTP
MCOD NO
_SERVERDB_FOR_SAP YES
_UNICODE NO
DEFAULT_CODE ASCII
DATE_TIME_FORMAT ISO
CONTROLUSERID DBM
CONTROLPASSWORD
MAXLOGVOLUMES 2
MAXDATAVOLUMES 11
LOG_VOLUME_NAME_001 /db/SPDT/log/log01.dat
LOG_VOLUME_TYPE_001 F
LOG_VOLUME_SIZE_001 6400
DATA_VOLUME_NAME_0005 /db/SPDT/data/data05.dat
DATA_VOLUME_NAME_0004 /db/SPDT/data/data04.dat
DATA_VOLUME_NAME_0003 /db/SPDT/data/data03.dat
DATA_VOLUME_NAME_0002 /db/SPDT/data/data02.dat
DATA_VOLUME_NAME_0001 /db/SPDT/data/data01.dat
DATA_VOLUME_TYPE_0005 F
DATA_VOLUME_TYPE_0004 F
DATA_VOLUME_TYPE_0003 F
DATA_VOLUME_TYPE_0002 F
DATA_VOLUME_TYPE_0001 F
DATA_VOLUME_SIZE_0005 524288
DATA_VOLUME_SIZE_0004 524288
DATA_VOLUME_SIZE_0003 524288
DATA_VOLUME_SIZE_0002 524288
DATA_VOLUME_SIZE_0001 524288
DATA_VOLUME_MODE_0005 NORMAL
DATA_VOLUME_MODE_0004 NORMAL
DATA_VOLUME_MODE_0003 NORMAL
DATA_VOLUME_MODE_0002 NORMAL
DATA_VOLUME_MODE_0001 NORMAL
DATA_VOLUME_GROUPS 1
LOG_BACKUP_TO_PIPE NO
MAXBACKUPDEVS 2
LOG_MIRRORED NO
MAXVOLUMES 14
LOG_IO_BLOCK_COUNT 8
DATA_IO_BLOCK_COUNT 64
BACKUP_BLOCK_CNT 64
_DELAY_LOGWRITER 0
LOG_IO_QUEUE 50
_RESTART_TIME 600
MAXCPU 8
MAX_LOG_QUEUE_COUNT 0
USED_MAX_LOG_QUEUE_COUNT 8
LOG_QUEUE_COUNT 1
MAXUSERTASKS 500
_TRANS_RGNS 8
_TAB_RGNS 8
_OMS_REGIONS 0
_OMS_RGNS 7
OMS_HEAP_LIMIT 0
OMS_HEAP_COUNT 8
OMS_HEAP_BLOCKSIZE 10000
OMS_HEAP_THRESHOLD 100
OMS_VERS_THRESHOLD 2097152
HEAP_CHECK_LEVEL 0
_ROW_RGNS 8
RESERVEDSERVERTASKS 16
MINSERVERTASKS 28
MAXSERVERTASKS 28
_MAXGARBAGE_COLL 1
_MAXTRANS 4008
MAXLOCKS 120080
_LOCK_SUPPLY_BLOCK 100
DEADLOCK_DETECTION 4
SESSION_TIMEOUT 180
OMS_STREAM_TIMEOUT 30
REQUEST_TIMEOUT 5000
_IOPROCS_PER_DEV 2
_IOPROCS_FOR_PRIO 0
_IOPROCS_FOR_READER 0
_USE_IOPROCS_ONLY NO
_IOPROCS_SWITCH 2
LRU_FOR_SCAN NO
_PAGE_SIZE 8192
_PACKET_SIZE 131072
_MINREPLY_SIZE 4096
_MBLOCK_DATA_SIZE 32768
_MBLOCK_QUAL_SIZE 32768
_MBLOCK_STACK_SIZE 32768
_MBLOCK_STRAT_SIZE 16384
_WORKSTACK_SIZE 8192
_WORKDATA_SIZE 8192
_CAT_CACHE_MINSIZE 262144
CAT_CACHE_SUPPLY 131072
INIT_ALLOCATORSIZE 262144
ALLOW_MULTIPLE_SERVERTASK_UKTS NO
_TASKCLUSTER_01 tw;al;ut;2000*sv,100*bup;10*ev,10*gc;
_TASKCLUSTER_02 ti,100*dw;63*us;
_TASKCLUSTER_03 equalize
_DYN_TASK_STACK NO
_MP_RGN_QUEUE YES
_MP_RGN_DIRTY_READ DEFAULT
_MP_RGN_BUSY_WAIT DEFAULT
_MP_DISP_LOOPS 2
_MP_DISP_PRIO DEFAULT
MP_RGN_LOOP -1
_MP_RGN_PRIO DEFAULT
MAXRGN_REQUEST -1
_PRIO_BASE_U2U 100
_PRIO_BASE_IOC 80
_PRIO_BASE_RAV 80
_PRIO_BASE_REX 40
_PRIO_BASE_COM 10
_PRIO_FACTOR 80
_DELAY_COMMIT NO
_MAXTASK_STACK 512
MAX_SERVERTASK_STACK 500
MAX_SPECIALTASK_STACK 500
_DW_IO_AREA_SIZE 50
_DW_IO_AREA_FLUSH 50
FBM_VOLUME_COMPRESSION 50
FBM_VOLUME_BALANCE 10
_FBM_LOW_IO_RATE 10
CACHE_SIZE 262144
_DW_LRU_TAIL_FLUSH 25
XP_DATA_CACHE_RGNS 0
_DATA_CACHE_RGNS 64
XP_CONVERTER_REGIONS 0
CONVERTER_REGIONS 8
XP_MAXPAGER 0
MAXPAGER 64
SEQUENCE_CACHE 1
_IDXFILE_LIST_SIZE 2048
VOLUMENO_BIT_COUNT 8
OPTIM_MAX_MERGE 500
OPTIM_INV_ONLY YES
OPTIM_CACHE NO
OPTIM_JOIN_FETCH 0
JOIN_SEARCH_LEVEL 0
JOIN_MAXTAB_LEVEL4 16
JOIN_MAXTAB_LEVEL9 5
_READAHEAD_BLOBS 32
CLUSTER_WRITE_THRESHOLD 80
CLUSTERED_LOBS NO
RUNDIRECTORY /var/opt/sdb/data/wrk/SPDT
OPMSG1 /dev/console
OPMSG2 /dev/null
_KERNELDIAGFILE knldiag
KERNELDIAGSIZE 800
_EVENTFILE knldiag.evt
_EVENTSIZE 0
_MAXEVENTTASKS 2
_MAXEVENTS 100
_KERNELTRACEFILE knltrace
TRACE_PAGES_TI 2
TRACE_PAGES_GC 20
TRACE_PAGES_LW 5
TRACE_PAGES_PG 3
TRACE_PAGES_US 10
TRACE_PAGES_UT 5
TRACE_PAGES_SV 5
TRACE_PAGES_EV 2
TRACE_PAGES_BUP 0
KERNELTRACESIZE 5369
EXTERNAL_DUMP_REQUEST NO
_AK_DUMP_ALLOWED YES
_KERNELDUMPFILE knldump
_RTEDUMPFILE rtedump
_UTILITY_PROTFILE dbm.utl
UTILITY_PROTSIZE 100
_BACKUP_HISTFILE dbm.knl
_BACKUP_MED_DEF dbm.mdf
_MAX_MESSAGE_FILES 0
_SHMKERNEL 44601
__PARAM_CHANGED___ 0
__PARAM_VERIFIED__ 2008-05-03 23:12:55
DIAG_HISTORY_NUM 2
DIAG_HISTORY_PATH /var/opt/sdb/data/wrk/SPDT/DIAGHISTORY
_DIAG_SEM 1
SHOW_MAX_STACK_USE NO
SHOW_MAX_KB_STACK_USE NO
LOG_SEGMENT_SIZE 2133
_COMMENT
SUPPRESS_CORE YES
FORMATTING_MODE PARALLEL
FORMAT_DATAVOLUME YES
OFFICIAL_NODE
UKT_CPU_RELATIONSHIP NONE
HIRES_TIMER_TYPE CPU
LOAD_BALANCING_CHK 30
LOAD_BALANCING_DIF 10
LOAD_BALANCING_EQ 5
HS_STORAGE_DLL libhsscopy
HS_SYNC_INTERVAL 50
USE_OPEN_DIRECT YES
USE_OPEN_DIRECT_FOR_BACKUP NO
SYMBOL_DEMANGLING NO
EXPAND_COM_TRACE NO
JOIN_TABLEBUFFER 128
SET_VOLUME_LOCK YES
SHAREDSQL YES
SHAREDSQL_CLEANUPTHRESHOLD 25
SHAREDSQL_COMMANDCACHESIZE 262144
MEMORY_ALLOCATION_LIMIT 0
USE_SYSTEM_PAGE_CACHE YES
USE_COROUTINES YES
FORBID_LOAD_BALANCING YES
MIN_RETENTION_TIME 60
MAX_RETENTION_TIME 480
MAX_SINGLE_HASHTABLE_SIZE 512
MAX_HASHTABLE_MEMORY 5120
ENABLE_CHECK_INSTANCE YES
RTE_TEST_REGIONS 0
HASHED_RESULTSET YES
HASHED_RESULTSET_CACHESIZE 262144
CHECK_HASHED_RESULTSET 0
AUTO_RECREATE_BAD_INDEXES NO
AUTHENTICATION_ALLOW
AUTHENTICATION_DENY
TRACE_AK NO
TRACE_DEFAULT NO
TRACE_DELETE NO
TRACE_INDEX NO
TRACE_INSERT NO
TRACE_LOCK NO
TRACE_LONG NO
TRACE_OBJECT NO
TRACE_OBJECT_ADD NO
TRACE_OBJECT_ALTER NO
TRACE_OBJECT_FREE NO
TRACE_OBJECT_GET NO
TRACE_OPTIMIZE NO
TRACE_ORDER NO
TRACE_ORDER_STANDARD NO
TRACE_PAGES NO
TRACE_PRIMARY_TREE NO
TRACE_SELECT NO
TRACE_TIME NO
TRACE_UPDATE NO
TRACE_STOP_ERRORCODE 0
TRACE_ALLOCATOR 0
TRACE_CATALOG 0
TRACE_CLIENTKERNELCOM 0
TRACE_COMMON 0
TRACE_COMMUNICATION 0
TRACE_CONVERTER 0
TRACE_DATACHAIN 0
TRACE_DATACACHE 0
TRACE_DATAPAM 0
TRACE_DATATREE 0
TRACE_DATAINDEX 0
TRACE_DBPROC 0
TRACE_FBM 0
TRACE_FILEDIR 0
TRACE_FRAMECTRL 0
TRACE_IOMAN 0
TRACE_IPC 0
TRACE_JOIN 0
TRACE_KSQL 0
TRACE_LOGACTION 0
TRACE_LOGHISTORY 0
TRACE_LOGPAGE 0
TRACE_LOGTRANS 0
TRACE_LOGVOLUME 0
TRACE_MEMORY 0
TRACE_MESSAGES 0
TRACE_OBJECTCONTAINER 0
TRACE_OMS_CONTAINERDIR 0
TRACE_OMS_CONTEXT 0
TRACE_OMS_ERROR 0
TRACE_OMS_FLUSHCACHE 0
TRACE_OMS_INTERFACE 0
TRACE_OMS_KEY 0
TRACE_OMS_KEYRANGE 0
TRACE_OMS_LOCK 0
TRACE_OMS_MEMORY 0
TRACE_OMS_NEWOBJ 0
TRACE_OMS_SESSION 0
TRACE_OMS_STREAM 0
TRACE_OMS_VAROBJECT 0
TRACE_OMS_VERSION 0
TRACE_PAGER 0
TRACE_RUNTIME 0
TRACE_SHAREDSQL 0
TRACE_SQLMANAGER 0
TRACE_SRVTASKS 0
TRACE_SYNCHRONISATION 0
TRACE_SYSVIEW 0
TRACE_TABLE 0
TRACE_VOLUME 0
CHECK_BACKUP NO
CHECK_DATACACHE NO
CHECK_KB_REGIONS NO
CHECK_LOCK NO
CHECK_LOCK_SUPPLY NO
CHECK_REGIONS NO
CHECK_TASK_SPECIFIC_CATALOGCACHE NO
CHECK_TRANSLIST NO
CHECK_TREE NO
CHECK_TREE_LOCKS NO
CHECK_COMMON 0
CHECK_CONVERTER 0
CHECK_DATAPAGELOG 0
CHECK_DATAINDEX 0
CHECK_FBM 0
CHECK_IOMAN 0
CHECK_LOGHISTORY 0
CHECK_LOGPAGE 0
CHECK_LOGTRANS 0
CHECK_LOGVOLUME 0
CHECK_SRVTASKS 0
OPTIMIZE_AGGREGATION YES
OPTIMIZE_FETCH_REVERSE YES
OPTIMIZE_STAR_JOIN YES
OPTIMIZE_JOIN_ONEPHASE YES
OPTIMIZE_JOIN_OUTER YES
OPTIMIZE_MIN_MAX YES
OPTIMIZE_FIRST_ROWS YES
OPTIMIZE_OPERATOR_JOIN YES
OPTIMIZE_JOIN_HASHTABLE YES
OPTIMIZE_JOIN_HASH_MINIMAL_RATIO 1
OPTIMIZE_OPERATOR_JOIN_COSTFUNC YES
OPTIMIZE_JOIN_PARALLEL_MINSIZE 1000000
OPTIMIZE_JOIN_PARALLEL_SERVERS 0
OPTIMIZE_JOIN_OPERATOR_SORT YES
OPTIMIZE_QUAL_ON_INDEX YES
DDLTRIGGER YES
SUBTREE_LOCKS NO
MONITOR_READ 2147483647
MONITOR_TIME 2147483647
MONITOR_SELECTIVITY 0
MONITOR_ROWNO 0
CALLSTACKLEVEL 0
OMS_RUN_IN_UDE_SERVER NO
OPTIMIZE_QUERYREWRITE OPERATOR
TRACE_QUERYREWRITE 0
CHECK_QUERYREWRITE 0
PROTECT_DATACACHE_MEMORY NO
LOCAL_REDO_LOG_BUFFER_SIZE 0
FILEDIR_SPINLOCKPOOL_SIZE 10
TRANS_HISTORY_SIZE 0
TRANS_THRESHOLD_VALUE 60
ENABLE_SYSTEM_TRIGGERS YES
DBFILLINGABOVELIMIT 70L80M85M90H95H96H97H98H99H
DBFILLINGBELOWLIMIT 70L80L85L90L95L
LOGABOVELIMIT 50L75L90M95M96H97H98H99H
AUTOSAVE 1
BACKUPRESULT 1
CHECKDATA 1
EVENT 1
ADMIN 1
ONLINE 1
UPDSTATWANTED 1
OUTOFSESSIONS 3
ERROR 3
SYSTEMERROR 3
DATABASEFULL 1
LOGFULL 1
LOGSEGMENTFULL 1
STANDBY 1
USESELECTFETCH YES
USEVARIABLEINPUT NO
UPDATESTAT_PARALLEL_SERVERS 0
UPDATESTAT_SAMPLE_ALGO 1
SIMULATE_VECTORIO IF_OPEN_DIRECT_OR_RAW_DEVICE
COLUMNCOMPRESSION YES
TIME_MEASUREMENT NO
CHECK_TABLE_WIDTH NO
MAX_MESSAGE_LIST_LENGTH 100
SYMBOL_RESOLUTION YES
PREALLOCATE_IOWORKER NO
CACHE_IN_SHARED_MEMORY NO
INDEX_LEAF_CACHING 2
NO_SYNC_TO_DISK_WANTED NO
SPINLOCK_LOOP_COUNT 30000
SPINLOCK_BACKOFF_BASE 1
SPINLOCK_BACKOFF_FACTOR 2
SPINLOCK_BACKOFF_MAXIMUM 64
ROW_LOCKS_PER_TRANSACTION 50
USEUNICODECOLUMNCOMPRESSION NO
about send you the data from tables, i dont have permission to do that, since all data is in a production system, the customer dont give me the rights to send any information. sorry about that.
best regards
Clóvis -
Tables for development class and Message Class
Hi All,
In which table is Message Class and Development class stored.
Thanks,
SantoshHi All,
I am closing this thread..I was looking for a single table which does this and it is TADIR with object = MSAG
Thanks,
Santosh
Edited by: Santosh Kumar KezkhepatMelathil on Aug 29, 2008 1:32 PM -
Hyperlink table for IO class Issue - DMWB transaction
Hi,
We have problems when we want to activate some objects, specifically "ZRM_DOCXX". When we try to activate this object, an popup appears with the next error:
"There is no active "hyperlink" table for IO class 'ZRM_DOCP05' in 'ZRM_DOC05'
Message no. MODEL058
Procedure
Check the tabulation for the IO class &V2& and correct it if necessary."
Anyone knows where can we can customize this "hyperlink" table?
Thanks in advance and regards,
SidneyHi Raja,
Thanks for your reply.
When i entered the code you sent me, i get a hyperling with "Test Link". I am already haveing a link for the production order.
When i click on the "Test Link", it stays in the same page.
I sent the code in the forum.
Is there anything that you can help me?
I have created a transation ZCUS3 in SAP. The original Transaction code is ZCUS
In "Services" file,i have :
ZCUS1.srvc --> ~transaction ZCUS
ZCUS3.srvc--> ~transaction ZCUS3
~sources zcus1
Is the above settings right ?
Please do help me.
Thanks ,
Sathya -
Urgent!!!How to add a Dropdown in a Table View Iterator CLass?
Hi All,
I want to add a Drop Down List in the Table View Iterator Class. I am not able to do that.
If any of you have done please reply, as it is very urgent.
Please give the code extract possible (with data defination too)
Regards,
Dhaval
Points will be given
Mark this as UrgentHi
You need to modify RENDER_CELL_START method of your iterator class and you use the p_replacement_bee attribute to output the drop down
The example below outputs the units of measure for a material
data:
col_dropdown TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX,
col_listitem TYPE REF TO CL_HTMLB_LISTBOXITEM,
table_bee TYPE REF TO cl_bsp_bee_table,
CASE p_column_key.
WHEN 'Column Name'.
needs to change. way too slow to select each time.
prod_id = <current_line>-matnr.
CALL FUNCTION 'Z_GET_UOM'
EXPORTING
PRODUCT_ID = prod_id
IMPORTING
UOMLIST = uom_list.
clear uom_line. append uom_line to uom_list.
CREATE OBJECT table_bee.
CREATE OBJECT col_dropdown.
rowidx = p_row_index.
shift rowidx left deleting leading space.
concatenate p_column_key rowidx into col_dropdown->id.
col_dropdown->width = '100%'.
col_dropdown->selection = <current_line>-zieme.
table_bee->add( level = 1 element = col_dropdown ).
loop at uom_list into uom_line.
CREATE OBJECT col_listitem.
col_listitem->key = uom_line-name.
col_listitem->value = uom_line-value.
table_bee->add( level = 2 element = col_listitem ).
endloop.
p_replacement_bee = table_bee. -
Passing internal tables to a class
Hi All,
I have a problem at the moment, I need to pass an internal table to a class
The problem is that depending on user input one of two differnet tables will be passed.
TYPES: BEGIN OF t_destination_structure,
matnr TYPE mbew-matnr,
swerk TYPE mbew-bwkey,
sverpr TYPE mbew-verpr,
speinh TYPE mbew-peinh,
bwkey TYPE mbew-bwkey,
verpr TYPE mbew-verpr,
peinh TYPE mbew-peinh,
lbkum TYPE mbew-lbkum,
salk3 TYPE mbew-salk3,
new_verpr TYPE mbew-verpr,
new_salk3 TYPE mbew-salk3,
bwtar TYPE mbew-bwtar,
it_colours TYPE lvc_t_scol,
END OF t_destination_structure.
TYPES: BEGIN OF t_pur_org_structure,
matnr TYPE mbew-matnr,
bwkey TYPE mbew-bwkey,
verpr TYPE mbew-verpr,
peinh TYPE mbew-peinh,
lbkum TYPE mbew-lbkum,
salk3 TYPE mbew-salk3,
new_verpr TYPE mbew-verpr,
new_salk3 TYPE mbew-salk3,
bwtar TYPE mbew-bwtar,
it_colours TYPE lvc_t_scol,
END OF t_pur_org_structure.
DATA: i_destination_structure TYPE TABLE OF t_destination_structure,
i_pur_org_structure TYPE TABLE OF t_pur_org_structure.
PERFORM Output USING i_destination_structure 1.
OR
PERFORM Output USING i_pur_org_structure 2.
" Output for def
FORM Output USING fuw_PassedTable fuw_Output_Switch
" assignment that I want to make o_EventHandle is already created
o_EventHandle->li_destination_structure = fuw_PassedTable.
" Class definition
CLASS lcl_LocalEventHandler DEFINITION.
PUBLIC SECTION.
DATA: li_destination_structure TYPE REF TO data, ************************************************************************
lw_radio_choice TYPE string.
METHODS: OnUserCommand FOR EVENT added_function OF cl_salv_events IMPORTING e_salv_function.
" Applies the GLEP from a souce branch to selected branch(es) GELP
" DATA: iPassedTable TYPE passedtable.
PROTECTED SECTION.
PRIVATE SECTION.
METHODS: apply_change.
METHODS: simulate_change.
ENDCLASS.
When run this produces the error cannot convert type H to I
All I need is the attribute to be a generic tabe that will become the passed table type, this sort of thing shouldnt be rocket science but I am having real trouble in my TYPE assignment
If anyone can help or maybe have some ideas in how I can do this that would be great
Cheers
IanHi,
You have to create the tables dynamic. You can do this via CREATE DATA.. Also have a look at the RTTI classes.
I have added an example. Pass the itab via importing parameter (TYPE ANY TABLE), create data like the imported table, assign a field-symbol to the created data and, if needed, move the data from the passed itab to the dynamic itab.
REPORT zz_dynamic_itab.
CLASS lcl_sample DEFINITION DEFERRED.
DATA lt_sflight TYPE TABLE OF sflight.
DATA lt_spfli TYPE TABLE OF spfli.
DATA lcl_sample TYPE REF TO lcl_sample.
CLASS lcl_sample DEFINITION
CLASS lcl_sample DEFINITION.
PUBLIC SECTION.
METHODS
create_itab_from_data IMPORTING it_table TYPE ANY TABLE.
ENDCLASS. "lcl_sample DEFINITION
CLASS lcl_sample IMPLEMENTATION
CLASS lcl_sample IMPLEMENTATION.
METHOD create_itab_from_data.
DATA lr_table TYPE REF TO data.
DATA lr_wa_table TYPE REF TO data.
FIELD-SYMBOLS <lt_table> TYPE ANY TABLE. "Dynamic Table
FIELD-SYMBOLS <ls_table> TYPE ANY. "Dynamic WA of Table
Create data object from your table
CREATE DATA lr_table LIKE it_table.
Create your itab.
ASSIGN lr_table->* TO <lt_table>.
<lt_table> = it_table.
Create wa
CREATE DATA lr_wa_table LIKE LINE OF <lt_table>.
ASSIGN lr_wa_table->* TO <ls_table>.
ENDMETHOD. "create_table_from_data
ENDCLASS. "lcl_sample IMPLEMENTATION
START-OF-SELECTION.
Creates local class
CREATE OBJECT lcl_sample.
First table: sflight
SELECT *
FROM sflight
INTO TABLE lt_sflight.
Pass to class with method
lcl_sample->create_itab_from_data( lt_sflight ).
Second table: spfli
SELECT *
FROM spfli
INTO TABLE lt_spfli.
Pass to class with same method
lcl_sample->create_itab_from_data( lt_spfli ).
Cheers,
Roelof -
I need to know table for field CLASS , which is coming in cl30n
Hi,
I have to create a report customer meterial price.For this I need one coloumn i.e Finished Good material(coming from cl30n transaction and field name CLASS). I want to know in which table this field "CLASS" is getting stored.AS I am getting
structure CLSELINPUT where this field is stored but I need to know table .
Regards.Hi Ian ,
Thanks for your support.I need to fetch spare part meterial on basis of this class .which is the correct table to get spare parts details and how we can link klah with it.
Regards. -
More problems storing a passed table to a class.
Yesterday I posted a question regarding the need to pass an internal table to a class, have the class 'store' the table so any method in the class could then access the data.
I had loads of help and got this reply which work well
Unofrtuantely I cannot seem to loop through the table to get the data eg in the normal way
table = internal_table.
wa_table like line of table.
loop at table into wa_table.
write wa_table-field1.
write wa_table-field2.
write wa_table-field3.
endloop.
Also I will I think also need to pass this table into salv class, as I understand it is at the moment a pointer to a table?
I am a little lost as to why the TYPE ANY TABLE cannot be used on the DATA command, this would from what I have seen solve so many problems and reduce the amount of code 10 fold. Does anyone think or know if SAP will implement this or realse a patch to update OO?
Sorry for the silly questions, but I have onlly be coding ABAP for a week or so and coming from a python and C((+)) ABAP types are quite limiting..
CLASS lcl_some_class DEFINITION.
PUBLIC SECTION.
DATA mdo_table_object TYPE REF TO data.
METHODS: constructor
IMPORTING it_table TYPE STANDARD TABLE,
some_method.
ENDCLASS. "lcl_some_class DEFINITION
CLASS lcl_some_class IMPLEMENTATION.
METHOD constructor.
FIELD-SYMBOLS <gt_table> TYPE ANY TABLE.
CREATE DATA me->mdo_table_object LIKE it_table.
ASSIGN me->mdo_table_object->* TO <gt_table>.
<gt_table> = it_table.
ENDMETHOD. "constructor
METHOD some_method.
DATA ldo_line_object TYPE REF TO data.
DATA lo_struct_descr TYPE REF TO cl_abap_structdescr.
FIELD-SYMBOLS <lt_table> TYPE ANY TABLE.
FIELD-SYMBOLS <comp_wa> TYPE abap_compdescr.
ASSIGN me->mdo_table_object->* TO <lt_table>.
CREATE DATA ldo_line_object LIKE LINE OF <lt_table>.
lo_struct_descr ?= cl_abap_typedescr=>describe_by_data_ref( ldo_line_object ).
LOOP AT lo_struct_descr->components ASSIGNING <comp_wa>.
WRITE: / <comp_wa>-name, <comp_wa>-type_kind,
<comp_wa>-length, <comp_wa>-decimals.
ENDLOOP.
ULINE.
ENDMETHOD. "some_method
ENDCLASS. "lcl_some_class IMPLEMENTATION
TYPES: BEGIN OF type_eina,
infnr TYPE infnr,
matnr TYPE matnr,
lifnr TYPE lifnr,
END OF type_eina.
TYPES: BEGIN OF type_mara,
matnr TYPE matnr,
ersda TYPE ersda,
ernam TYPE ernam,
END OF type_mara.
DATA gt_eina TYPE STANDARD TABLE OF type_eina.
DATA gt_mara TYPE STANDARD TABLE OF type_mara.
DATA go_object_of_some_class TYPE REF TO lcl_some_class.
START-OF-SELECTION.
SELECT infnr matnr lifnr
FROM eina
INTO TABLE gt_eina
UP TO 10 ROWS.
SELECT matnr ersda ernam
FROM mara
INTO TABLE gt_mara
UP TO 20 ROWS.
CREATE OBJECT go_object_of_some_class
EXPORTING
it_table = gt_eina.
go_object_of_some_class->some_method( ).
CREATE OBJECT go_object_of_some_class
EXPORTING
it_table = gt_mara.
go_object_of_some_class->some_method( ).
Cheers again for all your help
Ian
PS (please dont get me wrong I am not knocking ABAP, I know with any language there is a learning curve, and I have seen so nice tools that other languages do not provide, and the speed of creating apps is real quick)Hi Ian,
change implementation of method "some_method" according to the following code:
METHOD some_method.
DATA ldo_line_object TYPE REF TO data.
DATA lo_struct_descr TYPE REF TO cl_abap_structdescr.
FIELD-SYMBOLS <lt_table> TYPE ANY TABLE.
FIELD-SYMBOLS <ls_line> TYPE ANY.
FIELD-SYMBOLS <ld_comp> TYPE ANY.
FIELD-SYMBOLS <comp_wa> TYPE abap_compdescr.
ASSIGN me->mdo_table_object->* TO <lt_table>.
CREATE DATA ldo_line_object LIKE LINE OF <lt_table>.
ASSIGN ldo_line_object->* TO <ls_line>.
lo_struct_descr ?= cl_abap_typedescr=>describe_by_data_ref( ldo_line_object ).
* Create header
LOOP AT lo_struct_descr->components ASSIGNING <comp_wa>.
WRITE: <comp_wa>-name.
ENDLOOP.
NEW-LINE.
* value output
LOOP AT <lt_table> ASSIGNING <ls_line>.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <ls_line> TO <ld_comp>.
IF sy-subrc = 0.
WRITE <ld_comp>.
ELSE.
NEW-LINE.
EXIT.
ENDIF.
ENDDO.
ENDLOOP.
ULINE.
ENDMETHOD. "some_method
( Using markup for code, really helps reading code... )
Kind Regards
REA
Edited by: Ramy El-Arnaouty on Apr 15, 2011 10:55 AM -
Internal table as a class attribute
Hello everybody.
I think many of you hhave passed through the same problem. I have a requirement to pass internal table to class as for example class constructor parameter. It is desirable that class should get the table of variable structure.
How coult that be realized?
Thank you in advance for your kind help.
Best regards,
AndreyHere is a quick sample........
report zrich_0003 .
* CLASS lcl_app DEFINITION
class lcl_app definition.
public section.
methods: constructor importing table type table.
endclass.
* CLASS lcl_app IMPLEMENTATION
class lcl_app implementation.
method constructor.
check sy-subrc = 0.
endmethod.
endclass.
data: app type ref to lcl_app.
data: imara type table of mara.
start-of-selection.
create object app
exporting
table = imara.
check sy-subrc = 0.
Regards,
Rich Heilman -
Data maintenance in a table of delivery class S
Hi,
If i have to maintain en entry in a table with delivery class S (System table, maint. only by SAP) , can i do it in any client
or only system maintenance client.
Regards,
sushanthi
There are the following delivery classes:
A: Application table (master and transaction data).
C: Customer table, data is maintained by the customer only.
L: Table for storing temporary data.
G: Customer table, SAP may insert new data records, but may not overwrite or delete existing data records. The customer namespace must be defined in table TRESC. (Use Report RDDKOR54 here).
E: System table with its own namespaces for customer entries. The customer namespace must be defined in table TRESC. (Use Report RDDKOR54 here.)
S: System table, data changes have the same status as program changes.
W: System table (e.g. table of the development environment) whose data is transported with its own transport objects (e.g. R3TR PROG, R3TR TABL, etc.).
Behavior during client copy
Only the data of client-specific tables is copied.
Classes C, G, E, S: The data records of the table are copied to the target client.Classes W, L: The data records of the table are not copied to the target client.
Class A: Data records are only copied to the target client if explicitly requested (parameter option). Normally it does not make sense to transport such data, but is supported to permit you to copy an entire client environment.
Behavior during installation, upgrade and language import
The behavior differs here for client-specific and cross-client tables.
Client-specific tables
Classes A and C: Data is only imported into client 000. Existing data records are overwritten.
Classes E, S and W: Data is imported into all clients. Existing data records are overwritten.Class G: Existing data records are overwritten in client 000. In all other clients, new data records are inserted, but existing data records are not overwritten.
Class L: No data is imported.
Cross-client tables
Classes A, L and C: No data is imported.
Classes E, S, and W: Data is imported. Exisitng data records with the same key are overwritten.Classe G: Data records that do not exist are inserted, but existing data records are not overwritten.
Behavior during transport between customer systems
Data records of tables of delivery class L are not imported into the target system. Data records of tables of delivery classes A, C, E, G, S and W are imported into the target system (this is done for the target client specified in the transport for client-specific tables).
Use of the delivery class in the extended table maintenance
The delivery class is also analyzed in the extended table maintenance (SM30). The maintenance interface generated for a table makes the following checks:
You cannot transport the entered data with the transport link of the generated maintenance interface for tables of delivery classes W and L.
When you enter data, there is a check if this data violates the namespace defined for the table in table TRESC. If the data violates the namespace, the input is rejected.
Hope this information is useful to you.
Regards
Vinodh A -
Tables in which class and Characters are stored
Hi all,
Can any one tell me in which tables class and Characters are stored
With Rgds
vinodCharacteristics :
CABN Characteristics ( o.a. batch/vendor)
CABNT Characteristics description
CAWN Characteristics ( o.a. material)
CAWNT Characteristics description
AUSP Characteristic Values
Class types and objects :TCLAO Several class types for object
TCLA Class types ( vb. lfa1 => v10 en 010)
TCLAT Class type text
TCLT Classifiable objects
TCLC Classification status
regards,
indranil -
Specifying table with jdbc-class-map-name
Greetings
How do I specify the name of the table to map to when using the jdbc-
class-map-name hint?
In my jdo file, I have specified:
<class name="Customer" objectid-class="CustomerId">
<extension vendor-name="kodo" key="jdbc-class-map-name" value="base">
<extension vendor-name="kodo" key="table" value="PERSONS"/>
</extension>
but when mappingtool generates the mapping file, the "table" hint
is ignored, and I end up with the following in the .mapping file:
<class name="Customer">
<jdbc-class-map type="base" table="FRED.CUSTOMER"/>
What I really want to see in the above jdbc-class-map is:
table="FRED.PERSONS"
I am using the property setting: kodo.jdbc.Schemas: FRED
Note that mapping fields to columns using jdbc-field-map-name
seems to work fine...
Any clues? Thanks.
droo.You can't specify table or column names via mapping tool hints. The
typical way to change the default names is either to override the
getValidTableName/getValidColumnName methods in a custom DBDictionary
for systematic changes, or to follow the process outlined in example 7.6
on this page:
http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_mapping.html#ref_guide_mapping_mappingtool_examples -
Generating database tables from Java classes
Hi,
I've encountered a number of tools which will create Java classes from database tables (e.g. JDeveloper has this functionality, Abator provides this for iBATIS, etc...).
However, I've not been able to locate any tools that perform the opposite job - i.e. given a Java class, it generates a database table (or, presumably, some SQL).
It's been suggested to me that Hibernate might provide this sort of capability, but if anybody has any experience of doing this, in any tool, I'd be interested to hear about it.
Thanks,
Alistair.Many thanks for the pointers.
duffymo: I've taken a look at Middlegen (http://boss.bekk.no/boss/middlegen/index.html) but it seems that the first step is to specify the database schema, whereas I'm looking to generate the schema from existing code. Or have I missed something?
Alistair. -
Tables for development class and program name
Hi,
IN which tables can we find the program name and its development class?
Thanks,
KumarHi Kumar,
Check the Table TADIR.
Regards,
Swapna.
Edited by: NagaSwapna Thota on Jul 9, 2008 10:41 AM
Maybe you are looking for
-
Sales Orders And Downpayment Invoices
Hi, I am trying to get a link between the Sales Order and the Downpayment Invoices. As I open a Sales Order I cannot directly figure out weather it has a down payment invoice or not. (DP Invoices will not show on Target Document Button on the tool ba
-
Save for Web does not open dialog box in PS Elements 8 for Mac
After opening an image and selecting Save for Web, the Save for Web dialog box fails to appear. I've seen similar reports for PS Elements 6 for Mac, but did not find the same files in those directories. Running iMac with OS 10.6.
-
How to map only the first occurance to the op in graphical mapping
Hi, i have a record whose occurance is ' * '.But to the output i need to only map the value of the field which comes in the first occurance of the record.Can anyone help me in this.its very urgent. For ex : my input is <header> <inp1>123</inp1> <inp2
-
Text messages not copied from sales order to billing
Text messages which have been given in sales order are not copied to billing. Two of the text are copied and the other two are not getting copied. Checked the access sequence.. everything is correct. Please give a clue.
-
Xbox wont connect with WRT160N
My home computer and my wife's laptop are all working fine with the wireless network. My xbox shows up on the Linksys system front page but does not have the solid green line connecting it to the router like our home computer and my wife's laptop doe