Fast growing Basis tables....
Hi,
I have bees using one note 706478 to find out the measure against fast growing basis tables. I use this for R/3. Is there any note like this for BW and CRM as well. I search OSS but could not come up with any solid note.
Does anybody knwo abot this? Your help will be appreciated.
Thanks in advance to everybody.
Thanks for the help.
There are several factors to consider. For example:
- Is the table a TimesTen only table or is it a cached Oracle table using AWT to push the inserts down to Oracle?
- How long does the data need to be retained? Forever, for 1 hour, for 1 minute...
If the table is an AWT cached table from Oracle then the inserted data ultimately ends up in Oracle. It is therefore likely that you can safely discard some data from TimesTen to prevent the datastore filling up. You can do this using the automnatic aging feature in TT 7.0 or you can implemnent it as a periodic UNLOAD CACHE GROUP statement executed from a script or from application code.
If the table is a TimesTen only table then in addition to the above you need to consider if you can just discard 'old' data or if you have to keep it somewhere. If you need to keep it then you will first need to copy it out of TT before it gets deleted. In this case aging is probably not a good solution and you should implement some application mechanism to copy the data somewhere else and then delete it. If you do not need to keep the data then aging may still be an option.
In any event, you will want to give yourself as much headroom as possible by making the datastore as big as you can subject to available memory etc. If you use aging, you will likely have to configure very aggressive aging parameters in order to keep the table size under control. It is possible that aging may not be up to the job if the insert rate is extremely high in which case you may anyway need to implement some application based cleanup mechanism.
Chris
Similar Messages
-
Create a materized view without primary key constraint on the base table?
Hi
I tried to create a materized view but I got this error:
SQL> CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
START WITH
to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
NEXT
sysdate + 1
AS
select * from TABLE1@remote_db
SQL> /
CREATE MATERIALIZED VIEW TABLE1_MV REFRESH FAST
ERROR at line 1:
ORA-12014: table 'TABLE1' does not contain a primary key constraint.
TABLE1 in remote_db doesn't have a primary key constraint. Is there anyway that I can create a materized view on a base table which doesn't have a primary key constraint?
Thanks
LizHi,
Thanks for your helpful info. I created a materialized view in the source db with rowid:
SQL> CREATE MATERIALIZED VIEW log on TABLE1 with rowid;
Materialized view log created.
Then I created a MV on the target DB:
CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
REFRESH FAST
with rowid
START WITH
to_date('04-25-2009 03:00:13','MM-dd-yyyy hh24:mi:ss')
NEXT
sysdate + 1
AS
select * from TABLE1@remote_db
SQL> /
CREATE MATERIALIZED VIEW my_schema.TABLE1_MV
ERROR at line 1:
ORA-12018: following error encountered during code generation for
"my_schema"."TABLE1_MV"
ORA-00942: table or view does not exist
TABLE1 exists in remote_db:
SQL> select count(*) from TABLE1@remote_db;
COUNT(*)
9034459
Any clue what is wrong?
Thanks
Liz -
Index size keep growing while table size unchanged
Hi Guys,
I've got some simple and standard b-tree indexes that keep on acquiring new extents (e.g. 4MB per week) while the base table size kept unchanged for years.
The base tables are some working tables with DML operation and nearly same number of records daily.
I've analysed the schema in the test environment.
Those indexes do not fulfil the criteria for rebuild as follows,
- deleted entries represent 20% or more of the current entries
- the index depth is more then 4 levels
May I know what cause the index size keep growing and will the size of the index reduced after rebuild?
Grateful if someone can give me some advice.
Thanks a lot.
Best regards,
TimmyPlease read the documentation. COALESCE is available in 9.2.
Here is a demo for coalesce in 10G.
YAS@10G>truncate table t;
Table truncated.
YAS@10G>select segment_name,bytes from user_segments where segment_name in ('T','TIND');
SEGMENT_NAME BYTES
T 65536
TIND 65536
YAS@10G>insert into t select level from dual connect by level<=10000;
10000 rows created.
YAS@10G>commit;
Commit complete.
YAS@10G>
YAS@10G>select segment_name,bytes from user_segments where segment_name in ('T','TIND');
SEGMENT_NAME BYTES
T 196608
TIND 196608We have 10,000 rows now. Let's delete half of them and insert another 5,000 rows with higher keys.
YAS@10G>delete from t where mod(id,2)=0;
5000 rows deleted.
YAS@10G>commit;
Commit complete.
YAS@10G>insert into t select level+10000 from dual connect by level<=5000;
5000 rows created.
YAS@10G>commit;
Commit complete.
YAS@10G>select segment_name,bytes from user_segments where segment_name in ('T','TIND');
SEGMENT_NAME BYTES
T 196608
TIND 327680Table size is the same but the index size got bigger.
YAS@10G>exec show_space('TIND',user,'INDEX');
Unformatted Blocks ..................... 0
FS1 Blocks (0-25) ..................... 0
FS2 Blocks (25-50) ..................... 6
FS3 Blocks (50-75) ..................... 0
FS4 Blocks (75-100)..................... 0
Full Blocks ..................... 29
Total Blocks............................ 40
Total Bytes............................. 327,680
Total MBytes............................ 0
Unused Blocks........................... 0
Unused Bytes............................ 0
Last Used Ext FileId.................... 4
Last Used Ext BlockId................... 37,001
Last Used Block......................... 8
PL/SQL procedure successfully completed.We have 29 full blocks. Let's coalesce.
YAS@10G>alter index tind coalesce;
Index altered.
YAS@10G>select segment_name,bytes from user_segments where segment_name in ('T','TIND');
SEGMENT_NAME BYTES
T 196608
TIND 327680
YAS@10G>exec show_space('TIND',user,'INDEX');
Unformatted Blocks ..................... 0
FS1 Blocks (0-25) ..................... 0
FS2 Blocks (25-50) ..................... 13
FS3 Blocks (50-75) ..................... 0
FS4 Blocks (75-100)..................... 0
Full Blocks ..................... 22
Total Blocks............................ 40
Total Bytes............................. 327,680
Total MBytes............................ 0
Unused Blocks........................... 0
Unused Bytes............................ 0
Last Used Ext FileId.................... 4
Last Used Ext BlockId................... 37,001
Last Used Block......................... 8
PL/SQL procedure successfully completed.The index size is still the same but now we have 22 full and 13 empty blocks.
Insert another 5000 rows with higher key values.
YAS@10G>insert into t select level+15000 from dual connect by level<=5000;
5000 rows created.
YAS@10G>commit;
Commit complete.
YAS@10G>select segment_name,bytes from user_segments where segment_name in ('T','TIND');
SEGMENT_NAME BYTES
T 262144
TIND 327680Now the index did not get bigger because it could use the free blocks for the new rows. -
Need to know base table and base column name for Oracle view columns
I am trying to load metadata for some views and that requires me to know what the final table and column name would be corresponding to the view column.
For example, if I have a view x_v that is select a,b from x_v2; and x_v2 is a view that is select a,b,c from x;
I need to get the following information.
View View Col Base Table Base Col
X_V A X A
X_V B X B
and so on.
Is it possible to get this programmatically using any SYS schema tables or Dependency tables?
I tried an indirect approach wherein I lock tables using LOCK TABLE or FOR UPDATE OF. But I'm not too sure if I can go down to the level of individual view columns.
Can you help me with this?Thanks. I was looking at some indirect approaches.
I came up with this script that does it faster than dependencies but thats just for tables and not column mapping.
declare
cursor bt(cp_sid number) is
select u.name uname, o.name oname
from sys.obj$ o, sys.user$ u
where o.obj# in (select id1
from v$lock
where sid=cp_sid)
and u.user# =o.owner#;
cursor c_sid is
select sid
from v$session
where audsid =userenv('sessionid');
l_sid number;
l_view varchar2(100):= 'PER_PEOPLE_V';
l_schema varchar2(10):= 'APPS';
begin
open c_sid;
fetch c_sid into l_sid;
close c_sid;
dbms_output.put_line('SID: '||l_sid);
execute immediate 'lock table '||l_schema||'.'||l_view||' in row share mode nowait';
for i in bt(l_sid) loop
dbms_output.put_line(i.uname||'.'||i.oname);
execute immediate 'alter table '||i.uname||'.'||i.oname||' disable table lock';
execute immediate 'alter table '||i.uname||'.'||i.oname||' enable table lock';
end loop;
end;
It basically uses locks on views to verify locks on the base tables.
Just wondering, can we use FOR UPDATE OF statements to get to the columns? -
Fast growing object in tablespace
Hi Experts
can any tell me how to find the fast growing objects in database. database is growing very fast and i want to know what all objects are those?
thanks in advance
anucan any tell me how to find the fast growing objects in database. database is growing very fast and i want to know what all objects are those?I would change this query to take it object wise it as OP is interested in growing object size not in segment size
select owner,segment_name,segment_type,sum(bytes)/1024/1024 "SIZE(MB)",blocks from dba_segments where segment_type = 'TABLE' and owner = 'LOGS' group by owner,segment_name,segment_type;Regards. -
How to stored data after clicking checkbox in data base table
REPORT ZT .
TYPE-pools: slis.
tables:mkpf,mseg,mard,COWB_COMP,ZTABLE.
Types:BEGIN OF tp_data,
mblnr LIKE mseg-mblnr,
matnr LIKE mseg-matnr,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
lgpbe LIKE mard-lgpbe,
charg LIKE mseg-charg,
bwart LIKE mseg-bwart,
budat LIKE mkpf-budat,
menge LIKE mseg-menge,
meins LIKE mseg-meins,
kostl LIKE mseg-kostl,
aufnr LIKE mseg-aufnr,
rsnum LIKE mseg-rsnum,
endkz like COWB_COMP-endkz,
END OF tp_data,
tp_tbl_data TYPE STANDARD TABLE OF tp_data.
MODIFIED*******************
DATA: WA TYPE TP_DATA.
MODIFIED*******************
*data: t_data like Y00_MM_ISSUE_DAT occurs 0 with header line.
Constants
Data objects (variable declarations and definitions)
Report data to be shown.
DATA: it_data TYPE STANDARD TABLE OF tp_data.
MODIFIED*******************
DATA : V_REPID LIKE SY-REPID.
MODIFIED*******************
Heading of the report.
DATA: t_heading TYPE slis_t_listheader.
*========================== Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:smblnr FOR mseg-mblnr MODIF ID m1,
smatnr FOR mseg-matnr MODIF ID m2,
swerks FOR mard-werks MODIF ID m3,
slgort FOR mard-lgort MODIF ID m4,
slgpbe FOR mard-lgpbe MODIF ID m5,
scharg FOR mseg-charg MODIF ID m6,
sbwart FOR mseg-bwart MODIF ID m7,
skostl FOR mseg-kostl MODIF ID m8,
saufnr FOR mseg-aufnr MODIF ID m9,
srsnum FOR mseg-rsnum MODIF ID m10.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:pre RADIOBUTTON GROUP radi USER-COMMAND ucomm DEFAULT 'X',
pse RADIOBUTTON GROUP radi,
bps RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETER:layout TYPE i.
SELECTION-SCREEN END OF BLOCK b3.
MODIFIED*******************
INITIALIZATION.
V_REPID = sy-repid.
MODIFIED*******************
*=========================== Event Blocks
AT selection-SCREEN.
start-OF-selection.
PERFORM get_data USING it_data.
END-OF-selection.
PERFORM build_alv USING it_data t_heading.
*=========================== Subroutines
*& Form get_data
Gets the information to be shown in the report.
FORM get_data USING t_data TYPE tp_tbl_data.
SELECT msegmblnr msegmatnr mardwerks mardlgort mard~lgpbe
msegcharg msegbwart mkpf~budat
msegmenge msegmeins msegkostl msegaufnr mseg~rsnum
INTO CORRESPONDING FIELDS OF TABLE t_data
FROM mseg
JOIN mard ON mardmatnr EQ msegmatnr
JOIN mkpf ON msegmblnr EQ mkpfmblnr
WHERE mseg~matnr IN smatnr.
ENDFORM. " get_data
*& Form build_alv
Builds and display the ALV Grid.
FORM build_alv USING t_data TYPE tp_tbl_data
t_heading TYPE slis_t_listheader.
ALV required data objects.
DATA: w_title TYPE lvc_title,
w_comm TYPE slis_formname,
w_status TYPE slis_formname,
x_layout TYPE slis_layout_alv,
t_event TYPE slis_t_event,
t_fieldcat TYPE slis_t_fieldcat_alv,
t_sort TYPE slis_t_sortinfo_alv.
REFRESH t_fieldcat.
REFRESH t_event.
REFRESH t_sort.
CLEAR x_layout.
CLEAR w_title.
Field Catalog
PERFORM set_fieldcat2 USING:
1 'MBLNR' 'MBLNR' 'MSEG' space space space space space space
space space space space space space t_fieldcat ,
2 'MATNR' 'MATNR' 'MSEG' space space space space space space
space space space space space space t_fieldcat ,
3 'WERKS' 'WERKS' 'MARD' space space space space space space
space space space space space space t_fieldcat,
4 'LGORT' 'LGORT' 'MARD' space space space space space space
space space space space space space t_fieldcat ,
5 'LGPBE' 'LGPBE' 'MARD' space space space space space space
space space space space space space t_fieldcat ,
6 'CHARG' 'CHARG' 'MSEG' space space space space space space
space space space space space space t_fieldcat ,
7 'BWART' 'BWART' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
8 'BUDAT' 'BUDAT' 'MKPF' space space space space space space
space space space space space space t_fieldcat,
9 'MENGE' 'MENGE' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
10 'MEINS' 'MEINS' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
11 'KOSTL' 'KOSTL' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
12 'AUFNR' 'AUFNR' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
13 'RSNUM' 'RSNUM' 'MSEG' space space space space space space
space space space space space space t_fieldcat,
14 'ENDKZ' 'ENDKZ' 'COWB_COMP' space space 'select' 'Select this row' 'Sel' 'Select this row' space space space 'X' 'X' space t_fieldcat.
Layout
x_layout-zebra = 'X'.
Top of page heading
PERFORM set_top_page_heading USING t_heading t_event.
Events
PERFORM set_events USING t_event.
GUI Status
w_status = ''.
User commands
w_comm = 'USER_COMMAND'.
Order
Example
PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
PERFORM set_order USING 'MBLNR' 'IT_DATA' 'X' space 'X' t_sort.
PERFORM set_order USING 'EBELN' 'IT_DATA' 'X' space 'X' t_sort.
PERFORM set_order USING 'EBELP' 'IT_DATA' 'X' space space t_sort.
Displays the ALV grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = V_REPID
it_fieldcat = t_fieldcat
is_layout = x_layout
it_sort = t_sort
i_callback_pf_status_set = w_status
i_callback_user_command = w_comm
i_save = 'X'
it_events = t_event
i_grid_title = w_title
TABLES
t_outtab = t_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " build_alv.
*& Form set_top_page_heading
Creates the report headings.
FORM set_top_page_heading USING t_heading TYPE slis_t_listheader
t_events TYPE slis_t_event.
DATA: x_heading TYPE slis_listheader,
x_event TYPE LINE OF slis_t_event.
Report title
CLEAR t_heading[].
CLEAR x_heading.
x_heading-typ = 'H'.
x_heading-info = 'Reporte Prueba'(001).
APPEND x_heading TO t_heading.
Program name
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'Program: '.
x_heading-info = sy-repid.
APPEND x_heading TO t_heading.
User who is running the report
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'User: '.
x_heading-info = sy-uname.
APPEND x_heading TO t_heading.
Date of execution
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'Date: '.
WRITE sy-datum TO x_heading-info.
APPEND x_heading TO t_heading.
Time of execution
CLEAR x_heading.
x_heading-typ = 'S'.
x_heading-KEY = 'Time: '.
WRITE sy-uzeit TO x_heading-info.
APPEND x_heading TO t_heading.
Top of page event
x_event-name = slis_ev_top_of_page.
x_event-FORM = 'TOP_OF_PAGE'.
APPEND x_event TO t_events.
ENDFORM.
*& Form set_events
Sets the events for ALV.
The TOP_OF_PAGE event is alredy being registered in
the set_top_page_heading subroutine.
FORM set_events USING t_events TYPE slis_t_event.
DATA: x_event TYPE LINE OF slis_t_event.
Example
clear x_event.
x_event-name = .
x_event-form = .
append x_event to t_event.
ENDFORM.
*& Form set_order
Adds an entry to the order table.
FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
t_sort TYPE slis_t_sortinfo_alv.
DATA: x_sort TYPE slis_sortinfo_alv.
CLEAR x_sort.
x_sort-fieldname = p_fieldname.
x_sort-tabname = p_tabname.
x_sort-UP = p_up.
x_sort-down = p_down.
x_sort-subtot = p_subtot.
APPEND x_sort TO t_sort.
ENDFORM. "set_order
*& Form set_fieldcat2
Adds an entry to the field catalog.
FORM set_fieldcat2 USING p_colpos p_fieldname p_ref_fieldname
p_ref_tabname
p_outputlen p_noout
p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
p_hotspot p_showasicon p_checkbox p_edit
p_dosum
t_fieldcat TYPE slis_t_fieldcat_alv.
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CLEAR wa_fieldcat.
General settings
wa_fieldcat-fieldname = p_fieldname.
wa_fieldcat-col_pos = p_colpos.
wa_fieldcat-no_out = p_noout.
wa_fieldcat-HOTSPOT = p_hotspot.
wa_fieldcat-CHECKBOX = p_checkbox.
wa_fieldcat-ICON = p_showasicon.
wa_fieldcat-do_sum = p_dosum.
Set reference fieldname, tablenam and rollname.
If p_ref_tabname is not given, the ref_fieldname given is a data
*element.
If p_ref_tabname is given, the ref_fieldname given is a field of a
*table. In case ref_fieldname is not given, it is copied from the
*fieldname.
IF p_ref_tabname IS INITIAL.
wa_fieldcat-rollname = p_ref_fieldname.
ELSE.
wa_fieldcat-ref_tabname = p_ref_tabname.
IF p_ref_fieldname EQ space.
wa_fieldcat-ref_fieldname = wa_fieldcat-fieldname.
ELSE.
wa_fieldcat-ref_fieldname = p_ref_fieldname.
ENDIF.
ENDIF.
Set output length.
IF NOT p_outputlen IS INITIAL.
wa_fieldcat-outputlen = p_outputlen.
ENDIF.
Set text headers.
IF NOT p_seltext_m IS INITIAL.
wa_fieldcat-seltext_m = p_seltext_m.
ENDIF.
IF NOT p_seltext_l IS INITIAL.
wa_fieldcat-seltext_l = p_seltext_l.
ENDIF.
IF NOT p_seltext_s IS INITIAL.
wa_fieldcat-seltext_s = p_seltext_s.
ENDIF.
IF NOT p_reptext_ddic IS INITIAL.
wa_fieldcat-reptext_ddic = p_reptext_ddic.
ENDIF.
IF NOT p_ddictxt IS INITIAL.
wa_fieldcat-ddictxt = p_ddictxt.
ENDIF.
Set as editable or not.
IF NOT p_edit IS INITIAL.
wa_fieldcat-INPUT = 'X'.
wa_fieldcat-EDIT = 'X'.
ENDIF.
APPEND wa_fieldcat TO t_fieldcat.
ENDFORM. "set_fieldcat2
*& Form top_of_page
Called on top_of_page ALV event.
Prints the heading.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'TRVPICTURE04'
it_list_commentary = t_heading.
ENDFORM. " alv_top_of_page
*& Form user_command
Called on user_command ALV event.
Executes custom commands.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
case sy-ucomm.
WHEN '&DATA_SAVE'.
LOOP AT IT_DATA INTO WA WHERE ENDKZ = 'X'.
IF WA-ENDKZ = 'X'.
*******MODIFIED*********************************
U DELETE THIS CODE N USER UR INSERT CODE TO CHECK
SY-MSGV1 = WA-MBLNR. " U CAN DELETE
SY-MSGV2 = WA-MATNR. " U CAN DELETE
MESSAGE ID 'BC_BOR' TYPE 'I' NUMBER '888' " U CAN DELETE
WITH SY-MSGV1 SY-MSGV2. " U CAN DELETE
*******MODIFIED*********************************
INSERT ZTABLE.
ENDIF.
endloop.
ENDCASE.
ENDFORM. "user_command
this is my code, database will stored in fields only.data is empty,
how to slove that one,send any sugestion.Hi Lakshmi,
Can u explain briefly what is ur requirement. U mean to say that after clicking the checkbox in data base table or Screen?
Regards,
Jayaram... -
Data Not loaded from ap_invoice_lines_interface to the base table
Hi ,
Please I'm working on Interface which load invoices from Cobol system to oracle , anyway procedure is working on fine & all data is loaded to the interface as i'm inserting 4 attributes which is DFF on the invoice line level
Now when i ran the import program all data is loaded to the base table except one of the attributes isnot loaded .
will anyone tell me what is the reason or how can i trace that ..........
Thanks In AdvanceDear All ,,,,
Please i got it's a matter of size of the attribute1 segment i increased it ,,,,,,,,,but now the issue that data is saved in the base table but not showing in the screen
will you please help me in that
Edited by: miro_feps on May 21, 2012 1:01 AM -
How to stored data after clicking check box save in data base table
TABLES:mseg,mard,mkpf.
TYPE-POOLS:slis.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:smblnr FOR mseg-mblnr MODIF ID m1,
smatnr FOR mseg-matnr MODIF ID m2,
swerks FOR mard-werks MODIF ID m3,
slgort FOR mard-lgort MODIF ID m4,
slgpbe FOR mard-lgpbe MODIF ID m5,
scharg FOR mseg-charg MODIF ID m6,
sbwart FOR mseg-bwart MODIF ID m7,
skostl FOR mseg-kostl MODIF ID m8,
saufnr FOR mseg-aufnr MODIF ID m9,
srsnum FOR mseg-rsnum MODIF ID m10.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:pre RADIOBUTTON GROUP radi USER-COMMAND ucomm DEFAULT 'X',
pse RADIOBUTTON GROUP radi,
bps RADIOBUTTON GROUP radi.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETER:layout TYPE i.
SELECTION-SCREEN END OF BLOCK b3.
DATA:BEGIN OF itab OCCURS 0,
mblnr LIKE mseg-mblnr,
matnr LIKE mseg-matnr,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
lgpbe LIKE mard-lgpbe,
charg LIKE mseg-charg,
bwart LIKE mseg-bwart,
budat LIKE mkpf-budat,
menge LIKE mseg-menge,
meins LIKE mseg-meins,
kostl LIKE mseg-kostl,
aufnr LIKE mseg-aufnr,
rsnum LIKE mseg-rsnum,
checkbox TYPE c,
END OF itab.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
gw_fieldcat TYPE slis_fieldcat_alv,
gt_layout TYPE slis_layout_alv.
START-OF-SELECTION.
SELECT msegmblnr msegmatnr mardwerks mardlgort mardlgpbe msegcharg msegbwart mkpfbudat
msegmenge msegmeins msegkostl msegaufnr mseg~rsnum
INTO TABLE itab FROM
mseg JOIN mard ON mardmatnr EQ msegmatnr
JOIN mkpf ON msegmblnr EQ mkpfmblnr
WHERE mseg~matnr IN smatnr.
IF sy-subrc EQ 0.
SORT itab BY matnr.
PERFORM display_alv_output.
ENDIF.
*& Form display_alv_output
text
--> p1 text
<-- p2 text
FORM display_alv_output.
REFRESH gt_fieldcat.
gw_fieldcat-fieldname = 'MBLNR'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 1.
gw_fieldcat-seltext_m = 'material document'.
gw_fieldcat-key = 'x'.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'MATNR'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 2.
gw_fieldcat-seltext_m = 'material'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'WERKS'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 3.
gw_fieldcat-seltext_m = 'plant'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'LGORT'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 4.
gw_fieldcat-seltext_m = 'storage location'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'LGPBE'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 5.
gw_fieldcat-seltext_m = 'storage bin'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'CHARG'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 6.
gw_fieldcat-seltext_m = 'Batch number'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'BWART'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 7.
gw_fieldcat-seltext_m = 'Movement Type (Inventory Management)'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'BUDAT'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 8.
gw_fieldcat-seltext_m = 'Posting Date in the Document'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'MENGE'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 9.
gw_fieldcat-seltext_m = 'QUANTITY'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'MEINS'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 10.
gw_fieldcat-seltext_m = 'Basic unit of measure'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'KOSTL'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 11.
gw_fieldcat-seltext_m = 'Cost center'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'AUFNR'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 12.
gw_fieldcat-seltext_m = 'Order Number'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-fieldname = 'RSNUM'.
gw_fieldcat-tabname = 'itab'.
gw_fieldcat-col_pos = 13.
gw_fieldcat-seltext_m = 'Number of Reservation / Depe'.
gw_fieldcat-key = ' '.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
gw_fieldcat-col_pos = 14.
gw_fieldcat-fieldname = 'CHECKBOX'.
gw_fieldcat-seltext_m = 'Compltd'.
gw_fieldcat-checkbox = 'X'.
gw_fieldcat-edit = 'X'.
APPEND gw_fieldcat TO gt_fieldcat.
CLEAR gw_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZREPORT'
IS_LAYOUT = gt_layout
IT_FIELDCAT = gt_fieldcat
TABLES
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. " display_alv_output
this is mycode .
send me replay.Hi Lakshmi,
Can u explain briefly what is ur requirement. U mean to say that after clicking the checkbox in data base table or Screen?
Regards,
Jayaram... -
how do i knw the views base table...
i can view text from user_source
but i there any dictionary table which show view name and base table name..?Hmm , jsut a note to mention that you may use , v$fixed_view_definition also.
For example,
SQL> select view_definition
2 from v$fixed_view_definition where view_name=’V$LOG’;
VIEW_DEFINITION
select GROUP# , THREAD# , SEQUENCE# , BYTES , MEMBERS , ARCHIVED , STATUS , FI
RST_CHANGE# , FIRST_TIME from GV$LOG where inst_id = USERENV(’Instance’)
SQL> select view_definition
2 from v$fixed_view_definition where view_name=’GV$LOG’;
VIEW_DEFINITION
select le.inst_id, le.lenum, le.lethr, le.leseq, le.lesiz*le.lebsz, ledup, decod
e(bitand(le.leflg,1),0,’NO’,'YES’), decode(bitand(le.leflg,24), 8, ‘CURRENT’,
16,’CLEARING’, 24,’CLEARING_
CURRENT’, decode(sign(leseq),0,’UNUSED’, decode(sign((to_number(rt
.rtckp_scn)-to_number(le.lenxs))* bitand(rt.rtsta,2)),-1,’ACTIVE’,'INACTI
VE’))), to_number(le.lelos), to_date(le.lelot,’MM/DD/RR HH24:MI:SS’,'NLS_CALENDA
R=Gregorian’) from x$kccle le, x$kccrt rt where le.ledup!=0 and le.lethr=rt.rtnu
m and le.inst_id = rt.inst_id
SQL>HTH
Aman.... -
ORA-01776: cannot modify more than one base table through a join view
I have created EO based on a database view than consists of two tables, and only one is updateable.
When I try to update a row using EO, I got a following message: "ORA-01776-cannot modify more than one base table through a join view"
In Forms, this issue is resolved by setting "Query Only" property of non-updateable items to "True".
Is it possible to do something like that in ADF BC?
ThanksThanks for answer.
When I set "updateable" property to "Never", that attribute is protected from any change.
I'm sorry for incomplete usecase.
I have set up a list of value on that attribute, because it is a lookup field for another table and I need to get an ID from that table.
Basically, I need that attribute to be updateble for BC, but not for database.
Edited by: MarioK on Oct 13, 2011 9:28 AM -
Cannot modify more than one base table through a join view
hi guys, my current problem is that i have a datablock based on a view, now all the fields bar 1 are updateable, but this one field that is obtained through a join is displayed, the user can enter data in this field which then pupulates other fields which are required, but this specific field should not be updated. Is there an option to state this as i keep getting the error:
cannot modify more than one base table through a join view
Any help would be greatly appreciated, thanks.the user can enter data in this field which then pupulates other fields So, using the value of "this field" you then query the rest of the fields? Can you show us the code you use to populate the rest of the fields?
but this specific field should not be updatedHave you tried setting the "Query Only" property of the field to "Yes" and the other DML properties (Ins, Upd, Del) to No?
Also, what is your Forms version?
Thanks,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Assigning a Value to a Base Table BLock Field
hi,
I have a form in which a block is a base table block . i need to change the value of a field. currently it shows the value of a field from the Table on which the block is based . I need to change the value of that field to display some other value of another table.
i have a written select statement like this
select name into vname from ws_emp where ecode = 101
then i have assigned to this base table field
:bt_person.ti_v_name := vname;
this i have created in the base table blocks Post query
but it is not assigning value
pls correct me and suggest me if there is any other better method to do this
SaravThat SHOULD work in the Post-Query trigger of the block, but doing that is never a good idea. By replacing a base-table field with any value, it causes Forms automatic processing to lock the row immediately, so no other person running your form can call up the same data. And it causes Forms to think you need to update the record, so the record's status is changed to 'CHANGED' from 'QUERY'.
It would be better to create a non-base-table field in the block, and put the name into that field. -
Hi
I am trying to create a view.
Chosing a sap table fo ex: likp
and a customized table activated which is having a customized field with curr reference field as waerk of vbak (reference table).
Now while i am activating the view i have an error : the customized table is not a base table
please le tme know what is a base table and how can i successfully create my view .
thanks in advance
points will be awarded
vgmnmHi,
Try to create a view on normal application tables , and dont include any customizable table as base table in view creation. because those customizatable table can be maintained through SPRO only. So it wont allow you to include that in the view creation.
Regards,
Naveen -
How to know who has created a particular record in the data base table
Hi All...
Can any one tell me how to track the information about who has entered the records in to the data base table....
Thanks in advance...You could check the Created By and Created On fields if your tables contains these fields.
OR
You could check the table DBTABLOG if table logging is enabled for the table
OR
You could check the Change document tables CDHDR and CDPOS.
-Kiran
Please mark useful answers -
Data is visible in base tables of BOM routing but not visible in front end
Hi,
Through BOM_RTG_PUB API I am populating routing data into base tables, it is successfull.. but that data is not visible in front end when i queried from front end..
i am getting error while i run API as......
An error occured while processing business object BOM_ITEM12 in organization MMO. Please check the data in this business object and re-run the import process.
Can any one help me in finding out what's wrong with this..
Thanks in advance..
Edited by: 875417 on Feb 6, 2012 10:49 PMYour obeservation is correct, and expected behavior.
This behavior is useful when you have inputs that you would like to set as defaults for the user.
Obviously, if there is a value to be saved, it will require some memory to store the value.
If the input is left empty by default, that memory is made available again.
It may not be easy to think of a good use for this for a graph, but think about for numeric or string controls.
What if the user isnt sure how they should input a certain parameter or value?
You could store a default value so they could see how they should input their value.
Message Edited by Cory K on 09-15-2009 11:12 AM
Cory K
Maybe you are looking for
-
IPhone no longer recognized by ITunes, and Service is not starting
Hi My IPhone is no longer recognized by ITunes. I already tried the steps on http://support.apple.com/kb/TS1495, but had no luck, and I also tried to remove all relevant Apple software and reinstall, but this did not result in anything either. Now, a
-
How do I install memory into the Pavilion 17z-F2 series laptops?
How do I install memory into the Pavilion 17z-F (17z-F200, product L2H13AV) series laptops? HP appears to have no maintenance guide available for this model series. What's up with that? Please, do not offer the generic (and out-of-date) Pavilion 17 N
-
Print month view without time of day
I am using iCal to manage project due dates in our office. I am able to turn off the hours/minutes when in screen mode, but each time I print the month view of the calendar the times print too. Is it possible to NOT print the time? Thank you.
-
Dear Team, I have HP Laserjet 3055 All in one Printer which is configured on Wireless through Print server. My network printering is 100% OK. But when I run HP full solution for Scanning & FAX then setup do not detect printer. Please Help
-
How to get values from workflow to program
Hello everybody, I am stuck with an issue in workflow. I want to know how can I get the values of workflow in Abap program. Scenario: The workflow is triggered when a user does the transaction MIGO. The user gets a workflow in his SAP inbox. He click