When is table analyzed after mapping
The OWB 10.1 User Guide says this about the mapping configuration parameter Analyze Table Statements:
"If you set this parameter to true, Warehouse Builder generates code for analyzing the target table after the target is loaded if the resulting target table only is double or half its original size."
But if I look in the generated package, DBMS_STATS is performed when the number of records loaded is greater than NUM_ROWS in ALL_TABLES (so greater than when the table was analyzed last).
I'm I missing something or is this a document error?
Jaap.
No, you are correct!
Thats a BIG mistake from the OWB developers if you ask me. They know about it since several people opened a TAR regarding this issue.
MB
Similar Messages
-
Repository Table Empty after mapping procedures
I'm using OWB 11g and simply trying to do a 'test case' where I create a simple mapping from a single (oracle) source table to a target table and then generate and populate a repository table. All 3 tables have the exact same structure. The problem is that when I generate the Repository table it has no data in it.
I'm religiously following all the directions:
1) Create & Bind on the target table
2) Synchronize on the target table
3) Validate Mapping
4) Generate mapping
Go to Design center
5) Validate, Generate, Deploy the repository table
6) Validate, Generate, Deploy and 'Start' the repository mapping.
But when I finally select 'data' for the Repository Table the Data Viewer shows me the structure but no data beneath it.
Just to cover the basics, I've set up a Staging Area module for all of this and I'm sure my source table has data in it.
Any ideas on why this is happening?
Thanks
Message was edited by:
John WDavid,
I found the table that is generating the[b] table of view does not exist error- but I'm stumped as to why this is. I have 2 tables in my source module (dw_user) which are the EVENTS and PRIZES tables. They are both accessible from the staging schema and the repository schema in sql. But the PRIZES table is getting the table of view does not exist error and the EVENTS table is not. Also, all columns referred to in the script are all valid.
The line that is generating the error is line 17 in the script below which I've bolded. Note that Line 16 accessing the EVENTS table is not generating an error. Here are some points:
1) When I try to 'deploy' either the EVENTS table or the PRIZES table, as you suggested, I get a msg saying that these are source tables and cannot be 'deployed'. I am validating, generating and deploying the target table and the mapping however.
2) One difference I did find in my initial error was that I just happened to have a copy of the EVENTS table in the stage schema (dw_stg) but did not have a copy of the PRIZES table there. This should not matter since the schema being accessed in the sql is obviously the source schema (dw_user) and not the stage schema (dw_stg). Nonetheless, just as an experiment I also put a copy of the PRIZES table in the stage schema (dw_stg) but the error remained.
Any other ideas as to why the EVENTS table is accessible in the sql but the PRIZES table is not?
Here's the script with the error on line 17:
1) CREATE OR REPLACE PACKAGE BODY ""MAP3"" AS
2)
3)
4)
5)
6)
7) -- Procedure "JOINER_p" is the entry point for map "JOINER_p"
8)
9) PROCEDURE "JOINER_p"
10) IS
11)
12) -- Row by row processing
13) "PRZ_EVT_ld" BOOLEAN;
14) CURSOR "JOINER_c" IS
15) SELECT
16) "EVENTS"."EVENTNAME" "EVENTNAME",
[17) "PRIZES"."PRIZEPLACE" "PRIZEPLACE",
18) "PRIZES"."PRIZEAMOUNT" "PRIZEAMOUNT"
19) FROM
20) "DW_USER"."EVENTS" "EVENTS",
21) "DW_USER"."PRIZES" "PRIZES"
22) WHERE
23) ( "EVENTS"."EVENTID" = "PRIZES"."EVENTID" );
Thanks for your continued help.
Cheers,
John -
Message when opening BEx Analyzer after an upgrade to 3.5
When I open BEx Analyzer after an upgrade to 3.5, I get a message:
Internal Error when generating the history. Use a different view
Is this because it is the first time I am logging onto BEx after the upgrade or is this an issue? ThanksNiten,
As A.H.P suggested what version of BW did you upgrade from ? and what version of SAPGUI are you using - try and reinstall SAPGUI or install SAPGUI6.40 final.
Also please give your front end support pack levels. This could also be due to a front end SP issue.
Some other things that could help would be :
Were there any problems / issues when upgrading ?
Arun
!!!! Oops looks like I posted at the same time as you!!!!
Message was edited by: Arun Varadarajan -
Count not updating when counting table rows (after adding one)
following this code from this link:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/479cbc96-6ec2-4d9f-b2f8-a2b43a09111e/html-client-dynamically-count-records-in-a-collection-on-browse-screen?forum=lightswitch
I have got my screen to count how many rows are present when the screen first loads. In my scenario I have a add button located on the bottom navigation bar. this opens up a dialog window where the user can add the relevant information. However when the
user hits save, and is navigated back to the browse screen, the count still displays the previous value. If i was to refresh the page it updates but this is not what i am after, when i navigate back i want the value to add by one, am i missing something in
this code?
screen.ExpanderLines.addChangeListener("state", function() {
screen.countExp = screen.ExpanderLines.data.length;
thanks for any helpTry this:
screen.ExpanderLines.addChangeListener("count", function () {
screen.countExp = screen.ExpanderLines.count;
Dave
Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer. -
XML load error - when moving table data after upgrade
Greetings:
Background:
Previously in our 2.2 instance, we would use the Data Load/Unload feature of APEX to move data in the form of XML from instance 1 to instance 2. This woks well because it moves images also (BLOB)
What Changed:
Recently we did the upgrade to APEX 3.0. The tool is working well, but we are having issues uploading XML data in the same manner we used to. The process wizard works up until time for execution.. the following error message is seen.
XML load error.
Return to application.
Assumption:
I do not believe this is an XML file issues because the file I am testing the process with is from the EMP table, and is from the UNLOAD option on the same DB and SCHEMA.. (testing is unloading the data, than re-loading the same data to the same place)
Internally some permissions or something internal must be missing.
Assistance or suggestions on where to look is greatly appreciated.
Regards,
TimTim,
Sorry for the delay - that silly day job keeps getting in the way.
Here is a small procedure you could use to take the XML data file format exported from Application Express and import into your table. This uses the Java-dependent DBMS_XMLSAVE package, which avoids the issue mentioned above.
create or replace procedure load_xml(
p_clob in clob,
p_schema in varchar2,
p_table in varchar2 )
is
l_insCtx dbms_xmlsave.ctxType;
l_rows number;
begin
l_insCtx := dbms_xmlsave.newContext(p_schema || '.' || p_table);
dbms_xmlsave.setDateFormat(l_insCtx,'yyyy-MM-dd''T''HH:mm:ss.SSS');
l_rows := dbms_xmlsave.insertXML( l_insCtx, p_clob);
dbms_xmlsave.closeContext(l_insCtx);
end load_xml;I then ran the following quick test on apex.oracle.com just for verification.
declare
l_xml varchar2(32000);
begin
l_xml := '<?xml version="1.0"?>
<ROWSET>
<ROW>
<ID>11645117496276327</ID>
<FLOW_ID>30072</FLOW_ID>
<NAME>F11645117496276327/no_image_found.gif</NAME>
<FILENAME>no_image_found.gif</FILENAME>
<MIME_TYPE>image/gif</MIME_TYPE>
<CREATED_BY>JOEL</CREATED_BY>
<CREATED_ON>2007-03-14T05:06:38.000</CREATED_ON>
<BLOB_CONTENT>474946383961C800...(data removed for this example)...41000003B</BLOB_CONTENT>
</ROW>
</ROWSET>';
load_xml( l_xml, 'MY_DB_USER', 'MY_APEX_FILES' );
end;It's now simply a matter of how you get your XML file(s) into a CLOB to call this procedure. The options include:
1) Just pass in a VARCHAR2 as I did in the example above, which would limit you to roughly 32K.
2) You could use DBMS_LOB.LOADCLOBFROMFILE to read it from the database server filesystem.
3) You could upload the file via an APEX application (or some other means within APEX), you could convert the BLOB to a CLOB, and then call this procedure. If you need help with this method, let me know.
Don't forget - as yet another alternative, you could always contact Oracle Support to see what could be done about that underlying database bug.
I hope this helps.
Joel -
<p>
{color:#339966}Hi,
I have a very basic question.
I want to know what exactly happens in the Database architecture when a table analyze is done by gathering the stats.
How does this analyze helps in performance of queries.
Thanks
Mns{color}
</p>hi,
Table analyze is done to get the internal details for the table like exact space used,exact blocks used,row chaining etc.
optimizer uses these details in creating execution plan for the statements for that table.
SQL> set lines 10000
SQL> select table_name,num_rows,blocks,chain_cnt,avg_row_len from user_tables where table_name='EMP';
TABLE_NAME NUM_ROWS BLOCKS CHAIN_CNT AVG_ROW_LEN
EMP
SQL> analyze table emp compute statistics;
Table analyzed.
SQL> select table_name,num_rows,blocks,chain_cnt,avg_row_len from user_tables where table_name='EMP';
TABLE_NAME NUM_ROWS BLOCKS CHAIN_CNT AVG_ROW_LEN
EMP 14 1 0 40
Regards
Edited by: NKU on Nov 5, 2008 12:28 AM -
Java.lang.NullpointerException when use source table as a mapping component
Hi all,
I am new to owb and I got NullPointerException when I try to drag a table to my mapping.
The table is imported and it's from a windows oracle database. The mapping is located on my linux oracle database.
By the way, I can even deploy the table.
What have I done wrong and why this happen?
thanks in advance.
帖子经 953800编辑过Hi Timo,
Thanks for the reply,
If I understand correctly I need to apply to the weblogic server 10.3.5 + Sherman patch UPDATE1 patch #12979653 and patch #12917525. After this the ADF Runtime 11.1.1.5 installed in the Production environments will allow me to run my application that is running in ADF Runtime 11.1.2.1. right?
I'm working on getting this patches installed. Thank you very much for your help.
I run the test on my local server as a test class and as a web service, it worked perfect, nevertheless in the Production environment I got a interesting answer:
Production 1 and 2:
Request:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://model/">
<env:Header/>
<env:Body>
<ns1:getVersion/>
</env:Body>
</env:Envelope>
Response
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Server</faultcode>
<faultstring>oracle/jbo/Version</faultstring>
</S:Fault>
</S:Body>
</S:Envelope>
Request:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://model/">
<env:Header/>
<env:Body>
<ns1:getBuildLabel/>
</env:Body>
</env:Envelope>
Response:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getBuildLabelResponse xmlns:ns2="http://model/">
<return>oracle.jbo.Version</return>
</ns2:getBuildLabelResponse>
</S:Body>
</S:Envelope>
Edited by: 917852 on Jul 12, 2012 11:31 AM -
Update 2 tables in 1 mapping fails when using DB link
Hi,
We use OWB10 R2. We have a mapping which should update 2 target tables. 1 table is part of the target schema of the mapping, the other table is located on a different database and is updated through a database link.
What we encounter is that only 1 of the 2 targets is updated.
When removing 1 of the targets in the mapping (does not matter which one) then the target left in the mapping is updated normally.
Is there a problem or restriction on using target tables in a mapping? Should they always be located in the same database? Or is there somethingelse we are overlooking?
Any help is very appreciated.
Regards,
IlonaHi Ilone
When we had a conf call with Oracle regarding one of the issues - they told us that with Oracle 10g R2 it is recommened configuration to have target in the same machine/database as the runtime repository. Apparetnly they haven't tested the situation when the target is on different machine. I was told that it makes more sense to keep runtime and target together as it will reduce network traffic and increase performance coz no data will have to be moved across the network (and aviod using pesky dblinks!). Apparently this recommendation is stated somewhere in thier installation guide. Because it is not supported and tested configuration - they don't know the impact it might have and how it is going to behaive. Some sql might be generated wrongly or the situation you are in...
So we had to change our configuration and now have runtime repository sitting on the target machine and i have maps that load more then one table - no problems at all!
Could you possibly try creating simple map and doing load to two tables on the same db? if this works - then y ou will know the answer.
Hope it helps and would be interesting to know how you get on.
Vix -
How May i verify, table analyzed or not and if yes, when it was done?
How May i verify, table analyzed or not and if yes, when it was done?
SQL> desc user_tables
Name Null? Type
TABLE_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(30)
IOT_NAME VARCHAR2(30)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2(3)
BACKED_UP VARCHAR2(1)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2(10)
INSTANCES VARCHAR2(10)
CACHE VARCHAR2(5)
TABLE_LOCK VARCHAR2(8)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2(3)
IOT_TYPE VARCHAR2(12)
TEMPORARY VARCHAR2(1)
SECONDARY VARCHAR2(1)
NESTED VARCHAR2(3)
BUFFER_POOL VARCHAR2(7)
ROW_MOVEMENT VARCHAR2(8)
GLOBAL_STATS VARCHAR2(3)
USER_STATS VARCHAR2(3)
DURATION VARCHAR2(15)
SKIP_CORRUPT VARCHAR2(8)
MONITORING VARCHAR2(3)
CLUSTER_OWNER VARCHAR2(30)
DEPENDENCIES VARCHAR2(8)
COMPRESSION VARCHAR2(8)
SQL> -
Invalid DataStore object name error when running process chain after EHP1
Hello,
We recently upgraded our BW Dev platform to NW7.01 EHP1 SP6. I noticed that the layout for "Delete PSA Request" process in the Process Chain has changed after the upgrade. We can no longer specify the actual PSA table to delete eg, /BIC/B0001645. Instead we need to specify the Datasource name and the Source System.
Now after the upgrade when I run one of my process chains, it fails at "Delete PSA Request" step with error message "Invalid DataStore object name /BIC/B0001645: Reason: No valid entry in table RSTS". This datasource is based on the flat file source system and the PSA table for this Datasource is /BIC/B0001653.
Unfortunately the process chain is picking up an older PSA table for this datasource and there is no way for me to specify the current PSA table name after this change in layout with EHP1 upgrade. Any suggestions on how to resolve this issue.
Many Thanks,
AlHi,
Please implement OSS 1345331.
If this does not help try the below steps:
1. Run the report 'RSAR_PSA_CLEANUP_DIRECTORY/_MS' in check mode for a
particular PSA table for finding the inconsistencies.
2. After that please analyze the logs and if there is any problems related to partition, you need to correct them using the report u2013
3. 'SAP_PSA_PARTNO_CORRECT' in repair mode for the
PSA tables. Run the report again after this
4. 'RSR_PSA_CLEANUP_DIRECTORY/_MS' in check mode to
double check that the invalid partitions are
corrected.
Once this is done you can execute the report
'RSR_PSA_CLEANUP_DIRECTORY/_MS' in repair mode.
-Vikram -
How and when the table will go STALE ?
Hi,
I want to check how and when a table will be marked as STALE.
I have done following steps
---- Created a table --------------------
SQL> create table t1 (id number, name varchar2(100)) ;
Table created.
---- Inserted decent amount of data --------------
SQL> declare v1 number; begin for i in 1..25 loop
2 insert into t1 select object_id, object_name from all_objects ; commit; end loop;
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> select table_name, status, num_rows, last_analyzed, monitoring from user_tables where table_name='T1';
TABLE_NAME STATUS NUM_ROWS LAST_ANAL MON
T1 VALID YES
---- Gather stats -----------------
SQL> exec dbms_stats.gather_table_stats( user, 'T1', METHOD_OPT => 'FOR ALL COLUMNS SIZE 1');
PL/SQL procedure successfully completed.
SQL> select table_name, status, num_rows, last_analyzed, monitoring from user_tables where table_name='T1';
TABLE_NAME STATUS NUM_ROWS LAST_ANAL MON
T1 VALID 115544 18-JAN-08 YES
---- Insert more data ---------------------------
SQL> declare v1 number; begin for i in 1..25 loop
2 insert into t1 select object_id, object_name from all_objects ; commit; end loop;
3 end;
4 /
PL/SQL procedure successfully completed.
Now, after I have analyzed the table and get the stats in, I loaded good amount of data. So, in theory, this table should be marked as STALE.
Where can I check if this table has been marked STALE? when ?
Please guide.
ThanksYou need to read that manual with more caution. It has all info you need.
1. Table modification info stays in shared pool and flushed into dictionary by Oracle automatically. You can explicity do it by calling dbms_stats.flush_database_monitoring_info.
2. dba_tab_modifications view = How many DML are applied to target table?
dba_tab_statistics.stale_stats = Is statistics stale?
3. When you call dbms_stats.gather... familiy, Oracle flushed the stale info to disk. You gnerally don't need to care about that.
4. Statistics is considered to be stale, when the change is over 10% of current rows.
(As of 11g, this value can be customized per objects. Cool feature)
create table t_stat(id int);
insert into t_stat select rownum from all_objects where rownum <= 100;
commit;
exec dbms_stats.gather_table_stats(user, 'T_STAT');
select * from sys.dba_tab_modifications where table_name = 'T_STAT';
No row selected
select stale_stats from sys.dba_tab_statistics where table_name = 'T_STAT';
NO
insert into t_stat select rownum from all_objects where rownum <= 20;
select * from sys.dba_tab_modifications where table_name = 'T_STAT';
No rows selected <-- Oops
select stale_stats from sys.dba_tab_statistics where table_name = 'T_STAT';
NO <-- Oops
exec dbms_stats.flush_database_monitoring_info;
select * from sys.dba_tab_modifications where table_name = 'T_STAT';
TABLE_OWNER TABLE_NAME PARTITION_NAME SUBPARTITION_NAME INSERTS UPDATES DELETES TIMESTAMP TRUNCATED DROP_SEGMENTS
UKJA T_STAT 20 0 0 2008-01-18 PM 11:30:19 NO 0
select stale_stats from sys.dba_tab_statistics where table_name = 'T_STAT';
YES -
Help: Jbo Exception non blocking when using table cell renderer?
Hi,
JClient 9.5.2.
When using Table Cell Renderer on an table cell attribute that is defined mandatory and activating the insert button, the (oracle.jbo.AttrValException) JBO-27014 exception is caught but it is not blocking and a new row is still inserted.
The JClient component demo, table attribute list, has the same behaviour.
You can add multiple rows even if not all required attributes have been documented.
Can a Swing specialist help me on this one?
Example of Table Cell Renderer:
public class TableBasicStatusRenderer extends DefaultTableCellRenderer
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
int row, int column)
JLabel lb = new JLabel((String) StaticData.getStatusName(value)); // retrieves label from Map
return lb;
Regards
FredericHi,
I found something interesting, it could be a WORKAROUND!
I noticed that in another detail panel with table layout the JBO exception was blocking and adding another row before completing the row was NOT possible.
In the create method of the entity object of the displayed View Object I iterate over the detail row iterator to retrieve a maximum value.
By the end of the method the pointer is positionned after the last row.
So I added to the detail panel that doesn't block following code:
In create method of detail Entity Object Impl (only one entity object involved for this View)
// Retrieve master EntityObjectImpl from association:
PostalTariffImpl postalTariffImpl = getPostalTariffAssoc();
// Retrieve detail default row iterator
RowIterator ri = postalTariffImpl.getPostalDetailGroupAssoc();
// Position pointer after last row
ri.last();
ri.next();
Question: Why does this solve the problem?
Regards
Frederic
PS Les mysteres de l'informatique! -
Hi All,
I am doing Flat file to Flat file Scenario.I am doing content conversion on both the sender and receiver side.I have twenty eight fileds on sender side and twenty eight fields on receiver side.When the Flat file is being picked up it is converting into XML and all the fields are clearly shown in SXMB_MONI.I have mapped every field during mapping.But when i check the payload in RWB in message monitoring the XML message which we can see after mapping in some records only 24 fields are being shown while in some records all 28 fields are being shown.When I check the same in test tab in message mapping it is working fine.Please help in this regard ASAP.
Thanks in Advance
DinakarSounds to me like you have some conditional mappings that are falling out and not returning values. If all your field mappings are one-to-one without conditions then the problem must be within the data itself. We've seen where certain XML control characters can mess up mappings (& and $ for example).
I don't suppose you are using an XSL mapping that you can post here for us to check out???
Chad -
Alv show in report but when see in spool (after run background job) there i
my program have some error when i run result alv show in report but when see in spool (after run background job) there is no data, (other program can see result in spool)
Please help
here is some example of my program
********************************declare internal table*****************************
internal table output for BDC
data : begin of t_output occurs 0,
bukrs type anla-bukrs,
anln1 type anla-anln1,
anln2 type anla-anln2,
zugdt type anla-zugdt,
result(70) type c,
end of t_output.
*****get data from loop********************************
loop at t_anla.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = t_anla-anln1
IMPORTING
OUTPUT = t_anla-anln1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = t_anla-anln2
IMPORTING
OUTPUT = t_anla-anln2.
check record is correct or not
select single bukrs anln1 anln2 zugdt
into w_output
from anla
where bukrs = t_anla-bukrs and
anln1 = t_anla-anln1 and
anln2 = t_anla-anln2
zugdt = '00000000'
if record is correct
if sy-subrc = 0 and w_output-zugdt = '00000000'.
w_output-bukrs = t_anla-bukrs.
w_output-anln1 = t_anla-anln1.
w_output-anln2 = t_anla-anln2.
w_output-result = 'Yes : this asset can delete'.
append w_output to t_output.
if record is not correct
elseif sy-subrc = 0 and w_output-zugdt <> '00000000'.
there is error record this asset have value already
v_have_error = 'X'.
w_output-bukrs = t_anla-bukrs.
w_output-anln1 = t_anla-anln1.
w_output-anln2 = t_anla-anln2.
w_output-result = 'Error : this asset have value already'.
append w_output to t_output.
else.
there is error record this asset donot exist in table anla
v_have_error = 'X'.
w_output-bukrs = t_anla-bukrs.
w_output-anln1 = t_anla-anln1.
w_output-anln2 = t_anla-anln2.
w_output-result = 'Error : this asset doest not exist'.
append w_output to t_output.
endif.
*end of check record is correct or not
clear w_output.
endloop.
******************************show data in ALV***************************************************
show data from file in ALV
perform display_report_ALV.
*& Form display_report_ALV
form display_report_ALV.
DATA: LT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
LT_EVENTS TYPE SLIS_T_EVENT,
LV_REPID LIKE SY-REPID.
PERFORM ALV_DEFINE_FIELD_CAT USING LT_FIELD_CAT.
PERFORM ALV_HEADER_BUILD USING T_LIST_TOP_OF_PAGE[].
PERFORM ALV_EVENTTAB_BUILD USING LT_EVENTS[].
LV_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = LV_REPID
IT_FIELDCAT = LT_FIELD_CAT
I_SAVE = 'A'
IT_EVENTS = LT_EVENTS[]
TABLES
T_OUTTAB = t_output
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
WRITE: / 'Return Code : ', SY-SUBRC,
'from FUNCTION REUSE_ALV_GRID_DISPLAY'.
ENDIF.
endform.
*& Form alv_define_field_cat
text
-->P_LT_FIELD_CAT text
FORM ALV_DEFINE_FIELD_CAT USING TB_FCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: WA_FIELDCAT LIKE LINE OF TB_FCAT,
LV_COL_POS TYPE I.
DEFINE FIELD_CAT.
CLEAR WA_FIELDCAT.
ADD 1 TO LV_COL_POS.
WA_FIELDCAT-FIELDNAME = &1.
WA_FIELDCAT-REF_TABNAME = &2.
WA_FIELDCAT-COL_POS = LV_COL_POS.
WA_FIELDCAT-KEY = &3.
WA_FIELDCAT-NO_OUT = &4.
WA_FIELDCAT-REF_FIELDNAME = &5.
WA_FIELDCAT-DDICTXT = 'M'.
IF NOT &6 IS INITIAL.
WA_FIELDCAT-SELTEXT_L = &6.
WA_FIELDCAT-SELTEXT_M = &6.
WA_FIELDCAT-SELTEXT_S = &6.
ENDIF.
WA_FIELDCAT-DO_SUM = &7.
WA_FIELDCAT-OUTPUTLEN = &8.
APPEND WA_FIELDCAT TO TB_FCAT.
END-OF-DEFINITION.
FIELD_CAT 'BUKRS' 'ANLA' 'X' '' 'BUKRS' 'Company Code' '' ''.
FIELD_CAT 'ANLN1' 'ANLA' 'X' '' 'ANLN1' 'Asset Number' '' ''.
FIELD_CAT 'ANLN2' 'ANLA' 'X' '' 'ANLN2' 'Asset Sub Number' '' ''.
FIELD_CAT 'ATEXT' 'T5EAE' 'X' '' 'ATEXT' 'Result' '' ''.
FIELD_CAT 'RESULT' '' 'X' '' 'RESULT' 'RESULT' '' ''.
ENDFORM. " alv_define_field_catHi,
Check this code..
FORM display_report_alv.
DATA: lt_field_cat TYPE slis_t_fieldcat_alv,
lt_events TYPE slis_t_event,
lv_repid LIKE sy-repid.
PERFORM alv_define_field_cat USING lt_field_cat.
PERFORM alv_header_build USING t_list_top_of_page[].
PERFORM alv_eventtab_build USING lt_events[].
lv_repid = sy-repid.
IF sy-batch EQ 'X'. ----> " System Field for Backgroud..if Background use list display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = lv_repid
it_fieldcat = lt_field_cat
i_save = 'A'
it_events = lt_events[]
TABLES
t_outtab = t_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
ELSE.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_repid
it_fieldcat = lt_field_cat
i_save = 'A'
it_events = lt_events[]
TABLES
t_outtab = t_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDIF.
IF sy-subrc NE 0.
WRITE: / 'Return Code : ', sy-subrc,
'from FUNCTION REUSE_ALV_GRID_DISPLAY'.
ENDIF.
ENDFORM. "display_report_ALV -
To Disble the Field in Table Control after clicking Save button
Hi,
I have a requirement as follows. i need to disable one field in the table control after clicking save button. i tried with SCREEN elements but it disabling whole the table control but i need to disable that particular one record only in the table control. i found Structure CXTAB_COLUMN in documentaion. it has the properties like invisible. can any body tell how can we disble that particular field in table control only for the one record. and how can we use CXTAB_COLUMN.
Thanks in advance.hi,
do like this...
in USER_COMMAND_1000 module of PAI,
MODULE user_command_1000 INPUT.
CASE ok_code.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
WHEN 'SAVE'.
fl = 1.
GET CURSOR LINE lin.
ENDCASE.
ENDMODULE. " user_command_1000 INPUT
and make on module disable in Loop Endloop in PBO.
and write like this...
MODULE disable OUTPUT.
LOOP AT SCREEN.
IF tab1-current_line = lin AND fl = 1.
screen-input = 0.
ELSEIF tab1-current_line < lin.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE. " disable OUTPUT
here fl and lin both are type i.....
and there will b one module in PBO
MODULE tab1_change_tc_attr.
in that put if condition....
MODULE tab1_change_tc_attr OUTPUT.
IF sy-ucomm <> '' AND sy-ucomm <> 'SAVE'.
DESCRIBE TABLE itab LINES tab1-lines.
ENDIF.
ENDMODULE. "TAB1_CHANGE_TC_ATTR OUTPUT
ur problem will solve...
reward if usefull....
Edited by: Dhwani shah on Jan 2, 2008 1:17 PM
Maybe you are looking for
-
Creating a new row in a JTable
How do i make a new row in a JTabel?
-
HELP! Cannot open Canon RAW (CR2) file in PP5.5.2 (Mac)
Hi folks. I cannot import RAW (CR2) files (Canon 5D2) files into premiere pro 5.5.2! I can get them into After Effects (through cameraraw) but PP does not even show them as a "supported file type" If I drag and drop from the finder I get "unsupported
-
How to compact and repair a MS Access database with NI CVI 8.5 (and SQL Toolkit)
Hello I'm using the SQL Toolkit with CVI 8.5 for accessing MS Access Databases. Is there a possibility to compact and repair the .mdb file with CVI? Thanks in advance.
-
Create HTTPConnection using javabean?
Hi All, I hav few questions about jsp... 1. If there are 2 files jsp. A & B. A send params to B. Is that the response of B (such as HTTP200, etc) r sent to A automatically after B received the params? 2. What if A send params to B. & The params r pro
-
Problem started when no sound would play in YouTube. Updated Java, flash, adobe, shockwave, plugins. Nada. Checked sound mixer on laptop, Firefox not muted. Ran firefox in safe mode. Still no sound. Yet no issues, sounds play in IE and other browers.