Total number of Subscribers in EPF Challan Forms
Dear Friends,
I need to calculate the total number of subscribers under each EPF trust. Can you please help me to extract the total number of subscribers under each trust so that I can use the same in my EPF challan.
Regards,
AXE
Hi Philippe,
we can only determine the page size when its already loaded with data and its published/sent by ADS.
i.e., the no of pages increases based on the data you feed to the form which mean by the time the form/script determines the number of pages it has published dynamically data is already there. so your requirement cannot be solved in that approach.
the next approach which I can think of is as follows.
lets say you display the invoices data as a table in the form.
so then lets specify the row height to .5" which mean in a form with content area size of 15" we can display 30 records.
so in the interface or the source program count the number of records per customer if they are < (12pages X 30 records = 360) leave them as they are else remove them for the list and process the data for other customers.
As per your other query of having OMR on the form I have no Idea, I never worked on that but if its just any other type of barcode that shouldn't have any problem.
Hope this helps you,
Cheers,
Sai
Similar Messages
-
Need to Find Total number of InfoPart form in our Web application
Hello,
We have to find total number of Infopath forms in our web application. IS there any Power sheell Scripts or anuthing which can output the Infopath Forms location and file count .
Thanks
KundanHow about something like:
Get-SPWebApplication http://yourWebAppUrl |
Get-SPSite -Limit All |
Get-SPWeb -Limit All |
Select -ExpandProperty Lists |
Where { $_.GetType().Name -eq "SPDocumentLibrary" -AND -NOT $_.Hidden } |
Select -ExpandProperty Items |
Where { $_.Name -LIKE "*.xsn" }
Select {$_.Web.Url}, Url
The above will list all of the files. Do you need counts by library, by site or other?
Mike Smith TechTrainingNotes.blogspot.com -
How to get the total number of occurrences based on the value of a column.
Hello everyone,
This is the first time that I will ask question here on your forum but has been following several threads ever since. I guess that now is my turn to ask a question. So anyway here is the thing, I have a query that should return count the number of rows depending on the value of SLOT. Something like this:
WIPDATAVALUE SLOT N M
1-2 TRALTEST43S1 1 3
1-2 TRALTEST43S1 2 3
3 TRALTEST43S1 3 3
4-6 TRALTEST43S2 1 4
4-6 TRALTEST43S2 2 4
4-6 TRALTEST43S2 3 4
7 TRALTEST43S2 4 4-----
As you can see above, on the SLOT TRALTEST43S1, there are three occurrences so M (Total number of occurrences) should be three and that column N should count it. Same goes with the SLOT TRALTEST43S2. This is the query that I have so far:
SELECT DISTINCT
WIPDATAVALUE, SLOT
, LEVEL AS n
, m
FROM
SELECT
WIPDATAVALUE
, SLOT
, (dulo - una) + 1 AS m
FROM
SELECT
WIPDATAVALUE
, SLOT
, CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, 1, INSTR(wipdatavalue, '-')-1) END AS una
, CASE WHEN INSTR(wipdatavalue, '-') = 0 THEN wipdatavalue ELSE SUBSTR(wipdatavalue, INSTR(wipdatavalue, '-') + 1) END AS dulo
FROM trprinting
WHERE (containername = :lotID OR SLOT= :lotID) AND WIPDATAVALUE LIKE :wip
) CONNECT BY LEVEL <= m
ORDER BY wipdatavalue;And that it results to something like this:
WIPDATAVALUE SLOT N M
1-2 TRALTEST43S1 1 2
1-2 TRALTEST43S1 2 2
3 TRALTEST43S1 1 1
4-6 TRALTEST43S2 1 3
4-6 TRALTEST43S2 2 3
4-6 TRALTEST43S2 3 3
7 TRALTEST43S2 1 1-----
I think that my current query is basing its M and N results on WIPDATAVALUE and not the SLOT that is why I get the wrong output. I have also tried to use the WITH Statement and it works well but unfortunately, our system cant accept subquery factoring.
I know you guys will be helping out because you are all awesome. Thanks everyone
Edited by: 1001275 on Apr 19, 2013 8:07 PM
Edited by: 1001275 on Apr 19, 2013 8:18 PMHi,
Sorry, it's still not clear what you want.
Are you saying that, given this table:
CREATE TABLE trprinting
WIPDATAVALUE VARCHAR2(255)
, SLOT VARCHAR2(255)
INSERT INTO trprinting (wipdatavalue, slot) VALUES ('1-2', 'TRALTEST43S1');
INSERT INTO trprinting (wipdatavalue, slot) VALUES ('3', 'TRALTEST43S1');
INSERT INTO trprinting (wipdatavalue, slot) VALUES ('4-6', 'TRALTEST43S2');
INSERT INTO trprinting (wipdatavalue, slot) VALUES ('7', 'TRALTEST43S2');you want to produce this output:
WIPDATAVALUE SLOT N M
1-2 TRALTEST43S1 1 3
1-2 TRALTEST43S1 2 3
3 TRALTEST43S1 3 3
4-6 TRALTEST43S2 1 4
4-6 TRALTEST43S2 2 4
4-6 TRALTEST43S2 3 4
7 TRALTEST43S2 4 4? If so, here's one way:
WITH got_numbers AS
SELECT wipdatavalue
, slot
, TO_NUMBER ( SUBSTR ( wipdatavalue
, 1
, INSTR ( wipdatavalue || '-'
) - 1
) AS low_number
, TO_NUMBER ( SUBSTR ( wipdatavalue
, 1 + INSTR ( wipdatavalue
) AS high_number
FROM trprinting
SELECT wipdatavalue
, slot
, ROW_NUMBER () OVER ( PARTITION BY slot
ORDER BY low_number
) AS n
, COUNT (*) OVER ( PARTITION BY slot ) AS m
FROM got_numbers
CONNECT BY LEVEL <= high_number + 1 - low_number
AND low_number = PRIOR low_number
AND PRIOR SYS_GUID () IS NOT NULL
ORDER BY low_number
, n
;Much of the complexity here is caused by storing 2 numbers in 1 VARCHAR2 column, wipdatavalue. Relational databases work best when there is no more than 1 item in any given column of any given row. This is so basic to datbase design that it is called First Normal Form. Also, numbers belong in NUMBER columns, not VARCHAR2. If you stored your data like that in the fist place, then you wouldn't need the sub-query I called got_numbers, which is about 60% of the code above. (That could be reduced by replacing SUSTR and INSTR with the less efficient REGEGP_SUBSTR.) -
How to get total number of result count for particular key on cluster
Hi-
My application requirement is client side require only limited number of data for 'Search Key' form total records found in cluster. Also i need 'total number of result count' for that key present on the custer.
To get subset of record i'm using IndexAwarefilter and returning only limited set each individual node. though i get total number of records present on the individual node, it is not possible to return this count to client form IndexAwarefilter (filter return only Binary set).
Is there anyway i can get this number (total result size) on client side without returning whole chunk of data?
Thanks in advance.
Prashantuser11100190 wrote:
Hi,
Thanks for suggesting a soultion, it works well.
But apart from the count (cardinality), the client also expects the actual results. In this case, it seems that the filter will be executed twice (once for counting, then once again for generating actual resultset)
Actually, we need to perform the paging. In order to achieve paging in efficient manner we need that filter returns only the PAGESIZE records and it also returns the total 'count' that meets the criteria.
If you want to do paging, you can use the LimitFilter class.
If you want to have paging AND total number of results, then at the moment you have to use two passes if you want to use out-of-the-box features because LimitFilter does not return the total number of results (which by the way may change between two page retrieval).
What we currently do is, the filter puts the total count in a static variable and but returns only the first N records. The aggregator then clubs these info into a single list and returns to the client. (The List returned by aggregator contains a special entry representing the count).
This is not really a good idea because if you have more than one user doing this operation then you will have problems storing more than one values in a single static variable and you used a cache service with a thread-pool (thread-count set to larger than one).
We assume that the aggregator will execute immediately after the filter on the same node, this way aggregator will always read the count set by the filter.
You can't assume this if you have multiple client threads doing the same kind of filtering operation and you have a thread-pool configured for the cache service.
Please tell us if our approach will always work, and whether it will be efficient as compared to using Count class which requires executing filter twice.
No it won't if you used a thread-pool. Also, it might happen that Coherence will execute the filtering and the aggregation from the same client thread multiple times on the same node if some partitions were newly moved to the node which already executed the filtering+aggregation once. I don't know anything which would even prevent this being executed on a separate thread concurrently.
The following solution may be working, but I can't fully recommend it as it may leak memory depending on how exactly the filtering and aggregation is implemented (if it is possible that a filtering pass is done but the corresponding aggregation is not executed on the node because of some partitions moved away).
At sending the cache.aggregate(Filter, EntryAggregator) call you should specify a unique key for each such filtering operation to both the filter and the aggregator.
On the storage node you should have a static HashMap.
The filter should do the following two steps while being synchronized on the HashMap.
1. Ensure that a ConcurrentLinkedQueue object exists in a HashMap keyed by that unique key, and
2. Enqueue the total number count you want to pass to the aggregator into that queue.
The parallel aggregator should do the following two steps while being synchronized on the HashMap.
1. Dequeue a single element from the queue, and return it as a partial total count.
2. If the queue is now empty, then remove it from the HashMap.
The parallel aggregator should return the popped number as a partial total count as part of the partial result.
The client side of the parallel aware aggregator should sum the total counts in the partial result.
Since the enqueueing and dequeueing may be interleaved from multiple threads, it may be possible that the partial total count returned in a result does not correspond to the data in the partial result, so you should not base anything on that assumption.
Once again, that approach may leak memory based on how Coherence is internally implemented, so I can't recommend this approach but it may work.
Another thought is that since returning entire cached values from an aggregation is more expensive than filtering (you have to deserialize and reserialize objects), you may still be better off by running a separate count and filter pass from the client, since for that you may not need to deserialize entries at all, so the cost on the server may be lower.
Best regards,
Robert -
Total number lines, in an alv (REUSE_ALV_GRID_DISPLAY)
Hi,
i want to know, if it´s possible to show the total number of lines displayed in an alv. I´not not sure if that, is an event of the table gt_events[] (maybe the end_of_list one???)
I would like to show this total, like an status message...
Thanks in advance
Carlesreport ztest_alv1 .
type-pools: slis.
data:
ls_fieldcat type slis_fieldcat_alv,
lt_fieldcat type slis_t_fieldcat_alv,
lt_sort type slis_t_sortinfo_alv,
ls_sort type slis_sortinfo_alv.
data: v_line type i,
lines(3) type c.
DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
data: it_events type slis_t_event,
x_events type slis_alv_event.
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
end of itab.
itab-vbeln = '12345'.
itab-posnr = '10'.
append itab.
clear itab.
itab-vbeln = '12345'.
itab-posnr = '11'.
append itab.
clear itab.
itab-vbeln = '12345'.
itab-posnr = '12'.
append itab.
clear itab.
itab-vbeln = '12356'.
itab-posnr = '10'.
append itab.
clear itab.
itab-vbeln = '12356'.
itab-posnr = '11'.
append itab.
clear itab.
itab-vbeln = '12356'.
itab-posnr = '12'.
append itab.
clear itab.
describe table itab lines v_line.
lines = v_line.
PERFORM E04_COMMENT_BUILD USING GT_LIST_TOP_OF_PAGE[].
x_events-name = 'TOP_OF_PAGE'.
x_events-form = 'TOP_OF_PAGE'.
append x_events to it_events.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
changing
ct_fieldcat = lt_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.
ls_sort-fieldname = 'VBELN'.
ls_sort-up = 'X'.
*ls_sort-group = 'UL'.
append ls_sort to lt_sort.
clear ls_sort.
ls_sort-fieldname = 'POSNR'.
ls_sort-up = 'X'.
*ls_sort-group = '*'.
append ls_sort to lt_sort.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = lt_fieldcat
it_sort = lt_sort
it_events = it_events
tables
t_outtab = itab.
FORM E04_COMMENT_BUILD USING E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'NO of lines'.
LS_LINE-INFO = lines.
APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
ENDFORM.
* FORM TOP_OF_PAGE *
form top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
I_LOGO = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
endform. "top_of_page
check this code..
regards
vijay -
Add a count to an ALV grid of the total number of lines
Hi There
I have a really long ALV report which prints lots of records. How can I add a total number of records count to appear in the header?
I use the Grid display function to call the ALV grid.
Any help appreciatedHi,
You can do as below :
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
* Form TOP-OF-PAGE *
* ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
* Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
* Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
* Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
* i_logo = 'Z_LOGO'.
endform.
Thanks,
Sriram Ponna. -
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 -
Total number of pages before generating the PDF - OMR
Dear all,
We are facing the following problem. We want to apply OMR (optical mark recognition) barcoding on a batch of invoices.
Basically there are two steps in the proces:
- Fetch the batch of invoices created during the day, let's say 1000 invoices.
- Calculate for this batch of invoices the total number of pages per customer. 1 customer can have multiple invoices per day.
- If the number of pages per customer > 12, remove the invoices from the total batch (1000 invoices become then 800 for example).
- Apply OMR logic on the remaining 800.
My question is regarding step 2. The calculation of the total number of pages per customer. Is it possible to get the total number of pages before generating the PDF? Or do we have to 'simulate' the PDF to get to this number?
Another question I have, does anybody have experience implementing OMR using adobe forms? Any experience to share?
Thanks for your feedback
SimonHi Philippe,
we can only determine the page size when its already loaded with data and its published/sent by ADS.
i.e., the no of pages increases based on the data you feed to the form which mean by the time the form/script determines the number of pages it has published dynamically data is already there. so your requirement cannot be solved in that approach.
the next approach which I can think of is as follows.
lets say you display the invoices data as a table in the form.
so then lets specify the row height to .5" which mean in a form with content area size of 15" we can display 30 records.
so in the interface or the source program count the number of records per customer if they are < (12pages X 30 records = 360) leave them as they are else remove them for the list and process the data for other customers.
As per your other query of having OMR on the form I have no Idea, I never worked on that but if its just any other type of barcode that shouldn't have any problem.
Hope this helps you,
Cheers,
Sai -
Total Number of Pages with page exception
Hi all,
Currently a have a form that requires a page number to start on the second page. I've done this via DAL script
#PCOUNT +=1;
return(#PCOUNT);
The problem now lies in the total number of pages. Is there a way for me to get the total number of pages on my form without taking the first page into consideration? Thanks!Haven't tried this but I think you could use the @ function to retrieve the Form Page Num Of field value.
Copied this from the DAL help:
You are here: Function Reference > Alphabetical Listing > Other > @
Use this function to return the current value contained in a section field. The @ function is also called the get field function. The @ symbol is used because it is easy to recognize in script statements and it reduces the amount of typing required.
You can use this function to get text values from the special page numbering fields, FORMSET PAGE NUM, FORMSET PAGE NUM OF, FORM PAGE NUM, and FORM PAGE NUM OF.
Note
Although you can also set these page numbering fields, these fields are maintained by the system and the value you set them to will be overwritten.
You can also use this function to get page number field values within scripts that execute during the batch printing process. You can use this, for instance, during the Banner processing with the GenPrint program to check the page number fields on certain pages.
Keep in mind that during GenData processing, page numbering is not usually done unless you are also doing single-step printing. Even then, page numbering does not occur until the print process begins.
Syntax
@(Field, Section, Form, Group)
Parameter
Description
Field
Enter the name of a section field. The default is the current field.
Section
Enter the name of a section that contains the field named. The default is the current section.
Form
Enter the name of a form that contains the section and/or field named. The default is the current form.
Group
Enter the name of the form group that contains the form, section, or field. The default is the current group.
The system uses the parameters you provide to search for one field on a section and return that field’s data. If the field is defined as a numeric data type, the system returns a number. Otherwise, the result is a string of text.
Note
If you omit the Field parameter, make sure you include quotation marks, as shown in the second and third example below.
Example
For these examples, assume the current field value is 1234.23 and is named MyField. Also, assume that a second occurrence of MyField appears on the form, MyForm, and contains the value automobile.
For the third example, assume the current form is the third page of the form set being processed. For the fourth example, assume the section Header3 is on the second page of the form ABC.
Function
Result
Explanation
Return(@( ))
1234.23
Returns the value in the current field.
Return(@("MyField"))
1234.23
Returns the value in the named field, located on the current section.
Return ( @("Formset Page Num") )
3
Returns the value in the field named "Formset Page Num" on the current section.
Return ( @(Form Page Num"), "Header3","ABC") )
2
Returns the value in the field named "Form Page Num" in section, "Header3" on form "ABC". -
How to count Total Number of Pages in SAPSCRIPT
Hi,
Iam unable to print total number of pages in the First Page of SAPSCRIPT.Iam writing the Logic in the Varibale window.
Please kindly help me.
In First Page , The preview is
Page 1 of 1-
In Second Page , Teh Preview is
Page 2 of 2
The Logic is ....
1. Variable window of Script
PERFORM CHECK_PAGE IN PROGRAM ZZZF_SAPSCRIPT_EXITS
USING &SAPSCRIPT-FORMPAGES&
CHANGING &WS_PAGE&
ENDPERFORM
Page &PAGE(C)& of &WS_PAGE&
2. Program
FORM check_page TABLES p_pagein STRUCTURE itcsy
p_pageout STRUCTURE itcsy.
DATA : p_i TYPE sypagno.
READ TABLE p_pagein INDEX 1.
IF sy-subrc = 0 .
p_i = p_pagein-value.
p_i = p_i - 1 .
READ TABLE p_pageout INDEX 1.
CLEAR p_pageout-value.
*p_pageout-value = p_i+0(3).
WRITE P_I TO p_pageout-value.
condense p_pageout-value no-gaps.
MODIFY p_pageout INDEX sy-tabix.
ENDIF.
ENDFORM. "check_page
Please help me ASAP.
Regards,
Deepthi.Try this
'On The Form'
IF &NEXTPAGE& EQ 0
DEFINE &DECRE& := '2'
PERFORM SET_TEXT_SYMBOL IN PROGRAM YSS20200
USING &SAPSCRIPT-FORMPAGES&
USING &DECRE&
ENDPERFORM
ENDIF
'In The Program'
DATA : BEGIN OF script_table OCCURS 0.
INCLUDE STRUCTURE itcsy.
DATA END OF script_table.
Used to modify total pages so they print correctly
FORM set_text_symbol TABLES input_table LIKE script_table[]
output_table LIKE script_table[].
DATA: pageno TYPE i,
intCnt type i,
chrPg(2) type c.
READ TABLE input_table INDEX 1.
MOVE input_table-VALUE TO pageno.
READ TABLE input_table INDEX 2.
MOVE input_table-VALUE TO intCnt.
subtract intcnt from pageno.
write pageno to chrpg.
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
NAME = 'FORMPAGES'
VALUE = chrpg
VALUE_LENGTH = 0
REPLACE_SYMBOLS = ' '
ENDFORM. -
Total number of pages in script
how do u represent total number of pages in documents,
2. in need logo ontheright handside of corner how do u do that
plz explain clearlyHi rajesh,
<b>1. To represent total number of pages in documents use
&SAPSCRIPT-FORMPAGES&:
This field contains a number representing the total number of pages of the currently formatted form (any output between START_FORM and END_FORM). The page counter mode (START, INC, HOLD) of the individual pages is ignored.
2. To have logo ontheright handside of corner
Basically u have four type of windows
main , constant , variable and graph
create a window of type GRAPH
place the window on right hand corner of u r page
and place u r image in this window</b> -
Count the number of values selected in a form
Hello
I need to count the number of values selected in a form.
Here is my form dump:
I want to count the values circled in red.
So the number I want in this case is 5.
Any suggestions?Aegis,
Yeah, good point. Here is a minor tweak:
<cfset total = 0>
<cfloop collection="#FORM#" item="field">
<cfif field NOT IS "fieldnames">
<cfset total += ListLen( FORM[ field ] )>
</cfif>
</cfloop>
<cfoutput>
<p>Total: #total#</p>
</cfoutput>
-Carl V. -
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. -
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 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,
CKI 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
Maybe you are looking for
-
Viewing photos from EXT drive in iPhoto, please help!
Is there any way to view my photos in iPhoto if I store some of them on an external drive (without having to copy them into the iPhoto library on the internal drive)? There's a lot more room on my external drives and my computer is full; this would s
-
Hi, we need the credit control area rank invoices in F110. ACC field is not ready to use in this transaction and is not in reports of it. Do you know what is a field toi substitute this field or whaths is the alternative solution for this question? T
-
ITunes available app update count is incorrect - off by 1
so for the past couple weeks i've been having this problem with itunes app updates. on the left-hand side of itunes where "apps" is, the number that pops up next to it to show the available updates to be downloaded is off by one. if i click and try t
-
Hello All, I just installed Ecc6.0 ABAP+JAVA, Windows SQL 2005. Install went ok, however I am not able to see the J2EE process table in the MMC, I wanted to know if anyone knows of how to get that view? Regards King
-
Expandable menu buttons are not working in transaction iviews
Hi, I created the transaction iviews and it connects to the backend. I can able to see all the data's but when I click the Menu, its not expanding. I activated the all the services as per the note517484 and 1088717. When I go to the Webgui service