How to find total number of records in a BDoc?
Dear all,
I have replicated about BP 1088 records from ISU into CRM system with block size 100. Technically on SMW01, for each successfully processed BDoc, there will be 100 records (corresponds to 100 block size). But due to some failed BDocs, not all "successfully" BDocs will have 100 records each, some may have only 1 record inside...or 30...or 88 for example. So, may i know how to find or is there a report i can look into to find the total number of records clearly shown for each of the successfully processed green status BDocs???
Please help and points will be rewards!!
Thank You
Best Regards,
CK
I am just showing this to show how to get the rowcount along with the cursor, if the program has so much gap of between verifying the count(*) and opening the cursor.
Justin actually covered this, he said, oracle has to spend some resources to build this functionality. As it is not most often required, it does not makes much sence to see it as a built-in feature. However, if we must see the rowcount when we open the cursor, here is a way, but it is little bit expensive.
SQL> create table emp_crap as select * from emp where 1 = 2;
Table created.
SQL> declare
2 v_cnt number := 0;
3 zero_rows exception;
4 begin
5 for rec in (select * from (select rownum rn, e.ename from emp_crap e) order by 1 desc)
6 loop
7 if v_cnt = 0 then
8 v_cnt := rec.rn;
9 end if;
10 end loop;
11 if v_cnt = 0 then
12 raise zero_rows;
13 end if;
14 exception
15 when zero_rows then
16 dbms_output.put_line('No rows');
17 end;
18 /
No rows
PL/SQL procedure successfully completed.
-- Now, let us use the table, which has the data
SQL> declare
2 v_cnt number := 0;
3 zero_rows exception;
4 begin
5 for rec in (select * from
6 (select rownum rn, e.ename from emp e)
7 order by 1 desc)
8 loop
9 if v_cnt = 0 then
10 v_cnt := rec.rn;
11 dbms_output.put_line(v_cnt);
12 end if;
13 end loop;
14 if v_cnt = 0 then
15 raise zero_rows;
16 end if;
17 exception
18 when zero_rows then
19 dbms_output.put_line('No rows');
20 end;
21 /
14
PL/SQL procedure successfully completed.Thx,
Sri
Similar Messages
-
Hw to find total number of records
Hi All,
Can anyone help from these
1. how to find total number of reports for a particular cube/ods... need step - step solution
2. how to find total number of records for a particular Cube and ODS and Aggr's to till date.
3.what is sandbox,mirror sys,instance of a sys..?
4.what r TWS(Tivoli Workload Scheduler) jobs? how these r different to standard schedulers?
Thanks in ADv
LindaHello Linda,
As you have lots of answers on first 2 so i'll start from 3rd onward.
3. Sandbox is mostly practice system where you can do all kind of R&D, mirror sys can be mirror image of any system depends on the organization and instance of system is again mirror image of one system.
4. TWS is third party tool for scheduling which doesn't come along with SAP like standard scheduler as TWS has been prepared specially for this purpose so it has some more features than standard.
Hope it helps.
San. -
How to find total no of record in cube
Hi Experts,
How to find total no of records in a cube.
Thanks in Advance.Hi
If you want total number of records in a CUBE then you have to check in both F Table and E table.
Go to LISTSCHEMA tcode in your system, give your CUBE name and execute.
You will fine two table E and F table
goto SE16 -->give the table name and click on number of entries.You will get number of records.
Check the below thread
No of records in /size of Info cube
Regards,
Venkatesh -
How to find the number of records per months in cube
Hi,
how to find the number of records per months for my all cubes?
Can i use the ListCube transaction to find totl number f records per cube monthwise ?
JimmyHi,
Here is a program to generate no of records and list of ODS and Cubes in Active version.Schedule this program in background and create a cube to load this information and schedule to the data from the file generated by the program. Schedule this all per you requirement.
1.Copy the code into your Z<programname> from Se38.
2.change the FILENAME in CALL FUNCTION 'GUI_DOWNLOAD' in the program to the location from where you can pick the information to load data to cube(eg Application server).
3.Save program.
4.Schedule the program in background as required
5.Create cube with infoobjects to hold no of records and Infoprovider name
6.Load this cube based on event after the program job is done.
Hence you can report on this cube to see no of records in CUBE or ODS in your box.
Please find the code below.
Cheers,
Kavitha Kamesh.
types: begin of itabs ,
tabname type dd02l-tabname,
end of itabs.
data: itab type itabs occurs 0 with header line.
data: counter type i.
data: begin of itab1 occurs 0,
tabname type dd02l-tabname,
counter type i,
end of itab1.
DATA: ITABTABNAME TYPE STRING.
DATA: LENGTH TYPE I.
DATA: OBJECT(30).
data: str(6) type c.
select tabname from dd02l into table itab where ( tabname LIKE '/BIC/F%' or tabname LIKE '/BIC/A%00' )
and TABCLASS = 'TRANSP' and AS4LOCAL = 'A'.
loop at itab.
select count(*) from (itab-tabname) into counter.
str = itab-tabname.
if str = '/BIC/F'.
LENGTH = STRLEN( ITAB-TABNAME ).
SHIFT itab-tabname BY 6 PLACES LEFT.
ELSEIf str = '/BIC/A'.
SHIFT itab-tabname BY 6 PLACES LEFT.
LENGTH = STRLEN( ITAB-TABNAME ).
LENGTH = LENGTH - 2.
endif.
itab1-tabname = itab-tabname(LENGTH).
append itab1.
itab1-counter = counter.
clear itab-tabname.
clear: COUNTER.
endloop.
*********** itab1
loop at itab1.
write:/ itab1-tabname, itab1-counter.
endloop.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = 'c:records.xls'
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = ','
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* WK1_N_FORMAT = ' '
* WK1_N_SIZE = ' '
* WK1_T_FORMAT = ' '
* WK1_T_SIZE = ' '
* IMPORTING
* FILELENGTH =
TABLES
DATA_TAB = itab1
* FIELDNAMES =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* OTHERS = 22
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to find the number of records in ods?
how to find the number of records in ods?
Pls suggest the solution apart going to the table of ods and seeing the number of records.
Is there any program or function module to see the number of records in ods?
For eg: SAP_INFOCUBE_DESIGNS is a program which gives the detail (number of records) of infocube.Hi,
I was looking at this and found the following tables that may be of help.
One of these tables will include a summary of the record count of all the tables in your system based on the last time each table had it's database statistics calculated:
DBSTATTADA
DBSTATTDB2
DBSTATTDB4
DBSTATTDB6
DBSTATTINF
DBSTATTMSS
DBSTATTORA
We run on an Oracle database so the table record counts can be taken from DBSTATTORA. Type in AZ in table selection field in SE16 to restrict the output to ODS (or DSO) tables only.
The record count is at the time indicated in the timestamp field. Obviously this is not real time but should not be too out of date - if it is you may be having performance issues and should get your DBA / Basis to run a full refresh of DB stats.
Hope this helps, alhtough not real time the table should give you a decent indication of the size of all your ODS objects (or any other table for that matter!) -
How to count total number of records in mYSQL through JSP ??
hi
i want method to count total number of records in table.
it was there rs.count() method in VB .
But what about JSP , i used MYSQL database.
tell me solution please...
thanks...
remember JSP - total record count for mySQLhello mr.
i don't want ur suggestion ok
i know that site.
no need to give suggestion if u don't give code.
its better to give proper reply instead of making a
comment in forum.
next time take care
He was perfectly justified in that remark. I have given you the information you need, nicely, twice. But I, and noone else here is going to do your work for you. We will point you in the direction you need to be looking, but we are not going to give code. If you attempt to code something yourself, and it doesn't work, then post the code you tried, and we may make some corrections to it. Then again, with the attitude you've shown so far we probably will not. But one thing no one here will do, is do your work. Especially not for free.
Now, if you are not willing to sit down, and look at the suggestion that has already been made, and attempt to use it. Then continue wasting your time, but go away and stop wasting our time. -
How to find total count of records in a cursor
Aassume below is the cursor i defined
cursor c1 is select * from emp;
now, i want to find the total count of records in this cursor using an existing function etc., using one line statement.
FYI: c1%rowcount is always giving 0, so i cant rely on this.
Any thoughts, please share.
Thanks in advance.I am just showing this to show how to get the rowcount along with the cursor, if the program has so much gap of between verifying the count(*) and opening the cursor.
Justin actually covered this, he said, oracle has to spend some resources to build this functionality. As it is not most often required, it does not makes much sence to see it as a built-in feature. However, if we must see the rowcount when we open the cursor, here is a way, but it is little bit expensive.
SQL> create table emp_crap as select * from emp where 1 = 2;
Table created.
SQL> declare
2 v_cnt number := 0;
3 zero_rows exception;
4 begin
5 for rec in (select * from (select rownum rn, e.ename from emp_crap e) order by 1 desc)
6 loop
7 if v_cnt = 0 then
8 v_cnt := rec.rn;
9 end if;
10 end loop;
11 if v_cnt = 0 then
12 raise zero_rows;
13 end if;
14 exception
15 when zero_rows then
16 dbms_output.put_line('No rows');
17 end;
18 /
No rows
PL/SQL procedure successfully completed.
-- Now, let us use the table, which has the data
SQL> declare
2 v_cnt number := 0;
3 zero_rows exception;
4 begin
5 for rec in (select * from
6 (select rownum rn, e.ename from emp e)
7 order by 1 desc)
8 loop
9 if v_cnt = 0 then
10 v_cnt := rec.rn;
11 dbms_output.put_line(v_cnt);
12 end if;
13 end loop;
14 if v_cnt = 0 then
15 raise zero_rows;
16 end if;
17 exception
18 when zero_rows then
19 dbms_output.put_line('No rows');
20 end;
21 /
14
PL/SQL procedure successfully completed.Thx,
Sri -
How to find total no of records in DSO
How to find the total no of records in a DSO?
Hi,
To check the num of entries in DSO,
in DSO the data always comes from Active data table(Since DSO has 3 tables-> New data,Active data, Change log tables)
just right click on DSO and go to manage DSO, then select "Active data table" tab and go to Contents.. There u can see the data which you loaded in to DSO... So there u can get num of entries..
Or
go to TCODE : SE11 and give ur Active DATA table name.. and click display....
then press ctrlshiftF5 to see the contents of tha table....
Thanks And Regars
MAnjunath P -
Old How to find total number of events in an event list?
Hi,
I am developing a j2me application. i Want to find the total number of events in an event list.(ie, If it contains 15 events then it should return length as 15).
Not the length of EVENT LISTS i want to find the Length of EVENTS.
Thanks,
kumarHi,
you can find the number of columns and their order using
the <b>'REUSE_ALV_FIELDCATALOG_MERGE'</b>
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'ITAB'
I_INCLNAME = sy-repid
changing
ct_fieldcat = IT_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif
now describe your fieldcat . and find no of columns.
and their order also..
regards
vijay -
How to find total number of employees for an organisation
Hi Experts,
Need help in finding the total number of employees working in an organization. Please let me know if I need to run a report or if there is any T Code.
Appreciate your help at the earliest.
Regards,
Subbu.Hi
Try this out
T code :Paah
Select the key field Per nr for out put
GO to organizational Assignment select the Employee group for selection
and also Organizational Unit for selection.it will come to the right hand side
Give the input ESG as 1 for active and also input the org unit (dept) u require to
see the list of employees
and press out put for list or else hit list for number of employees
with regards
partha
keep sharing and learning -
Total number of record in database??
Hi,
How to find total number of record in database using Single Query/Statement?
ThanksHere we go, in a Single Statement Block
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 v_cnt NUMBER := 0;
3 v_tot NUMBER := 0;
4 CURSOR cur_tables IS
5 SELECT table_name FROM user_tables;
6 BEGIN
7 DBMS_OUTPUT.ENABLE(1000000);
8 FOR t IN cur_tables
9 LOOP
10 EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM '||t.table_name INTO v_cnt;
11 v_tot := v_tot + v_cnt;
12 END LOOP;
13 DBMS_OUTPUT.PUT_LINE('Total Table Rows: '||v_tot);
14* END;
SQL> /
Total Table Rows: 5850553
PL/SQL procedure successfully completed.
SQL>What use it is is anybody's guess.
Note: This only works on the users own tables, not all the system tables or tables from other schemas in the database. -
Total number of records loaded into ODS and in case of Infocube
hai
i loaded some datarecords from Oracle SS in ODS and Infocube.
My SOurceSytem guy given some datarecords by his selection at Oracle source system side.
how can i see that 'how many data records are loaded into ODS and Infocube'.
i can check in monitor , but that not correct(becz i loaded second , third time by giving the ignore duplicate records). So i think in monitor , i wont get the correct number of datarecords loaded in case of ODS and Infocube.
So is there any transaction code or something to find number records loaded in case of ODS and Infocube .
ps tell me
i ll assing the points
bye
rizwanHAI
I went into ODS manage and see the 'transferred' and 'added' data records .Both are same .
But when i total the added data records then it comes 147737.
But when i check in active table(BIC/A(odsname)00 then toal number of entries come 1,37,738
why it is coming like that difference.......
And in case of infocube , how can i find total number of records loaded into Infocube.(not in infocube).
Like any table for fact table and dimension tables.
pls tell me
txs
rizwan -
Total number of records in given range.
total number of records in given range.
Hi all ,
I have the Requirement as follows.
I Have a Table which Contains Duplicate Dates like
22.11.2006
15.11.2006
31.10.2006
15.09.2006
15.09.2006
14.09.2006
15.09.2006
14.09.2006
16.09.2006
etc...
The input is monday of any week of a Year. Suppose 3 rd week starts from 15.11.2006 and ends to 21.11.2006. Weekly 5 days are working days. If i ienter the 15.09.2006 as input.....
The Required out put is : 5 Records ( In above example 15.09.2006 to 21.09.2006 total Number of records is 5. I mean 15.09.2006 is Found 4 times + 16.09.2006 is found 1 time in the Specied Range.
total: 4+1 = 5 records.)
Simply...my requirement is to find total number of Records(with Duplicates) in the Given range .
thanks in Advance
sivaranga& Krish...this is the code. Where i have to make changes..
this is the program which they given
Report Title: /GIL/ZZKWKBKS
Author: XNIMKARP
Creation Date: 29.09.2006
ZSAO System: <&system> (blue)
ZSAO System Fct.: <&sf> (green)
DER: DER&
HLD: HLD&
Request number:
Description (technical)
===================================================================
Modification History (recent on top / refs: MODnnn+ or MODnnn-)
Modification Number: MODnnn
Modifier: &userid
Modification Date: &
Change object: DER, TPR, Clarify number
Request number:
Description
Modification Number: MOD001
Modifier: &userid
Modification Date: &
Change object: DER, TPR, Clarify number
Request number:
Description
REPORT /GIL/ZZKWKBKS
MESSAGE-ID ?? "....
NO STANDARD PAGE HEADING
LINE-COUNT 65(0)
LINE-SIZE 132.
eject*******************************************************
Data Declaration Section *
TABLE declarations for select-options only *
TABLES: /GIL/ZZKDERMAST ,
/GIL/ZZKCOMBOOK ,
/GIL/ZZKWEEKID .
SELECT-OPTIONS and PARAMETERS *
SELECT-OPTIONS:
S_STRWK FOR /GIL/ZZKWEEKID-STRWK NO INTERVALS . "....
"PARAMETERS:
" P_???? TYPE ????-????? DEFAULT ?, "description ????
" PX_??? AS CHECKBOX "description ????
TYPES *
TYPES:
begin of T_IT_OUTTAB ,
STRWK like /GIL/ZZKCOMBOOK-STRWK ,
CSTMZ like /GIL/ZZKDERMAST-CSTMZ ,
NAME_TEXT like ADRP-NAME_TEXT ,
DERNO like /GIL/ZZKCOMBOOK-DERNO ,
BNAME like /GIL/ZZKCOMBOOK-BNAME ,
HRSBK like /GIL/ZZKCOMBOOK-HRSBK ,
STATS like /GIL/ZZKDERMAST-STATS ,
CLSDT like /GIL/ZZKDERMAST-CLSDT ,
MNTHI like /GIL/ZZKWEEKID-MNTHI ,
QRTRI like /GIL/ZZKWEEKID-QRTRI ,
end of T_IT_OUTTAB .
TYPES:
begin of T_IT_WEEKSUM ,
STRWK like /GIL/ZZKCOMBOOK-STRWK ,
MNTHI like /GIL/ZZKWEEKID-MNTHI ,
QRTRI like /GIL/ZZKWEEKID-QRTRI ,
DEVHRS like /GIL/ZZKCOMBOOK-HRSBK ,
CUSHRS like /GIL/ZZKCOMBOOK-HRSBK ,
TOTHRS like /GIL/ZZKCOMBOOK-HRSBK ,
DVMHRS like /GIL/ZZKCOMBOOK-HRSBK ,
CSMHRS like /GIL/ZZKCOMBOOK-HRSBK ,
TOMHRS like /GIL/ZZKCOMBOOK-HRSBK ,
DVQHRS like /GIL/ZZKCOMBOOK-HRSBK ,
CSQHRS like /GIL/ZZKCOMBOOK-HRSBK ,
TOQHRS like /GIL/ZZKCOMBOOK-HRSBK ,
TOTDER like /GIL/ZZKCOMBOOK-HRSBK ,
TOMDER like /GIL/ZZKCOMBOOK-HRSBK ,
TOQDER like /GIL/ZZKCOMBOOK-HRSBK ,
end of T_IT_WEEKSUM .
TYPES:
begin of T_IT_DEVSUM ,
NAME_TEXT like ADRP-NAME_TEXT ,
HRSBK like /GIL/ZZKCOMBOOK-HRSBK ,
end of T_IT_DEVSUM .
"TYPES: T_FL_??? TYPE ????-?????. "description ???
"TYPES: T_IT_??? TYPE ????-?????. "description ???
VARIABLES *
"DATA: V_??? TYPE ????-?????. "field description
"DATA: VX_??? TYPE ????-?????. "flag description
DATA: VIT_DATATAB TYPE T_IT_OUTTAB occurs 0 with header line.
DATA: VIT_WEEKSUM TYPE T_IT_WEEKSUM occurs 0 with header line.
DATA: VIT_DEVSUM TYPE T_IT_DEVSUM occurs 0 with header line.
constants *
CONSTANTS: C_BR1 TYPE C VALUE '(' ,
C_BR2 TYPE C VALUE ')' ,
C_DASH TYPE C VALUE '-' ,
C_005 TYPE I VALUE '5' ,
C_006 TYPE I VALUE '6' ,
C_030 TYPE I VALUE '30' ,
C_031 TYPE I VALUE '31' ,
C_055 TYPE I VALUE '55' ,
C_056 TYPE I VALUE '56' ,
C_080 TYPE I VALUE '80' ,
C_081 TYPE I VALUE '81' ,
C_105 TYPE I VALUE '105' ,
C_106 TYPE I VALUE '106' ,
C_125 TYPE I VALUE '126' ,
C_130 TYPE I VALUE '130' ,
C_150 TYPE I VALUE '150' .
eject*******************************************************
program section (EVENTS) *
start of database access *
START-OF-SELECTION.
PERFORM FETCH_BOOKING_DATA .
PERFORM FETCH_USER_DATA .
PERFORM WEEKLY_CUMULATION .
TOP-OF-PAGE.
PERFORM WRITE_HEADER .
*& Form FETCH_BOOKING_DATA
text
--> p1 text
<-- p2 text
FORM FETCH_BOOKING_DATA .
select a~STRWK
a~DERNO
a~BNAME
a~HRSBK
b~STATS
b~CLSDT
b~CSTMZ
c~MNTHI
c~QRTRI
into corresponding fields of table VIT_DATATAB
from /GIL/ZZKCOMBOOK as a
inner join /GIL/ZZKDERMAST as b
on bBNAME = aBNAME
and bDERNO = aDERNO
inner join /GIL/ZZKWEEKID as c
on cSTRWK = aSTRWK
where a~STRWK in S_STRWK .
if SY-SUBRC <> 0 .
WRITE /10 TEXT-001.
EXIT .
endif .
ENDFORM. " FETCH_BOOKING_DATA
*& Form FETCH_USER_DATA
text
--> p1 text
<-- p2 text
FORM FETCH_USER_DATA .
DATA:
BEGIN OF LIT_USER OCCURS 0 ,
BNAME like /GIL/ZZKCOMBOOK-BNAME ,
NAME_TEXT like ADRP-NAME_TEXT ,
END OF LIT_USER .
DATA : L_SY_TABIX LIKE SY-TABIX .
LOOP AT VIT_DATATAB .
MOVE-CORRESPONDING VIT_DATATAB TO LIT_USER .
APPEND LIT_USER .
ENDLOOP .
DELETE ADJACENT DUPLICATES FROM LIT_USER COMPARING BNAME .
if LIT_USER[] is not initial .
SELECT BBNAME ANAME_TEXT
INTO corresponding fields of table LIT_USER
FROM ADRP AS A
INNER JOIN USR21 AS B
ON BPERSNUMBER = APERSNUMBER
for all entries in LIT_USER
WHERE B~BNAME = LIT_USER-BNAME .
endif.
loop at VIT_DATATAB .
L_SY_TABIX = SY-TABIX .
read table LIT_USER with key BNAME = VIT_DATATAB-BNAME .
if sy-subrc = 0 .
VIT_DATATAB-NAME_TEXT = LIT_USER-NAME_TEXT .
modify VIT_DATATAB index L_SY_TABIX .
endif .
endloop.
ENDFORM. " FETCH_USER_DATA
*& Form WEEKLY_CUMULATION
text
--> p1 text
<-- p2 text
FORM WEEKLY_CUMULATION .
DATA:
L_PREV_MNTHI like /GIL/ZZKWEEKID-MNTHI ,
L_PREV_QRTRI like /GIL/ZZKWEEKID-QRTRI ,
LFL_DATATAB_WA TYPE T_IT_OUTTAB .
SORT VIT_DATATAB BY STRWK CSTMZ NAME_TEXT .
loop at VIT_DATATAB .
move-corresponding VIT_DATATAB to LFL_DATATAB_WA .
AT END OF NAME_TEXT .
SUM .
VIT_DEVSUM-NAME_TEXT = VIT_DATATAB-NAME_TEXT .
VIT_DEVSUM-HRSBK = VIT_DATATAB-HRSBK .
APPEND VIT_DEVSUM .
ENDAT .
AT END OF CSTMZ .
SUM .
if LFL_DATATAB_WA-CSTMZ IS INITIAL .
VIT_DEVSUM-NAME_TEXT = TEXT-011 .
else.
VIT_DEVSUM-NAME_TEXT = TEXT-012 .
endif.
VIT_DEVSUM-HRSBK = VIT_DATATAB-HRSBK .
APPEND VIT_DEVSUM .
ENDAT .
AT END OF STRWK .
CLEAR: VIT_WEEKSUM-DEVHRS ,
VIT_WEEKSUM-CUSHRS ,
VIT_WEEKSUM-TOTHRS .
VIT_WEEKSUM-STRWK = LFL_DATATAB_WA-STRWK .
VIT_WEEKSUM-MNTHI = LFL_DATATAB_WA-MNTHI .
VIT_WEEKSUM-QRTRI = LFL_DATATAB_WA-QRTRI .
SUM .
VIT_WEEKSUM-TOTHRS = VIT_DATATAB-HRSBK .
VIT_DEVSUM-NAME_TEXT = TEXT-013 .
VIT_DEVSUM-HRSBK = VIT_DATATAB-HRSBK .
APPEND VIT_DEVSUM .
SELECT SUM( HRSBK )
INTO VIT_WEEKSUM-CUSHRS
from /GIL/ZZKWEKBK
where STRWK = LFL_DATATAB_WA-STRWK
AND CSTMZ NE SPACE .
VIT_WEEKSUM-DEVHRS =
VIT_WEEKSUM-TOTHRS - VIT_WEEKSUM-CUSHRS .
IF LFL_DATATAB_WA-MNTHI <> L_PREV_MNTHI .
if week falls in differnet month .
L_PREV_MNTHI = LFL_DATATAB_WA-MNTHI .
CLEAR: VIT_WEEKSUM-DVMHRS ,
VIT_WEEKSUM-CSMHRS ,
VIT_WEEKSUM-TOMHRS .
SELECT SUM( HRSBK )
INTO VIT_WEEKSUM-DVMHRS
from /GIL/ZZKWEKBK
where MNTHI = LFL_DATATAB_WA-MNTHI
AND CSTMZ EQ SPACE .
SELECT SUM( HRSBK )
INTO VIT_WEEKSUM-CSMHRS
from /GIL/ZZKWEKBK
where MNTHI = LFL_DATATAB_WA-MNTHI
AND CSTMZ NE SPACE .
VIT_WEEKSUM-TOMHRS =
VIT_WEEKSUM-DVMHRS + VIT_WEEKSUM-CSMHRS .
ENDIF .
IF LFL_DATATAB_WA-QRTRI <> L_PREV_QRTRI .
L_PREV_QRTRI = LFL_DATATAB_WA-QRTRI .
SELECT SUM( HRSBK )
INTO VIT_WEEKSUM-DVQHRS
from /GIL/ZZKWEKBK
where QRTRI = LFL_DATATAB_WA-QRTRI
AND CSTMZ EQ SPACE .
SELECT SUM( HRSBK )
INTO VIT_WEEKSUM-CSQHRS
from /GIL/ZZKWEKBK
where QRTRI = LFL_DATATAB_WA-QRTRI
AND CSTMZ NE SPACE .
VIT_WEEKSUM-TOQHRS =
VIT_WEEKSUM-DVQHRS + VIT_WEEKSUM-CSQHRS .
ENDIF .
APPEND VIT_WEEKSUM .
NEW-PAGE .
PERFORM WRITE_WEEKLY_STATISTICS .
PERFORM WRITE_DEVELOPER_STATISTICS .
ENDAT .
endloop .
ENDFORM. " WEEKLY_CUMULATION
*& Form WRITE_DEVELOPER_STATISTICS
text
--> p1 text
<-- p2 text
FORM WRITE_DEVELOPER_STATISTICS .
SKIP 2.
WRITE AT: /C_005 TEXT-014 .
ULINE AT /C_005(C_125) .
WRITE AT:/C_005 SY-VLINE ,
C_006 TEXT-014 ,
C_080 SY-VLINE ,
C_081 TEXT-015 ,
C_130 SY-VLINE .
WRITE AT: C_005 SY-VLINE ,
C_080 SY-VLINE ,
C_130 SY-VLINE .
ULINE AT /C_005(C_125) .
loop at VIT_DEVSUM .
CASE VIT_DEVSUM-NAME_TEXT .
WHEN TEXT-011 .
WRITE AT:/C_005 SY-VLINE ,
C_006 VIT_DEVSUM-NAME_TEXT COLOR COL_NEGATIVE ,
C_080 SY-VLINE ,
C_081 VIT_DEVSUM-HRSBK COLOR COL_NEGATIVE ,
C_130 SY-VLINE .
WHEN TEXT-012 .
WRITE AT:/C_005 SY-VLINE ,
C_006 VIT_DEVSUM-NAME_TEXT COLOR COL_NEGATIVE ,
C_080 SY-VLINE ,
C_081 VIT_DEVSUM-HRSBK COLOR COL_NEGATIVE ,
C_130 SY-VLINE .
WHEN TEXT-013 .
WRITE AT:/C_005 SY-VLINE ,
C_006 VIT_DEVSUM-NAME_TEXT COLOR COL_TOTAL ,
C_080 SY-VLINE ,
C_081 VIT_DEVSUM-HRSBK COLOR COL_TOTAL ,
C_130 SY-VLINE .
WHEN OTHERS .
WRITE AT:/C_005 SY-VLINE ,
C_006 VIT_DEVSUM-NAME_TEXT ,
C_080 SY-VLINE ,
C_081 VIT_DEVSUM-HRSBK ,
C_130 SY-VLINE .
ENDCASE .
WRITE AT: C_005 SY-VLINE ,
C_080 SY-VLINE ,
C_130 SY-VLINE .
ULINE AT /C_005(C_125) .
endloop .
REFRESH VIT_DEVSUM .
CLEAR VIT_DEVSUM .
ENDFORM. " WRITE_DEVELOPER_STATISTICS
*& Form WRITE_WEEKLY_STATISTICS
text
--> p1 text
<-- p2 text
FORM WRITE_WEEKLY_STATISTICS .
SKIP 2.
ULINE AT C_005(C_125) .
WRITE AT: /C_005 SY-VLINE ,
C_006 TEXT-003 ,
C_030 SY-VLINE ,
C_031 TEXT-004 ,
C_055 SY-VLINE ,
C_056 TEXT-005 ,
C_080 SY-VLINE ,
C_081 TEXT-006 ,
C_105 SY-VLINE ,
C_106 TEXT-007 ,
C_130 SY-VLINE .
WRITE AT: /C_005 SY-VLINE ,
C_030 SY-VLINE ,
C_031 /GIL/ZZKWEEKID-STRWK ,
41 C_DASH ,
43 /GIL/ZZKWEEKID-ENDWK ,
C_055 SY-VLINE ,
C_056 VIT_WEEKSUM-MNTHI ,
C_080 SY-VLINE ,
C_081 VIT_WEEKSUM-QRTRI ,
C_105 SY-VLINE ,
C_130 SY-VLINE .
WRITE AT: /C_005 SY-VLINE ,
C_030 SY-VLINE ,
C_055 SY-VLINE ,
C_080 SY-VLINE ,
C_105 SY-VLINE ,
C_130 SY-VLINE .
ULINE AT C_005(C_125) .
WRITE AT: /C_005 SY-VLINE ,
C_006 TEXT-008 ,
C_030 SY-VLINE ,
C_031 VIT_WEEKSUM-DEVHRS ,
C_055 SY-VLINE ,
C_056 VIT_WEEKSUM-DVMHRS ,
C_080 SY-VLINE ,
C_081 VIT_WEEKSUM-DVQHRS ,
C_105 SY-VLINE ,
C_130 SY-VLINE .
WRITE AT: /C_005 SY-VLINE ,
C_030 SY-VLINE ,
C_055 SY-VLINE ,
C_080 SY-VLINE ,
C_105 SY-VLINE ,
C_130 SY-VLINE .
ULINE AT C_005(C_125) .
WRITE AT: /C_005 SY-VLINE ,
C_006 TEXT-009 ,
C_030 SY-VLINE ,
C_031 VIT_WEEKSUM-CUSHRS ,
C_055 SY-VLINE ,
C_056 VIT_WEEKSUM-CSMHRS ,
C_080 SY-VLINE ,
C_081 VIT_WEEKSUM-CSQHRS ,
C_105 SY-VLINE ,
C_130 SY-VLINE .
WRITE AT: /C_005 SY-VLINE ,
C_030 SY-VLINE ,
C_055 SY-VLINE ,
C_080 SY-VLINE ,
C_105 SY-VLINE ,
C_130 SY-VLINE .
ULINE AT C_005(C_125) .
WRITE AT: /C_005 SY-VLINE COLOR COL_TOTAL,
C_006 TEXT-010 COLOR COL_TOTAL,
C_030 SY-VLINE COLOR COL_TOTAL ,
C_031 VIT_WEEKSUM-TOTHRS COLOR COL_TOTAL,
C_055 SY-VLINE COLOR COL_TOTAL,
C_056 VIT_WEEKSUM-TOMHRS COLOR COL_TOTAL,
C_080 SY-VLINE COLOR COL_TOTAL,
C_081 VIT_WEEKSUM-TOQHRS COLOR COL_TOTAL,
C_105 SY-VLINE COLOR COL_TOTAL,
C_130 SY-VLINE COLOR COL_TOTAL.
WRITE AT: /C_005 SY-VLINE ,
C_030 SY-VLINE ,
C_055 SY-VLINE ,
C_080 SY-VLINE ,
C_105 SY-VLINE ,
C_130 SY-VLINE .
ULINE AT C_005(C_125) .
ENDFORM. " WRITE_WEEKLY_STATISTICS
*& Form WRITE_HEADER
text
--> p1 text
<-- p2 text
FORM WRITE_HEADER .
SKiP 1 .
SELECT SINGLE *
FROM /GIL/ZZKWEEKID
WHERE STRWK = VIT_WEEKSUM-STRWK .
WRITE AT: 5 TEXT-002 INTENSIFIED ON .
WRITE AT: 47 /GIL/ZZKWEEKID-MNTHI ,
55 /GIL/ZZKWEEKID-WEEKI ,
65 C_BR1 ,
67 /GIL/ZZKWEEKID-STRWK ,
78 C_DASH ,
80 /GIL/ZZKWEEKID-ENDWK ,
91 C_BR2
INTENSIFIED ON .
ENDFORM. " WRITE_HEADER -
How to find total recs in a local table for a particular condition
Hi,
How to find total recs in a local table for a particular condition?
Thanks,
CDWell, you may want to try this as well, and compare to the LOOP way. Not sure what kind of overhead you may get doing this way. Here ITAB is our main internal table, and ITAB_TMP is a copy of it. Again I think there may be some overhead in doing the copy. Next, delete out all records which are the reverse of your condition. Then whatever is left is the rows that you want to count. Then simply do a LINES operator on the internal table, passing the number of lines to LV_COUNT.
data: itab type table of ttab.
data: itab_tmp type table of ttab.
itab_tmp[] = itab[].
delete table itab_tmp where fld1 <> 'A'.
lv_count = lines( itab_tmp ).
Regards,
Rich Heilman -
How to find the number of entries in a master data table
Hi Experts,
I am trying to find the entries in 0CUSTOMER master data.
BW>LISTCUBE>Data target: 0CUSTOMER and selected the fields that I need.
I would like to know how to find the "number of entrees". I tried to run the SUM for a count field, but it is taking forever as there are huge number of records .Hi Dev,
Go to the change/display mode of the info object (0CUSTOMER) in your case. Go to the Master data/Text tab. Here you will find the master data tables according to your settings (P orQ or X or Y). Double click on the table name and it will take you to the SE11 display. From there, you can check the number of records as you do in any transparent table.
Hope this helps.
Thanks and Regards
Subray Hegde
Maybe you are looking for
-
Hi - I'm trying to register for an iCloud account (I've just had a baby and am terrified I'm going to lose all my photos of him!) but when I try and register, it tells me it needs an email address so I go to edit my username and try and amend it so m
-
Outlook invitations have incorrect date
Hope someone can help, when I create meeting rooms and send out the invitations to all participants the time and date of the 'event' is displayed correctly in the email message generated by Adobe Connect Pro, but if I want to send out a calendar remi
-
Why is the entire song is in the right channel?!
I thought my headphones were broken! In a only single file in GarageBand, the entire song is in the right channel. All of the tracks but 2 are software instruments that I recorded from a MIDI keyboard. The other 2 are loops from the library. Every tr
-
Photos on Facebook are all black, likewise full screen Youtube videos.
When I click on a Facebook photo, it quickly shows a full size blurry sketch, then turns all black. I can watch Youtube videos small, but when I make them full screen, they are all black. Without first uninstalling Firefox, I downloaded Firefox and i
-
My PC has windows 7 64-bit. I can see my iphone in windows explorer, but I cannot see any folders underneath. When I plug my iphone into a windows vista pc, I can see the iphone and the folders with pictures. Does anyone else using windows 7 have