Sort output data in MDX queries
Hi,
I wuold obtain a sorted output from my MDX query.
Follow an extract from my mdx code:
the sorted list will be ordered by char APF000050 and APF00048 descendant.
who can help my ?
Thanks in advance
SELECT
{ [Measures].MEMBERS} ON columns ,
NON EMPTY [APF000050].[LEVEL01].MEMBERS
[APF000048].[LEVEL01].MEMBERS
[APF000063].[LEVEL01].MEMBERS
[APF000068].[LEVEL01].MEMBERS
[APF000088].[LEVEL01].MEMBERS
*[APF000069].[LEVEL01].MEMBERS
PROPERTIES [APF000088].[2APF000088],[APF000069].[2APF000069]
on rows
FROM [APF_MP_01/AP]
WHERE ( [APF000001].[AP06 0000090106], [APF000095].[2004] )
Message was edited by: Luca Di Benedetto
Solved.
hi sundar
follow working code:
SELECT
{ [Measures].MEMBERS} ON columns ,
NON EMPTY
{ORDER({ [APF000048].[LEVEL01].MEMBERS}, (APF000048),ASC) }
{ORDER({ [APF000050].[LEVEL01].MEMBERS}, ([APF000050].[2APF000050]),ASC) }
{ORDER({[APF000063].[LEVEL01].MEMBERS},(APF000063),ASC)}
[APF000068].[LEVEL01].MEMBERS
[APF000088].[LEVEL01].MEMBERS
[APF000069].[LEVEL01].MEMBERS
PROPERTIES [APF000088].[2APF000088],[APF000069].[2APF000069]
ON ROWS
FROM [APF_MP_01/MA]
WHERE ( [APF000001].[MAG0460000100043],[APF000048].[datadoc])
Similar Messages
-
Sort the data set after quering
Hi
I have a grid where I query and load the data.
Is it possible to filter and show the same data set which I have got in the grid with a check box item.
Some occasions needs to get input for the said filter from the first row of the grid.
(Dev Forms Builder (9.0.4.2.0))
rgds
shabarHi Navnit Punj/Danish
I hav a following table
clo1 col2 col3 col4
12 po 56 Y
13 ss 75 Y
14 ty 40 N
19 po 35 Y
21 po 80 NWill say by normal query (F11 and after giving col2 value in the grid and ctrl + F11)I get the following data on the grid
12 po 56 Y
19 po 35 Y
21 po 80 NWith this by clicking check box I want to get the records only having 'Y' for the col4.
rgds
shabar -
Current date in BO queries with Universe built on Infocube
Hi dear experts,
We are facing the following issue :
- we built a universe on top of a multiprovider (with 2 infocubes) since we don't want to manage BW Queries.
- we need to restrict data on WebI queries using current date or system date (to compare with a date from the universe)
No options to do that seem to be available through MDX in the universe.
Has anyone already solved such an issue and how do you proceed?
Thanks for your help.
AndréHi Andre,
I assume you are aware that you are losing items when connecting to the cubes directly, such as restricted keyfigures, calculated keyfigures, variables, structures, navigational attributes, and the option to use authorization variables.
In the universe right now you don't have an option to reference something like a system data - that is done with an EXIT variable in the query.
Ingo -
Perfromance problem when using MDX queries in Crystal
Dear All,
I am using Crystal reports together with an MDX query from the BI system. When I run the report in the Web then it takes 60 seconds to get results. When I use this query through MDX into a crystal report the query runs very long and in most cases ends up with the message :
Database connection error: 'No more storage space available for extending an internal table"
It looks like there is something going on with the definition of the query on the database when using the MDX drivers. Is There a way to solve this ?
I hear rumours that upgrading to EHP 1 Stack 3 solves performance problems arround MDX queries, but I cannot find prove anywhere. Without proof or an official statement I cannot advise the Customer.
Please Help,
MarcelHi Ingo,
This feature I did not use yet ;-).
The MDX looks like :
SELECT {[Measures].[4B78DNZSKX3JQCWJKSS9S421C]} ON COLUMNS, NON EMPTY CROSSJOIN(EXCEPT([Z0TERR2__Z0SALEM].MEMBERS, {[Z0TERR2__Z0SALEM].[All]}), CROSSJOIN(EXCEPT([Z0CUST].MEMBERS, {[Z0CUST].[All]}), CROSSJOIN(EXCEPT([0DOC_NUMBER].MEMBERS, {[0DOC_NUMBER].[All]}), CROSSJOIN(EXCEPT([Z0TERR2].MEMBERS, {[Z0TERR2].[All]}), CROSSJOIN(EXCEPT([Z0ORDITEM__Z0CNVMAN].MEMBERS, {[Z0ORDITEM__Z0CNVMAN].[All]}), CROSSJOIN(EXCEPT([Z0CICL__Z0IMLG18].MEMBERS, {[Z0CICL__Z0IMLG18].[All]}), CROSSJOIN(EXCEPT([Z0DUMOVEN__Z0MOVDECR].MEMBERS, {[Z0DUMOVEN__Z0MOVDECR].[All]}), CROSSJOIN(EXCEPT([Z0BUSTRW].MEMBERS, {[Z0BUSTRW].[All]}), CROSSJOIN(EXCEPT([Z0BUSTSTW].MEMBERS, {[Z0BUSTSTW].[All]}), EXCEPT([Z0IBUSTRW].MEMBERS, {[Z0IBUSTRW].[All]})))))))))) DIMENSION PROPERTIES [Z0CUST].[20CITY], [Z0CUST].[2Z0CUST], [0DOC_NUMBER].[2Z0SALCRON] ON ROWS FROM [Z0SD_M04/Z0SD_M04_Q0021] SAP VARIABLES [0P_COAR] INCLUDING [0CO_AREA].[3100], [0P_COCD] INCLUDING [0COMP_CODE].[3110], [0GMFROM] INCLUDING [0FISCPER].[Y42009002], [0GMTO] INCLUDING [0FISCPER].[Y42009002], [!V000005] INCLUDING [Z0REJECFP].[Y42009002], [!V000006] INCLUDING [Z0REJECFP].[Y42009002], [ZP_CSDAT] INCLUDING [0CALDAY].[20090311]
Running the query in MDXTEST transaction with Flattening gives data in 10 minutes.
Running the query in multidimensional mode gives the same result.
How to proceed ??
Kind regards
Marcel -
IPhone and iPad photos - Sort by date taken
If your photos are not sorted by the date the photos were taken, here's how to troubleshoot and resolve the problem.
I encountered the problem when syncing my photo library from my computer to my iPhone and iPad. Almost all the photos were sorted properly by the date they were taken except for photos taken with a Nikon D70S SLR Camera. The photos from the Nikon D70S were being sorted using the date the sync was performed (not the file creation date nor the EXIF data date). This caused my photo album to not have all the photos in a nice chronological order.
First I checked to ensure the photos output from the Nikon D70S contained the EXIF "date taken" data and they did indeed have the proper date in the EXIF data. Next I checked to see if the EXIF version number was in each file and it was. I then noticed the EXIF version number output by the Nikon D70S was formatted differently than the other sources (e.g. differently than other Nikon cameras, other iPhones, etc).
I then viewed the EXIF data for the Nikon D70S photos in the Adobe Photoshop organizer and found the EXIF version number was missing. It was clearly in the Nikon original files (I use RAW format when taking photos with the Nikon D70S). This led me to suspect Adobe Photoshop Elements was not exporting the data in a form Apple iTunes could read when I was converting the Nikon .NEF files (RAW format) to .JPG files (needed for Apple iTunes and the iPhone and Ipad products). Most likely iTunes needs both the EXIF date taken and EXIF version number when syncing photos into iTunes, if the EXIF version number is missing, it uses the date the sync was performed as the date when sorting the photo file in the iPhone and iPad photo viewer.
I then used Adobe Creative Suite / Adobe Bridge (at our office, it's used for graphic arts work along with regular Photoshop, Illustrator, In-Design, etc.) to export the files from Nikon .NEF RAW format to .JPG format and found it output the EXIF data including the EXIF date taken date and EXIF version in a form readable by iTunes.
By using Adobe Creative Suite / Adobe Bridge instead of Adobe Photoshop Elements Organizer to convert the Nikon D70S .NEF files to .JPG format (for subsequent import into the iPhone and iPad via iTunes), the process worked properly and the photos are sorted by date taken properly.Maybe this will help
iOS: Understanding photo sorting -
Mdx-queries: how to optimize their processing?
hi there. I have a problem with mdx-queries processing. For now mdx-queries are processed as follows:
if I refer a dimension in an mdx-query the OLAP processor while creating a cube downloads into internal memory the whole SID-table and then the whole P- and Q- tables for the corresponding charachteristic are being downloaded as well. And it doesn't take in account any filters used in a query on this stage, i.e. the whole axis is downloaded.
Does anyone know if there is a possibility to optimize the mdx-queries processing in SAP BW? How to make it take in account filters on the stage of downloading master data for the cube?
We use the SAP BW 3.5 version.hi there. I have a problem with mdx-queries processing. For now mdx-queries are processed as follows:
if I refer a dimension in an mdx-query the OLAP processor while creating a cube downloads into internal memory the whole SID-table and then the whole P- and Q- tables for the corresponding charachteristic are being downloaded as well. And it doesn't take in account any filters used in a query on this stage, i.e. the whole axis is downloaded.
Does anyone know if there is a possibility to optimize the mdx-queries processing in SAP BW? How to make it take in account filters on the stage of downloading master data for the cube?
We use the SAP BW 3.5 version. -
How to output data outtside a for loop every 10 iterations​?
Hi friends,
does any body help me to sort out this problem?
please check the attchement for my vi.
all i want is output data from inside for loop to outside for loop every 10 iterations. please do not use local variable.
Many thanks
dan
Attachments:
output.vi 16 KBHi Dan,
I am not sure what you want to do every 10 iterations with the value outside, but If you want to update your graph every 10 iterations use the following way:
If you want to handle the specific value every x iterations outside the loop you could either use queues or notifieres.
BR,
ThSa
Message Edited by ThSa on 08-23-2006 09:05 PM
http://www.newgistics.com
Attachments:
1.png 6 KB -
i am using dynamic field catalog in one if the report.
in the selection screen i have MONTH/YEAR AS SELECT OPTION.IF I ENTER 200801 FROM THERE TO TILL
SYDATUM DATA WILL DISPLAY SO I CANNT DECIDE how many month/year columns will come depends on selection
criteria.
i am getting all the data into final internal table lt_final as below .
MONTH/YEAR BUKRS BELNR GJAHR WRBTR
JAN/2008 1001 3456 2008 100
FEB/2008 1001 3456 2008 200
MAR/2008 1001 3456 2008 300
THE output should be as
BUKRS BELNR GJAHR JAN/2008 FEB/2008 MAR/2008
1001 3456 2008 100 200 300
BUT NOW i am getting the output as
BUKRS BELNR GJAHR
1001 3456 2008 100 200 300
the headings JAN/2008 FEB/2008 MAR/2008 not getting displayyed.
the headings are dynamically created.
please see below my code
LOOP AT lt_final.
l_index = l_index + sytabix.
ASSIGN COMPONENT 'BUKRS' OF STRUCTURE <f_line> TO <f_field>.
<f_field> = lt_final-bukrs.
ASSIGN COMPONENT 'belnr' OF STRUCTURE <f_line> TO <f_field>.
<f_field> = lt_final-belnr.
ASSIGN COMPONENT 'gjahr' OF STRUCTURE <f_line> TO <f_field>.
<f_field> = lt_final-gjahr.
ASSIGN COMPONENT l_index OF STRUCTURE <f_line> TO <f_field>.
<f_field> = lt_final-wrbtr.
INSERT <f_line> INTO TABLE <f_tab>.
ENDLOOP.
DATA: lo_alv TYPE REF TO cl_salv_table.
TRY.
cl_salv_table=>factory(
EXPORTING
list_display = abap_false
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = <f_tab> ).
CATCH cx_salv_msg .
ENDTRY.
please let me know how to get MONTH/YEAR HEADINGS in output data.Hi,
You are creating dynamic filed cat,
so pass the data
if it is dynamic, loop the internal table which contains the date
for ex:
SORT IT_TAB BY LIFNR.
LOOP AT IT_TAB INTO WA_TAB.
ON CHANGE OF WA_TAB-LIFNR.
LS_LVC_CAT-FIELDNAME = WA_TAB-LIFNR.
LS_LVC_CAT-TABNAME = 'LFA1'.
LS_LVC_CAT-REPTEXT = WA_TAB-LIFNR.
LS_LVC_CAT-NO_ZERO = 'X'.
LS_LVC_CAT-JUST = 'R'.
LS_LVC_CAT-OUTPUTLEN = '35'.
APPEND LS_LVC_CAT TO LT_LVC_CAT.
CLEAR LS_LVC_CAT.
ENDON.
ENDLOOP.
Edited by: Aeda N on Nov 17, 2009 8:33 AM -
Hi,
Can anybody tell me as how can I sort output of ME1P i.e. PO price history by PO date ? On the selection screen, system only gives option of sorting by P org.
I need to sort it by date to see the latest purchase order for the material.
thanks,
RiteshHi,
I'm afraid that the sort functionality is not provided, you may download the result in excel, and sort by PO date
in excel file.
Thanks and regards,
Polly -
MDX queries : BW statistics are inconsistents
Hello,
We are implementing BO on top of SAP BW 3.5.
We had some major performance issues , and now we're tryning to investigate in detail.
The queries were first launched on BO only, and afeterwards on SAP BW, using the transaction MDXTEST, we measured a similar amount of time.
Now now want to have a closer look at the distribution of the time spent. (DB%,Frontend%;Network%, etc...)
The problem is that when we have a look at transaction ST03 in BW analysis, the statistics of MDX
queries are inconsistents :
I've join a concrete example :
The left column is a BO statistic executed on SAP using MDXTEST,
The right column is a traditional BEX query.
When I do the addition of the different time %(percent total) the results is 100 % for the Bex query ...and 44% for the MDX query.
I know that many fixes for MDX have been delivered on BI.7, but what about 3.5, I searched the sap notes but I couldn't find any note descrybing this symptom, nor any fix for our BW release.
Do you know how I should interpret thoses results, in other worlds, where ar the missing percentages in MDX queries ?
thank you in advance for your help.
Regards.
InfoCube Name Cube C Cube C
Name of Query Query A(BO) Query B(BEX)
Number of Navigation Steps 1 1
Total Runtime (s) 534,9 39,8
Total Runtime / Navigation Step (s) 534,9 39,8
Median of Total Runtime (s) 534,9 39,8
Initialization Time (s) 0,2 0,4
Initialization Time / Total Runtime (%) 0,04 1,01
Ø Initialization Time (s) 0,2 0,4
OLAP Runtime (s) 0,9 2,1
OLAP Time / Total Runtime (%) 0,17 5,28
OLAP Runtime / Navigation Step (s) 0,9 2,1
Database Runtime (s) 197,0 22,4
Database Runtime / Total Runtime (%) 36,83 56,28
DB Runtime per Navigation Step (s) 197,0 22,4
Frontend Runtime (s) 33,9 4,8
Frontend Runtime / Total Runtime (%) 6,34 12,06
Frontend Time per Navigation Step (s) 33,9 4,8
Master Data Runtime (s) 5,6 10,1
Master Data Time / Total Runtime (%) 1,05 25,38
Ø Master Data Time per Navigation Step 5,6 10,1
Number of records selected 18620 899
Number of Transferred Records 10037 629
Ratio of Selected to Transferred Records 1,9 1,4
Database Time per Selected Record (ms) 10,6 24,9
Number of Cells 162060 7295
Cells per Transferred Records 16,1 11,6
Number Formatted 0 72
Ratio of Formattings to Number of Cells 0,0 0,0
percent Total : 44,43% for MDX and 100,01% as expected for BEX
time 237,8 40,2
Edited by: Raoul Shiro on Feb 5, 2009 6:54 PMHi Raoul,
in regards to the BW statistics values I would suggest you open a OSS case.
in regards to the performance improvements - correct they are done for BI7 and the XI 3.1 release.
Ingo -
How to tune the MDX queries to avoid memory pressure? Please Help!
I tried to run the following mdx queries, but kept running into Memory pressure issue. Could someone give me some suggestions to avoid the issue?
Thanks a lot
Executing the query ...
Server: The operation has been cancelled due to memory pressure.
Execution complete
======================Query 1=============================
SELECT NON EMPTY { [Measures].[Net Purchased CPP] } ON COLUMNS,
NON EMPTY { ([STATION].[Station Name].[Station Name].ALLMEMBERS
* [DAYPART].[Daypart Code].[Daypart Code].ALLMEMBERS
* [DEMOGRAPHIC].[Demo].[Demo].ALLMEMBERS ) } ON ROWS
FROM [SPOT]
WHERE ([ESTIMATE].[Estimate Number].&[3881] )
==================Query 2================================
SELECT NON EMPTY { [Measures].[Net Purchased CPP] } ON COLUMNS,
NON EMPTY { ([STATION].[Station Name].[Station Name].MEMBERS
* [DAYPART].[Daypart Code].[Daypart Code].MEMBERS
* [DEMOGRAPHIC].[Demo].[Demo].MEMBERS ) } ON ROWS
FROM [SPOT]
WHERE ([ESTIMATE].[Estimate Number].&[3881] )
=====================Query 3============================
SELECT NON EMPTY { [Measures].[Net Purchased CPP] } ON COLUMNS,
NON EMPTY { ([ESTIMATE].[Estimate Number].[Estimate Number].ALLMEMBERS
* [STATION].[Station Name].[Station Name].ALLMEMBERS
* [DAYPART].[Daypart Code].[Daypart Code].ALLMEMBERS
* [DEMOGRAPHIC].[Demo].[Demo].ALLMEMBERS ) }
ON ROWS FROM ( SELECT ( { [ESTIMATE].[Estimate Number].&[3881] } ) ON COLUMNS FROM [SPOT])Hi BI_Eric,
The error occurs on the following scenario.
You run a Multidimensional Expressions (MDX) query that contains a Data Analysis Expressions (DAX) measure in Microsoft SQL Server 2008 R2 Analysis Services (SSAS 2008 R2).
The DAX measure has an expression that contains many levels of nested binary operators.
Applying SQL Server 2008 R2 Service Pack 1 will fix the problem, please refer to the link below.
http://support.microsoft.com/kb/2675230
Besides, enough to seriously impair performance.you used CrossJoin function to join multiple dimensions which might cause the performance issue. If you crossjoin medium sized or large sized sets (e.g., sets that contain more than 100 items each), you can
end up with a result set that contains many thousands of items enough to seriously impair performance.http://social.msdn.microsoft.com/Forums/sqlserver/en-US/337aea24-09ff-4354-b67d-8a90f67a13df/memory-pressure-error?forum=sqlanalysisservices
Regards,
Charlie Liao
TechNet Community Support -
MDX Queries , Webservices in SAP BI7.0
In BI we have a Query and that query is being used by .NET Application. Now we need to do some changes in the query. While i made a change in the query in Q-Sys that change is not reflecting in the .NET Application[Q-Sys]. From the .NET Person i received some MDX Queries which are using for retrieving the data from the query. I used the TCODE : MDXTEST while im going to give that MDX Query and run it is showing the data, but that data is not similar to the query o/p(changed query), it is showing the data (as of before modifying the query).
Any one please help me out, regarding this MDX Queries, What is the WebService part in BW,
When XMLA, SOAP, WSDL ... come into picture as of BW side.check these
http://help.sap.com/saphelp_nw2004s/helpdata/en/e8/2cd937651f1a13e10000009b38f8cf/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/c8/e92637c2cbf357e10000009b38f936/content.htm -
How to download output data into Excel with all Column Headings
Hi Experts,
Please tell me How to download output data of ALV Grid into Excel file with all Column Headings and I want to do this using coding,
please send me if any solution is available.
Thanks & Regards,
YogeshVERSION CONTROL (Most recent on top): *
DATE(mm.dd.yyyy) AUTHOR *
06.25.2007 Pattan Naveen *
Hi yogesh,,
Go through this in this u find ur solution.
report ZTEst_programe no standard page heading
line-size 100
line-count 50(5)
message-id zz.
*--alv type declaration
type-pools: slis.
*--Tables:
tables: anla,
anlz,
anlh,
anlb,
anlc.
data: v_pos type i.
data: v_ndjar type i.
data: v_ndper type i,
v_ndperndabp type i,
v_ndjarndabp1 type i,
v_ndjarndabp type i,
value type i,
date(10) type c value '2006.12.04'.
data: c_0000(4) type c value '0000'.
data: begin of it_final occurs 0,
anlkl(8),
bukrs(4),
anln1 like anla-anln1,
anln2 like anla-anln2,
txt50 like anla-txt50,
txa50 like anla-txa50,
anlhtxt like anlh-anlhtxt,
sernr like anla-sernr,
invnr like anla-invnr,
menge like anla-menge,
meins like anla-meins,
inken like anla-inken,
ivdat like anla-ivdat,
aktiv like anla-aktiv,
gsber like anlz-gsber,
kostl like anlz-kostl,
kostlv like anlz-kostlv,
werks like anlz-werks,
stort like anlz-stort,
raumn like anlz-raumn,
txjcd like anlz-txjcd,
ord41 like anla-ord41,
ord44 like anla-ord44,
gdlgrp like anla-gdlgrp,
anlue like anla-anlue,
lifnr like anla-lifnr,
typbz like anla-typbz,
aibn1 like anla-aibn1,
aibn2 like anla-aibn2,
aibdt like anla-aibdt,
posnr like anla-posnr,
vmgli like anla-vmgli,
invzu like anla-invzu,
ernam like anla-ernam,
erdat like anla-erdat,
afabe like anlb-afabe,
afasl like anlb-afasl,
ndjar like anlb-ndjar,
ndper like anlb-ndper,
afabg like anlb-afabg,
ndabj like anlc-ndabj,
ndabp like anlc-ndabp,
andsj like anlc-andsj,
andsp like anlc-andsp,
safbg like anlb-safbg,
umjar like anlb-umjar,
inbda like anlb-inbda,
kansw like anlc-kansw,
knafa like anlc-knafa,
kaafa like anlc-kaafa,
deakt like anla-deakt,
kanza like anlc-kanza,
kaufw like anlc-kaufw,
kinvz like anlc-kinvz,
ksafa like anlc-ksafa,
kmafa like anlc-kmafa,
end of it_final.
data: begin of it_final_as91 occurs 0,
anlkl(8),
bukrs(4),
anln1 like anla-anln1,
anln2 like anla-anln2,
txt50 like anla-txt50,
txa50 like anla-txa50,
anlhtxt like anlh-anlhtxt,
sernr like anla-sernr,
invnr like anla-invnr,
menge like anla-menge,
meins like anla-meins,
inken like anla-inken,
ivdat like anla-ivdat,
aktiv like anla-aktiv,
gsber like anlz-gsber,
kostl like anlz-kostl,
kostlv like anlz-kostlv,
werks like anlz-werks,
stort like anlz-stort,
raumn like anlz-raumn,
txjcd like anlz-txjcd,
ord41 like anla-ord41,
ord44 like anla-ord44,
gdlgrp like anla-gdlgrp,
anlue like anla-anlue,
lifnr(10),
typbz(15),
aibn1 like anla-aibn1,
aibn2 like anla-aibn2,
aibdt like anla-aibdt,
posnr like anla-posnr,
vmgli like anla-vmgli,
invzu like anla-invzu,
ernam like anla-ernam,
erdat like anla-erdat,
end of it_final_as91.
data: it_download_as91 like it_final_as91 occurs 0
with header line."#EC NEEDED
data: begin of it_final_as92 occurs 0,
anlkl(8),
bukrs(4),
anln1 like anla-anln1,
anln2 like anla-anln2,
deakt like anla-deakt,
ernam like anla-ernam,
erdat like anla-erdat,
afabe like anlb-afabe,
afasl like anlb-afasl,
ndjar like anlb-ndjar,
ndper like anlb-ndper,
afabg like date,
ndabj(3) type c,
ndabp(3) type c,
kansw like anlc-kansw,
knafa like anlc-knafa,
kaafa like anlc-kaafa,
kanza like anlc-kanza,
kaufw like anlc-kaufw,
kinvz like anlc-kinvz,
ksafa like anlc-ksafa,
kmafa like anlc-kmafa,
end of it_final_as92.
data: it_download_as92 like it_final_as92 occurs 0
with header line."#EC NEEDED
data: begin of it_values occurs 0,
anlkl(8),
bukrs(4),
anln1 like anla-anln1,
anln2 like anla-anln2,
deakt like anla-deakt,
afabe like anlb-afabe,
afasl like anlb-afasl,
ndjar like anlb-ndjar,
ndper like anlb-ndper,
afabg like date,
ndabj(3) type c,
ndabp(3) type c,
afabe_02 like anlb-afabe,
afasl_02 like anlb-afasl,
ndjar_02 like anlb-ndjar,
ndper_02 like anlb-ndper,
afabg_02 like date,
ndabj_02 like anlc-ndabj,
ndabp_02 like anlc-ndabp,
kansw01 like anlc-kansw,
knafa01 like anlc-knafa,
kaafa01 like anlc-kaafa,
kansw02 like anlc-kansw,
knafa02 like anlc-knafa,
kaafa02 like anlc-kaafa,
kansw03 like anlc-kansw,
knafa03 like anlc-knafa,
kaafa03 like anlc-kaafa,
kansw04 like anlc-kansw,
knafa04 like anlc-knafa,
kaafa04 like anlc-kaafa,
kansw05 like anlc-kansw,
knafa05 like anlc-knafa,
kaafa05 like anlc-kaafa,
kansw06 like anlc-kansw,
knafa06 like anlc-knafa,
kaafa06 like anlc-kaafa,
kansw07 like anlc-kansw,
knafa07 like anlc-knafa,
kaafa07 like anlc-kaafa,
kansw08 like anlc-kansw,
knafa08 like anlc-knafa,
kaafa08 like anlc-kaafa,
kansw09 like anlc-kansw,
knafa09 like anlc-knafa,
kaafa09 like anlc-kaafa,
kanza01 like anlc-kanza,
kaufw01 like anlc-kaufw,
kinvz01 like anlc-kinvz,
ksafa01 like anlc-ksafa,
kmafa01 like anlc-kmafa,
end of it_values.
data: it_values_xls like it_values occurs 0
with header line."#EC NEEDED
data: begin of it_itab1 occurs 0,
bukrs like anla-bukrs,
anlkl like anla-anlkl,
anln1 like anla-anln1,
anln2 like anla-anln2,
txt50 like anla-txt50,
txa50 like anla-txa50,
invnr like anla-invnr,
ktogr like anla-ktogr,
sernr like anla-sernr,
menge like anla-menge,
meins like anla-meins,
ivdat like anla-ivdat,
inken like anla-inken,
aktiv like anla-aktiv,
deakt like anla-deakt,
zugdt like anla-zugdt,
zujhr like anla-zujhr,
zuper like anla-zuper,
gdlgrp like anla-gdlgrp,
anlue like anla-anlue,
xafabch like anla-xafabch,
aibn1 like anla-aibn1,
aibn2 like anla-aibn2,
aibdt like anla-aibdt,
posnr like anla-posnr,
ord41 like anla-ord41,
ord44 like anla-ord44,
vmgli like anla-vmgli,
invzu like anla-invzu,
typbz like anla-typbz,
lifnr like anla-lifnr,
ernam like anla-ernam,
erdat like anla-erdat,
end of it_itab1.
data: begin of it_itab2 occurs 0,
bukrs like anlz-bukrs,
anln1 like anlz-anln1,
anln2 like anla-anln2,
bdatu like anlz-bdatu,
werks like anlz-werks,
gsber like anlz-gsber,
kostl like anlz-kostl,
kostlv like anlz-kostlv,
stort like anlz-stort,
raumn like anlz-raumn,
txjcd like anlz-txjcd,
ipsnr like anlz-ipsnr,
end of it_itab2.
data: begin of it_itab3 occurs 0,
bukrs like anlh-bukrs,
anln1 like anlh-anln1,
anlhtxt like anlh-anlhtxt,
end of it_itab3.
data: begin of it_itab4 occurs 0,
bukrs like anlb-bukrs,
anln1 like anlb-anln1,
anln2 like anla-anln2,
afabe like anlb-afabe,
bdatu like anlb-bdatu,
afasl like anlb-afasl,
ndjar like anlb-ndjar,
ndper like anlb-ndper,
afabg like anlb-afabg,
ndurj like anlb-ndurj,
ndurp like anlb-ndurp,
umjar like anlb-umjar,
safbg like anlb-safbg,
zinbg like anlb-zinbg,
inbda like anlb-inbda,
end of it_itab4.
data: begin of it_itab5 occurs 0,
bukrs like anlc-bukrs,
anln1 like anlc-anln1,
anln2 like anla-anln2,
gjahr like anlc-gjahr,
afabe like anlc-afabe,
zujhr like anlc-zujhr,
zucod like anlc-zucod,
ndabj like anlc-ndabj,
ndabp like anlc-ndabp,
kansw like anlc-kansw,
knafa like anlc-knafa,
kaafa like anlc-kaafa,
ksafa like anlc-ksafa,
andsj like anlc-andsj,
andsp like anlc-andsp,
kanza like anlc-kanza,
kaufw like anlc-kaufw,
kinvz like anlc-kinvz,
kmafa like anlc-kmafa,
end of it_itab5.
ALV DECLARATIONS
*--declarations for Xls sheet header field names
data: begin of it_head occurs 0,
column(70).
data: end of it_head.
data: begin of it_head1 occurs 0,
column(70).
data: end of it_head1.
*--type declarations for field catalog for basic report
data: it_fldcat_head type slis_t_fieldcat_alv,
wa_fldcat_head type slis_fieldcat_alv."#EC NEEDED
data : w_field type slis_fieldcat_alv."#EC NEEDED
data: it_fldcat_head1 type slis_t_fieldcat_alv,
wa_fldcat_head1 type slis_fieldcat_alv."#EC NEEDED
*--type declarations for layout design
data: wa_layout type slis_layout_alv.
*--type declarations for list header on grid
*data: top_of_page type slis_t_listheader.
*--declaration of variables
data : w_repid like sy-repid.
**selection-screen
select-options: s_bukrs for anla-bukrs,
s_anln1 for anla-anln1.
select-options: s_deakt for anla-deakt,
s_gjahr for anlc-gjahr obligatory,
s_anlkl for anla-anlkl,
s_date for anla-aktiv.
*selection-screen
selection-screen begin of block blk1 with frame title text-022.
selection-screen begin of line.
parameters : r1 radiobutton group g1 default 'X'.
selection-screen comment 20(50) text-020.
selection-screen end of line.
selection-screen begin of line.
parameters : r2 radiobutton group g1.
selection-screen comment 20(50) text-021.
selection-screen end of line.
selection-screen end of block blk1.
selection-screen begin of block blk2 with frame title text-023.
select-options: s_ernam for anla-ernam,
s_erdat for anla-erdat .
selection-screen end of block blk2.
*--INITIALIZATION
initialization.
w_repid = sy-repid.
at selection-screen.
if r1 = 'X'.
perform selection_screen_validation.
endif.
if r2 = 'X'.
perform selection_screen_validation.
endif.
*--START-OF-SELCTION
start-of-selection.
if r1 = 'X'.
perform populate-data.
perform fill_finaldata.
perform comment_build using top_of_page.
perform xls_output.
perform download.
endif.
if r2 = 'X'.
perform populate-data.
perform fill_finaldata.
perform fill_as92data.
perform putdata_horizontal.
perform xls_output_as92.
perform download_as92.
endif.
*--END-OF-SELCTION
end-of-selection.
if r1 = 'X'.
perform build_layout.
perform build_fieldcatalog.
perform top_of_page.
perform list-display.
endif.
if r2 = 'X'.
perform build_layout.
perform build_fieldcatalog1.
perform list-display1.
endif.
*& Form SELECTION_SCREEN_VALIDATION
text
--> p1 text
<-- p2 text
form selection_screen_validation.
*--validating originating company code
data: l_bukrs like anla-bukrs."#EC NEEDED
if not s_bukrs[] is initial.
select single bukrs from anla
into l_bukrs
where bukrs in s_bukrs.
if sy-subrc <> 0.
message e000 with text-001 .
endif.
endif.
*--validating originating main asset no.
data: l_anln1 like anla-anln1."#EC NEEDED
if not s_anln1[] is initial.
select single anln1 from anla
into l_anln1
where anln1 in s_anln1.
if sy-subrc <> 0.
message e000 with text-002 .
endif.
endif.
*--validating originating Deactivation date
data: l_deakt like anla-deakt."#EC NEEDED
if not s_deakt[] is initial.
select single deakt from anla
into l_deakt
where deakt in s_deakt.
if sy-subrc <> 0.
message e000 with text-004 .
endif.
endif.
*--validating originating asset class.
data: l_anlkl like anla-anlkl."#EC NEEDED
if not s_anlkl[] is initial.
select single anlkl from anla
into l_anlkl
where anlkl in s_anlkl.
if sy-subrc <> 0.
message e000 with text-006 .
endif.
endif.
*--validating originating Date
data: l_date like anla-aktiv."#EC NEEDED
if not s_date[] is initial.
select single aktiv from anla
into l_date
where aktiv in s_date.
if sy-subrc <> 0.
message e000 with text-007 .
endif.
endif.
*--validating originating Fiscal year which first acquisition was posted
data: l_gjahr like anlc-gjahr."#EC NEEDED
if not s_gjahr[] is initial.
select single gjahr from anlc
into l_gjahr
where gjahr in s_gjahr.
if sy-subrc <> 0.
message e000 with text-008.
endif.
endif.
data: l_ernam like anla-ernam."#EC NEEDED
if not s_ernam[] is initial.
select single ernam from anla
into l_ernam
where ernam in s_ernam.
if sy-subrc <> 0.
message e000 with text-009.
endif.
endif.
data: l_erdat like anla-erdat."#EC NEEDED
if not s_erdat[] is initial.
select single erdat from anla
into l_erdat
where erdat in s_erdat.
if sy-subrc <> 0.
message e000 with text-010.
endif.
endif.
endform. " SELECTION_SCREEN_VALIDATION
*& Form POPULATE-DATA
text
--> p1 text
<-- p2 text
form populate-data.
select bukrs
anlkl
anln1
anln2
txt50
txa50
invnr
ktogr
sernr
menge
meins
ivdat
inken
aktiv
deakt
zugdt
zujhr
zuper
gdlgrp
anlue
xafabch
aibn1
aibn2
aibdt
posnr
ord41
ord44
vmgli
invzu
typbz
lifnr
ernam
erdat
from anla
into table it_itab1
where anlkl in s_anlkl and
anln1 in s_anln1 and
deakt in s_deakt and
bukrs in s_bukrs and
aktiv in s_date.
if sy-subrc ne 0.
message e000 with 'Data does not exist'(094).
endif.
if not it_itab1[] is initial.
select bukrs
anln1
anln2
bdatu
werks
gsber
kostl
kostlv
stort
raumn
txjcd
ipsnr
from anlz
into table it_itab2
for all entries in it_itab1
where bukrs = it_itab1-bukrs and
anln1 = it_itab1-anln1 and
anln2 = it_itab1-anln2.
anln2 = '0000'.
if sy-subrc ne 0.
message e000 with 'Data does not exist'(094).
endif.
endif.
if not it_itab2[] is initial.
select bukrs
anln1
anlhtxt
from anlh
into table it_itab3
for all entries in it_itab2
where bukrs = it_itab2-bukrs and
anln1 = it_itab2-anln1.
if sy-subrc ne 0.
message e000 with 'Data does not exist'(094).
endif.
endif.
if not it_itab1[] is initial.
select bukrs
anln1
anln2
afabe
bdatu
afasl
ndjar
ndper
afabg
ndurj
ndurp
umjar
safbg
zinbg
inbda
from anlb
into table it_itab4
for all entries in it_itab1
where bukrs = it_itab1-bukrs and
anln1 = it_itab1-anln1 and
anln2 = it_itab1-anln2.
anln2 = '0000'.
if sy-subrc ne 0.
message e000 with 'Data does not exist'(094).
endif.
endif.
sort it_itab4 by bukrs anln1 anln2 afabe.
if not it_itab4[] is initial.
select bukrs
anln1
anln2
gjahr
afabe
zujhr
zucod
ndabj
ndabp
kansw
knafa
kaafa
ksafa
andsj
andsp
kanza
kaufw
kinvz
kmafa
from anlc
into table it_itab5
for all entries in it_itab4
where bukrs = it_itab4-bukrs and
anln1 = it_itab4-anln1 and
anln2 = it_itab4-anln2 and
anln2 = '0000' and
gjahr in s_gjahr.
if sy-subrc ne 0.
message e000 with 'Data does not exist'(094).
endif.
endif.
sort it_itab5 by bukrs anln1 anln2 ndabj ndabp.
endform. " POPULATE-DATA
*& Form FILL_FINALDATA
text
--> p1 text
<-- p2 text
form fill_finaldata.
loop at it_itab5.
loop at it_itab4 where bukrs = it_itab5-bukrs and
anln1 = it_itab5-anln1 and
anln2 = it_itab5-anln2 and
afabe = it_itab5-afabe.
it_final-afabe = it_itab4-afabe.
it_final-afasl = it_itab4-afasl.
it_final-ndjar = it_itab4-ndjar.
it_final-ndper = it_itab4-ndper.
it_final-afabg = it_itab4-afabg.
it_final-umjar = it_itab4-umjar.
it_final-safbg = it_itab4-safbg.
it_final-inbda = it_itab4-inbda.
it_final-ndabj = it_itab5-ndabj.
it_final-ndabp = it_itab5-ndabp.
it_final-kansw = it_itab5-kansw.
it_final-knafa = it_itab5-knafa.
it_final-kaafa = it_itab5-kaafa.
it_final-andsj = it_itab5-andsj.
it_final-andsp = it_itab5-andsp.
it_final-kanza = it_itab5-kanza.
it_final-kaufw = it_itab5-kaufw.
it_final-kinvz = it_itab5-kinvz.
it_final-ksafa = it_itab5-ksafa.
it_final-kmafa = it_itab5-kmafa.
read table it_itab1 with key bukrs = it_itab5-bukrs
anln1 = it_itab5-anln1
anln2 = it_itab5-anln2.
if sy-subrc = 0.
it_final-anlkl = it_itab1-anlkl.
it_final-anln1 = it_itab1-anln1.
it_final-anln2 = it_itab1-anln2.
it_final-bukrs = it_itab1-bukrs.
it_final-txt50 = it_itab1-txt50.
it_final-txa50 = it_itab1-txa50.
it_final-invnr = it_itab1-invnr.
it_final-sernr = it_itab1-sernr.
it_final-menge = it_itab1-menge.
it_final-meins = it_itab1-meins.
it_final-ivdat = it_itab1-ivdat.
it_final-inken = it_itab1-inken.
it_final-aktiv = it_itab1-aktiv.
it_final-deakt = it_itab1-deakt.
it_final-gdlgrp = it_itab1-gdlgrp.
it_final-anlue = it_itab1-anlue.
it_final-aibn1 = it_itab1-aibn1.
it_final-aibn2 = it_itab1-aibn2.
it_final-aibdt = it_itab1-aibdt.
it_final-ord41 = it_itab1-ord41.
it_final-ord44 = it_itab1-ord44.
it_final-vmgli = it_itab1-vmgli.
it_final-typbz = it_itab1-typbz.
it_final-lifnr = it_itab1-lifnr.
it_final-posnr = it_itab1-posnr.
it_final-invzu = it_itab1-invzu.
endif.
read table it_itab2 with key bukrs = it_itab5-bukrs
anln1 = it_itab5-anln1
anln2 = it_itab5-anln2.
if sy-subrc = 0.
it_final-werks = it_itab2-werks.
it_final-gsber = it_itab2-gsber.
it_final-kostl = it_itab2-kostl.
it_final-kostlv = it_itab2-kostlv.
it_final-stort = it_itab2-stort.
it_final-raumn = it_itab2-raumn.
it_final-txjcd = it_itab2-txjcd.
endif.
read table it_itab3 with key bukrs = it_itab5-bukrs
anln1 = it_itab5-anln1.
if sy-subrc = 0.
it_final-anlhtxt = it_itab3-anlhtxt.
endif.
append it_final.
clear it_final.
endloop.
endloop.
loop at it_final.
move-corresponding it_final to it_final_as91.
append it_final_as91.
clear it_final_as91.
endloop.
delete adjacent duplicates from it_final_as91 comparing anlkl bukrs
anln1 anln2.
it_download_as91[] = it_final_as91[].
endform. " FILL_FINALDATA
*& Form BUILD_LAYOUT
text
--> p1 text
<-- p2 text
form build_layout.
wa_layout-zebra = 'X'.
endform. " BUILD_LAYOUT
*& Form BUILD_FIELDCATALOG
text
--> p1 text
<-- p2 text
form build_fieldcatalog.
if it_fldcat_head is initial.
v_pos = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'ANLKL'.
wa_fldcat_head-seltext_l = 'Asset Class'(093).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'BUKRS'.
wa_fldcat_head-seltext_l = 'Company'(092).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'ANLN1'.
wa_fldcat_head-seltext_l = 'Asset No'(091).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'ANLN2'.
wa_fldcat_head-seltext_l = 'Asset Sub No'(090).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'TXT50'.
wa_fldcat_head-seltext_l = 'Asset Des.'(089).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'TXA50'.
wa_fldcat_head-seltext_l = 'Asset Des.'(088).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'ANLHTXT'.
wa_fldcat_head-seltext_l = 'Asset main no txt'(087).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'SERNR'.
wa_fldcat_head-seltext_l = 's.no/Expl no.'(086).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'INVNR'.
wa_fldcat_head-seltext_l = 'Inv No'(085).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'MENGE'.
wa_fldcat_head-seltext_l = 'Qtty'(084).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'MEINS'.
wa_fldcat_head-seltext_l = 'Units'(083).
append wa_fldcat_head to it_fldcat_head.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'INKEN'.
wa_fldcat_head-seltext_l = 'Inv indi.'(082).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'IVDAT'.
wa_fldcat_head-seltext_l = 'Last inv date'(081).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'AKTIV'.
wa_fldcat_head-seltext_l = 'Asset Capital date'(080).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'GSBER'.
wa_fldcat_head-seltext_l = 'Busin. Area'(079).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'KOSTL'.
wa_fldcat_head-seltext_l = 'cost centre'(078).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'KOSTLV'.
wa_fldcat_head-seltext_l = 'CC respon.for asset'(077).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'WERKS'.
wa_fldcat_head-seltext_l = 'Plant'(076).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'STORT'.
wa_fldcat_head-seltext_l = 'Asset location'(075).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'RAUMN'.
wa_fldcat_head-seltext_l = 'Room'(074).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'TXJCD'.
wa_fldcat_head-seltext_l = 'Tax. Jur.'(073).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'ORD41'.
wa_fldcat_head-seltext_l = 'Evaluation Grp 1'(072).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'ORD44'.
wa_fldcat_head-seltext_l = 'Evaluation Grp 4'(071).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'GDLGRP'.
wa_fldcat_head-seltext_l = 'Evalu. group 5'(070).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'ANLUE'.
wa_fldcat_head-seltext_l = 'Asset Super No'(069).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'LIFNR'.
wa_fldcat_head-seltext_l = 'Vendor Acct. No.'(068).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'TYPBZ'.
wa_fldcat_head-seltext_l = 'Reference no'(067).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'AIBN1'.
wa_fldcat_head-seltext_l = 'Original Asset Trans.'(066).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'AIBN2'.
wa_fldcat_head-seltext_l = 'Original Asset Trans.'(065).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'AIBDT'.
wa_fldcat_head-seltext_l = 'Trans. Asset'(064).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'POSNR'.
wa_fldcat_head-seltext_l = 'WBS Elt. Invt. Proj.'(063).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'VMGLI'.
wa_fldcat_head-seltext_l = 'Property clas.key'(062).
append wa_fldcat_head to it_fldcat_head.
V_POS = 0.
v_pos = v_pos + 1.
w_field-col_pos = v_pos.
wa_fldcat_head-tabname = 'it_FINAL_AS91'.
wa_fldcat_head-fieldname = 'INVZU'.
wa_fldcat_head-seltext_l = 'suppl.inv spec.'(061).
append wa_fldcat_head to it_fldcat_head.
endif.
endform. " BUILD_FIELDCATALOG
*& Form COMMENT_BUILD
text
-->P_TOP_OF_PAGE text
*form comment_build using top_of_page type slis_t_listheader.
data: ls_line type slis_listheader.
****Header
clear : ls_line.
ls_line-typ = 'H'.
LS_LINE-KEY: not used for this type
ls_line-info = 'ASSET MASTER DATA LIST'.
append ls_line to top_of_page.
****Selection
clear ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Key 1'.
ls_line-info = 'Asset Records'.
append ls_line to top_of_page.
****Action
clear ls_line.
ls_line-typ = 'A'.
LS_LINE-KEY: not used for this type
ls_line-info = 'for AS91'.
append ls_line to top_of_page.
*endform. "comment_build
FORM top_of_page *
*form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = top_of_page.
*endform. "top_of_page
*& Form LIST-DISPLAY
text
--> p1 text
<-- p2 text
form list-display.
wa_layout-colwidth_optimize = 'X'.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = w_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = it_fldcat_head
i_background_id = 'ALV_BACKGROUND'
tables
t_outtab = it_final_as91
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
write:/'No Top of Page'(098).
endif.
endform. " LIST-DISPLAY
*& Form DOWNLOAD
text
--> p1 text
<-- p2 text
form download.
perform setup_header.
call function 'DOWNLOAD'
exporting
filetype = 'DAT'
tables
data_tab = it_download_as91
fieldnames = it_head
exceptions
invalid_filesize = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
customer_error = 7
others = 8.
if sy-subrc <> 0.
write:/'Error in file Type'(097).
endif.
endform. " DOWNLOAD
*& Form setup_header
text -
Slow perfromance on sort output?
we have a partitioned table that is range partitioned by month. It has partitions starting from feb_2010 to feb_2011
we forgot to split the overflow partiton since february and now I was running the alter table commmand to split the partition at mar_2011 and it has been running for a really long time (30 hours)? This is oracle 10.2.0.3 on rhel4. This is a pretty powerful server with 4 dual core cpu's and 96 gb of ram and also a dedicated emc cx4-240 disk sub system with 60 drives dedicated to thiss database. We are also using asm for our datatfiles.
I started the alter table command to split the partition yesterday at noon time so this has been running for bout 30 hours?
There are about 5 to 7 millions rows in each of the monthly partitions and then there was 30million rows in the overflow partition. The column width is small with only 6 columns and avg row length of 101.
i have been watching the process run and it ran a sort output for over 24 hours and i cant figure out why it is taking this long for only the amunt of rows the table has in it. it is now running another sort and it is dragging as well.
Could my temp file be corrupted? Other processes seem to be running fine as this is a data warehouse system and all other jobs are completing ontime?
The system has been more than 50% idle most of the time while this process has been running.
i dont want to kill the session and caue further problems.
Any thoughts on why this process could be taking soo long?
Thanks.user520056 wrote:
HI I have been looking at sesssion long ops and it has been runnning sort output for really long times and when one of them finishes it just kicks off another one? This process has been running for 3 days now and I am reluctant to kill the session?
To make matters worse the putty session that I used to initially kickoff the alter table statement has been killed but the session is still alive on the server? Coulod this be part of the problem?
The wait events keeps moving between latch free and db file sequential read.
Any help is greatly appreciated.
Do you know what will happen if I kill the session since this is a ddl command?
for speeding your statement
_ use parallel option along with the alter table split
_ also you can check disabling the logging option for the particular table , also enhances performance (skip redo log writing) , but prepare your next backup after .
Edited by: akhalaf on Jun 27, 2011 7:12 PM -
Hi Experts,
Can you please suggest me how to sort multilingual data in oracle ? Like
Caf
Caf Tierra S.A.
Café Cap, S.A.
Café Capris, S.A.
Café El Botón Ltda.
Café ff
Café Granja La Esperanza
Café Granja La Esperanza
Cafe hh
Café Tierra S.A.
Café Tierra S.A.
Cafetalera Fernandez, S.A.
Capitales Unidos, S.A. de C.V.
Carcafe Ltda. C.I
-Regards
ManiThanks
Query used......
SELECT COMPANYNAME FROM VIEW_PRODUCER_MASTER
WHERE NLSSORT(COMPANYNAME) IS NOT NULL and COMPANYNAME Like 'C%'
ORDER BY NLSSORT (COMPANYNAME);
But issue not resolved ......
Output of sql query
COFINANZAS, S.A. de C.V.
Caf Tierra S.A.
Caf Tierra S.A.
Caf Tierra S.A.
Cafe Cap S.A.
Cafe hh
Cafetalera Fernandez, S.A.
Café Tierra S.A.
Capitales Unidos, S.A. de C.V.
Carlos Alberto Vasquez Arevelo
Carlos Alfredo Panamá Díaz
Carlos Brasileiro e Douglas Brasileiro
Casa de Zinc, S.A. de C.V.
Casal, Coexca, Comexca S.A. de C.V.
Required Output of above query
COFINANZAS, S.A. de C.V.
Caf Tierra S.A.
Caf Tierra S.A.
Caf Tierra S.A.
Cafe Cap S.A.
Cafe hh
Café Tierra S.A.
Cafetalera Fernandez, S.A.
Capitales Unidos, S.A. de C.V.
Carlos Alberto Vasquez Arevelo
Carlos Alfredo Panamá Díaz
Carlos Brasileiro e Douglas Brasileiro
Casa de Zinc, S.A. de C.V.
Casal, Coexca, Comexca S.A. de C.V.
Mani
Maybe you are looking for
-
Okay. Here's the story: After downloading latest itunes and IPOD update, my IPOD slipped into DATA mode and is completely locked up. I tried to reset the IPOD, but it cycles through and ultimately shows a folder and exclamation point on the screen. I
-
I have been using my HP Officejet J4680 with my Win7 PC for several years and relatively problem-free -- until about six months ago. My printing issue might be rather odd. So odd, in fact, I'm not sure how to succinctly describe it. I'm not too t
-
Launch Camera App / Insert Image(s)
Hello, I did some browsing but was not able to find something similar to the question I have. I have a client who would like me to build some .PDF form(s) for his construction crews. The objective is to eliminate all the paperwork they currently have
-
Sensing a keyboard press in a forms app?
In a windows form, I have a button. When that button is pressed, I want it to look for keyboard presses. When the spacebar is pressed 10 times, I want the button to do something. Is this at all possible? In Calculus, 1+1=0.
-
How to close a fullscreen Weboverlay with a MSO
Hi there, for our Client we've developed a Fullscreen Overlay which replaces the Default Navigation (which works great). But we've the Problem that we can't Close the overlay completley. We Show the overlay wih a MSO state, which works fine. Undernea