How to count occurrences on dates
I have a table which which measures the occurrences of various events, and I'm trying to figure out a way to calculate the occurrences on each day.
Table 1 - Occurrences
3/4/08 4:40 PM
3/4/08 9:45 PM
3/5/08 2:50 AM
3/5/08 5:45 AM
3/5/08 9:30 AM
3/5/08 12:30 PM
Table 2 - Occurrences per day
3/4/08 - 2
3/5/08 - 4
Is there a way to get Numbers to do a COUNTIF and recognize ONLY the date (and not the time) for Table 2?
Hello
Assuming that the original occurences are stored in column A, in column B put the formula
=DATE(YEAR(A),MONTH(A),DAY(A))
so you will have stripped date.
Now in Table 2 you may use:
=COUNTIF(Table 1 :: B,DATE(2008,3,4)) --> 2
=COUNTIF(Table 1 :: B,DATE(2008,3,5)) --> 4
Or, for an easier use
in Table 2
column A
3/1/2008
3/2/2008
3/3/2008
3/4/2008
3/5/2008
column B
=IF(COUNTIF(Tableau 1 :: B,A),COUNTIF(Tableau 1 :: B,A),"")
Yvan KOENIG (from FRANCE vendredi 2 mai 2008 09:08:54)
Similar Messages
-
How to count number of items present in a data block
hi all,
how to count how many items present in a particular data block in oracle forms 10g.
whether it is a text_item or display_item or list_item etc is there any method to do this.
please reply....hi all,
i have written this when-button pressed but the problem is how to get the next item name in the block
DECLARE
V_COUNT NUMBER:=0;
V_FIRSTITEM VARCHAR2(100):='';
BEGIN
GO_BLOCK('BLOCK_ITEMCOUNT');
V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
LOOP
V_COUNT := V_COUNT + 1;
EXIT WHEN GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM) IS NULL;
--V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', NEXTITEM);
--V_COUNT := V_COUNT + 1;
END LOOP;
END; -
How to count the number of text boxes that are data entered
How to count the number of text boxes that are data entered in visual basic form.
Here is an Iterator that expands on my previous response:
''' <summary>
''' Iterator for form controls
''' </summary>
''' <param name="onlyControlsOfType">specify type if a certain type of controls needed</param>
''' <param name="onlyTopLevel">if true don't search containers within the form</param>
''' <returns></returns>
''' <remarks></remarks>
Private Iterator Function AllControls(Optional onlyControlsOfType As Type = Nothing, _
Optional onlyTopLevel As Boolean = False) As IEnumerable(Of Control)
Dim ctrl As Control = Me.GetNextControl(Me, True)
Do Until ctrl Is Nothing
If onlyControlsOfType Is Nothing OrElse ctrl.GetType = onlyControlsOfType Then
If TypeOf ctrl.Parent Is Form OrElse Not onlyTopLevel Then
Yield ctrl
End If
End If
ctrl = Me.GetNextControl(ctrl, True)
Loop
End Function
Some sample uses:
For Each
For Each c As Control In AllControls()
Debug.WriteLine(c.Name)
Next
List of all controls, including controls in containers i.e. Groupbox
Dim l As List(Of Control) = AllControls().ToList
List of all Textbox controls, including Textboxes in containers i.e. Groupbox
l = AllControls(GetType(TextBox)).ToList
List of all Textbox controls, don't include Textboxes in containers i.e. Groupbox
l = AllControls(GetType(TextBox), True).ToList
'Those who use Application.DoEvents() have no idea what it does and those who know what it does never use it.' JohnWein
Multics
My Serial Port Answer -
How to COUNT all data Characters in an IDOC ?
Hi All,
I am doing an IDOC-->File scenario.
As per the Third party system requirements, I need to COUNT all the Data characters (Minus the EDIDC record) and write this value at the end of the trailer record in the file.
Example:
EDIDC--> SAPR3, LS...
E1KNA1M-->SHIRIN, UK, SW1DPL
E1KNBKM-->SHIRIN, CITIBANK
So in this example I should sum up(COUNT) all the characters(of Data) belonging to segment E1KNA1m and E1KNBKM. So here COUNT is '28'. So I need to write the value '28' at the end of the file.
I want to know, is it possible to count data in XI mapping or should this be done in R/3 itself and appended as a COUNT field to the IDOC.
Appreciate any suggestion help on this. All I want to know which is the best practise/place to count the data characters in this scenario.
Thanks
ShirinHi,
Thanks for explaining.Really appreciated.
Just to confirm,
in Java edit Section I have added the following data: Please let me know if that is correct.
Imports:
Global Variables: len
Initilisation section: 0
Clean-up:
Similarly in UDF I have entered the following data:
Label/Description: Calculate length
Cache: Value(radiobutton)
Arguments: a
Next screen:
Imports:
public String Calculate(String a, Container container)
Then entered ur code.
When I save and activate I get the following error
Starting compilation Source code has syntax error: D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map2494b0c0596b11dda115001a4b52813a/source/com/sap/xi/tf/_MM_ALLOCATION_RESPONSE_.java:32: <identifier> expected public /*!_$ClNRep_*/_MM_ALLOCATION_RESPONSE_(){} ^ D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map2494b0c0596b11dda115001a4b52813a/source/com/sap/xi/tf/_MM_ALLOCATION_RESPONSE_.java:210: ';' expected } ^ 2 errors
Appreciate if you could help.
Thanks
Shirin -
How can I load my data faster? Is there a SQL solution instead of PL/SQL?
11.2.0.2
Solaris 10 sparc
I need to backfill invoices from a customer. The raw data has 3.1 million records. I have used pl/sql to load these invoices into our system (dev), however, our issue is the amount of time it's taking to run the load - effectively running at approx 4 hours. (Raw data has been loaded into a staging table)
My research keeps coming back to one concept: sql is faster than pl/sql. Where I'm stuck is the need to programmatically load the data. The invoice table has a sequence on it (primary key = invoice_id)...the invoice_header and invoice_address tables use the invoice_id as a foreign key. So my script takes advantage of knowing the primary key and uses that on the subsequent inserts to the subordinate invoice_header and invoice_address tables, respectively.
My script is below. What I'm asking is if there are other ideas on the quickest way to load this data...what am I not considering? I have to load the data in dev, qa, then production so the sequences and such change between the environments. I've dummied down the code to protect the customer; syntax and correctness of the code posted here (on the forum) is moot...it's only posted to give the framework for what I currently have.
Any advice would be greatly appreciated; how can I load the data faster knowing that I need to know sequence values for inserts into other tables?
DECLARE
v_inv_id invoice.invoice_id%TYPE;
v_inv_addr_id invoice_address.invoice_address_id%TYPE;
errString invoice_errors.sqlerrmsg%TYPE;
v_guid VARCHAR2 (128);
v_str VARCHAR2 (256);
v_err_loc NUMBER;
v_count NUMBER := 0;
l_start_time NUMBER;
TYPE rec IS RECORD
BILLING_TYPE VARCHAR2 (256),
CURRENCY VARCHAR2 (256),
BILLING_DOCUMENT VARCHAR2 (256),
DROP_SHIP_IND VARCHAR2 (256),
TO_PO_NUMBER VARCHAR2 (256),
TO_PURCHASE_ORDER VARCHAR2 (256),
DUE_DATE DATE,
BILL_DATE DATE,
TAX_AMT VARCHAR2 (256),
PAYER_CUSTOMER VARCHAR2 (256),
TO_ACCT_NO VARCHAR2 (256),
BILL_TO_ACCT_NO VARCHAR2 (256),
NET_AMOUNT VARCHAR2 (256),
NET_AMOUNT_CURRENCY VARCHAR2 (256),
ORDER_DT DATE,
TO_CUSTOMER VARCHAR2 (256),
TO_NAME VARCHAR2 (256),
FRANCHISES VARCHAR2 (4000),
UPDT_DT DATE
TYPE tab IS TABLE OF rec
INDEX BY BINARY_INTEGER;
pltab tab;
CURSOR c
IS
SELECT billing_type,
currency,
billing_document,
drop_ship_ind,
to_po_number,
to_purchase_order,
due_date,
bill_date,
tax_amt,
payer_customer,
to_acct_no,
bill_to_acct_no,
net_amount,
net_amount_currency,
order_dt,
to_customer,
to_name,
franchises,
updt_dt
FROM BACKFILL_INVOICES;
BEGIN
l_start_time := DBMS_UTILITY.get_time;
OPEN c;
LOOP
FETCH c
BULK COLLECT INTO pltab
LIMIT 1000;
v_err_loc := 1;
FOR i IN 1 .. pltab.COUNT
LOOP
BEGIN
v_inv_id := SEQ_INVOICE_ID.NEXTVAL;
v_guid := 'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff');
v_str := str_parser (pltab (i).FRANCHISES); --function to string parse - this could be done in advance, yes.
v_err_loc := 2;
v_count := v_count + 1;
INSERT INTO invoice nologging
VALUES (v_inv_id,
pltab (i).BILL_DATE,
v_guid,
'111111',
'NONE',
TO_TIMESTAMP (pltab (i).BILL_DATE),
TO_TIMESTAMP (pltab (i).UPDT_DT),
'READ',
'PAPER',
pltab (i).payer_customer,
v_str,
'111111');
v_err_loc := 3;
INSERT INTO invoice_header nologging
VALUES (v_inv_id,
TRIM (LEADING 0 FROM pltab (i).billing_document), --invoice_num
NULL,
pltab (i).BILL_DATE, --invoice_date
pltab (i).TO_PO_NUMBER,
NULL,
pltab (i).net_amount,
NULL,
pltab (i).tax_amt,
NULL,
NULL,
pltab (i).due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
TO_TIMESTAMP (SYSDATE),
TO_TIMESTAMP (SYSDATE),
PLTAB (I).NET_AMOUNT_CURRENCY,
(SELECT i.bc_value
FROM invsvc_owner.billing_codes i
WHERE i.bc_name = PLTAB (I).BILLING_TYPE),
PLTAB (I).BILL_DATE);
v_err_loc := 4;
INSERT INTO invoice_address nologging
VALUES (invsvc_owner.SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH INITIAL',
pltab (i).BILL_DATE,
NULL,
pltab (i).to_acct_no,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 5;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_ACCT_NO,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 6;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH2',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_CUSTOMER,
pltab (i).to_name,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 7;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH3',
pltab (i).BILL_DATE,
NULL,
'SOME PROPRIETARY DATA',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 8;
INSERT
INTO invoice_event nologging (id,
eid,
root_eid,
invoice_number,
event_type,
event_email_address,
event_ts)
VALUES ( SEQ_INVOICE_EVENT_ID.NEXTVAL,
'111111',
'222222',
TRIM (LEADING 0 FROM pltab (i).billing_document),
'READ',
'some_user@some_company.com',
SYSTIMESTAMP);
v_err_loc := 9;
INSERT INTO backfill_invoice_mapping
VALUES (v_inv_id,
v_guid,
pltab (i).billing_document,
pltab (i).payer_customer,
pltab (i).net_amount);
IF v_count = 10000
THEN
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (
pltab (i).billing_document,
pltab (i).payer_customer,
errString || ' ' || v_err_loc
COMMIT;
END;
END LOOP;
v_err_loc := 10;
INSERT INTO backfill_invoice_timing
VALUES (
ROUND ( (DBMS_UTILITY.get_time - l_start_time) / 100,
2)
|| ' seconds.',
(SELECT COUNT (1)
FROM backfill_invoice_mapping),
(SELECT COUNT (1)
FROM backfill_invoice_errors),
SYSDATE
COMMIT;
EXIT WHEN c%NOTFOUND;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (NULL, NULL, errString || ' ' || v_err_loc);
COMMIT;
END;Hello
You could use insert all in your case and make use of sequence.NEXTVAL and sequence.CURRVAL like so (excuse any typos - I can't test without table definitions). I've done the first 2 tables, so it's just a matter of adding the rest in...
INSERT ALL
INTO invoice nologging
VALUES ( SEQ_INVOICE_ID.NEXTVAL,
BILL_DATE,
my_guid,
'111111',
'NONE',
CAST(BILL_DATE AS TIMESTAMP),
CAST(UPDT_DT AS TIMESTAMP),
'READ',
'PAPER',
payer_customer,
parsed_francises,
'111111'
INTO invoice_header
VALUES ( SEQ_INVOICE_ID.CURRVAL,
TRIM (LEADING 0 FROM billing_document), --invoice_num
NULL,
BILL_DATE, --invoice_date
TO_PO_NUMBER,
NULL,
net_amount,
NULL,
tax_amt,
NULL,
NULL,
due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
SYSTIMESTAMP,
NET_AMOUNT_CURRENCY,
bc_value,
BILL_DATE)
SELECT
src.billing_type,
src.currency,
src.billing_document,
src.drop_ship_ind,
src.to_po_number,
src.to_purchase_order,
src.due_date,
src.bill_date,
src.tax_amt,
src.payer_customer,
src.to_acct_no,
src.bill_to_acct_no,
src.net_amount,
src.net_amount_currency,
src.order_dt,
src.to_customer,
src.to_name,
src.franchises,
src.updt_dt,
str_parser (src.FRANCHISES) parsed_franchises,
'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff') my_guid,
i.bc_value
FROM BACKFILL_INVOICES src,
invsvc_owner.billing_codes i
WHERE i.bc_name = src.BILLING_TYPE;Some things to note
1. Don't commit in a loop - you only add to the run time and load on the box ultimately reducing scalability and removing transactional integrity. Commit once at the end of the job.
2. Make sure you specify the list of columns you are inserting into as well as the values or columns you are selecting. This is good practice as it protects your code from compilation issues in the event of new columns being added to tables. Also it makes it very clear what you are inserting where.
3. If you use WHEN OTHERS THEN... to log something, make sure you either rollback or raise the exception. What you have done in your code is say - I don't care what the problem is, just commit whatever has been done. This is not good practice.
HTH
David
Edited by: Bravid on Oct 13, 2011 4:35 PM -
How to count number of sales orders generated in a month in SAP SD
Hi SD Gurus,
I have a very strange query from client. I have to count the number of sales order created in a month for a z report. For example 30 in Jan, 25 in Feb etc. Could anyone suggest me How to count number of sales orders generated in a month in SAP SD.
Regards
Vinod KumarHi,
Goto the T.Code "SE16" or "SE16n" or "SE11".
Enter the table name as VBAK
Enter the created on date as the starting date of the period and to date as the end date.
Enter.
Click on "Number of Entries".It will tell you the number of entries created in a particular period.
If you want a report,goto the T.Code "VA05n".
Regards,
Krishna. -
How to Count Number of completed line items in past 6 months / 12 months ?
How to Count Number of completed line items in past 6 months / 12 months ?
Hi,
I am trying to count "Number of Completed Line Items in Purchase Order Document" for my Key Figure ZPO_CNT.
Purchase Order document = ZEBELN
Line Item = ZEBELP.
I need to find and count if the Line Item has been received in the past 6 months from today and similarly in the past 12 months.
I have "Delivery Completed" field, ELIKZ.
So, based on this would I be able to calculate it in Query Designer?
If so, Please let me know howHello Deva
If youe want to calculate the completed line item for last 6 or 12 month then i think u will be displaying the query data for these montrhs...create a customer exit to give you date range and restric it in filter area....
Now Choose any of the below option
1. I would suggest to implement an additional key figure "counter" in cube and fill values with one for which delivery is completed.
Now use calculated key figure in Query Designer based on logic
IF counter = 1 THEN counter ELSE 0
OR
2. create a formula variable based on ELIKZ and use replacement path variable, it will display you no. of docs for which delivery is completed....
Award points if it solves your problem
Revert back in case of further assistance...
Thanks
Tripple k -
How to count number of autoextents that had took place between a period.
urgent question
Hi all
how to provide me a report for getting the result of the Disk Drive Space usage (drive letter) that shows how quickly the space is being used up by the database(dbf files).
Or how to count the number of autoextents that had took place between a certain period of time.
either by cmd promt or OEM would be fine
Oracle database 10g(single instance)
OS:Windows 2003 server
thanks
Antohi justin and Pavan
First Thanks for your immediate responce,
Secoundly client has asked for the growth report at the OS level and not at the database level. but the growth is with respect to the autoextent feature that oracle has over the datafiles.
I was thinking that i could get a view or some history log to get this data retrieved from the past may be of a months data.I normally manually check the data base growth with the following script
SELECT total_space,free_space,
(NVL(total_space,2)-NVL(free_space,2) ) used_space
FROM (select round(SUM(Bytes/1024/1024/1024),2) Total_space
from DBA_data_files
(select round(SUM(Bytes/1024/1024/1024),2) free_space
from DBA_free_space
but this is Oracle DB level.
Any ideas for the report.like a query or somewhere in OEM
Thanks
Anto -
Doubt in how to calculate net due date
Hi..
Experts i have doubt in my salesmen ageing report i have to display
netamout day wise in the range of 0-30 days , 30-60 days and > 60 days
how to calculate the date difference between to date one is invoice creation date and another one is system date.
Give me any function module available to count the date difference
and how i filter the amount date wise.
Thanks Regds
Prabir Kumar DandpatHi,
check fm;
SD_DATETIME_DIFFERENCE
regards,
Navneeth K.
Message was edited by:
Navneeth Bothra -
How to count number of ones in table
Hello,
i created one table 16x32 each cell is updating 1 byte of data,how to count number of one in all cell,and is it right way to calculate check sum??
thank youThe simplest way is to call GetTableCellRangeValues with VAL_ENTIRE_TABLE as the range, next summing array elements.
But I don't understand your comment on checksum, so this may not be the more correct method for your actual needs: can you explain what do you mean?
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Lost all of my data on iphone and have no cloud back up how can i get my data back
lost all of my data on iphone and have no cloud back up how can i get my data back
iOS devices do backup automatically to iCloud providing:
iCloud Backup is turned on
It has a Wi-Fi connection
It is connected to a power source
The screen is off
5GB is plenty of storage for me to backup to iCloud automatically.
I have a 64GB iPhone & a 128GB iPad both backing up to the same iCloud account and I still have nearly 2GB free.
This is mainly because media is not backed up and Photo Stream & iTunes purchases do not count against your iCloud storage.
Here’s what iCloud backs up:
Purchase history for music, movies, TV shows, apps, and booksYour iCloud backup includes information about the content you have purchased, but not the purchased content itself. When you restore from an iCloud backup, your purchased content is automatically downloaded from the iTunes Store, App Store, or iBooks Store. Some types of content aren’t downloaded automatically in all countries, and previous purchases may be unavailable if they have been refunded or are no longer available in the store. For more information, see the Apple Support article iTunes in the Cloud availability by country. Some types of content aren’t available in all countries. For more information, see the Apple Support article Which types of items can I buy in my country?.
Photos and videos in your Camera Roll
Device settings
App data
Home screen and app organization
iMessage, text (SMS), and MMS messages
Ringtones
Visual Voicemail -
How to test or view data if the source is XML files..?
Hi,
I just got a doubt..
How can we test or view data from BI Admintool if the source is XML files.
If it is database we can perform "Update Row Count" or "view data" from physical layer.
I am just going through the "sample sales" example and could not find the option to test
connectivity with xml file..(I can see the directory which points to samplesales and xml files..
but how can I view those data in BI admintool)..
Help would be appreciable..
Thanks and Regards,
Sri.Hi Sri,
Yes, this option is not available for XML and multidimensional sources. Check "Show row count in physical view" in Table 2-1 documented here ,
http://docs.oracle.com/cd/E21764_01/bi.1111/e10540/planning.htm#BABEFIHE
Rgds,
Dpka -
How to count the number of lines dynamically,
In the below code am trying to read the lines which are selected using a check box, also am categorizing the contents depending on the follow up material.
after displaying one category contents am displaying a line
which also counts to a line in the internal table.
My question is how to count the number of lines(ULINE) displayed dynamically.
FORM GET_LINES .
DATA: LV_LINES TYPE I,
LV_TIMES TYPE I,
LV_TABIX TYPE SY-TABIX.
DESCRIBE TABLE IT_REC LINES LV_LINES.
DO LV_LINES TIMES.
LV_TIMES = SY-INDEX .
READ LINE LV_TIMES FIELD VALUE IT_REC-CHECK INTO GV_CHECK.
IF SY-SUBRC EQ 0 AND GV_CHECK IS NOT INITIAL.
LV_TABIX = LV_TIMES.
READ TABLE IT_REC INDEX LV_TABIX INTO GWA_UPDATE.
IF SY-SUBRC EQ 0.
APPEND GWA_UPDATE TO GT_UPDATE.
ENDIF.
ENDIF.
ENDDO.
ENDFORM. " GET_LINESIn the below code am trying to read the lines which are selected using a check box, also am categorizing the contents depending on the follow up material.
after displaying one category contents am displaying a line
which also counts to a line in the internal table.
My question is how to count the number of lines(ULINE) displayed dynamically.
FORM GET_LINES .
DATA: LV_LINES TYPE I,
LV_TIMES TYPE I,
LV_TABIX TYPE SY-TABIX.
DESCRIBE TABLE IT_REC LINES LV_LINES.
DO LV_LINES TIMES.
LV_TIMES = SY-INDEX .
READ LINE LV_TIMES FIELD VALUE IT_REC-CHECK INTO GV_CHECK.
IF SY-SUBRC EQ 0 AND GV_CHECK IS NOT INITIAL.
LV_TABIX = LV_TIMES.
READ TABLE IT_REC INDEX LV_TABIX INTO GWA_UPDATE.
IF SY-SUBRC EQ 0.
APPEND GWA_UPDATE TO GT_UPDATE.
ENDIF.
ENDIF.
ENDDO.
ENDFORM. " GET_LINES
The display function is:
FORM DISPLAY_DATA .
ULINE.
WRITE : /1 SY-VLINE, 'check',
10 SY-VLINE, 'Plant',
20 SY-VLINE, 'Material number',
50 SY-VLINE, 'Follow up material',
70 SY-VLINE, 'Safety stock',
100 SY-VLINE, 'Partc'.
ULINE.
LOOP AT IT_MARC.
MOVE: IT_MARC-WERKS TO IT_REC-WERKS,
IT_MARC-MATNR TO IT_REC-MATNR,
IT_MARC-NFMAT TO IT_REC-NFMAT,
IT_MARC-EISBE TO IT_REC-EISBE,
IT_MARC-PARTC TO IT_REC-PARTC .
APPEND IT_REC.
CLEAR IT_MARC.
ENDLOOP.
DATA: GV_TABIX TYPE SY-TABIX.
LOOP AT IT_REC.
GV_TABIX = SY-TABIX.
READ TABLE GT_TOTAL WITH KEY WERKS = IT_REC-WERKS
NFMAT = IT_REC-NFMAT.
IF SY-SUBRC EQ 0.
IT_REC-PARTC = GT_TOTAL-PARTC.
MODIFY IT_REC INDEX GV_TABIX TRANSPORTING PARTC.
ENDIF.
ENDLOOP.
LOOP AT IT_REC.
WRITE : /1 SY-VLINE, IT_REC-CHECK AS CHECKBOX,
10 SY-VLINE, IT_REC-WERKS,
20 SY-VLINE, IT_REC-MATNR,
50 SY-VLINE, IT_REC-NFMAT,
70 SY-VLINE, IT_REC-EISBE,
100 SY-VLINE, IT_REC-PARTC.
AT END OF NFMAT.
ULINE.
ENDAT.
ENDLOOP.
ULINE.
ENDFORM. " DISPLAY_DATA
Solved -
Count the displayed date rows on a column.
Hi,
I am trying to have a table with the following information and try to give a total count (of the dates visible) at the bottom of the table for the date columns. (not counting the rows)
(E.g.- Under the Sent column there are 5 dates displayed and there are 6 numbers associated. On the received column there are 3 dates displayed for 6 numbers)
Could you please advice me how to accomplish this. Thank you in advance.
Rob.
Name SENum SentReceived
John 1234 12/22/06
5678 12/13/06
6565 12/19/06 1/6/07
5656 - -
Jane 9866 12/18/06 1/5/07
Jim 5657 12/18/06 12/14/06
Total: 5 3I ma not sue what you want but
here is some idea at sql plus
SQL> compute count of ename on deptno
SQL> compute count of sal on deptno
SQL> select deptno,ename,sal from emp order by deptno
2 ;
DEPTNO ENAME SAL
10 CLARK 2450
KING 5000
MILLER 1300
count 3 3
20 SMITH 880
ADAMS 1100
FORD 3000
SCOTT 3000
JONES 2975
count 5 5
30 ALLEN 1600
BLAKE 2850
MARTIN 1250
JAMES 1045
TURNER 1500
WARD 1250
count 6 6
DEV 5000
count 1 1 -
Sum, total, or count true false data vs using the insert summary
Please, does someone have specific knowledge on how to count total instances of true or false data vs using the insert summary?
We have data such as:
Name Formula1 Formula2
Detail level Bob Barker True False
Detail level Bob Barker False True
Detail level Bob Barker True False
Detail level Bob Barker True False
Group level (value) (value)
Detail level Drew Carey True True
Detail level Drew Carey False True
Detail level Drew Carey False False
Group level (value) (value)
I would like to group by person and run a total in the group level but count only the true data, not every instance. The insert summary wants to sum all instances formula1 or formula2 whether they are true or false, so Bob Barker will have a value of 4 for formula1 and a value of 4 for formula2 if the insert summary is used. Our goal is to show Bob having a value of 3 for formula1 and a value of 1 for formula2, only counting the true instances.
I was unsucessful using the insert summary, running totals, and my if, then, else formula statements.
Any ideas or suggestions?Instead of using true/false (which is actually returning a 1 or a 0), try using a formula like this...
IF {TableName.FieldName} = true condition THEN 1
Notice there is no ELSE condition, which means that if the formula evaluates to false the result will be a null value. Null values are not included in counts.
HTH,
Jason
Maybe you are looking for
-
My iTunes password does not work on my iPhone...
My iTunes password does not work on my iPhone, but it does on my MacBook. Why? This is really annoying. How can I solve my problem? I don't even know how to contact Apple.
-
I am trying to hook my MacBook Pro to a Sony Bravia TV via DVI to HDMI cable and the TV will not recognize the signal. I have used the same setup with three other TV's, each a different brand with no problem. Any ideas?
-
Hello anyone, I am fairly new to flash, I am using the MX version. I am having trouble getting my scroll bars to load with the page load? The bar shows up, but it does not give the option to scroll. If I click off the page and return to it then the s
-
SQL Server 2012 Physical vs. Hyper-V Same Query Different Results
I have a database that is on physical hardware (16 CPU's, 32GB Ram). I have a copy of the database that was attached to a virtual Hyper-V server (16 CPU's, 32GB Ram). Both Servers and SQL Servers are identical OS=2008R2 Standard, SQL Server 2012R2 St
-
Hi All, I get the funny feeling at my work that the IT guy can log on and view my screen. I have heard they use a program called 'Chicken of the VNC' Does anyone know if i can tell if i am being wathced as I don't bloody like it. I have turned off sh