Performance Problems - Reports 2.5, Oracle 7.3
We have an application designed using Developer 2000 (Forms 4.5, Repors 2.5) and is running on Oracle 7.3.3 on Windows NT Server 4.0/Windows 95/98 clients. Server is of 128MB RAM and clients are typically 32MB RAM.
Whenever a report is fired for execution, the entire system performance decreases. When more then two reports are fired simultaneuosly, the system performance is pathetic.
The database size is very small < 500 MB.
Dear Namrata Somani: You proved to run the reports in form ASYNCHRONOUS? See that is triggers in reports which they are very useful, in my case, gains much performance, simplifying the Querys which the reports run. For it, it records information obtained by query complex, in a temporary table that load in trigger of the report and erasing it once the report finishes. Of this form, it simplifies to much the Data model. greetings, Juan Pablo
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Namrata Somani ([email protected]):
We have an application designed using Developer 2000 (Forms 4.5, Repors 2.5) and is running on Oracle 7.3.3 on Windows NT Server 4.0/Windows 95/98 clients. Server is of 128MB RAM and clients are typically 32MB RAM.
Whenever a report is fired for execution, the entire system performance decreases. When more then two reports are fired simultaneuosly, the system performance is pathetic.
The database size is very small < 500 MB.<HR></BLOCKQUOTE>
null
Similar Messages
-
Interactive report performance problem over database link - Oracle Gateway
Hello all;
This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
query like this: (due to sensitivity issue, I can not disclose real table name)
SELECT apex_item.checkbox(1,b.col3)
, a.col1
, a.col2
FROM table_one a
, table_two b
WHERE a.col3 = 12345
AND a.col4 = 100
AND b.col5 = a.col5
table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
I would like to get ideas from people how to resolve or speed-up the query?
Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
Thank you.
Shaun S.Hi Shaun
Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
WITH a AS
(SELECT /*+ MATERIALIZE */ *
FROM table_one),
b AS
(SELECT /*+ MATERIALIZE */ *
FROM table_two),
sourceqry AS
(SELECT b.col3 x
, a.col1 y
, a.col2 z
FROM table_one a
, table_two b
WHERE a.col3 = 12345
AND a.col4 = 100
AND b.col5 = a.col5)
SELECT apex_item.checkbox(1,x), y , z
FROM sourceqry
WITH a AS
(SELECT /*+ MATERIALIZE */ *
FROM table_one),
b AS
(SELECT /*+ MATERIALIZE */ *
FROM table_two)
SELECT apex_item.checkbox(1,x), y , z
FROM table_one a
, table_two b
WHERE a.col3 = 12345
AND a.col4 = 100
AND b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
Sorry for all the questions but it helps to answer the question, if I can.
Cheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;) -
Performance Problem After upgrade to oracle 10g
Hi
I have upgrade one of my datawarehouse database from oracle 9.2.0.8 to oracle 10.2.0.4 running on solaris 9
After the upgrade jobs which were running in the database is taking hell lot of time.
The jobs are accessing the views which is used to get the monthly report data from the database.
what could be the solution and where to start from to get the RCA to resolve this performance issue
Please let me know if you require any other information
database is currently running in the automatic shared memory management mode ie SGA_MAX and SGA_TARGET parameters are defined for thatThere are a lot of differences between 10g and 9i in this regard, among these are:
- There is a default job that gathers statistics every night which is not there in 9i. You might have totally different statistics as in 9i due to that job, depending on how and if at all you used to collect statistics in 9i
- The 10g DBMS_STATS package collects histograms on some columns by default (parameter METHOD_OPT=>'FOR ALL COLUMNS SIZE AUTO' default in 10g whereas 'FOR ALL COLUMNS SIZE 1' in 9i) which can have a significant effect on the execution plans
- The 10g optimizer has CPU costing enabled by default which can make significant changes to your execution plans due to different costing of table scans and order of predicate evaluation. In addition it uses NOWORKLOAD system statistics if system statistics have not been gathered explicitly
- 10g checks the min and max values stored for columns in the data dictionary. If your predicates are way off compared to these values then 10g begins to adjust the calculated selectivity of the predicate which can again significantly affect your execution plans
- 10g introduces the "Cost Based Query Transformation (CBQT)" feature which means that rather than applying heuristic transformation rules transformations are costed and potentially discarded whereas 9i applies transformations unconditionally whenever possible
Check also the following note resp. white paper:
http://optimizermagic.blogspot.com/2008/02/upgrading-from-oracle-database-9i-to.html
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Performance problem with Orcacle / Crystal reports 8.5 / ASP
Hi,
I have a performance problem with reports running crystal reports 8.5 with oracle databases.
Fetching data appears to be slow. Oracle trace reports (tkprof) shows that fetchsize=1.
Fetchsize in Oracle ODBC is 15 (default).
How can I update te fetchsize in crystal reports?
I would appreciate any help.CR XI R2 is also still available for purchase. This is the last version of CR to use the RDC. Contact sales at 866-681-3435.
Make sure the installed versin is 11.5.12.1838 - if it is not, apply SP6:
https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe
MSM:
https://smpdl.sap-ag.de/~sapidp/012002523100000634032010E/crxir2sp6_rdc_mm.zip
- Ludek
Edited by: Ludek Uher on Jan 4, 2011 10:05 AM -
Performance Problem between Oracle 9i to Oracle 10g using Crystal XI
We have a Crystal XI Report using ODBC Drivers, 14 tables, and one sub report. If we execute the report on an Oracle 9i database the report will complete in about 12 seconds. If we execute the report on an Oracle 10g database the report will complete in about 35 seconds.
Our technical Setup:
Application server: Windows Server 2003, Running Crystal XI SP2 Runtime dlls with Oracle Client 10.01.00.02, .Net Framework 1.1, C# for Crystal Integration, Unmanaged C++ for app server environment calling into C# through a dynamically loaded mixed-mode C++ DLL.
Database server is Oracle 10g
What we have concluded:
Reducing the number of tables to 1 will reduce the execution time of the report from 180s to 13s. With 1 table and the sub report we would get 30 seconds
We have done some database tracing and see that Crystal Reports Issues the following query when verifying the database and it takes longer in 10g vs 9i.
We have done some profiling in the application code. When we retarget the first table to the target database, it takes 20-30 times longer in 10g than in 9i. Retargeting the other tables takes about twice as long. The export to a PDF file takes about 4-5 times as long in 10g as in 9i.
Oracle 10g no longer supports the /*+ RULE */ hint.
Verify DB Query:
select /*+ RULE */ *
from
(select /*+ RULE */ null table_qualifier, o1.owner table_owner,
o1.object_name table_name, decode(o1.owner,'SYS', decode(o1.object_type,
'TABLE','SYSTEM TABLE','VIEW', 'SYSTEM VIEW', o1.object_type), 'SYSTEM',
decode(o1.object_type,'TABLE','SYSTEM TABLE','VIEW', 'SYSTEM VIEW',
o1.object_type), o1.object_type) table_type, null remarks from all_objects
o1 where o1.object_type in ('TABLE', 'VIEW') union select /*+ RULE */ null
table_qualifier, s.owner table_owner, s.synonym_name table_name, 'SYNONYM'
table_type, null remarks from all_objects o3, all_synonyms s where
o3.object_type in ('TABLE','VIEW') and s.table_owner= o3.owner and
s.table_name = o3.object_name union select /*+ RULE */ null table_qualifier,
s1.owner table_owner, s1.synonym_name table_name, 'SYNONYM' table_type,
null remarks from all_synonyms s1 where s1.db_link is not null ) tables
WHERE 1=1 AND TABLE_NAME='QCTRL_VESSEL' AND table_owner='QLM' ORDER BY 4,2,
3
SQL From Main Report:
SELECT "QCODE_PRODUCT"."PROD_DESCR", "QCTRL_CONTACT"."CONTACT_FIRST_NM", "QCTRL_CONTACT"."CONTACT_LAST_NM", "QCTRL_MEAS_PT"."MP_NM", "QCTRL_ORG"."ORG_NM", "QCTRL_TKT"."SYS_TKT_NO", "QCTRL_TRK_BOL"."START_DT", "QCTRL_TRK_BOL"."END_DT", "QCTRL_TRK_BOL"."DESTINATION", "QCTRL_TRK_BOL"."LOAD_TEMP", "QCTRL_TRK_BOL"."LOAD_PCT", "QCTRL_TRK_BOL"."WEIGHT_OUT", "QCTRL_TRK_BOL"."WEIGHT_IN", "QCTRL_TRK_BOL"."WEIGHT_OUT_UOM_CD", "QCTRL_TRK_BOL"."WEIGHT_IN_UOM_CD", "QCTRL_TRK_BOL"."VAPOR_PRES", "QCTRL_TRK_BOL"."SPECIFIC_GRAV", "QCTRL_TRK_BOL"."PMO_NO", "QCTRL_TRK_BOL"."ODORIZED_VOL", "QARCH_SEC_USER"."SEC_USER_NM", "QCTRL_TKT"."DEM_CTR_NO", "QCTRL_BA_ENTITY"."BA_NM1", "QCTRL_BA_ENTITY_VW"."BA_NM1", "QCTRL_BA_ENTITY"."BA_ID", "QCTRL_TRK_BOL"."VOLUME", "QCTRL_TRK_BOL"."UOM_CD", "QXREF_BOL_PROD"."MOVEMENT_TYPE_CD", "QXREF_BOL_PROD"."BOL_DESCR", "QCTRL_TKT"."VOL", "QCTRL_TKT"."UOM_CD", "QCTRL_PMO"."LINE_UP_BEFORE", "QCTRL_PMO"."LINE_UP_AFTER", "QCODE_UOM"."UOM_DESCR", "QCTRL_ORG_VW"."ORG_NM"
FROM (((((((((((("QLM"."QCTRL_TRK_BOL" "QCTRL_TRK_BOL" INNER JOIN "QLM"."QCTRL_PMO" "QCTRL_PMO" ON "QCTRL_TRK_BOL"."PMO_NO"="QCTRL_PMO"."PMO_NO") INNER JOIN "QLM"."QCTRL_MEAS_PT" "QCTRL_MEAS_PT" ON "QCTRL_TRK_BOL"."SUP_MP_ID"="QCTRL_MEAS_PT"."MP_ID") INNER JOIN "QLM"."QCTRL_TKT" "QCTRL_TKT" ON "QCTRL_TRK_BOL"."PMO_NO"="QCTRL_TKT"."PMO_NO") INNER JOIN "QLM"."QCTRL_CONTACT" "QCTRL_CONTACT" ON "QCTRL_TRK_BOL"."DRIVER_CONTACT_ID"="QCTRL_CONTACT"."CONTACT_ID") INNER JOIN "QFC_QLM"."QARCH_SEC_USER" "QARCH_SEC_USER" ON "QCTRL_TRK_BOL"."USER_ID"="QARCH_SEC_USER"."SEC_USER_ID") LEFT OUTER JOIN "QLM"."QCODE_UOM" "QCODE_UOM" ON "QCTRL_TRK_BOL"."ODORIZED_VOL_UOM_CD"="QCODE_UOM"."UOM_CD") INNER JOIN "QLM"."QCTRL_ORG_VW" "QCTRL_ORG_VW" ON "QCTRL_MEAS_PT"."ORG_ID"="QCTRL_ORG_VW"."ORG_ID") INNER JOIN "QLM"."QCTRL_BA_ENTITY" "QCTRL_BA_ENTITY" ON "QCTRL_TKT"."DEM_BA_ID"="QCTRL_BA_ENTITY"."BA_ID") INNER JOIN "QLM"."QCTRL_CTR_HDR" "QCTRL_CTR_HDR" ON "QCTRL_PMO"."DEM_CTR_NO"="QCTRL_CTR_HDR"."CTR_NO") INNER JOIN "QLM"."QCODE_PRODUCT" "QCODE_PRODUCT" ON "QCTRL_PMO"."PROD_CD"="QCODE_PRODUCT"."PROD_CD") INNER JOIN "QLM"."QCTRL_BA_ENTITY_VW" "QCTRL_BA_ENTITY_VW" ON "QCTRL_PMO"."VESSEL_BA_ID"="QCTRL_BA_ENTITY_VW"."BA_ID") LEFT OUTER JOIN "QLM"."QXREF_BOL_PROD" "QXREF_BOL_PROD" ON "QCTRL_PMO"."PROD_CD"="QXREF_BOL_PROD"."PURITY_PROD_CD") INNER JOIN "QLM"."QCTRL_ORG" "QCTRL_ORG" ON "QCTRL_CTR_HDR"."BUSINESS_UNIT_ORG_ID"="QCTRL_ORG"."ORG_ID"
WHERE "QCTRL_TRK_BOL"."PMO_NO"=12345 AND "QXREF_BOL_PROD"."MOVEMENT_TYPE_CD"='TRK'
SQL From Sub Report:
SELECT "QXREF_BOL_VESSEL"."PMO_NO", "QXREF_BOL_VESSEL"."VESSEL_NO"
FROM "QLM"."QXREF_BOL_VESSEL" "QXREF_BOL_VESSEL"
WHERE "QXREF_BOL_VESSEL"."PMO_NO"=12345
Does anyone have any suggestions on how we can improve the report performance with 10g?Hi Eric,
Thanks for your response. The optimizer mode in our 9i database is CHOOSE. We changed the optimizer mode from ALL_ROWS to CHOOSE in 10g but it didn't make a difference.
While researching Metalink I came across a couple of documents that indicated performance problems and issues with using certain data-dictionary views in 10g. Apparently, the definition of ALL_OBJECTS, ALL_ARGUMENTS and ALL_SYNONYMS have changed in 10g, resulting in degradation in performance, if quieried against these views. These are the same queries that crystal reports is queriying. We'll try the workaround suggested in these documents and see if it resolves the issue.
Here are the Doc Ids, if you are interested:
Note 377037.1
Note:364822.1
Thanks again for your response.
Venu Boddu. -
Performance problems on a Oracle 11G with Windows 2008 64bits.
Hi everyone,
I have noticed that our db is going low and low every week. My server has 16GB RAM and 10GB are dedicated to the Oracle database, this is a 11.2.0.1 with Windows 2008 R2 SP1 64bits. I like to know acording to the nexts values what you guys recommend to adjust in the init.ora:
orcl.__db_cache_size=5402263552
orcl.__java_pool_size=33554432
orcl.__large_pool_size=33554432
orcl.__pga_aggregate_target=3657433088
orcl.__sga_target=6878658560
orcl.__shared_io_pool_size=0
orcl.__shared_pool_size=1308622848
orcl.__streams_pool_size=33554432
*.memory_target=10511974400
*.open_cursors=5000
*.optimizer_mode='RULE'
*.processes=300
Acording to the memory target on how values can be increased the processes, pga_agregate_target, etc.
Also we have problems related to the bug Bug 9593134 that “Connections to Oracle 11g are slow and can take anywhere from 10 seconds to 2 minutes.” there is a fix on linux by removing the dns names on it but anyone have experience on windows platforms?
Thanks for all and sorry for my english.
Regards.
Arturo.Regarding the long connection times, have you tried using network packet capture software (such as Wireshark) to determine what the client computer is doing when a connection attempt is initiated?
The Oracle Database time model statistics, along with the system wide wait events may help you diagnose the non-connection related performance issues (you should not just look at the statistics, but instead capture the current values, wait a period of time, capture the statistics again, and compare the changes in the statistic values). A statspack report might also help you - but a 10046 trace at level 8 or 12 is more appropriate if you are able to identify a couple of sessions that experience performance problems.
I do not suggest just blindly modifying parameters, although I am curious to know:
* Why the session level parameter OPEN_CURSORS is set to 5000 - do you expect a single session to hold open 5,000 cursors?
* Why are you using the deprecated RULE based optimizer?
* Why is the MEMORY_TARGET parameter used when the SGA_TARGET and PGA_AGGREGATE target are specified?
Charles Hooper
http://hoopercharles.wordpress.com/
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
SAP Performance Problem with Oracle 10 on Sun SPARC T5240 server
Dear Friends,
We have a performance problem after migrating our SAP ERP 6.0 basis system. We moved to new servers a month ago.
According to SAP EarlyWatchAlert Report, CPU response time is too high, altough CPU utilization is never more than 5%,
The current system is :
Database server : Sun SPARC Enterprise T5240 Server - 2 CPU´s with 6 core, 8 thread, 1.2 Ghz 32 GB RAM
and we use another identical configured server as an application server.
Database is Oracle 10.2.0 and operating system is Solaris 10.
The problem is average CPU response time is 450 ms, and max. CPU load is %5 percent.
Pre-migration configuration with old servers, we had CPU response : 150 ms and max CPU load: 50%.
Old configuration : 2 X HP rp3440, 2 X PA 8800 CPU (2 core, 1.0 GHz).
Have you got any experience with a similar situation, which setting might be wrong for not fully utilizing server CPU´s?
or do you know any similar configuration for benchmark?
Thanks in advance
UzanOur organization upgraded an application - The vendor had originally suggested a T2000. When we finally migrated onto it, the performance was worse than the older version of the application. The vendor hadn't yet tested the combination of T2000 and 10.2 with their application when they had made that hardware recommendation, they subsequently revised their recommendations. We ended up with an M4000.
The application performance, IMHO, still stinks. But that's because it's a java based application written for database independence.
The interesting item to note here, is that in the application teams 'selective' testing - everything worked fine. When the testing was extended to include users who didn't follow the 'test plan', they found performance begin to tank. Then with more users, more testing, they found that the T2000 was not going to perform well. The test plan by the apps team was not sufficient to find the issues, and they did not include any load testing!
Edited by: dbtoo on Jun 5, 2009 11:20 AM -
Hi
My problem is with performance in reports. The reports I use is 'Reports From SQL Query' and I have the following select statement.
select * from lagffastadr
where kommun like :bind_kommun
and adrniva3 like :bind_adrniva3
and adrnr like :bind_adrnr
and adrlitt like :bind_adrlit
and :bind_show = 1
this works fine, but I have one big problem. The user may use wildcard to select all, %, this give me a new problem. The table I use contains NULL values. Then we don't get all the rows by using %, we get all that have a value. This can be solved by adding
where (kommun like :bind_kommun OR kommun IS NULL)
this will give me all the rows. But, then this will take a long time to evaluate since the sql query don't use the index that I have created. Is there another way to solve this or do I have to change all the NULL values in my database? (I rather not).
thanks
/Jvrgen SwensenIt looks more like a query tuning problem. Please try the SQL, PL/SQL forum.
You can expect a better answer there.
Thanx,
Chetan. -
Hi Guys,
I have a problem with performance in report, not exactly in report but in one of filter of it, I have a vision that the name is "Input a cliente", i can surf in everthing, i can filter other visions in report but when I try to make a filter using "Input a cliente" i can't do this because the screen don't open for me and some minutes after appear the message "Time out", somebody have this problem in the report?Hi KJ, I have a lot of record in the info provider....because all of my customer are there and I have a lot of customer.....when I trie do do the drill down I search in the customer hierarchy, so I have too record to look, its the reason that I can't to make a filter in this vision, I need to know how Can I solve this problem, can yo help me?
-
Performance problem in Zstick report...
Hi Experts,
I am facing performance problem in Custoom Stock report of Material Management.
In this report i am fetching all the materials with its batches to get the desired output, at a time this report executes 36,000 plus unique combination of material and batch.
This report takes around 30 mins to execute. And this report is to be viewed regularly in every 2 hours.
To read the batch characteristics value I am using FM -> '/SAPMP/CE1_BATCH_GET_DETAIL'
Is there any way out to increase the performance of this report, the output of the report is in ALV.
May i have any refresh button in the report so that data may get refreshed automatically without executing it again. or is there any cache memory concept.
Note: I have declared all the itabs with type sorted, all the select queries are fetched with key and index.
Thanks
Rohit GharwarHello,
SE30 is old. Switch on trace on ST12 while running this progarm and identify where exactly most of the time is being spent. If you see high CPU time this problem with the ABAP code. You can exactly figure out the program/function module from ST12 trace where exactly time is being spent. If you see high database time in ST12, problem is with database related issue. So basically you have to analyze sql statement from performance traces in ST12. These could resolve your issue.
Yours Sincerely
Dileep -
SQL report performance problem
I have a SQL classic report in Apex 4.0.2 and database 11.2.0.2.0 with a performance problem.
The report is based on a PL/SQL function returning a query. The query is based on a view and pl/sql functions. The Apex parsing schema has select grant on the view only, not the underlying objects.
The generated query runs in 1-2 sec in sqlplus (logged in as the Apex parsing schema user), but takes many minutes in Apex. I have found, by monitoring the database sessions via TOAD, that the explain plan in the Apex and sqlplus sessions are very different.
The summary:
In sqlplus SELECT STATEMENT ALL_ROWS Cost: 3,695
In Apex SELECT STATEMENT ALL_ROWS Cost: 3,108,551
What could be the cause of this?
I found a blog and Metalink note about different explain plans for different users. They suggested to set optimizer_secure_view_merging='FALSE', but that didn't help.Hmmm, it runs fast again in SQL Workshop. I didn't expect that, because both the application and SQL Workshop use SYS.DBMS_SYS_SQL to parse the query.
Only the explain plan doesn't show anything.
To add: I changed the report source to the query the pl/sql function would generate, so the selects are the same in SQL Workshop and in the application. Still in the application it's horribly slow.
So, Apex does do something different in the application compared to SQL Workshop.
Edited by: InoL on Aug 5, 2011 4:50 PM -
Report program Performance problem
Hi All,
one object is taking 30hr for executing.some one develped this in 1998 but this time it is a big Performance problem.please some one helep what to do i am giving that code.
*--DOCUMENTATION--
Programe written by : 31.03.1998 .
Purpose : this programe updates the car status into the table zsdtab1
This programe is to be schedule in the backgroud periodically .
Querries can be fired on the table zsdtab1 to get the details of the
Car .
This programe looks at the changes made in the material master from
last updated date and the new entries in material master and updates
the tables zsdtab1 .
Changes in the Sales Order are not taken into account .
To get a fresh data set the value of zupddate in table ZSTATUS as
01.01.1998 . All the data will be refreshed from that date .
Program Changed on 23/7/2001 after version upgrade 46b by jyoti
Addition of New tables for Ibase
tables used -
tables : mara , " Material master
ausp , " Characteristics table .
zstatus , " Last updated status table .
zsdtab1 , " Central database table to be maintained .
vbap , " Sales order header table .
vbak , " Sales order item table .
kna1 , " Customer master .
vbrk ,
vbrp ,
bkpf ,
bseg ,
mseg ,
mkpf ,
vbpa ,
vbfa ,
t005t . " Country details tabe .
--NEW TABLES ADDEDFOR VERSION 4.6B--
tables : ibsymbol ,ibin , ibinvalues .
data : vatinn like ibsymbol-atinn , vatwrt like ibsymbol-atwrt ,
vatflv like ibsymbol-atflv .
*--types definition--
types : begin of mara_itab_type ,
matnr like mara-matnr ,
cuobf like mara-cuobf ,
end of mara_itab_type ,
begin of ausp_itab_type ,
atinn like ausp-atinn ,
atwrt like ausp-atwrt ,
atflv like ausp-atflv ,
end of ausp_itab_type .
data : mara_itab type mara_itab_type occurs 500 with header line ,
zsdtab1_itab like zsdtab1 occurs 500 with header line ,
ausp_itab type ausp_itab_type occurs 500 with header line ,
last_date type d ,
date type d .
data: length type i.
clear mara_itab . refresh mara_itab .
clear zsdtab1_itab . refresh zsdtab1_itab .
select single zupddate into last_date from zstatus
where programm = 'ZSDDET01' .
select matnr cuobf into (mara_itab-matnr , mara_itab-cuobf) from mara
where mtart eq 'FERT' or mtart = 'ZCBU'.
where MATNR IN MATERIA
and ERSDA IN C_Date
and MTART in M_TYP.
append mara_itab .
endselect .
loop at mara_itab.
clear zsdtab1_itab .
zsdtab1_itab-commno = mara_itab-matnr .
Get the detailed data into internal table ausp_itab .----------->>>
clear ausp_itab . refresh ausp_itab .
--change starts--
select atinn atwrt atflv into (ausp_itab-atinn , ausp_itab-atwrt ,
ausp_itab-atflv) from ausp
where objek = mara_itab-matnr .
append ausp_itab .
endselect .
clear ausp_itab .
select atinn atwrt atflv into (ausp_itab-atinn , ausp_itab-atwrt ,
ausp_itab-atflv) from ibin as a inner join ibinvalues as b
on ain_recno = bin_recno
inner join ibsymbol as c
on bsymbol_id = csymbol_id
where a~instance = mara_itab-cuobf .
append ausp_itab .
endselect .
----CHANGE ENDS HERE -
sort ausp_itab by atwrt.
loop at ausp_itab .
clear date .
case ausp_itab-atinn .
when '0000000094' .
zsdtab1_itab-model = ausp_itab-atwrt . " model .
when '0000000101' .
zsdtab1_itab-drive = ausp_itab-atwrt . " drive
when '0000000095' .
zsdtab1_itab-converter = ausp_itab-atwrt . "converter
when '0000000096' .
zsdtab1_itab-transmssn = ausp_itab-atwrt . "transmission
when '0000000097' .
zsdtab1_itab-colour = ausp_itab-atwrt . "colour
when '0000000098' .
zsdtab1_itab-ztrim = ausp_itab-atwrt . "trim
when '0000000103' .
*=========Sujit 14-Mar-2006
IF AUSP_ITAB-ATWRT(3) EQ 'WDB' OR AUSP_ITAB-ATWRT(3) EQ 'WDD'
OR AUSP_ITAB-ATWRT(3) EQ 'WDC' OR AUSP_ITAB-ATWRT(3) EQ 'KPD'.
ZSDTAB1_ITAB-CHASSIS_NO = AUSP_ITAB-ATWRT+3(14).
ELSE.
ZSDTAB1_ITAB-CHASSIS_NO = AUSP_ITAB-ATWRT . "chassis no
ENDIF.
zsdtab1_itab-chassis_no = ausp_itab-atwrt . "chassis no
*=========14-Mar-2006
when '0000000166' .
----25.05.04
length = strlen( ausp_itab-atwrt ).
if length < 15. "***aded by patil
zsdtab1_itab-engine_no = ausp_itab-atwrt . "ENGINE NO
else.
zsdtab1_itab-engine_no = ausp_itab-atwrt+13(14)."Aded on 21.05.04 patil
endif.
----25.05.04
when '0000000104' .
zsdtab1_itab-body_no = ausp_itab-atwrt . "BODY NO
when '0000000173' . "21.06.98
zsdtab1_itab-cockpit = ausp_itab-atwrt . "COCKPIT NO . "21.06.98
when '0000000102' .
zsdtab1_itab-dest = ausp_itab-atwrt . "destination
when '0000000105' .
zsdtab1_itab-airbag = ausp_itab-atwrt . "AIRBAG
when '0000000110' .
zsdtab1_itab-trailer_no = ausp_itab-atwrt . "TRAILER_NO
when '0000000109' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-fininspdat = date . "FIN INSP DATE
when '0000000108' .
zsdtab1_itab-entrydate = ausp_itab-atwrt . "ENTRY DATE
when '0000000163' .
zsdtab1_itab-regist_no = ausp_itab-atwrt . "REGIST_NO
when '0000000164' .
zsdtab1_itab-mech_key = ausp_itab-atwrt . "MECH_KEY
when '0000000165' .
zsdtab1_itab-side_ab_rt = ausp_itab-atwrt . "SIDE_AB_RT
when '0000000171' .
zsdtab1_itab-side_ab_lt = ausp_itab-atwrt . "SIDE_AB_LT
when '0000000167' .
zsdtab1_itab-elect_key = ausp_itab-atwrt . "ELECT_KEY
when '0000000168' .
zsdtab1_itab-head_lamp = ausp_itab-atwrt . "HEAD_LAMP
when '0000000169' .
zsdtab1_itab-tail_lamp = ausp_itab-atwrt . "TAIL_LAMP
when '0000000170' .
zsdtab1_itab-vac_pump = ausp_itab-atwrt . "VAC_PUMP
when '0000000172' .
zsdtab1_itab-sd_ab_sn_l = ausp_itab-atwrt . "SD_AB_SN_L
when '0000000174' .
zsdtab1_itab-sd_ab_sn_r = ausp_itab-atwrt . "SD_AB_SN_R
when '0000000175' .
zsdtab1_itab-asrhydunit = ausp_itab-atwrt . "ASRHYDUNIT
when '0000000176' .
zsdtab1_itab-gearboxno = ausp_itab-atwrt . "GEARBOXNO
when '0000000177' .
zsdtab1_itab-battery = ausp_itab-atwrt . "BATTERY
when '0000000178' .
zsdtab1_itab-tyretype = ausp_itab-atwrt . "TYRETYPE
when '0000000179' .
zsdtab1_itab-tyremake = ausp_itab-atwrt . "TYREMAKE
when '0000000180' .
zsdtab1_itab-tyresize = ausp_itab-atwrt . "TYRESIZE
when '0000000181' .
zsdtab1_itab-rr_axle_no = ausp_itab-atwrt . "RR_AXLE_NO
when '0000000183' .
zsdtab1_itab-ff_axl_nor = ausp_itab-atwrt . "FF_AXLE_NO_rt
when '0000000182' .
zsdtab1_itab-ff_axl_nol = ausp_itab-atwrt . "FF_AXLE_NO_lt
when '0000000184' .
zsdtab1_itab-drivairbag = ausp_itab-atwrt . "DRIVAIRBAG
when '0000000185' .
zsdtab1_itab-st_box_no = ausp_itab-atwrt . "ST_BOX_NO
when '0000000186' .
zsdtab1_itab-transport = ausp_itab-atwrt . "TRANSPORT
when '0000000106' .
zsdtab1_itab-trackstage = ausp_itab-atwrt . " tracking stage
when '0000000111' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_1 = date . " tracking date for 1.
when '0000000112' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_5 = date . " tracking date for 5.
when '0000000113' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_10 = date . "tracking date for 10
when '0000000114' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_15 = date . "tracking date for 15
when '0000000115' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_20 = date . " tracking date for 20
when '0000000116' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_25 = date . " tracking date for 25
when '0000000117' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_30 = date . "tracking date for 30
when '0000000118' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_35 = date . "tracking date for 35
when '0000000119' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_40 = date . " tracking date for 40
when '0000000120' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_45 = date . " tracking date for 45
when '0000000121' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_50 = date . "tracking date for 50
when '0000000122' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_55 = date . "tracking date for 55
when '0000000123' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_60 = date . " tracking date for 60
when '0000000124' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_65 = date . " tracking date for 65
when '0000000125' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_70 = date . "tracking date for 70
when '0000000126' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_75 = date . "tracking date for 75
when '0000000127' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_78 = date . " tracking date for 78
when '0000000203' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_79 = date . " tracking date for 79
when '0000000128' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_80 = date . " tracking date for 80
when '0000000129' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_85 = date . "tracking date for 85
when '0000000130' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_90 = date . "tracking date for 90
when '0000000131' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dat_trk_95 = date . "tracking date for 95
when '0000000132' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dattrk_100 = date . " tracking date for100
when '0000000133' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dattrk_110 = date . " tracking date for110
when '0000000134' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dattrk_115 = date . "tracking date for 115
when '0000000135' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dattrk_120 = date . "tracking date for 120
when '0000000136' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-dattrk_105 = date . "tracking date for 105
when '0000000137' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_1 = date . "plan trk date for 1
when '0000000138' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_5 = date . "plan trk date for 5
when '0000000139' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_10 = date . "plan trk date for 10
when '0000000140' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_15 = date . "plan trk date for 15
when '0000000141' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_20 = date . "plan trk date for 20
when '0000000142' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_25 = date . "plan trk date for 25
when '0000000143' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_30 = date . "plan trk date for 30
when '0000000144' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_35 = date . "plan trk date for 35
when '0000000145' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_40 = date . "plan trk date for 40
when '0000000146' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_45 = date . "plan trk date for 45
when '0000000147' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_50 = date . "plan trk date for 50
when '0000000148' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_55 = date . "plan trk date for 55
when '0000000149' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_60 = date . "plan trk date for 60
when '0000000150' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_65 = date . "plan trk date for 65
when '0000000151' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_70 = date . "plan trk date for 70
when '0000000152' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_75 = date . "plan trk date for 75
when '0000000153' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_78 = date . "plan trk date for 78
when '0000000202' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_79 = date . "plan trk date for 79
when '0000000154' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_80 = date . "plan trk date for 80
when '0000000155' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_85 = date . "plan trk date for 85
when '0000000156' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_90 = date . "plan trk date for 90
when '0000000157' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_95 = date . "plan trk date for 95
when '0000000158' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_100 = date . "plan trk date for 100
when '0000000159' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_105 = date . "plan trk date for 105
when '0000000160' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_110 = date . "plan trk date for 110
when '0000000161' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_115 = date . "plan trk date for 115
when '0000000162' .
perform date_convert using ausp_itab-atflv changing date .
zsdtab1_itab-pdt_tk_120 = date . "plan trk date for 120
********Additional fields / 24.05.98**********************************
when '0000000099' .
case ausp_itab-atwrt .
when '540' .
zsdtab1_itab-roll_blind = 'X' .
when '482' .
zsdtab1_itab-ground_clr = 'X' .
when '551' .
zsdtab1_itab-anti_theft = 'X' .
when '882' .
zsdtab1_itab-anti_tow = 'X' .
when '656' .
zsdtab1_itab-alloy_whel = 'X' .
when '265' .
zsdtab1_itab-del_class = 'X' .
when '280' .
zsdtab1_itab-str_wheel = 'X' .
when 'CDC' .
zsdtab1_itab-cd_changer = 'X' .
when '205' .
zsdtab1_itab-manual_eng = 'X' .
when '273' .
zsdtab1_itab-conn_handy = 'X' .
when '343' .
zsdtab1_itab-aircleaner = 'X' .
when '481' .
zsdtab1_itab-metal_sump = 'X' .
when '533' .
zsdtab1_itab-speaker = 'X' .
when '570' .
zsdtab1_itab-arm_rest = 'X' .
when '580' .
zsdtab1_itab-aircond = 'X' .
when '611' .
zsdtab1_itab-exit_light = 'X' .
when '613' .
zsdtab1_itab-headlamp = 'X' .
when '877' .
zsdtab1_itab-readlamp = 'X' .
when '808' .
zsdtab1_itab-code_ckd = 'X' .
when '708' .
zsdtab1_itab-del_prt_lc = 'X' .
when '593' .
zsdtab1_itab-ins_glass = 'X' .
when '955' .
zsdtab1_itab-zelcl = 'Elegance' .
when '593' .
zsdtab1_itab-zelcl = 'Classic' .
endcase .
endcase .
endloop .
*--Update the sales data .--
perform get_sales_order using mara_itab-matnr .
perform get_cartype using mara_itab-matnr .
append zsdtab1_itab .
endloop.
<<<
loop at zsdtab1_itab .
if zsdtab1_itab-cartype <> 'W-203'
or zsdtab1_itab-cartype <> 'W-210'
or zsdtab1_itab-cartype <> 'W-211'.
clear zsdtab1_itab-zelcl.
endif.
SELECT SINGLE * FROM ZSDTAB1 WHERE COMMNO = MARA_ITAB-MATNR .
select single * from zsdtab1 where commno = zsdtab1_itab-commno.
if sy-subrc <> 0 .
insert into zsdtab1 values zsdtab1_itab .
else .
update zsdtab1 set :vbeln = zsdtab1_itab-vbeln
bill_doc = zsdtab1_itab-bill_doc
dest = zsdtab1_itab-dest
lgort = zsdtab1_itab-lgort
ship_tp = zsdtab1_itab-ship_tp
country = zsdtab1_itab-country
kunnr = zsdtab1_itab-kunnr
vkbur = zsdtab1_itab-vkbur
customer = zsdtab1_itab-customer
city = zsdtab1_itab-city
region = zsdtab1_itab-region
model = zsdtab1_itab-model
drive = zsdtab1_itab-drive
converter = zsdtab1_itab-converter
transmssn = zsdtab1_itab-transmssn
colour = zsdtab1_itab-colour
ztrim = zsdtab1_itab-ztrim
commno = zsdtab1_itab-commno
trackstage = zsdtab1_itab-trackstage
chassis_no = zsdtab1_itab-chassis_no
engine_no = zsdtab1_itab-engine_no
body_no = zsdtab1_itab-body_no
cockpit = zsdtab1_itab-cockpit
airbag = zsdtab1_itab-airbag
trailer_no = zsdtab1_itab-trailer_no
fininspdat = zsdtab1_itab-fininspdat
entrydate = zsdtab1_itab-entrydate
regist_no = zsdtab1_itab-regist_no
mech_key = zsdtab1_itab-mech_key
side_ab_rt = zsdtab1_itab-side_ab_rt
side_ab_lt = zsdtab1_itab-side_ab_lt
elect_key = zsdtab1_itab-elect_key
head_lamp = zsdtab1_itab-head_lamp
tail_lamp = zsdtab1_itab-tail_lamp
vac_pump = zsdtab1_itab-vac_pump
sd_ab_sn_l = zsdtab1_itab-sd_ab_sn_l
sd_ab_sn_r = zsdtab1_itab-sd_ab_sn_r
asrhydunit = zsdtab1_itab-asrhydunit
gearboxno = zsdtab1_itab-gearboxno
battery = zsdtab1_itab-battery
tyretype = zsdtab1_itab-tyretype
tyremake = zsdtab1_itab-tyremake
tyresize = zsdtab1_itab-tyresize
rr_axle_no = zsdtab1_itab-rr_axle_no
ff_axl_nor = zsdtab1_itab-ff_axl_nor
ff_axl_nol = zsdtab1_itab-ff_axl_nol
drivairbag = zsdtab1_itab-drivairbag
st_box_no = zsdtab1_itab-st_box_no
transport = zsdtab1_itab-transport
OPTIONS-
roll_blind = zsdtab1_itab-roll_blind
ground_clr = zsdtab1_itab-ground_clr
anti_theft = zsdtab1_itab-anti_theft
anti_tow = zsdtab1_itab-anti_tow
alloy_whel = zsdtab1_itab-alloy_whel
del_class = zsdtab1_itab-del_class
str_wheel = zsdtab1_itab-str_wheel
cd_changer = zsdtab1_itab-cd_changer
manual_eng = zsdtab1_itab-manual_eng
conn_handy = zsdtab1_itab-conn_handy
aircleaner = zsdtab1_itab-aircleaner
metal_sump = zsdtab1_itab-metal_sump
speaker = zsdtab1_itab-speaker
arm_rest = zsdtab1_itab-arm_rest
aircond = zsdtab1_itab-aircond
exit_light = zsdtab1_itab-exit_light
headlamp = zsdtab1_itab-headlamp
readlamp = zsdtab1_itab-readlamp
code_ckd = zsdtab1_itab-code_ckd
del_prt_lc = zsdtab1_itab-del_prt_lc
ins_glass = zsdtab1_itab-ins_glass
dat_trk_1 = zsdtab1_itab-dat_trk_1
dat_trk_5 = zsdtab1_itab-dat_trk_5
dat_trk_10 = zsdtab1_itab-dat_trk_10
dat_trk_15 = zsdtab1_itab-dat_trk_15
dat_trk_20 = zsdtab1_itab-dat_trk_20
dat_trk_25 = zsdtab1_itab-dat_trk_25
dat_trk_30 = zsdtab1_itab-dat_trk_30
dat_trk_35 = zsdtab1_itab-dat_trk_35
dat_trk_40 = zsdtab1_itab-dat_trk_40
dat_trk_45 = zsdtab1_itab-dat_trk_45
dat_trk_50 = zsdtab1_itab-dat_trk_50
dat_trk_55 = zsdtab1_itab-dat_trk_55
dat_trk_60 = zsdtab1_itab-dat_trk_60
dat_trk_65 = zsdtab1_itab-dat_trk_65
dat_trk_70 = zsdtab1_itab-dat_trk_70
dat_trk_75 = zsdtab1_itab-dat_trk_75
dat_trk_78 = zsdtab1_itab-dat_trk_78
dat_trk_79 = zsdtab1_itab-dat_trk_79
dat_trk_80 = zsdtab1_itab-dat_trk_80
dat_trk_85 = zsdtab1_itab-dat_trk_85
dat_trk_90 = zsdtab1_itab-dat_trk_90
dat_trk_95 = zsdtab1_itab-dat_trk_95
dattrk_100 = zsdtab1_itab-dattrk_100
dattrk_105 = zsdtab1_itab-dattrk_105
dattrk_110 = zsdtab1_itab-dattrk_110
dattrk_115 = zsdtab1_itab-dattrk_115
dattrk_120 = zsdtab1_itab-dattrk_120
pdt_tk_1 = zsdtab1_itab-pdt_tk_1
pdt_tk_5 = zsdtab1_itab-pdt_tk_5
pdt_tk_10 = zsdtab1_itab-pdt_tk_10
pdt_tk_15 = zsdtab1_itab-pdt_tk_15
pdt_tk_20 = zsdtab1_itab-pdt_tk_20
pdt_tk_25 = zsdtab1_itab-pdt_tk_25
pdt_tk_30 = zsdtab1_itab-pdt_tk_30
pdt_tk_35 = zsdtab1_itab-pdt_tk_35
pdt_tk_40 = zsdtab1_itab-pdt_tk_40
pdt_tk_45 = zsdtab1_itab-pdt_tk_45
pdt_tk_50 = zsdtab1_itab-pdt_tk_50
pdt_tk_55 = zsdtab1_itab-pdt_tk_55
pdt_tk_60 = zsdtab1_itab-pdt_tk_60
pdt_tk_65 = zsdtab1_itab-pdt_tk_65
pdt_tk_70 = zsdtab1_itab-pdt_tk_70
pdt_tk_75 = zsdtab1_itab-pdt_tk_75
pdt_tk_78 = zsdtab1_itab-pdt_tk_78
pdt_tk_79 = zsdtab1_itab-pdt_tk_79
pdt_tk_80 = zsdtab1_itab-pdt_tk_80
pdt_tk_85 = zsdtab1_itab-pdt_tk_85
pdt_tk_90 = zsdtab1_itab-pdt_tk_90
pdt_tk_95 = zsdtab1_itab-pdt_tk_95
pdt_tk_100 = zsdtab1_itab-pdt_tk_100
pdt_tk_105 = zsdtab1_itab-pdt_tk_105
pdt_tk_110 = zsdtab1_itab-pdt_tk_110
pdt_tk_115 = zsdtab1_itab-pdt_tk_115
pdt_tk_120 = zsdtab1_itab-pdt_tk_120
cartype = zsdtab1_itab-cartype
zelcl = zsdtab1_itab-zelcl
excise_no = zsdtab1_itab-excise_no
where commno = zsdtab1_itab-commno .
Update table .---------<<<
endif .
endloop .
perform update_excise_date .
perform update_post_goods_issue_date .
perform update_time.
*///////////////////// end of programe /////////////////////////////////
Get sales data -
form get_sales_order using matnr .
data : corr_vbeln like vbrk-vbeln .
ADDED BY ADITYA / 22.06.98 **************************************
perform get_order using matnr .
select single vbeln lgort into (zsdtab1_itab-vbeln , zsdtab1_itab-lgort)
from vbap where matnr = matnr . " C-22.06.98
from vbap where vbeln = zsdtab1_itab-vbeln .
if sy-subrc = 0 .
************Get the Excise No from Allocation Field*******************
select single * from zsdtab1 where commno = matnr .
if zsdtab1-excise_no = '' .
select * from vbrp where matnr = matnr .
select single vbeln into corr_vbeln from vbrk where
vbeln = vbrp-vbeln and vbtyp = 'M'.
if sy-subrc eq 0.
select single * from vbrk where vbtyp = 'N'
and sfakn = corr_vbeln. "cancelled doc.
if sy-subrc ne 0.
select single * from vbrk where vbeln = corr_vbeln.
if sy-subrc eq 0.
data : year(4) .
move sy-datum+0(4) to year .
select single * from bkpf where awtyp = 'VBRK' and awkey = vbrk-vbeln
and bukrs = 'MBIL' and gjahr = year .
if sy-subrc = 0 .
select single * from bseg where bukrs = 'MBIL' and belnr = bkpf-belnr
and gjahr = year and koart = 'D' and
shkzg = 'S' .
zsdtab1_itab-excise_no = bseg-zuonr .
endif .
endif.
endif.
endif.
endselect.
endif .
select single kunnr vkbur into (zsdtab1_itab-kunnr ,
zsdtab1_itab-vkbur) from vbak
where vbeln = zsdtab1_itab-vbeln .
if sy-subrc = 0 .
select single name1 ort01 regio into (zsdtab1_itab-customer ,
zsdtab1_itab-city , zsdtab1_itab-region) from kna1
where kunnr = zsdtab1_itab-kunnr .
endif.
Get Ship to Party **************************************************
select single * from vbpa where vbeln = zsdtab1_itab-vbeln and
parvw = 'WE' .
if sy-subrc = 0 .
zsdtab1_itab-ship_tp = vbpa-kunnr .
Get Destination Country of Ship to Party .************
select single * from kna1 where kunnr = vbpa-kunnr .
if sy-subrc = 0 .
select single * from t005t where land1 = kna1-land1
and spras = 'E' .
if sy-subrc = 0 .
zsdtab1_itab-country = t005t-landx .
endif .
endif .
endif .
endif .
endform. " GET_SALES
form update_time.
update zstatus set zupddate = sy-datum
uzeit = sy-uzeit
where programm = 'ZSDDET01' .
endform. " UPDATE_TIME
*& Form DATE_CONVERT
form date_convert using atflv changing date .
data : dt(8) , dat type i .
dat = atflv .
dt = dat .
date = dt .
endform. " DATE_CONVERT
*& Form UPDATE_POST_GOODS_ISSUE_DATE
form update_post_goods_issue_date .
types : begin of itab1_type ,
mblnr like mseg-mblnr ,
budat like mkpf-budat ,
end of itab1_type .
data : itab1 type itab1_type occurs 10 with header line .
loop at mara_itab .
select single * from zsdtab1 where commno = mara_itab-matnr .
if sy-subrc = 0 and zsdtab1-postdate = '00000000' .
refresh itab1 . clear itab1 .
select * from mseg where matnr = mara_itab-matnr and bwart = '601' .
itab1-mblnr = mseg-mblnr .
append itab1 .
endselect .
loop at itab1 .
select single * from mkpf where mblnr = itab1-mblnr .
if sy-subrc = 0 .
itab1-budat = mkpf-budat .
modify itab1 .
endif .
endloop .
sort itab1 by budat .
read table itab1 index 1 .
if sy-subrc = 0 .
update zsdtab1 set postdate = itab1-budat
where commno = mara_itab-matnr .
endif .
endif .
endloop .
endform. " UPDATE_POST_GOODS_ISSUE_DATE
*& Form UPDATE_EXCISE_DATE
form update_excise_date.
types : begin of itab2_type ,
mblnr like mseg-mblnr ,
budat like mkpf-budat ,
end of itab2_type .
data : itab2 type itab2_type occurs 10 with header line .
loop at mara_itab .
select single * from zsdtab1 where commno = mara_itab-matnr .
if sy-subrc = 0 and zsdtab1-excise_dat = '00000000' .
refresh itab2 . clear itab2 .
select * from mseg where matnr = mara_itab-matnr and
( bwart = '601' or bwart = '311' ) .
itab2-mblnr = mseg-mblnr .
append itab2 .
endselect .
loop at itab2 .
select single * from mkpf where mblnr = itab2-mblnr .
if sy-subrc = 0 .
itab2-budat = mkpf-budat .
modify itab2 .
endif .
endloop .
sort itab2 by budat .
read table itab2 index 1 .
if sy-subrc = 0 .
update zsdtab1 set excise_dat = itab2-budat
where commno = mara_itab-matnr .
endif .
endif .
endloop .
endform. " UPDATE_EXCISE_DATE
form get_order using matnr .
types : begin of itab_type ,
vbeln like vbap-vbeln ,
posnr like vbap-posnr ,
end of itab_type .
data : itab type itab_type occurs 10 with header line .
refresh itab . clear itab .
select * from vbap where matnr = mara_itab-matnr .
itab-vbeln = vbap-vbeln .
itab-posnr = vbap-posnr .
append itab .
endselect .
loop at itab .
select single * from vbak where vbeln = itab-vbeln .
if vbak-vbtyp <> 'C' .
delete itab .
endif .
endloop .
loop at itab .
select single * from vbfa where vbelv = itab-vbeln and
posnv = itab-posnr and vbtyp_n = 'H' .
if sy-subrc = 0 .
delete itab .
endif .
endloop .
clear : zsdtab1_itab-vbeln , zsdtab1_itab-bill_doc .
loop at itab .
zsdtab1_itab-vbeln = itab-vbeln .
select single * from vbfa where vbelv = itab-vbeln and
posnv = itab-posnr and vbtyp_n = 'M' .
if sy-subrc = 0 .
zsdtab1_itab-bill_doc = vbfa-vbeln .
endif .
endloop .
endform .
*& Form GET_CARTYPE
form get_cartype using matnr .
select single * from mara where matnr = matnr .
zsdtab1_itab-cartype = mara-satnr .
endform. " GET_CARTYPEHi,
I have analysed your program and i would like to share following points for better performance of this report :
(a) Use the field Names instead of Select * or Select Single * as if you use the field names it will consume less amount of resources inside the loop as well as you have lot many Select Single * and u r using very big tables like VBAP and many more.
(b) Trace on ST05 which particular query is mostly effecting your system or use ST12 in current mode to trace for less inputs which run the report for 20-30 min so that we get an idea which queries are effecting the system and taking a lot of time.
(c) In Case of internal tables sort the data properly and use binary search for getting the data.
I think this will help.
Thanks and Regards,
Harsh -
Report painter performance problem...
I have a client which runs a report group consists of 14 reports... When we run this program... It takes about 20 minutes to get results... I was assigned to optimize this report...
This is what I've done so far
(this is a SAP generated program)...
1. I've checked the tables that the program are using... (a customized table with more than 20,000 entries and many others)
2. I've created secondary indexes to the main customized table with (20,000) entries - It improves the performance a bit(results about 18 minutes)...
3. I divided the report group by 4... 3 reports each report group... It greatly improves the performance... (but this is not what the client wants)...
4. I've read an article about report group performance that it is a bug.
(sap support recognized the fact that we are dealing with a bug in the sap standard functionality)
http://it.toolbox.com/blogs/sap-on-db2/sap-report-painter-performance-problem-26000
Anyone have the same problem as mine?
Edited by: christopher mancuyas on Sep 8, 2008 9:32 AM
Edited by: christopher mancuyas on Sep 9, 2008 5:39 AMReport painter/Writer always creates a prerformance issue.i never preffred them since i have a option with Zreport
now you can do only one thing put more checks on selection-screen for filtering the data.i think thats the only way.
Amit. -
Performance problems with abap report SAPLPRGN_STRUCTURE during users login
Hello,
after patchimport of SAP BASIS level 21 and SAPABAP level 21 our SAP Production System (ECC6-UNICODE KERNEL 240) denote a performance problems. A lot of ours users during logon phase must wait until 10-12 minutes before that the navigation menu is displayed. The problem is generated by the slow performance of the standard SAP REPORT SAPLPRGN_STRUCTURE that require a lot time. Any idea?
ThanksHi Pat,
I would stop SAP and use DLTR3PKG, If this doesn't help, you need to investigate, if it is a CPU or DB-Time issue in ST03. Then you have to handle accordingly ...
Regards
Volker Gueldenpfennig, consolut international ag
http://www.consolut.net - http://www.4soi.de - http://www.easymarketplace.de -
Problem calling XML Report Publisher from Oracle Reports
Hi,
I'm facing a problem in calling XML Report Publisher from Oracle Reports.
Basically, I'm trying to customise Dunning Letter program. The program which is submitted calls another program. I have customised the second program and added a call to a stored procedure which in turn calls XML Report Publisher.I have created a template and attached it to the second program as well.
The procedure code is as follows.
v_request_id := FND_REQUEST.SUBMIT_REQUEST(application => 'AR'
,program => 'ARDLP_NON_SRS'
,description => 'Dunning Letter Print from Dunning Letter Generate'
,sub_request => FALSE
l_status := fnd_concurrent.WAIT_FOR_REQUEST
( REQUEST_ID => v_request_id,
INTERVAL => 15,
MAX_WAIT => 180,
PHASE => l_phase,
STATUS => l_status_code,
DEV_PHASE => l_dev_phase,
DEV_STATUS => l_dev_status,
MESSAGE => l_message );
v_xml_req_id := FND_REQUEST.submit_request(application => 'XDO',
program => 'XDOREPPB',
argument1 => v_request_id,
argument2 => 'FLS DE AR Dunning Letter Print - German',
argument3 => 603, -- changed 665 -- was 551,
argument4 => NULL,
argument5 => 'N',
argument6 => 'RTF',
argument7 => 'PDF');
Now, there are two problems I'm facing...
1. when the second program('Dunning Letter Print from Dunning Letter Generate') gets called it executes this procedure ... logically the 'Dunning Letter Print from Dunning Letter Generate' should get called twice ... second time from the procedure. Its getting called multiple times .. as many as 15 - 20 times.
2. The Xml Report Publisher program ultimately gets called but its erroring out with the following error:
java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA, DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.DS_APP_SHORT_NAME DS_APP_SHORT_NAME, B.DATA_SOURCE_CODE DATA_SOURCE_CODE, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND L.APPLICATION_SHORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4 ) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ) )
I have checked from database that the XDO_LOBS/ XDO_TEMPLATES_B table has corresponding registration data.
I don't know what's creating the problem.
If anyone has customised the Dunning Letter program before or having any idea about this problem, please help me out ..
Thankssatrajit,
Now I am getting the same error you got, Can you please tell me the solution you found?.
XML Report Publisher 5.0
Updating request description
Waiting for XML request
Retrieving XML request information
Preparing parameters
Process template
--XDOException
java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA, DBMS_LOB.GETLENGTH(L.FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGUAGE DEFAULT_LANGUAGE, B.DEFAULT_TERRITORY DEFAULT_TERRITORY,B.TEMPLATE_TYPE_CODE TEMPLATE_TYPE_CODE, B.USE_ALIAS_TABLE USE_ALIAS_TABLE, B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STATUS TEMPLATE_STATUS, B.USE_ALIAS_TABLE USE_ALIAS_TABLE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.LOB_TYPE = :1 AND L.APPLICATION_SHORT_NAME= :2 AND L.LOB_CODE = :3 AND L.APPLICATION_SHORT_NAME = B.APPLICATION_SHORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND ( (L.LANGUAGE = :4 AND L.TERRITORY = :5 ) OR (L.LANGUAGE = :6 AND L.TERRITORY = :7) OR (L.LANGUAGE= B.DEFAULT_LANGUAGE AND L.TERRITORY= B.DEFAULT_TERRITORY ) )
at oracle.apps.xdo.oa.schema.server.TemplateInputStream.initStream(TemplateInputStream.java:309)
at oracle.apps.xdo.oa.schema.server.TemplateInputStream.<init>(TemplateInputStream.java:187)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.getTemplateFile(TemplateHelper.java:776)
at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:1269)
at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:807)
at oracle.apps.fnd.cp.request.Run.main(Run.java:148)
Maybe you are looking for
-
Benefits Health Plans Deductions are not working
Hi All, I configured health plans successfully and i am able to see all of my health plas from Open Enrollment and when i was trying to enroll into plans, the plans are showing wrong deduction amount for all my health plans. Instead of deducting one
-
Strange Characters in Mail and Safari
Hello, Just got my mini home and have noticed strange characters appearing in both Mail and Safari. It seems to be a font problem, but changing the fonts in mail and safarui prefs doesn't seem to fix it. Specifically: The apple start page rss stories
-
Received iMac today. Transfered files from Mac mini via firewire in about one hour. 2 Gigs ram, high end video card. Machine is very fast. Doom and Halo run great. Microsoft Office runs without a problem. Just as fast or fast than he Mac mini. No pro
-
Display international text in QuickTime
Hi, I have an application that is supposed to display international characters in QuickTime. Can anyone guide me how to compose text supporting international characters for QT to display ? Thnx, Ayana
-
Table RSBASIDOC shows idoc inactive
Hello We are trying to test whether the RFC settings in the R3 and BW system are correct - however when we check the Table RSBASIDOC - the corresponding entry indicates the basic type for RSSEND to be inactive - INA R31 BW1 INA ZSWD050