Average Only Filtered Matrix Data
Hi All,
I am new to Reporting Services and I need help. I have a report that I have create below using matrix.
This is the SQL Query result :
YEAR |
MONTH
|
OUTLET |
QTY
2014 |
7
|
OUTLET A |
25
2014 |
8
|
OUTLET A |
25
2014 |
9
|
OUTLET A |
50
2014 |
10
|
OUTLET A |
75
and this is the Report Design :
Parameter : Year : 2014
Parameter : Month : 10
COLUMN
|
MATRIX GROUP
| COLUMN
OUTLET |
MONTH
|
3 MONTHS
|
7 |
8 |
9 |
AVERAGE
OUTLET A |
25 |
25 |
50 |
33.33333333
I use 2 Parameters, Year and Month. The matrix data group by Month, and in the column group properties I add three filters.
1 Filter for Year ([YEAR] = PARAMETERS!YEAR.VALUE), and 2 others for Month ([MONTH] < CINT(PARAMETERS!MONTH.VALUE) and [MONTH] >= PARAMETERS.MONTH - 3), because I only want to display data from previous month to 3 months before. For example, if I choose
Month 10, the matrix only display data from Month 7 to 9.
How do I count the average (put in “3 MONTHS AVERAGE” column) from Month 7 to 9 only and not from whole data? Please Advice.
Thanks,
Santony
Hi ,
YOu can try below ;
1. Select Matrix for this .
2 .Row -> Outlet
Column-> Month
Data -> Qty
3. Right Click on Column -> Insert column -> Outside Group Right
4. Use Avg(Fields!Qty.value) in this added column
Use sql query for dataset
Select * from table
where DD.MONTH<@Month and Year =@Year and Month >= month(dateadd(month,-3,getdate()))
Design Structure:
Output Screen
Thanks
Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem.
Similar Messages
-
Filtered the data to get only one data per day
Hi,
From the excel file below I have Power (from Hg Lamp) vs date.
I would like to filtered the data to have only one data per day. So when there are many data for one day, I want the data with Max Power (and delete the others).
In the test vi below I filtered data by compared the data 1 by 1. So I reduced the number of data but I still have date with many data.
I would like to count the number of data per days and keep the data with max power, but I don't know how to do it.
If you have any ideas...
Thanks
Geof
Attachments:
Test.xls 227 KB
Test.vi 48 KBI did it
Thanks
Attachments:
Test.vi 48 KB -
Averaging n number of data per x time after stripping out zeros
Hey all,
Very new to LabView and dropped in the deep end. I have a DAQ outputting data at 10hz. I need to be able to average that dataset every second after filtering out values I do not want and the zero values also, before saving to file. Currently I am outputting the data, instructing it to zero the values outputting below 0.6 and above 1.8. From there I need to rempove the zeros, so to average the remaining values in each 1 second/10hz interval and output one value per second.
I have attached the file.
Thanks
Attachments:
Overflowing Froth Height.vi 110 KBSo you want ot average only the values between 0.6 and 1.8?
Well, we can go about this in 2 ways: build an array of data points to keep or delete the unwanted data points. It is probably easiest to build an array of points to keep. So here's what you should do. Use a FOR loop and autoindex the waveform array. Use the In Range and Coerce function to see if your current data point is within the range. If it is add to the array. The building of the array should be handled with a shift register.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Build Array from Range.png 15 KB -
Filtering report data based on user login and Parameter fields
Post Author: mronquillo
CA Forum: General
Hi,I am running a report that filters data based on the user login. To do this, I created a formula called @user that compares the login name (using the CurrentCEUserName field) and returns the user's name. If the user login is not a login specified in the if statements, it returns the parameter field "user_name":For example: if CurrentCEUserName = "loginname1" then "User's Name 1"else if CurrentCEUserName = "loginname2" then "User's Name 2" else if CurrentCEUserName = "loginname3" then "User's Name 3" else if CurrentCEUserName = "loginname4" then "User's Name 4".. .else {?user_name} In select expert, I have a condition which filters data based on the string returned from that formula:{Table.Name} = {@user} This works fine and when the users run the report they only their own data. However, they are still prompted to choose a parameter field regardless if of the value returned by the @user formula. Oddly enough, regardless of what parameter field they choose, they will still only see their own data (i.e. if John chooses "Bob" from the parameter list, he will still only see John's data.)If I remove the "else {?user_name}" line from the @user formula, then the users are not prompted anymore. However, if they are not a "valid" user - that is, if any of the if statements in the formula are not true for their login name - then they will see no data. What I want to do is make the report ONLY prompt the user to choose a parameter field if their login name is not "valid". That is, if the @user formula is able to return a string value for their login name, then they will jump right into the report without being prompted to choose a parameter - otherwise, the user will be prompted to choose a name from the parameter list. I thought my formula would allow this (hence the "else" clause), but it seems that if a parameter field is present in any formula, then the report automatically prompts the user to choose a parameter. Is what I am trying to accomplish possible in CR (I'm using CR v10.0) or is there a better way to do what I am trying to do?Thanks in advance.Post Author: sharonmtowler
CA Forum: General
try, or something like that
(if CurrentCEUserName ={?user_name} then true else ({Table.Name} = {@user}) ) -
Is there a way to combine matrix data?
If anyone can, please help me. Linear algebra is not my
specialty.
I am trying to make a function using the BitmapData.hitTest()
to see if two sprites on screen are hit.
I have got it working for sprites that are direct siblings
(ie they are on the root stage layer). However, if I nest sprites,
things get messy. The reason I want to test nested objects is so I
can test for collision with *parts* of other visual components, not
the whole thing as one.
I can get a proper tx, ty value for nested sprites by using
the localToGlobal functions, but these do not take into
consideration rotation. Is there something like localToGlobal that
works for an object's entire transform matrix (and if not, why
not?!)?
Does anyone have any advice?
The only thing I can think of is to go through a given
sprite's parents until it reaches the top (root) layer and collect
the matrix data on the way. But even if I do that, I don't know how
to add the matrices together properly. I am convinced I need to do
this. If I don't use the actual transform matrix, I cannot take
into account skewing, rotation, etc.Well, I seem to have found a way to at least combine matrices
using the concat() method. Still, I have to cycle through each
parent matrix from the target sprite to the top level (stage) to
get a universal comparison. -
Unable to retrieve records when filtering by date
I am having difficulties getting this query to run when filtering by date. The code works fine if I remove the Date filter, and I have tested the query using SQL Developer and it works fine there so I am not sure what I am doing wrong:
Public Sub CheckForNewCampaign()
'Checks if the campaign received is new or not
'if new update the database with the new campaign information
'else check with the database for the existing campaign status
Dim strcmdQuery As String = “SELECT FROM RSP_ORDER_QUEUE WHERE REQUEST_CODE = 'N' AND INSERT_DATE > TO_DATE('2010-01-19','YYYY-MM-DD') “*
Dim strConn As String = System.Configuration.ConfigurationManager.AppSettings("SQLConnectionString")
Dim objOraConn As OracleConnection = New OracleConnection(strConn)
Dim objOraCmd As OracleCommand = New OracleCommand(strcmdQuery, objOraConn)
Try
objOraCmd.Connection.Open()
objOraCmd.CommandText = strcmdQuery
objOraCmd.CommandType = CommandType.Text
Dim objReader As OracleDataReader = objOraCmd.ExecuteReader()
If objReader.HasRows Then
LoggingQueueIn("CheckForNewCampaign: " & strcmdQuery & " records found")
bIsNewCampaign = True
'Set the Attempt for new call
oQueueKeyCols.memAttemps = 1
oQueueKeyCols.memRetries = 1
oQueueKeyCols.memSequenceNumber = 1
mCollectNewCampaignElements(objReader)
Else
LoggingQueueIn("CheckForNewCampaign: " & strcmdQuery & " no records found")
bIsNewCampaign = False
End If
Catch ex As Exception
LoggingQueueIn("CheckForNewCampaign: " & ex.Message.ToString)
Finally
objOraCmd.Dispose()
objOraConn.Close()
End Try
End Sub
Any help would be greatly appreciated. I am spinning my wheels here and could use some assistance.I can't think of any reason that you'd get different results with a hard coded literal query. I assume that rdr.HasRows=false?
My only guess would be that maybe you're connected to a different database, or as a different user, you inserted the data via sql develper but have not yet committed it, or something along those lines.
Were you to log a SR with Oracle Support, we'd probably ask for a level 16 sqlnet trace of they query executed via the .net app and sql developer so we can compare them to make sure all else is indeed equal.
Hope it helps,
Greg -
Hello,
I´ve generated a simple form using SAP UDO Form Generator. The problem that for the second line on, the Matrix data are not saved to the data base. I´ve added code for the button add (oMatrix.AddLine()) and it´s possible to edit the cells.
Why only the first line is saved ? What do I have to do ?
I´ve also tried: oMatrix.FlushToDataSource() and oDataSource.InsertRecord.
Please help!
Thanks a lot,
Chrisitano Pegorer.Trinidad,
I´m working on 2004 2B.
There´s no error message.
The form was generated by B1DO UDO Form Generator.
The only code is oMatrix.Addrow(1) to insert the new line on the matrix.
I´ve noticed that the Record Number is increased on the DBDatasource when a new line is added to the matrix.
I think that the Update button ("1") should save the datasource into the database.
The lines are brought ok and can be updated fine, so I think the bind is ok.
And I can insert as many records as I want to, if the form is in Add mode (first time). But once it´s inserted, a second try to insert more records (form in update mode) doens´t work anymore.
Any ideas ?
Thks!
Message was edited by: Christiano Pegorer
Message was edited by: Christiano Pegorer -
Excel download is not filtering the data
I create Pivot table and a detailed table. In interactive mode if i click on pivot table, the table below filters the data accordingly and shows only the selected data related fields in the table. This is how i want. But when i filter and then download it in excel, the excel file is saved with complete data with out filter. How can i make it download filtered data as in interactive mode?
Make sure, that the columns you are using in Prompts are filtered in your reports using 'ISPROMPTED'. make sure you use same columns in both the places.
-Suman -
How to move only subset of data from one database to another?
Both source & destination are Oracle11g databases.
The requirement details are as below,
1) The database contains static as well as transactional data for telecom domain.
2) We have to move region-wise data from one database to another.
3) There are around 10 regions.
4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
static data & it will not change.
5) The volume is around 1 million subscribers per region.
6) The migration is required because
a) The client is upgrading its base product which uses this database
b) There is a change in structure of static tables
c) Hardware upgrade
d) The client want to start with single region on new database & rest of the regions will be operated from old
database.
7) Keep execution time to very minimum.
I am thinking to have solution as below,
1) Create destination database with upgraded db structure (as mentioned in 6b)
2) Create database links to access source db in destination db.
3) Write SQL queries to fetch data from all the respective tables for a specific region
4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
destination db
a) Use FOR ALL & bulk collect to improve the performance
b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
5) Validate pre & post counts to verify the success of migration
Is there any other better way?
Regards,
SandeepHow to move only subset of data from a partiular table by using transportable tablespace?
E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
The indexes defined on SUB table are under SMP_IDX_SUB tablespace
The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
any specific example would be helpful. -
I made a new Apple ID and I want to delete my iCloud account on my iPhone, will it delete only documents or data or it will reset my whole iPhone, like deleting my apps, contacts. Please I need your help.
All you have to do is this: Sync your 3GS to create a current backup. Then either: Settings>General>Reset>Erase All Content & Settings or restore it as a "New" device in iTunes. Both accomplish the same thing, erasing all of your data & settings from the phone. You can now give it to your sister, she can plug it into her computer, name it what she wants & sync her content to it. You then restore your 4S from the backup of the 3GS you created when you started. Follow this by syncing your content to your new phone & your 4S will look just like your 3GS.
-
Can I store only the aggregate data in OLAP cube
Hi All,
I know that the OLAP cubes store the leaf data and then builds the aggregate data on top of it and stores with in it. I have huge amounts of data ( like billions of data in my fact table and 6-8 dimension tables). If you keep the leaf data along with the agg data with in the cube would be too large to build.
So I am thinking to have to store only the agg data within the OLAP cube and for the leaf data it should still read from the Relational tables. Something like Hybrid OLAP.
(what I mean is
1. create the dimensions and cube in the AWM on 11g.
2. I will also specifiy the levels that I want the agg data to be calculated and stored in the OLAP cube.
(what I want is
1. I want to store only the agg data in the cube and leaf data still in the relatlional tables.
2. when I read the cube and drill down to the leaf level , it should fetch the leaf level data.
Is this possible in Oracle OLAP, if yes please provide some pointers
Thanks
SFirst you should try out storing and aggregating data to atleast see if the cube-loading time, query-time and AW-size is within acceptable limit or not. 11gOLAP especially 11gR2 OLAP is very efficient on all three fronts.
Regarding specifying levels, you can either use Cost-based-aggregation and pick the %age that should be pre-aggregated OR you can use Level-based-aggregation and pick the levels from each dimension that should be pre-aggregated.
Try these out before venturing into anything else. You will be surprised by the results. There are other ways to store the data in smaller multiple-cubes and joining those cubes through formulas. Make sure you don't mistake an attribute for a dimension.
Not sure what you mean by just storing aggregated data in olap cubes. You can just do a SUM .. GROUP BY .. of relational data before loading it into olap cubes. For example, if you source data is at DAY level, you can SUM.. GROUP BY .. at MONTH-level and then load month-level data into olap cubes where leaf-level is month-level.
The sql view (used by reporting tools) could then be a join between month-level "olap" data and "day-level" relational data. When you are drilling-down on the data, the sql view will pick up data from appropriate place.
One more thing. Drill-Thru to detail data is a functionality of reporting tools also. If you are using OBIEE or Discoverer Plus OLAP, then you can design the reports in a way that after you reach the olap leaf-level, then it will take the user to a relational detail-report.
These are all just quick suggestions (on a Friday evening). If possible, you should get Oracle OLAP Consulting Group help, who can come up with good design for all your reporting needs. -
How do I query a SharePoint List using a url and filtering on date?
I am reading a SharePoint list using jquery. Everything is working fine
except for the filter. Each list item has an expiration date. I want to retrieve JUST the items that have not expired (Expires > Today) but I can't figure out the url syntax and I've been searching all day for an example and
can't find one. Could someone please help?!? See bold code below.
Thanks,
Glen
$(document).ready(function ()
<strong>var qryWCFUrl = "/sites/MMTP1/_vti_bin/listdata.svc/MMAlerts?$filter=(Expires gt '08/10/2011')&$orderby=Title";
</strong> $.getJSON(qryWCFUrl, function (results)
$.each(results.d.results, function (i, mmAlert)
itemID = mmAlert.Id;
mmTitle = mmAlert.Title;
mmClass = mmAlert.ClassValue;
//alert("Item="+itemID+" Title="+mmTitle+" Class="+mmClass);
AddMMStatus(mmAlert.Id,mmAlert.Title,mmAlert.ClassValue);Fadi,
Thanks for your response. I actually have another version of the code that uses the SP client objects that works. The problem is site boundries. Let me give a more complete project explanation.
I am creating a master page for a new intranet. As part of this master page, I want to read from an SP list of alerts and post each alert (if not expired) in the SP status bar. I've gotten this to work with SP client objects and jquery (except
for the date filter part). Both of these solutions work fine on the top site level. BUT when trying it out at the sub-site level, the SP client objects version of my code fails. The jQuery version works except the date filtering.
I looked at the example from your link and it looks like a bit of a hybrid to my approaches: JQuery with CAML. My question is; does this example permit me to access a list in the top-level site from the subsites? Please excuse my ignorance,
but I am an EXTREME newbie in this having spent the past 8 years as a VB.Net developer and a little bit of ASP.Net.
Below are the two different versions of my code in different versions of my master page definition:
SP Client Object Version
<script type="text/javascript">
// <![CDATA[
ExecuteOrDelayUntilScriptLoaded(LoadAlerts, "sp.js");
var ctx;
var currAlerts;
function LoadAlerts() {
ctx = new SP.ClientContext.get_current();
list = ctx.get_web().get_lists('/sites/MMTP1/Lists/').getByTitle('MMAlerts');
var cmlQry = new SP.CamlQuery();
var camlExp = '<query><Query><Where><Gt><FieldRef Name="Expires" /><Value IncludeTimeValue="FALSE" Type="DateTime"><Today /></Value></Gt></Where></Query></query>';
cmlQry.set_viewXml(camlExp);
currAlerts = list.getItems(cmlQry);
ctx.load(currAlerts,'Include(ID,Title,Class)');
ctx.executeQueryAsync(GetAlertsSuccess,GetAlertsFailed);
function GetAlertsSuccess() {
var lstEnum = currAlerts.getEnumerator();
while(lstEnum.moveNext()) {
var mmAlert = lstEnum.get_current();
AddMMStatus(mmAlert.get_item('ID'),mmAlert.get_item('Title'),mmAlert.get_item('Class'));
function GetAlertsFailed(sender,args) {
alert('Alerts load failed: ' + args.tostring);
function AddMMStatus(msgID, strTitle, strClass) {
var statID;
var statClass;
var statTitle;
statClass = "<a href=\"#\" onclick=\"javascript:DisplayAlert("+msgID+");\">" + strClass + ": </a>";
statTitle = "<a href=\"#\" onclick=\"javascript:DisplayAlert("+msgID+");\">" + strTitle + "</a>";
statID = SP.UI.Status.addStatus(statClass, statTitle, true);
SP.UI.Status.setStatusPriColor(statID,"red");
function DisplayAlert(msgID) {
var options = {
title: "Miller & Martin Alert!",
url: "/sites/MMTP1/SitePages/ShowAlert02.aspx?ID="+msgID,
allowMaximize: false,
showClose: true
SP.UI.ModalDialog.showModalDialog(options);
// ]]>
</script>
JQuery Version (works except for filtering by date)
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" >
// <![CDATA[
var itemID;
var mmTitle;
var mmClass;
$(document).ready(function ()
var qryWCFUrl = "/sites/MMTP1/_vti_bin/listdata.svc/MMAlerts?$filter=(Expires gt '08/10/2011')&$orderby=Title";
$.getJSON(qryWCFUrl, function (results)
$.each(results.d.results, function (i, mmAlert)
itemID = mmAlert.Id;
mmTitle = mmAlert.Title;
mmClass = mmAlert.ClassValue;
AddMMStatus(mmAlert.Id,mmAlert.Title,mmAlert.ClassValue);
function AddMMStatus(msgID, strTitle, strClass, strSeverity) {
var statID;
var statClass;
var statTitle;
statClass = "<div id=\"mmAlertTitle\" style=\"display:inline-block;\"><a href=\"#\" onclick=\"javascript:DisplayAlert("+msgID+");\">" + strClass + ": </a></div>";
statTitle = "<div id=\"mmAlertDetail\" style=\"display:inline-block;\"><a href=\"#\" onclick=\"javascript:DisplayAlert("+msgID+");\">" + strTitle + "</a></div>";
statID = SP.UI.Status.addStatus(statClass, statTitle, true);
SP.UI.Status.setStatusPriColor(statID,"green");
function DisplayAlert(msgID) {
var options = {
title: "Miller & Martin Alert!",
url: "/sites/MMTP1/SitePages/ShowAlert02.aspx?ID="+msgID,
allowMaximize: false,
showClose: true
SP.UI.ModalDialog.showModalDialog(options);
// ]]>
</script> -
Problem in alv grid display (it is not filtering the data in print preview)
Hi Every One,
Its very urgent for me to deliver this report ....
I applied sort criteria on my final internal table which is pupulated and then i passed to the function module...
when i execute the program it is showing me the perfect output..when i take a print preview it is not filtering the data instead it is showing me the normal uotput i.e..,without sort criteria...
here is the code plz go thru it and tell me were i am doing wrong...
i thank u one and all ...and plz debub the code on the system and let me know....
REPORT tracking-quotation NO STANDARD PAGE HEADING MESSAGE-ID zrv_message LINE-COUNT 65 LINE-SIZE 110.
Includes
This include contains declarations
INCLUDE ZMM_TRACKING_QUOTATION_T.
This include contains code for the performs
INCLUDE ZMM_TRACKING_QUOTATION_F.
AT SELECTION SCREEN *
AT SELECTION-SCREEN.
This perform will validate the fields
PERFORM f_validate_sel_screen.
Start-Of-Selection
START-OF-SELECTION.
This perform will read the values from the database.
PERFORM selection.
This perform will build the field catalogue
PERFORM f_build_catalogue.
This perform will build the sort
PERFORM f_event_sort.
This perform will build the layout
PERFORM f_build_layout.
This perform will build the event
PERFORM f_event_build.
This perform will build the comment
PERFORM f_comment_build.
This perform will display the list
PERFORM f_list_display.
End-Of-Selection
END-OF-SELECTION.
*& Include ZMM_TRACKING_QUOTATION_T *
T a b l e s D e c l a r a t i o n s *
TABLES: eban,
ebkn,
ekko,
eket,
lfa1,
ekpo.
Selection Screen Declaration
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.
SELECT-OPTIONS: bednr FOR eban-bednr,
ps_psp FOR ebkn-ps_psp_pnr,
kostl FOR ebkn-kostl,
erdat FOR ebkn-erdat.
SELECTION-SCREEN END OF BLOCK b1.
Type Pools D e c l a r a t i o n s *
TYPE-POOLS: slis.
V a r i a b l e s *
DATA : rt_fieldcat TYPE slis_t_fieldcat_alv,
i_layout TYPE slis_layout_alv,
i_event TYPE slis_t_event,
i_listheader TYPE slis_t_listheader,
l_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
I n t e r n a l T a b l e s *
DATA: BEGIN OF i_final_tab OCCURS 0,
name1 LIKE lfa1-name1,
banfn LIKE eban-banfn,
badat LIKE eban-badat,
bnfpo LIKE eban-bnfpo,
txz01 LIKE eban-txz01,
menge LIKE eban-menge,
bednr LIKE eban-bednr,
frgdt LIKE eban-frgdt,
lfdat LIKE eban-lfdat,
ps_psp_pnr LIKE ebkn-ps_psp_pnr,
bwbdt LIKE ekko-bwbdt,
aedat LIKE ekko-aedat,
lifnr LIKE ekko-lifnr,
ihran LIKE ekko-ihran,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
plifz LIKE ekpo-plifz,
eindt LIKE eket-eindt,
END OF i_final_tab.
DATA: BEGIN OF itab OCCURS 0,
name1 LIKE lfa1-name1,
banfn LIKE eban-banfn,
badat LIKE eban-badat,
bnfpo LIKE eban-bnfpo,
txz01 LIKE eban-txz01,
menge(17),
bednr LIKE eban-bednr,
frgdt LIKE eban-frgdt,
lfdat LIKE eban-lfdat,
ps_psp_pnr LIKE ebkn-ps_psp_pnr,
bwbdt LIKE ekko-bwbdt,
aedat LIKE ekko-aedat,
lifnr LIKE ekko-lifnr,
ihran LIKE ekko-ihran,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
plifz LIKE ekpo-plifz,
eindt LIKE eket-eindt,
END OF itab.
*& Include ZMM_TRACKING_QUOTATION_F *
**& Form FIELDCAT_INIT
text
-->P_GT_FIELDCAT[] text
FORM f_build_catalogue.
DATA : ls_fieldcat TYPE slis_fieldcat_alv.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'BANFN'.
ls_fieldcat-tabname = 'itab'.
ls_fieldcat-seltext_m = 'PR Number'.
ls_fieldcat-ref_tabname = 'EBAN'.
ls_fieldcat-fix_column = ''.
ls_fieldcat-emphasize = ''.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'BNFPO'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'BADAT'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'TXZ01'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'MENGE'.
ls_fieldcat-ref_tabname = 'ITAB'.
ls_fieldcat-seltext_l = 'Quantity'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'PS_PSP_PNR'.
ls_fieldcat-ref_tabname = 'EBKN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'BEDNR'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'FRGDT'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'LFDAT'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'EBELN'.
ls_fieldcat-ref_tabname = 'EKPO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'EBELP'.
ls_fieldcat-ref_tabname = 'EKPO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'AEDAT'.
ls_fieldcat-ref_tabname = 'EKKO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'LIFNR'.
ls_fieldcat-ref_tabname = 'EKKO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'NAME1'.
ls_fieldcat-ref_tabname = 'LFA1'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'IHRAN'.
ls_fieldcat-ref_tabname = 'EKKO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'EINDT'.
ls_fieldcat-ref_tabname = 'EKET'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'PLIFZ'.
ls_fieldcat-ref_tabname = 'EKPO'.
APPEND ls_fieldcat TO rt_fieldcat.
ENDFORM. " FIELDCAT_INIT
*& Form selection
text
--> p1 text
<-- p2 text
FORM selection .
SELECT
lfa1~name1
eban~banfn
eban~badat
eban~bnfpo
eban~txz01
eban~menge
eban~bednr
eban~frgdt
eban~lfdat
ebkn~ps_psp_pnr
ekko~bwbdt
ekko~aedat
ekko~lifnr
ekko~ihran
ekpo~ebeln
ekpo~ebelp
ekpo~plifz
eket~eindt
FROM lfa1 INNER JOIN ekko ON ( lfa1lifnr = ekkolifnr )
INNER JOIN ekpo ON ( ekkoebeln = ekpoebeln )
INNER JOIN eket ON ( ekpoebeln = eketebeln
AND
ekpoebelp = eketebelp )
INNER JOIN eban ON ( ebanbanfn = eketbanfn
AND
ebanbnfpo = eketbnfpo )
INNER JOIN ebkn ON ( ebanbanfn = ebknbanfn
AND
ebanbnfpo = ebknbnfpo )
INTO TABLE i_final_tab WHERE eban~bednr IN bednr AND
ebkn~ps_psp_pnr IN ps_psp AND
ebkn~kostl IN kostl AND
ebkn~erdat IN erdat AND
ekko~bstyp <> 'F'.
LOOP AT i_final_tab.
itab-name1 = i_final_tab-name1.
itab-banfn = i_final_tab-banfn.
itab-badat = i_final_tab-badat.
itab-bnfpo = i_final_tab-bnfpo.
itab-txz01 = i_final_tab-txz01.
itab-menge = i_final_tab-menge.
itab-bednr = i_final_tab-bednr.
itab-frgdt = i_final_tab-frgdt.
itab-lfdat = i_final_tab-lfdat.
itab-ps_psp_pnr = i_final_tab-ps_psp_pnr.
itab-aedat = i_final_tab-aedat.
itab-lifnr = i_final_tab-lifnr.
itab-ihran = i_final_tab-ihran.
itab-ebeln = i_final_tab-ebeln.
itab-ebelp = i_final_tab-ebelp.
itab-plifz = i_final_tab-plifz.
itab-eindt = i_final_tab-eindt.
APPEND itab.
CLEAR itab.
ENDLOOP.
ENDFORM. " selection
*& Form f_event_build
text
--> p1 text
<-- p2 text
FORM f_event_build .
DATA wa_event TYPE slis_alv_event.
CLEAR: wa_event,
i_event.
*read event top-of-page
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = i_event.
IF sy-subrc <> 0.
ENDIF.
*Prepare event table
READ TABLE i_event WITH KEY name = 'TOP_OF_PAGE' INTO wa_event.
IF sy-subrc EQ 0.
MOVE 'TOP_OF_PAGE' TO wa_event-form.
APPEND wa_event TO i_event.
ENDIF.
ENDFORM. " f_event_build
*& Form f_comment_build
text
--> p1 text
<-- p2 text
FORM f_comment_build .
DATA: wa_listheader TYPE slis_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Tracking Of Quotation For Purchase Requisition'.
APPEND wa_listheader TO i_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = 'SMS-DEMAG Pvt. Ltd.'.
APPEND wa_listheader TO i_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = 'R1- Nehru Enclave'.
APPEND wa_listheader TO i_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = 'New Delhi - '.
APPEND wa_listheader TO i_listheader.
ENDFORM. " f_comment_build
*& Form f_build_layout
text
--> p1 text
<-- p2 text
FORM f_build_layout .
CLEAR i_layout.
i_layout-colwidth_optimize = 'X'.
i_layout-zebra = 'X'.
i_layout-totals_text = 'Total'.
ENDFORM. " f_build_layout
*& Form f_list_display
text
--> p1 text
<-- p2 text
FORM f_list_display .
*sort itab by name1
banfn
badat
bnfpo
txz01
menge
bednr
frgdt
lfdat
ps_psp_pnr
bwbdt
aedat
lifnr
ihran
ebeln
ebelp
plifz
eindt.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = i_layout
it_fieldcat = rt_fieldcat
it_events = i_event
it_sort = l_sort
TABLES
t_outtab = itab.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " f_list_display
*& Form TOP_OF_PAGE
text
--> p1 text
<-- p2 text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_listheader
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "TOP_OF_PAGE
*& Form f_event_sort
text
--> p1 text
<-- p2 text
FORM f_event_sort .
wa_sort-spos = 1.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BANFN'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
CLEAR WA_SORT.
wa_sort-spos = 5.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'MENGE'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 2.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BNFPO'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 3.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BADAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 4.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'TXZ01'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 7.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BEDNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 6.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'PS_PSP_PNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 8.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'FRGDT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 9.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'LFDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 10.
wa_sort-fieldname = 'EBELN'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 11.
wa_sort-fieldname = 'EBELP'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 12.
wa_sort-fieldname = 'AEDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 13.
wa_sort-fieldname = 'LIFNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 14.
wa_sort-fieldname = 'NAME1'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 15.
wa_sort-fieldname = 'IHRAN'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 16.
wa_sort-fieldname = 'EINDT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
*sort l_sort by spos.
CLEAR wa_sort.
wa_sort-spos = 1.
wa_sort-fieldname = 'BANFN'.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
wa_sort-spos = 5.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'MENGE'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-spos = 2.
wa_sort-fieldname = 'BNFPO'.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
wa_sort-spos = 3.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'BADAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 4.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'TXZ01'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 7.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'BEDNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 6.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'PS_PSP_PNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 8.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'FRGDT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 9.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'LFDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 10.
wa_sort-fieldname = 'EBELN'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 11.
wa_sort-fieldname = 'EBELP'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 12.
wa_sort-fieldname = 'AEDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 13.
wa_sort-fieldname = 'LIFNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 14.
wa_sort-fieldname = 'NAME1'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 15.
wa_sort-fieldname = 'IHRAN'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-spos = 16.
wa_sort-fieldname = 'EINDT'.
wa_sort-tabname = 'itab'.
wa_sort-down = 'X'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
*sort l_sort by spos.
ENDFORM. " f_event_sort
*& Form f_validate_sel_screen
text
--> p1 text
<-- p2 text
FORM f_validate_sel_screen .
*Tracking number
SELECT SINGLE * FROM eban WHERE bednr IN bednr.
IF sy-subrc NE 0.
MESSAGE e013.
ENDIF.
*Wbs Element
SELECT SINGLE * FROM ebkn WHERE ps_psp_pnr IN ps_psp.
IF sy-subrc NE 0.
MESSAGE e014.
ENDIF.
*Cost center
SELECT SINGLE * FROM ebkn WHERE kostl IN kostl.
IF sy-subrc NE 0.
MESSAGE e015.
ENDIF.
*Date
SELECT SINGLE * FROM ebkn WHERE erdat IN erdat.
IF sy-subrc NE 0.
MESSAGE e012.
ENDIF.
ENDFORM. " f_validate_sel_screenHey Ravi,
As you said it is urgent to deliver the report, i will suggest you temporary solution while i debug the program.
In the FM "REUSE_ALV_GRID_DISPLAY", use layout to generate your sorted report for now as shown following:
<b>DATA: G_VARIANT LIKE DISVARIANT.</b>
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = RT_FIELDCAT
IT_EVENTS = I_EVENT
IT_SORT = L_SORT
<b>is_variant = g_variant</b>
TABLES
T_OUTTAB = ITAB.
IF SY-SUBRC <> 0.
ENDIF.
Where g_variant is your custom layout which you will make as default for output.
Hope this helps and let me know if you need more details.
In the mean time, i will look in to the program.
Regards,
Vicky
PS: Award points if helpful -
Read only field in data manager
Hi,
if we set a field permission as read only in console.
in data manager this field will be read only.
in import manager during process of import will this field be receiving value or it will be read only
SonaliHello,
I tested (MDM 5.5 sp6) and if you import data, and for a read-only fied mapped, data can be created and updated ( import done with same role/user than the one with read/only rules)
I haven't see this behaviour on documentation, but don't look as a trouble for me.
If this role/user try to update from the data manager, it is not possible to update a read-only fied
Hope helps you
regards
Vincent -
How to use a query in matrix data retrive
hai everybody
how to use a query in matrix data retrive...
pls ..If u have created a UDT to store the data then U can retrive the data through recordset.
oRecordset.doquery("SQL Statement")
If u have taken the DB Data source to Manipulate then
then type
oMatrix.flushtoDataSource
then
U can retrive the data through DB Data source.
-Manmath
Maybe you are looking for
-
My daughter has disabled her ipod and we do not know how to re-set her password,Message on ipod screen is "connect to itunes" have connected ipod and it keeps asking for password which we have disabled?? can anyone help.
-
I am facing a strange issue on the implementation of List Control on webdynpro ABAP UI screen . I have created a List Control where I have some buttons on the toolbar to perform some action. I am providing the data to the list . My issue now is when
-
Retina MacBook Pro: What new adapters do I need?
I am seriously considering purchasing the new Retina Display MBP. My confusion lies with some of the adapters What adapter will I need to: a) hook a new Retina MacBook Pro to a VGA projector? b) hook a new Retina MacBookPro to a HDMI TV so that I can
-
JDeveloper IDE Tool - Thank you Oracle/Sun and Java community
I am sure it has been done many times over within the JDeveloper community discussion but I felt compelled to stop, think and acknowledge the efforts here. To Oracle, Sun and others that have contributed to this software and resources a huge THANK YO
-
How to create internal links with pages...?
I'm thinking of taking all my class notes with the computer and I wanted to know if Pages can create internal links (to other documents, or to another point in the same document). Or is there a better application to do this? iMac Mac OS X (10.4.9)