Static Tables Creation In oracle & Diff Between Static table ,Dynamic table
Static Tables Creation In oracle & Diff Between Static table ,Dynamic table
972471 wrote:
Static Tables Creation In oracle & Diff Between Static table ,Dynamic tableAll tables in a well designed application should be static tables.
Whilst it's possible to execute dynamic code and therefore create tables dynamically at run time, this is considered poor design and should be avoided in 99.99% of cases... though for some reason some people still think they need to do this, and it's never really justified.
So what issue are you facing that you need to even bother considering dynamic tables?
Similar Messages
-
Table creation in Oracle back end
Hi Gurus,
Can we create a oracle table in SAP schema directly from back-end and update it by taking snapshot from other oracle system.
I know its not a recommended solution and DB link / DBCon would be better solution but the problem is other oracle system is not ready to give us access/userID to connect to it using DBlink.
Can we access the table create above using native SQL statement or can we create a synonym to a ztable created using se11.
Thanks in advanced.
SumitHi Bill,
Thanks for the reply. Please check below.
My DTData.txt:
My Agentry.ini file:
My File back end log file:
--In editor I added a new system connection with "File Back end", created new data table with this system connection and created DTData.txt as file name.
--Created "Tables" folder in ServerDev root directory and placed DTData.txt file in this folder and entered the above 1st screen shot text.
--In my ATE i couldn't see this filedatatable.
Thanks,
Swaroopa. -
Credit Management: Difference Between Static and Dynamic Credit Check
Hi,
Could anyone tell the difference Between Static and Dynamic Credit Check?
According to website: http://www.sap-basis-abap.com/sd/difference-between-static-and-dynamic-credit-check.htm ... this is the answer:
====================
Simple Credit Check : Tr.Code - FD32
It Considers the Doc.Value + Open Items.
Doc.Value : Sales Order Has been saved but not delivered
Open Item : Sales Order has been saved , Delivered, Billed & Transfered to FI, but not received the payment from the customer.
Static Credit Check it checks all these doc value & check with the credit limit
1) Open Doc.Value / Sales Order Value : Which is save but not delievered
2) Open Delivery Doc.Value : Which is delivered but not billed
3) Open Billing Doc.Value : Which is billed but not posted to FI
4) Open Item : Which is transfered to FI but not received from the customer.
Dynamic Credit Check 1) Open Doc
2) Open Delivery
3) Open Billing
4) Open Items
5) Horizon Period = Eg.3Months
Here the System will not consider the above 1, 2, 3 & 4 values for the lost 3 months.
====================
Question 1: Could you further explain the above information, if there is any?
Question 2:: What is the Tcode to customize settings of:
a) Simple Credit Check (isn't this same with b) below?)
b) Static Credit Check
c) Dynamic Credit CheckHi Tanish,
Diff between Static and Dynamic Filters.
Example One at report Level.
Create a variable for a Infoobject say ,Material .
1)In the Query Designer and if u restrict it to some 10 materials at query level, the report will display for only those 10 materials only.This is Static Filter.UR AHrdcoding it to those materials.You cant change them at Query Run time.i.e not changeable by user.
2)If u give the variable as input ,and when u run the query ,u can can choose the material,may 10 may be 1 or may 20 .It is dynamic.Changeable by user at run time
Example Two at DTP and Start Routine Level,say Document Type.
1)If u give filters in Start routine it is Static as u cannot change it in Production,not changeable by user.
2)f u give filters in DTP it is Dyanamic as u can change it in Production.U can give any doc type,Changeable by user at run time.
Hope it is Understood.
Rgds
SVU -
Error while insert data using execute immediate in dynamic table in oracle
Error while insert data using execute immediate in dynamic table created in oracle 11g .
first the dynamic nested table (op_sample) was created using the executed immediate...
object is
CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
mark1 number,
mark2 number
t_sub_mark is a class of type sub_mark
CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
create table sam1(id number,name varchar2(30));
nested table is created below:
begin
EXECUTE IMMEDIATE ' create table '||op_sample||'
(id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
end;
now data from sam1 table and object (subject_obj) are inserted into the dynamic table
declare
subject_obj t_sub_mark;
begin
subject_obj:= t_sub_mark();
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
end;
and got the below error:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7
then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
execute immediate 'insert into '||dynam_table ||'
(SELECT887684 wrote:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically. -
I've recently completed a database upgrade from 10.2.0.3 to 11.2.0.1 using the DBUA.
I've since encountered a slowdown when running a script which drops and recreates a series of ~250 tables. The script normally runs in around 19 seconds. After the upgrade, the script requires ~2 minutes to run.
By chance has anyone encountered something similar?
The problem may be related to the behavior of an "after CREATE on schema" trigger which grants select privileges to a role through the use of a dbms_job call; between 10g and the database that was upgraded from 10G to 11g. Currently researching this angle.
I will be using the following table creation DDL for this abbreviated test case:
create table ALLIANCE (
ALLIANCEID NUMBER(10) not null,
NAME VARCHAR2(40) not null,
CREATION_DATE DATE,
constraint PK_ALLIANCE primary key (ALLIANCEID)
using index
tablespace LIVE_INDEX
tablespace LIVE_DATA;When calling the above DDL, an "after CREATE on schema" trigger is fired which schedules a job to immediately run to grant select privilege to a role for the table which was just created:
create or replace
trigger select_grant
after CREATE on schema
declare
l_str varchar2(255);
l_job number;
begin
if ( ora_dict_obj_type = 'TABLE' ) then
l_str := 'execute immediate "grant select on ' ||
ora_dict_obj_name ||
' to select_role";';
dbms_job.submit( l_job, replace(l_str,'"','''') );
end if;
end;
{code}
Below I've included data on two separate test runs. The first is on the upgraded database and includes optimizer parameters and an abbreviated TKPROF. I've also, included the offending sys generate SQL which is not issued when the same test is run on a 10g environment that has been set up with a similar test case. The 10g test run's TKPROF is also included below.
The version of the database is 11.2.0.1.
These are the parameters relevant to the optimizer for the test run on the upgraded 11g SID:
{code}
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.2.0.1
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 8
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL> column sname format a20
SQL> column pname format a20
SQL> column pval2 format a20
SQL> select sname, pname, pval1, pval2 from sys.aux_stats$;
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 03-11-2010 16:33
SYSSTATS_INFO DSTOP 03-11-2010 17:03
SYSSTATS_INFO FLAGS 0
SYSSTATS_MAIN CPUSPEEDNW 713.978495
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM 1565.746
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED 2310
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
13 rows selected.
{code}
Output from TKPROF on the 11g SID:
{code}
create table ALLIANCE (
ALLIANCEID NUMBER(10) not null,
NAME VARCHAR2(40) not null,
CREATION_DATE DATE,
constraint PK_ALLIANCE primary key (ALLIANCEID)
using index
tablespace LIVE_INDEX
tablespace LIVE_DATA
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 4 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 4 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 324
{code}
... large section omitted ...
Here is the performance hit portion of the TKPROF on the 11g SID:
{code}
SQL ID: fsbqktj5vw6n9
Plan Hash: 1443566277
select next_run_date, obj#, run_job, sch_job
from
(select decode(bitand(a.flags, 16384), 0, a.next_run_date,
a.last_enabled_time) next_run_date, a.obj# obj#,
decode(bitand(a.flags, 16384), 0, 0, 1) run_job, a.sch_job sch_job from
(select p.obj# obj#, p.flags flags, p.next_run_date next_run_date,
p.job_status job_status, p.class_oid class_oid, p.last_enabled_time
last_enabled_time, p.instance_id instance_id, 1 sch_job from
sys.scheduler$_job p where bitand(p.job_status, 3) = 1 and
((bitand(p.flags, 134217728 + 268435456) = 0) or
(bitand(p.job_status, 1024) <> 0)) and bitand(p.flags, 4096) = 0 and
p.instance_id is NULL and (p.class_oid is null or (p.class_oid is
not null and p.class_oid in (select b.obj# from sys.scheduler$_class b
where b.affinity is null))) UNION ALL select
q.obj#, q.flags, q.next_run_date, q.job_status, q.class_oid,
q.last_enabled_time, q.instance_id, 1 from sys.scheduler$_lightweight_job
q where bitand(q.job_status, 3) = 1 and ((bitand(q.flags, 134217728 +
268435456) = 0) or (bitand(q.job_status, 1024) <> 0)) and
bitand(q.flags, 4096) = 0 and q.instance_id is NULL and (q.class_oid
is null or (q.class_oid is not null and q.class_oid in (select
c.obj# from sys.scheduler$_class c where
c.affinity is null))) UNION ALL select j.job, 0,
from_tz(cast(j.next_date as timestamp), to_char(systimestamp,'TZH:TZM')
), 1, NULL, from_tz(cast(j.next_date as timestamp),
to_char(systimestamp,'TZH:TZM')), NULL, 0 from sys.job$ j where
(j.field1 is null or j.field1 = 0) and j.this_date is null) a order by
1) where rownum = 1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.47 0.47 0 9384 0 1
total 3 0.48 0.48 0 9384 0 1
Misses in library cache during parse: 1
Optimizer mode: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
1 COUNT STOPKEY (cr=9384 pr=0 pw=0 time=0 us)
1 VIEW (cr=9384 pr=0 pw=0 time=0 us cost=5344 size=6615380 card=194570)
1 SORT ORDER BY STOPKEY (cr=9384 pr=0 pw=0 time=0 us cost=5344 size=11479630 card=194570)
194790 VIEW (cr=9384 pr=0 pw=0 time=537269 us cost=2563 size=11479630 card=194570)
194790 UNION-ALL (cr=9384 pr=0 pw=0 time=439235 us)
231 FILTER (cr=68 pr=0 pw=0 time=920 us)
231 TABLE ACCESS FULL SCHEDULER$_JOB (cr=66 pr=0 pw=0 time=690 us cost=19 size=13157 card=223)
1 TABLE ACCESS BY INDEX ROWID SCHEDULER$_CLASS (cr=2 pr=0 pw=0 time=0 us cost=1 size=40 card=1)
1 INDEX UNIQUE SCAN SCHEDULER$_CLASS_PK (cr=1 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 5056)
0 FILTER (cr=3 pr=0 pw=0 time=0 us)
0 TABLE ACCESS FULL SCHEDULER$_LIGHTWEIGHT_JOB (cr=3 pr=0 pw=0 time=0 us cost=2 size=95 card=1)
0 TABLE ACCESS BY INDEX ROWID SCHEDULER$_CLASS (cr=0 pr=0 pw=0 time=0 us cost=1 size=40 card=1)
0 INDEX UNIQUE SCAN SCHEDULER$_CLASS_PK (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=1)(object id 5056)
194559 TABLE ACCESS FULL JOB$ (cr=9313 pr=0 pw=0 time=167294 us cost=2542 size=2529254 card=194558)
{code}
and the totals at the end of the TKPROF on the 11g SID:
{code}
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 0.00 0.00 0 0 4 0
Fetch 0 0.00 0.00 0 0 0 0
total 3 0.00 0.00 0 0 4 0
Misses in library cache during parse: 1
Misses in library cache during execute: 1
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 70 0.00 0.00 0 0 0 0
Execute 85 0.01 0.01 0 62 208 37
Fetch 49 0.48 0.49 0 9490 0 35
total 204 0.51 0.51 0 9552 208 72
Misses in library cache during parse: 5
Misses in library cache during execute: 3
35 user SQL statements in session.
53 internal SQL statements in session.
88 SQL statements in session.
Trace file: 11gSID_ora_17721.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
35 user SQL statements in trace file.
53 internal SQL statements in trace file.
88 SQL statements in trace file.
51 unique SQL statements in trace file.
1590 lines in trace file.
18 elapsed seconds in trace file.
{code}
The version of the database is 10.2.0.3.0.
These are the parameters relevant to the optimizer for the test run on the 10g SID:
{code}
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.3
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 8
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL> column sname format a20
SQL> column pname format a20
SQL> column pval2 format a20
SQL> select sname, pname, pval1, pval2 from sys.aux_stats$;
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 09-24-2007 11:09
SYSSTATS_INFO DSTOP 09-24-2007 11:09
SYSSTATS_INFO FLAGS 1
SYSSTATS_MAIN CPUSPEEDNW 2110.16949
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
13 rows selected.
{code}
Now for the TKPROF of a mirrored test environment running on a 10G SID:
{code}
create table ALLIANCE (
ALLIANCEID NUMBER(10) not null,
NAME VARCHAR2(40) not null,
CREATION_DATE DATE,
constraint PK_ALLIANCE primary key (ALLIANCEID)
using index
tablespace LIVE_INDEX
tablespace LIVE_DATA
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.01 0 2 16 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.01 0.01 0 2 16 0
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 113
{code}
... large section omitted ...
Totals for the TKPROF on the 10g SID:
{code}
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.02 0 0 0 0
Execute 1 0.00 0.00 0 2 16 0
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.02 0 2 16 0
Misses in library cache during parse: 1
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 65 0.01 0.01 0 1 32 0
Execute 84 0.04 0.09 20 90 272 35
Fetch 88 0.00 0.10 30 281 0 64
total 237 0.07 0.21 50 372 304 99
Misses in library cache during parse: 38
Misses in library cache during execute: 32
10 user SQL statements in session.
76 internal SQL statements in session.
86 SQL statements in session.
Trace file: 10gSID_ora_32003.trc
Trace file compatibility: 10.01.00
Sort options: default
1 session in tracefile.
10 user SQL statements in trace file.
76 internal SQL statements in trace file.
86 SQL statements in trace file.
43 unique SQL statements in trace file.
949 lines in trace file.
0 elapsed seconds in trace file.
{code}
Edited by: user8598842 on Mar 11, 2010 5:08 PMSo while this certainly isn't the most elegant of solutions, and most assuredly isn't in the realm of supported by Oracle...
I've used the DBMS_IJOB.DROP_USER_JOBS('username'); package to remove the 194558 orphaned job entries from the job$ table. Don't ask, I've no clue how they all got there; but I've prepared some evil looks to unleash upon certain developers tomorrow morning.
Not being able to reorganize the JOB$ table to free the now wasted ~67MB of space I've opted to create a new index on the JOB$ table to sidestep the full table scan.
CREATE INDEX SYS.JOB_F1_THIS_NEXT ON SYS.JOB$ (FIELD1, THIS_DATE, NEXT_DATE) TABLESPACE SYSTEM;The next option would be to try to find a way to grant the select privilege to the role without using the aforementioned "after CREATE on schema" trigger and dbms_job call. This method was adopted to cover situations in which a developer manually added a table directly to the database rather than using the provided scripts to recreate their test environment.
I assume that the following quote from the 11gR2 documentation is mistaken, and there is no such beast as "create or replace table" in 11g:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_9003.htm#i2061306
"Dropping a table invalidates dependent objects and removes object privileges on the table. If you want to re-create the table, then you must regrant object privileges on the table, re-create the indexes, integrity constraints, and triggers for the table, and respecify its storage parameters. Truncating and replacing have none of these effects. Therefore, removing rows with the TRUNCATE statement or replacing the table with a *CREATE OR REPLACE TABLE* statement can be more efficient than dropping and re-creating a table." -
Table creation - order of events
I am trying to get some help on the order I should be carrying out table creation tasks.
Say I create a simple table:
create table title (
title_id number(2) not null,
title varchar2(10) not null,
effective_from date not null,
effective_to date not null,
constraint pk_title primary key (title_id)
I believe I should populate the data, then create my index:
create unique index title_title_id_idx on title (title_id asc)
But I have read that Oracle will automatically create an index for my primary key if I do not do so myself.
At what point does Oracle create the index on my behalf and how do I stop it?
Should I only apply the primary key constraint after the data has been loaded as well?
Even then, if I add the primary key constraint will Oracle not immediately create an index for me when I am about to create a specific one matching my naming conventions?yeah but just handle it the way you would handle any other constraint violation - with the EXCEPTIONS INTO clause...
SQL> select index_name, uniqueness from user_indexes
2 where table_name = 'APC'
3 /
no rows selected
SQL> insert into apc values (1)
2 /
1 row created.
SQL> insert into apc values (2)
2 /
1 row created.
SQL> alter table apc add constraint apc_pk primary key (col1)
2 using index ( create unique index my_new_index on apc (col1))
3 /
Table altered.
SQL> insert into apc values (2)
2 /
insert into apc values (2)
ERROR at line 1:
ORA-00001: unique constraint (APC.APC_PK) violated
SQL> alter table apc drop constraint apc_pk
2 /
Table altered.
SQL> insert into apc values (2)
2 /
1 row created.
SQL> alter table apc add constraint apc_pk primary key (col1)
2 using index ( create unique index my_new_index on apc (col1))
3 /
alter table apc add constraint apc_pk primary key (col1)
ERROR at line 1:
ORA-02437: cannot validate (APC.APC_PK) - primary key violated
SQL> @%ORACLE_HOME%/rdbms/admin/utlexcpt.sql
Table created.
SQL> alter table apc add constraint apc_pk primary key (col1)
2 using index ( create unique index my_new_index on apc (col1))
3 exceptions into EXCEPTIONS
4 /
alter table apc add constraint apc_pk primary key (col1)
ERROR at line 1:
ORA-02437: cannot validate (APC.APC_PK) - primary key violated
SQL> select * from apc where rowid in ( select row_id from exceptions)
2 /
COL1
2
2
SQL> All this is in the documentation. Find out more.
Cheers, APC -
Linking a dbase table to an Oracle one
Hello Every body
Is there a mean (by ODBC,JDBC or somethink else) to link a dbase table to an oracle table so that oracle process can read the dbase table from the oracle side?
Please advice.
Thanks in advancetry hetrogeneous services of Oracle
check this link http://www.easysoft.com/applications/oracle/hsodbc.html -
Editable Table Creation using BSP Application
hi all,
I just want to create editable table creation if i enter any datas to that table.. it should be saved in Z table..
Could anyone explain me the procedure...
Thanks in Advance
HemaHi,
This is more a question for the BSP forum.
Anyway, as such it's realy easy since you can use HTML in order to import to Excel. All you need to do is add
runtime->server->response->set_header_field( name = 'Contnet-Type'
value = 'application/vnd.ms-excel' ).
runtime->server->response->delete_header_field( name = 'Cache-Control' ).
runtime->server->response->delete_header_field( name = 'Expires' ).
runtime->server->response->delete_header_field( name = 'Pragma' ).
Also check threads like
Download BSP data into Excel
export bsp-table to excel
Export BSP Table to Excel
Eddy
PS. Reward useful answers and earn points yourself -
Rp_provide_from_last dynamic table
Hi,
I have a report which uses logical database PNPCE to fetch employee data and macros like rp_provide_from_last to read infotypes.
INFOTYPES: 0001 name gtab1,
002 name gtab2.
rp_provide_from_last gtab1 space pn-begda pn-endda
rp_provide_from_last gtab2 space pn-begda pn-endda.
I want to use a dynamic fieldname instead of gtab1 / gtab2. Basically i want to use this above macro statement to check if the infotype exists for a employee. So if there are 50 infotypes to be checked, i donot want to write this macro 50 times with 50 tables, is there a way to use a dynamic table name in the macro statement ?
Thanks
SubhaYour requirement can be met by modelling the program based on the below source code. This program will list all infotypes that have been maintained for a PERNR. This proram excludes certain infotypes like PD infotypes. The source code can be changed to include all desired infotypes.
*& Report ZTEST_CHECK_INFY
REPORT ZTEST_CHECK_INFY.
tables: t777d.
DATA SUBRC LIKE SY-SUBRC.
DATA PAR1 LIKE SY-MSGV1.
DATA: BEGIN OF SELTAB OCCURS 5.
INCLUDE STRUCTURE PRELP AS prelp. "UC
DATA: OPERA(1).
DATA: END OF SELTAB.
data: it_777d like t777d occurs 0.
data: wa_777d type t777d.
data: ls_index(4) type n.
select-options: so_infty for t777d-infty.
select-options: so_inft1 for t777d-infty no intervals.
Initialization.
so_infty-sign = 'I'.
so_infty-option = 'BT'.
so_infty-low = '0000'.
so_infty-high = '9999'.
append so_infty.
select * from t777d into corresponding fields of table it_777d where infty in so_infty.
loop at it_777d into wa_777d.
so_inft1-sign = 'I'.
so_inft1-option = 'EQ'.
so_inft1-low = wa_777d-infty.
append so_inft1.
endloop.
start-of-selection.
CALL FUNCTION 'HR_INITIALIZE_BUFFER'
EXPORTING
TCLAS = 'A'
PERNR = '40101017'
EXCEPTIONS
OTHERS = 1.
Loop at so_inft1 where not low between '1000' and '8999'.
REFRESH SELTAB.
CLEAR SELTAB.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
TCLAS = 'A'
PERNR = '40101017'
INFTY = so_INFT1-low
BEGDA = '19000101'
ENDDA = '99991231'
IMPORTING
SUBRC = SUBRC
TABLES
INFTY_TAB = SELTAB
EXCEPTIONS
INFTY_NOT_FOUND = 1
OTHERS = 2.
if subrc eq 0.
write:/ so_inft1-low, 'has been maintained for employee: ', '40101017'.
endif.
endloop. -
How can I filter which records are displayed in my dynamic table?
I have what I think is probably an easy question for anyone
who is experienced with PHP/MySQL and Dreamweaver (which I am not).
I have a website where users login, and then have access to
their homepage which displays a dynamic table of all of the records
that they have inserted into a database (this page also has a link
to the form where they submit a record). However, right now I can
only get to display all records that have been inserted instead of
only the ones that they have inserted (which is what I want). How
can I accomplish this?
I already have a session variable, 'MM_username', which
allows me to bind the user_ID to anything I need to, and when a
user inserts a record, their 'user_ID' is already inserted into a
column in that record for that table, so I'd like to display the
dynamic table in a way that filters it out so it only shows the
records that match the logged-in user's 'user_ID'.
I've tried to use the filter function in the recordset dialog
box, nut I just can't get it to work correctly. Any help on this
would be much appreciated!I already tried that. I set the table to filter out and
display only the records that match the landlord ID to the session
variable(which I named 'Landlord_ID' not 'MM_username ' like I said
earlier). When I tried to simply insert the session variable into
the page just to see what data would show up, the result is just a
blank space, so the session variable itself apparently has no data
value to echo in the PHP form.
Because of that, I have no idea how to tell dreamweaver to
filter based on the Landlord_ID, even though I CAN echo the
landlord ID variable in the recordset, I can't figure out how to
put that runtime value in the filter. -
Call Function with RFC dynamic table
Hi all
I create a function compare TABLE_ENTRIES_GET_VIA_RFC and CTVB_COMPARE_TABLES, everything is.dynamic
it works well but, how could i create a dynamic output parameter for table.
the system show me that RFC and dynamic table don't work.
i don't want line by line i would like to have the real structure inside of the Function i have everything but i can't move the data to the output parameter table .
could somebody help ?Thx RE (and Mani) for the feedback.
I think that this URL is sufficient to understand how to pass dynamic internal table via RFC function module, whatever it is input or output. This URL says to use a STRING to store the table content in XML format, via CALL TRANSFORMATION ID, and pass this string as parameter. In the calling program, we have to "decode" the XML back into abap data, Just notice that we don't need to create an XSLT, ID is sufficient.
For any other information, open a new thread, or ask a precise question. -
Dynamic ALV: but with globally available dynamic table type
Hello,
I would like to create a dynamic node for a ALV and dynamic table types to fill and the ALV.
The ALV data can be changed so I need to read it again.
I have read all the threads about dynamic node create and i have no problem with it. I can create a structure and a table dynamically. thats also no issue for me.
But. I fill the ALV data in a method and read it in another method to save the changes in a data base table.
Thats also no problem
So where i need your help? I currently create the dynamic table and structure in both methods. That works, but why do the same thing twice?
I cant figure out by myself how to create a dynamic table/structure in a global way, so the dynamic table/structure is created once and then available in the whole WD4A view.
I tried is with a class type in se24 with reference to CL_ABAP_STRUCTDESCR but I cant make that run, because to access the type I created an attribute in se24 with reference to the class type that I now try in instance and fill in the method. But ABAP thinks that my attribute is not compatible anymore.
Any idea how to make a dynamic table globally available? That must be an ABAP god who can answer this question, hehe. So imagin me falling on my knees for the one who has an answer that really works
Kind regards,
HendrikThis doesn't seem too difficult really. For a dynamic table you just need to declare the internal table as TYPE REF TO DATA.
Just more this declaration to the attributes of your Component Controller. So for instance in my component controller I have an attribute called i_data with the RefTo column checked and the associated type = DATA.
So now I could do the following:
create data wd_this->idata type table of (tablename).
Or however you are dynamically creating the table - maybe with TYPE HANDLE instead.
The point is that your dynamic table is now global to your entire component and you can read and write to it from different methods.
Is this what you were looking for? Without knowing more about your existing coding, it is difficult to say more. -
Hi
I am new to Javascript. Anyone has a standard program to create a dynamic table after getting the input from the user. The number of columns would be 2 and the number of rows depend upon the user input. And the number of rows should not exceed 4. I tried some codes from web but does not seem to work for me. Thanks.Sorry, new to JSP. I tried as follows. My basic idea is get the input from the user and generate table according to that.
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD>
<TITLE>A Colorful and Dynamic Table</TITLE></HEAD>
<BODY>
<CENTER>
<H1>Colorful and Dynamic Table</H1>
<FORM METHOD=POST>
<INPUT TYPE=TEXT NAME=WIDTH VALUE=15 SIZE=2>
<INPUT TYPE=SUBMIT VALUE="Do it !">
</FORM>
<% String w = request.getParameter("WIDTH"); %>
<% out.print(w); %>
<TABLE>
<% for(int row=1; row <= w; row++) { %>
<TR>
<% for(int col=1; col<=2; col++) { %>
<TD> (<%=col%>, <%=row%>)
</TD>
<% } %>
</TR>
<% } %>
</TABLE>
<HR>
</CENTER>
</BODY>
</HTML>But something wrong. It is giving me some errors. I need to get the info from the user and then generate the table. Is it possible to do it with JSp or I have to use javascript. Thanks. -
Copying fields froma dynamic table
i have a dyanmic table say t1. now i have craeted another dynamic table say t2 with some fields in common with table t1. i won't be knowing which fields are in common. the common fields will be stord in another table t3. now i need to copy the common fields from t1 to t2 after reading them from t3. how do i go about it???
TYPES:
BEGIN OF s_t3.
INCLUDE TYPE A.
INCLUDE TYPE B.
TYPES:
END OF s_t3.
DATA:
t1 TYPE TABLE OF A,
t2 TYPE TABLE OF B,
ls_t3 TYPE s_t3,
t3 TYPE TABLE OF s_t3.
FIELD-SYMBOLS:
<fs_t1> TYPE A,
<fs_t2> TYPE B.
LOOP AT t1 ASSIGNING <fs_t1>.
READ TABLE t2 ASSIGNING <fs_t2>
WITH KEY
[key_t2] = [key_t1].
CHECK sy-subrc IS INITIAL.
MOVE-CORRESPONDING <fs_t1> TO <ls_t3>.
MOVE-CORRESPONDING <fs_t2> TO <ls_t3>.
APPEND ls_t3 TO t3.
ENDLOOP. -
Diff. between table and template in smartforms
hi there,
please tell me what the diff. between table and template options available in smartformsHI
GOOD
TABLES=>
In forms of business procedures you usually want to list details such as open items of an invoice. You can use a Smart Form to display this data in a table. You can design the layout of the table independent of the number of lines it will contain. The size of the table depends on how much data the application program passes to the form at runtime (unlike with templates, where you specify the number of columns and lines explicitly). The table can cover one or more pages, depending on the number of lines. This is why you display tables in the main window.
TEMPLATES=>
Use node type Template to display a table whose layout and size (number of lines and columns) is determined before the runtime of the application program. For this reason, a template is also called a static table.
To create a template, define a table layout to determine the cell structure for each line. The cells are used to display the contents of the inferior nodes of the template node. This allows you to position text and a graphic side by side (see Displaying Graphics in Templates).
The template node is also suited for label printing.
GO THROUGH THIS LINK
http://help.sap.com/saphelp_nw04/helpdata/en/4b/83fb4edf8f11d3969700a0c930660b/content.htm
THANKS
MRUTYUN
Maybe you are looking for
-
First off, thanks to kglad for the line graph function I started with, it has been a huge help. Now the step I'm trying to take is 2 fold. First, I'd like to graph more than one line segment on the graph. Right now I am graphing functions f1 and f2,
-
Soa suite 11.1.1.4 & Grid 12C
Periodically in Grid 12C and Grid 11 we have got database soainfra workload and we have find it that this is becouse of very strange select SELECT COUNT(*) FROM CUBE_INSTANCE ci WHERE ci.COMPONENTTYPE = :1 AND ci.STATE IN (6, 10) and we receive about
-
PS icons show instead of photo thumbnails on Picture Viewer
I've loaded CS3 on a new laptop---Windows 7. CS3 Bridge and Photoshop work great, however the thumbnails show the PS icon instead of the photo in picture viewer. I'm sure I'm missing a file or have one in the wrong location. Any idea how to repair
-
Hi, I tried to install Acrobat 9.1 in Vista and it got hung up. Now whenever I try to complete the install, repair the install or uninstall I get the following message: Error 1500. Another installation is already in progress. Complete that install be
-
Using tcpdump...please help..
Hi I want to use tcpdump to check a connection termination situation that occurs in my application. I read the documents and they say that the simplest way to use tcp dump is by typing tcpdump -i "interface name" But I am not able to find out what is