Erecruitment POWL based Reports fetching no results
Hi There,
We are using ERec on same server as HR.. and we have ECC 6.0 enhacement Package 4.
We are able to process candidates against activities though when we access Reports from "Activities with Requisition and Candidate".. there are no results..
I have tried filling in different combination of selection criteria but it simply fails to fetch any results.. I also checked SLG1 for possible logs.. apart from few error for Indexing issue( periodic indexing report).. nothing else is coming up there.
I also tried to find out any basic setup steps to activate/configure standard reports.. but strange enough they were working and now they have stopped working. Any clue what/where needs to be checked.
Thanks for your time,
Rgds
One thing you might do is this. Don't display the Title View in your reports. You can do this either by deleting the views from the Compound Layout or, within Edit Dashboard, by selecting only the view that contains the report. (Obviously, if your report has several view, you would need to choose the first route.)
Instead of the Title View, do this: In the Dashboard section which contains both reports, click on the "Rename" button. Type the name of that best illustrates both reports, check the "Display Section Heading" checkbox and click "OK."
Next, click the "Rename" button again and this time go in to the formatting section to format as required. (Note: After you check the checkbox, if you don't click "OK" right after, the check mark won't stick. So click "OK" and then go back in to do any formatting you wish.)
This method allows the user to collapse the section and still see what the section is about. This is good practice when you have several reports in one dashboard page. Even collapsing all the sections, you can see what is "inside" and expand the appropriate section.
HTH,
Similar Messages
-
Crystal Report is very slow to fetch the results of a Query used in Command
Hello All,
We have a query which is used in command object in Business Objects Crystal reports XI. This report is executed against IBM DB2 database. It is taking 40 min to getback the results. Here is the Query. Please suggest how can i improve the performance of this query in report as another reporting tool is taking 2-3 min time to fetch the results with the same query.
SELECT
A1.CARR_NUM , A1.CST_CTR_NUM ,A1.CLM_CLOSE_STS_CD , A1.CLM_RJCT_STS_CD ,A1.CLM_VOID_STS_CD , A1.PMT_MTCH_DT , A1.ASC_TRANS_TYP_CD , A1.DRUG_DESC ,
A1.BATCH_NUM , T5.TPA_RJCT_CD , A1.DIV_NUM , A1.INVC_NUM , A1.SERVICE_DT , A1.ACTL_REFILL_NUM , A1.CLM_DSPSN_CD , A1.INVC_RSBMT_CD , A1.TP_TOTAL_DUE_AMT ,
A1.INTL_BILG_MTHD_CD , A1.CARR_EOB_1_CD , T5.CARR_EOB_CD_DESC , A1.NTNL_DRUG_CD , A1.PTNT_FRST_NM , A1.PTNT_MDDL_INTL , A1.PTNT_LST_NM , A1.PTNT_BIRTH_DT ,
A1.CRDHLDR_ID_NUM
FROM
(SELECT DISTINCT
T1.CARR_NUM , T1.CST_CTR_NUM , T1.CLM_CLOSE_STS_CD , T1.CLM_RJCT_STS_CD , T1.CLM_VOID_STS_CD , T3.PMT_MTCH_DT ,
T3.ASC_TRANS_TYP_CD , T2.DRUG_DESC , T4.BATCH_NUM , T1.DIV_NUM , T1.INVC_NUM , T1 . SERVICE_DT , T1.ACTL_REFILL_NUM ,
T1.CLM_DSPSN_CD , T1.INVC_RSBMT_CD ,T1.TP_TOTAL_DUE_AMT , T1.INTL_BILG_MTHD_CD ,T3.CARR_EOB_1_CD ,T1.NTNL_DRUG_CD , T2.PTNT_FRST_NM , T2.PTNT_MDDL_INTL , T2.PTNT_LST_NM , T2.PTNT_BIRTH_DT , T2.CRDHLDR_ID_NUM
FROM
PDRD2LO.VINVC_CLM T1
, PDRD2LO.VPMNT_DTL T3
, PDRD2LO.VINVC_CLM_2 T2
, PDRD2LO.VINVC_ITM_PHARM T4
WHERE
T1.CLM_CLOSE_STS_CD ='OP'
AND T1.CLM_RJCT_STS_CD ='RJ'
AND T1.CLM_VOID_STS_CD ='NV'
AND T3.ASC_TRANS_TYP_CD ='40'
AND T1.CARR_NUM = T3.CARR_NUM
AND T1.CST_CTR_NUM = T3.CST_CTR_NUM
AND T1.DIV_NUM = T3.DIV_NUM
AND T1.INVC_NUM = T3.INVC_NUM
AND T1.SERVICE_DT = T3.SERVICE_DT
AND T1.CLM_CTRL_NUM = T3.CLM_CTRL_NUM
AND T1.ACTL_REFILL_NUM = T3.ACTL_REFILL_NUM
AND T1.INVC_ITM_NUM = T3.INVC_ITM_NUM
AND T1.REFILL_TRANS_NUM = T3.REFILL_TRANS_NUM
AND T1.CARR_NUM = T2.CARR_NUM
AND T1.CST_CTR_NUM = T2.CST_CTR_NUM
AND T1.DIV_NUM = T2.DIV_NUM
AND T1.INVC_NUM = T2.INVC_NUM
AND T1.SERVICE_DT = T2.SERVICE_DT
AND T1.ACTL_REFILL_NUM = T2.ACTL_REFILL_NUM
AND T1.CLM_CTRL_NUM = T2.CLM_CTRL_NUM
AND T1.INVC_ITM_NUM = T2.INVC_ITM_NUM
AND T1.REFILL_TRANS_NUM = T2.REFILL_TRANS_NUM
AND T1.INVC_CTRL_NUM = T4.INVC_CTRL_NUM) A1
LEFT OUTER JOIN PDRD2LO.VCARR_EOB T5
ON A1.CARR_EOB_1_CD = T5.CARR_EOB_CD
AND A1.CARR_NUM = T5.CARR_NUM
AND A1.DIV_NUM = T5.DIV_NUM
Thanks!Hi Zilla Eh ,
Thanks for the reply.
The another reporting tool name is impromptu and it takes 2-3 min , where in Crystal report is taking around 40 min. Please let me know if you any other questions.
Regards
Ravi -
Hi!
I am unable to get the result for my one of the item as checkbox. Other two are working properly .Please check and let me know wheres the problem please.
***INCLUDE ZSD_CONTRACT_LIST_T01_RENTAL1 .
TABLES: vbak, vbap, wbrk, zsdsched,vbkd, fplt, fpla, tvlvt.
TYPE-POOLS: slis.
data: BEGIN OF gt_report occurs 0,
vbeln LIKE vbak-vbeln, "Sales Document
posnr LIKE vbap-posnr, "Item
ernam LIKE vbak-ernam, "Created by
erdat LIKE vbak-erdat, "Created on
audat LIKE vbak-audat, "Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
auart LIKE vbak-auart, "Sales Document type
vkorg LIKE vbak-vkorg, "Sales Org
vtweg LIKE vbak-vtweg, "Distribution Channel
spart LIKE vbak-spart, "Division
vkbur LIKE vbak-vkbur, "Sales Office
guebg LIKE vbak-guebg, "Valid from date
gueen LIKE vbak-gueen, "Valid to date kunnrt LIKE kna1-name1, "Sold-to Name
kunwet LIKE kna1-name1, "Ship-to Name
kunnrt LIKE kna1-name1, "Sold-to Name
kunret LIKE kna1-name1, "Bill-to Name
kunnr LIKE vbak-kunnr, "Sold-to party
kunnrt LIKE kna1-name1, "Sold-to Name
kvgr4 LIKE vbak-kvgr4, "Territory
matnr LIKE vbap-matnr, "Material
arktx LIKE vbap-arktx, "Material Short Text
charg LIKE vbap-charg, "Batch
matkl LIKE vbap-matkl, "Material Group
pstyv LIKE vbap-pstyv, "Item Category
zmeng LIKE vbap-zmeng, "Target Quantity
zieme LIKE vbap-zieme, "Target Unit
kdmat LIKE vbap-kdmat, "Customer Material Number
werks LIKE vbap-werks, "Plant
lgort LIKE vbap-lgort, "Storage Location
vstel LIKE vbap-vstel, "Shipping Point
route LIKE vbap-route, "Route
netpr LIKE vbap-netpr, "Net Price
kpein LIKE vbap-kpein, "Condition Price Unit
kmein LIKE vbap-kmein, "Condition Unit
shkzg LIKE vbap-shkzg, "Returns Item
oidrc LIKE vbap-oidrc, "DRC Code
kunwe LIKE vbap-oid_ship, "Ship-to
aufnr LIKE vbap-aufnr, "Order Number
vkaus LIKE vbap-vkaus, "Usage
kunwet LIKE kna1-name1, "Ship-to Name
zzwprofid LIKE vbap-zzwprofid, "Waste Profile ID
kunre LIKE wbrk-kunre, "Bill-to
kunret LIKE kna1-name1, "Bill-to Name
addl_schd LIKE icon-id, "Push Button For addl line
datab LIKE zsdsched-datab, "Valid-From Date
datbi LIKE zsdsched-datbi, "Valid To Date
zschdfreq LIKE zsdsched-zschdfreq, "Contract schedule frequency
frequency LIKE zsdsched-frequency, "Frequency
monday LIKE zsdsched-monday, "Mondays
tuesday LIKE zsdsched-tuesday, "Tuesdays
wednesday LIKE zsdsched-wednesday, "Wednesdays
thursday LIKE zsdsched-thursday, "Thursdays
friday LIKE zsdsched-friday, "Fridays
saturday LIKE zsdsched-saturday, "Saturdays
sunday LIKE zsdsched-sunday, "Sundays
dzieme LIKE zsdsched-dzieme, "Target quantity UoM
comments LIKE zsdsched-comments, "Comments
END OF gt_report.
data: Begin of gt_report1 occurs 0,
fksaf LIKE fplt-fksaf,
afdat LIKE fplt-afdat,
fakwr LIKE fplt-fakwr,
fkdat LIKE fplt-fkdat,
nfdat LIKE fplt-nfdat,
fpart LIKE fpla-fpart,
bedat LIKE fpla-bedat,
endat LIKE fpla-endat,
horiz LIKE fpla-horiz,
bezei LIKE tvlvt-bezei,
vbeln LIKE vbak-vbeln,
erdat LIKE vbak-erdat,
ernam LIKE vbak-ernam,
guebg LIKE vbak-guebg,
gueen LIKE vbak-gueen,
auart LIKE vbak-auart,
kunnr LIKE vbak-kunnr,
kvgr4 LIKE vbak-kvgr4,
vkbur LIKE vbak-vkbur,
vkorg LIKE vbak-vkorg,
vtweg LIKE vbak-vtweg,
vbtyp LIKE vbak-vbtyp,
name1 LIKE kna1-name1,
pstyv LIKE vbap-pstyv,
matnr LIKE vbap-matnr,
werks LIKE vbap-werks,
oid_ship LIKE vbap-oid_ship,
kpein LIKE vbap-kpein,
kmein LIKE vbap-kmein,
netpr LIKE vbap-netpr,
kdmat LIKE vbap-kdmat,
posnr LIKE vbap-posnr,
matkl LIKE vbap-matkl,
aufnr LIKE vbap-aufnr,
vkaus LIKE vbap-vkaus,
route LIKE vbap-route,
kunre LIKE wbrk-kunre, "Bill-to
kunwe LIKE vbap-oid_ship, "Ship-to
kunwet LIKE kna1-name1, "Ship-to Name
kunnrt LIKE kna1-name1, "Sold-to Name
kunret LIKE kna1-name1, "Bill-to Name
End of gt_report1.
data: gs_report LIKE LINE OF gt_report,
gs_report1 LIKE LINE OF gt_report1,
gt_sched TYPE TABLE OF zsdsched,
gt_sched_tmp TYPE TABLE OF zsdsched,
gs_sched TYPE zsdsched,
gt_sel LIKE gt_report OCCURS 0,
gt_sel1 LIKE gt_report1 OCCURS 0,
gt_vbpa TYPE TABLE OF vbpa,
gs_vbpa TYPE vbpa,
gv_auart TYPE auart,
gv_counter TYPE i.
**-- ALV variables
DATA: ls_fieldcat TYPE slis_fieldcat_alv, "Field Catalog list
gt_fieldcat TYPE slis_t_fieldcat_alv, "Field Catalog
ls_sort TYPE slis_sortinfo_alv, "Sorting list
gt_sort TYPE slis_t_sortinfo_alv, "Sort
gs_layout TYPE slis_layout_alv, "List Layout
gs_variant TYPE disvariant, "Display Variant
gv_repid LIKE sy-repid,
gv_save(1) TYPE c,
ls_fieldcat1 TYPE slis_fieldcat_alv, "Field Catalog list
gt_fieldcat1 TYPE slis_t_fieldcat_alv, "Field Catalog
ls_sort1 TYPE slis_sortinfo_alv, "Sorting list
gt_sort1 TYPE slis_t_sortinfo_alv, "Sort
gs_layout1 TYPE slis_layout_alv, "List Layout
gs_variant1 TYPE disvariant, "Display Variant
gv_repid1 LIKE sy-repid,
gv_exit(1) TYPE c.
CONSTANTS: gc_a TYPE c VALUE 'A',
gc_g TYPE c VALUE 'G',
gc_re(2) TYPE c VALUE 'RE'.
Screen-control Variables
CONTROLS:
tctrl_sched TYPE TABLEVIEW USING SCREEN 1010. " Schedule lines.
*& Report ZSD_CONTRACT_LIST
*& Created on: January 21, 2007
*& Description: List of Contracts - ALV
REPORT zsd_contract_list_rental1.
INCLUDE zsd_contract_list_t01_rental1.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK m1 WITH FRAME TITLE text-t01.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t02.
SELECT-OPTIONS: s_vkorg FOR vbak-vkorg MEMORY ID vko,
s_vtweg FOR vbak-vtweg MEMORY ID vtw,
s_spart FOR vbak-spart MEMORY ID spa,
s_vkbur FOR vbak-vkbur MEMORY ID vkb.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln,
s_erdat FOR vbak-erdat,
s_ernam FOR vbak-ernam,
s_guebg FOR vbak-guebg,
s_gueen FOR vbak-gueen,
s_auart FOR gv_auart MEMORY ID vta
MATCHCODE OBJECT h_vakz,
s_fkarv FOR fplt-fkarv.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS:
s_kunnr FOR vbak-kunnr,
s_kunwe FOR vbap-oid_ship,
s_kunre FOR wbrk-kunre.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: s_werks FOR vbap-werks MEMORY ID wrk,
s_lgort FOR vbap-lgort MEMORY ID lag,
s_vstel FOR vbap-vstel MEMORY ID vst,
s_route for vbap-route,
s_matnr FOR vbap-matnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t04.
PARAMETERS: p_varia TYPE disvariant-variant MEMORY ID wrk,
p_all AS CHECKBOX DEFAULT 'X',
p_group AS CHECKBOX DEFAULT 'X',
p_rental AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF BLOCK m1.
Start of Selection
START-OF-SELECTION.
PERFORM get_data.
Display ALV
END-OF-SELECTION.
IF gt_report[] IS INITIAL.
MESSAGE s419(brain).
ELSE.
PERFORM create_alv.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varia.
PERFORM f01_f4_variant CHANGING p_varia.
*& Form get_data
text
FORM get_data .
select the appropriate rental data.
IF p_rental IS NOT INITIAL AND ( ( p_all IS INITIAL ) AND ( p_group IS INITIAL ) ).
SELECT avbeln aerdat aernam aaudat avbtyp aauart a~vkorg
avtweg aspart avkbur aguebg agueen akunnr a~kvgr4
bpstyv bmatnr bwerks boid_ship bkpein bkmein
bnetpr bkdmat bposnr bmatkl baufnr bvkaus b~route
dbezei efkarv eafdat efakwr efkdat enfdat e~fksaf
ffpart fbedat fendat fhoriz flodat ftndat b~oid_ship AS kunwe
INTO CORRESPONDING FIELDS OF TABLE gt_sel1
FROM vbak AS a
INNER JOIN vbap AS b ON avbeln = bvbeln
INNER JOIN vbpa as c ON avbeln = cvbeln
INNER JOIN vbkd AS g ON avbeln = gvbeln
INNER JOIN fplt AS e ON gfplnr = efplnr
INNER JOIN fpla AS f ON efplnr = ffplnr
INNER JOIN tvlvt AS d ON bvkaus = dabrvw
WHERE a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~vbtyp = gc_g
AND a~ernam IN s_ernam
AND a~vkorg IN s_vkorg
AND a~vtweg IN s_vtweg
AND a~spart IN s_spart
AND a~vkbur IN s_vkbur
AND a~guebg IN s_guebg
AND a~gueen IN s_gueen
AND a~auart IN s_auart
AND a~kunnr IN s_kunnr
AND b~oid_ship IN s_kunwe
AND b~werks IN s_werks
AND b~lgort IN s_lgort
AND b~vstel IN s_vstel
and b~route in s_route
AND b~matnr IN s_matnr
AND e~fkarv IN s_fkarv
AND e~fksaf = 'A'
OR e~fksaf = 'B'.
sort gt_sel1.
*ENDIF.
IF NOT gt_sel1[] IS INITIAL.
Get Bill-to Party's for Item Lines
SELECT vbeln posnr parvw kunnr INTO CORRESPONDING FIELDS OF TABLE gt_vbpa
FROM vbpa
FOR ALL ENTRIES IN gt_sel1
WHERE vbeln = gt_sel1-vbeln
AND parvw = gc_re.
Loop through captured data for additional information
LOOP AT gt_sel1 INTO gs_report1.
Find the bill-to party
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report1-vbeln
posnr = gs_report1-posnr
parvw = gc_re.
IF sy-subrc <> 0.
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report1-vbeln
parvw = gc_re.
CHECK sy-subrc = 0 AND gs_vbpa-kunnr IN s_kunre.
ELSE.
CHECK gs_vbpa-kunnr IN s_kunre.
ENDIF.
gs_report1-kunre = gs_vbpa-kunnr.
Get the Customer's Name
gs_report1-kunnrt = zcl_kna1=>get_name1( itp_kunnr = gs_report1-kunnr ).
gs_report1-kunwet = zcl_kna1=>get_name1( itp_kunnr = gs_report1-kunwe ).
gs_report1-kunret = zcl_kna1=>get_name1( itp_kunnr = gs_report1-kunre ).
Get the scheduling lines for the item line.
CLEAR gv_counter.
APPEND gs_report1 TO gt_report1.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM gt_report1.
*ENDIF.
ELSE.
IF ( ( p_all IS NOT INITIAL ) OR ( p_group IS NOT INITIAL ) ) AND p_rental IS INITIAL.
Select the appropriate contract data.
SELECT a~vbeln a~erdat a~ernam a~audat a~vbtyp a~auart a~vkorg
a~vtweg a~spart a~vkbur a~guebg a~gueen a~kunnr a~kvgr4
b~posnr b~matnr b~charg b~matkl b~arktx b~pstyv b~zmeng
b~zieme b~kdmat b~werks b~lgort b~vstel b~netpr b~kpein
b~kmein b~shkzg b~oid_extbol b~oid_miscdl b~oidrc b~oid_ship AS kunwe
b~zzwprofid c~datbi c~datab b~route
baufnr bvkaus d~bezei
INTO CORRESPONDING FIELDS OF TABLE gt_sel
FROM vbak AS a
INNER JOIN vbap AS b ON a~vbeln = b~vbeln
INNER JOIN tvlvt AS d ON bvkaus = dabrvw
LEFT OUTER JOIN zsdsched AS c ON b~vbeln = c~vbeln AND
b~posnr = c~posnr
WHERE a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~vbtyp = gc_g
AND a~ernam IN s_ernam
AND a~vkorg IN s_vkorg
AND a~vtweg IN s_vtweg
AND a~spart IN s_spart
AND a~vkbur IN s_vkbur
AND a~guebg IN s_guebg
AND a~gueen IN s_gueen
AND a~auart IN s_auart
AND a~kunnr IN s_kunnr
AND b~oid_ship IN s_kunwe
AND b~werks IN s_werks
AND b~lgort IN s_lgort
AND b~vstel IN s_vstel
and b~route in s_route
AND b~matnr IN s_matnr.
SORT gt_sel.
ENDIF.
IF NOT gt_sel[] IS INITIAL.
Get Bill-to Party's for Item Lines
SELECT vbeln posnr parvw kunnr INTO CORRESPONDING FIELDS OF TABLE gt_vbpa
FROM vbpa
FOR ALL ENTRIES IN gt_sel
WHERE vbeln = gt_sel-vbeln
AND parvw = gc_re.
endif.
Select the remaining records from the ZSDSCHED Table.
IF p_group IS NOT INITIAL.
SELECT * FROM zsdsched
INTO TABLE gt_sched
FOR ALL ENTRIES IN gt_sel
WHERE vbeln = gt_sel-vbeln
AND posnr = gt_sel-posnr.
SORT gt_sched.
ENDIF.
Loop through captured data for additional information
LOOP AT gt_sel INTO gs_report.
Find the bill-to party
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report-vbeln
posnr = gs_report-posnr
parvw = gc_re.
IF sy-subrc <> 0.
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report-vbeln
parvw = gc_re.
CHECK sy-subrc = 0 AND gs_vbpa-kunnr IN s_kunre.
ELSE.
CHECK gs_vbpa-kunnr IN s_kunre.
ENDIF.
gs_report-kunre = gs_vbpa-kunnr.
Get the Customer's Name
gs_report-kunnrt = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunnr ).
gs_report-kunwet = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunwe ).
gs_report-kunret = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunre ).
Get the scheduling lines for the item line.
CLEAR gv_counter.
IF NOT p_group IS INITIAL.
If we are grouping the lines add the icon button.
LOOP AT gt_sched INTO gs_sched WHERE vbeln = gs_report-vbeln
AND posnr = gs_report-posnr.
IF gv_counter > 0.
gs_report-addl_schd = '@1E@'.
CONTINUE.
ENDIF.
MOVE-CORRESPONDING gs_sched TO gs_report.
ADD 1 TO gv_counter.
ENDLOOP.
ELSE.
Otherwise get the rest of the schedule information
READ TABLE gt_sched INTO gs_sched
WITH KEY vbeln = gs_report-vbeln
posnr = gs_report-posnr
datbi = gs_report-datbi
datab = gs_report-datab.
IF sy-subrc = 0.
MOVE-CORRESPONDING gs_sched TO gs_report.
ENDIF.
ENDIF.
APPEND gs_report TO gt_report.
ENDLOOP.
Remove any duplicates from the reporting table
DELETE ADJACENT DUPLICATES FROM gt_report.
If Show all records is initial, delete non-scheduled lines (ex. Sub-items)
IF p_all IS INITIAL.
DELETE gt_report WHERE datbi = 0
AND datab = 0.
ENDIF.
endif.
endif.
ENDFORM. " get_data
*& Form create_alv
text
FORM create_alv .
if ( ( p_all is not initial ) or ( p_group is not initial ) ) and p_rental is initial.
PERFORM initialize_fieldcat USING gt_fieldcat[].
PERFORM populate_layout CHANGING gs_layout
gs_variant.
PERFORM populate_sort USING gt_sort[].
PERFORM display_alv_report.
else.
if p_rental is not initial and ( ( p_all is initial ) and ( p_group is initial ) ).
PERFORM initialize_fieldcat1 USING gt_fieldcat1[].
PERFORM populate_layout1 CHANGING gs_layout1
gs_variant1.
PERFORM populate_sort1 USING gt_sort1[].
PERFORM display_alv_report1.
*endif.
*endif.
ENDFORM. " create_alv
*& Form initialize_fieldcat
Get and enhance the field catalog data
-->L_FIELDCAT[] text
FORM initialize_fieldcat USING l_fieldcat TYPE slis_t_fieldcat_alv.
IF p_rental IS NOT INITIAL .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_RENTAL1'
i_internal_tabname = 'GT_REPORT1'
i_inclname = 'ZSD_CONTRACT_LIST_T01_RENTAL1'
CHANGING
ct_fieldcat = l_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'VBELN'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Contract'.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNNRT'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sold-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNWET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Ship-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNRET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Bill-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'ADDL_SCHD'.
IF NOT p_group IS INITIAL.
ls_fieldcat-seltext_s = 'Schd'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Additional Scheduling Lines'.
ls_fieldcat-icon = 'X'.
CLEAR: ls_fieldcat-key,
ls_fieldcat-ref_fieldname,
ls_fieldcat-ref_tabname,
ls_fieldcat-reptext_ddic,
ls_fieldcat-ddic_outputlen.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ELSE.
DELETE l_fieldcat INDEX sy-tabix.
ENDIF.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'DATAB'.
ls_fieldcat-seltext_s = 'Schd From'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. From Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat1 WITH KEY fieldname = 'DATBI'.
ls_fieldcat-seltext_s = 'Schd To'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. To Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ELSE.
IF p_rental IS INITIAL.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_RENTAL1'
i_internal_tabname = 'GT_REPORT'
i_inclname = 'ZSD_CONTRACT_LIST_T01_RENTAL1'
CHANGING
ct_fieldcat = l_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'VBELN'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Contract'.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNNRT'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sold-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNWET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Ship-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNRET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Bill-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'ADDL_SCHD'.
IF NOT p_group IS INITIAL.
ls_fieldcat-seltext_s = 'Schd'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Additional Scheduling Lines'.
ls_fieldcat-icon = 'X'.
CLEAR: ls_fieldcat-key,
ls_fieldcat-ref_fieldname,
ls_fieldcat-ref_tabname,
ls_fieldcat-reptext_ddic,
ls_fieldcat-ddic_outputlen.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ELSE.
DELETE l_fieldcat INDEX sy-tabix.
ENDIF.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'DATAB'.
ls_fieldcat-seltext_s = 'Schd From'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. From Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat1 WITH KEY fieldname = 'DATBI'.
ls_fieldcat-seltext_s = 'Schd To'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. To Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ENDIF.
ENDIF.
ENDFORM. " initialize_fieldcat
*& Form populate_layout
text
<--GS_LAYOUT
<--GS_VARIANT
FORM populate_layout CHANGING gs_layout TYPE slis_layout_alv
gs_variant TYPE disvariant.
gs_layout-colwidth_optimize = 'X'.
gs_layout-allow_switch_to_list = 'X'.
gs_layout-zebra = 'X'.
gs_variant-report = sy-repid.
ENDFORM. " populate_layout
*& Form populate_sort
text
-->l_SORT[] text
FORM populate_sort USING l_sort TYPE slis_t_sortinfo_alv.
ENDFORM. " populate_sort
*& Form display_alv_report
FORM display_alv_report .
gv_repid = sy-repid.
IF p_rental IS INITIAL.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'GT_REPORT'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = gc_a
is_variant = gs_variant
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_report
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ELSE.
IF p_rental IS NOT INITIAL.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'GT_REPORT1'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = gc_a
is_variant = gs_variant
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = GT_REPORT1
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endif.
endif.
ENDFORM. " display_alv_report
*& Form initialize_fieldcat1
Get and enhance the field catalog data for rental fields
-->L_FIELDCAT[] text
*FORM initialize_fieldcat1 USING l_fieldcat1 TYPE slis_t_fieldcat_alv.
**if ***
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_rental1'
i_internal_tabname = 'GT_SEL1'
i_inclname = 'ZSD_CONTRACT_LIST_T01_rental1'
CHANGING
ct_fieldcat = l_fieldcat1
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
**else.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_rental1'
i_internal_tabname = 'GT_SEL1'
i_inclname = 'ZSD_CONTRACT_LIST_T01_rental1'
CHANGING
ct_fieldcat = l_fieldcat1
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
***endfi.
*ENDFORM. " initialize_fieldcat
*& Form populate_layout
text
<--GS_LAYOUT
<--GS_VARIANT
*FORM populate_layout1 CHANGING gs_layout1 TYPE slis_layout_alv
gs_variant1 TYPE disvariant.
gs_layout1-colwidth_optimize = 'X'.
gs_layout1-allow_switch_to_list = 'X'.
gs_layout1-zebra = 'X'.
gs_variant1-report = sy-repid.
*ENDFORM. " populate_layout
***& Form populate_sort
text
-->l_SORT[] text
*FORM populate_sort1 USING l_sort TYPE slis_t_sortinfo_alv.
*ENDFORM. " populate_sort
***& Form display_alv_report
*FORM display_alv_report1 .
gv_repid = sy-repid.
if p_rental is not initial and ( ( p_all is initial ) and ( p_group is initial ) ).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'gt_sel1'
is_layout = gs_layout1
it_fieldcat = gt_fieldcat1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort1
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = gc_a
is_variant = gs_variant1
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_sel1
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*endif.
*ENDFORM. " display_alv_report
*& Form f01_f4_variant
Get the Layout variant for the user.
FORM f01_f4_variant CHANGING c_variant TYPE disvariant-variant.
DATA: ls_variant TYPE disvariant,
l_exit TYPE char1.
ls_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = ls_variant
i_save = 'A'
it_default_fieldcat =
IMPORTING
e_exit = l_exit
es_variant = ls_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit EQ space.
c_variant = ls_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " f01_f4_variant
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE gt_report INTO gs_report INDEX rs_selfield-tabindex.
CHECK sy-subrc = 0.
CASE rs_selfield-fieldname.
WHEN 'VBELN'.
Set parameter ID for transaction screen field
CHECK NOT gs_report-vbeln IS INITIAL.
SET PARAMETER ID 'KTN' FIELD gs_report-vbeln.
CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.
WHEN 'ADDL_SCHD'.
CHECK NOT gs_report-addl_schd IS INITIAL.
REFRESH gt_sched_tmp.
LOOP AT gt_sched INTO gs_sched
WHERE vbeln = gs_report-vbeln
AND posnr = gs_report-posnr.
APPEND gs_sched TO gt_sched_tmp.
ENDLOOP.
CHECK sy-subrc = 0.
CALL SCREEN '1010' STARTING AT 5 5.
ENDCASE.
ENDCASE.
ENDFORM. "user_command
*& Module STATUS_1010 OUTPUT
text
MODULE status_1010 OUTPUT.
SET PF-STATUS 'MAIN_1010'.
SET TITLEBAR '1010' WITH gs_report-vbeln gs_report-posnr.
ENDMODULE. " STATUS_1010 OUTPUT
*& Module USER_COMMAND_1010 INPUT
text
MODULE user_command_1010 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'CANC'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_1010 INPUTHi !
This report shows the schedule line items , group schedule line items and rental contact (billing plan) lines when particular checkbox is checked. The checkboxs p_all(non-schedule line) , p_group(group schedule line items) are working in my above alv report and showing result but unfortunately when p_rental is checked it dosent give me result , it says no data selected. This when checked has to show result based on a different set of selections as I have done, but its not shwoing me the result .
Kindly help please.
Thanks -
Key figures in Cost elemnt based report
Dear All,
I have created a Cost Element based Report for the Project using report painter. In this same report, I want to pull a key figure(the key figure is 'remaining forecast planned costs") which is coming from cost forecasting report (Report 12CTC1 from transaction CJE0).
The issue is this 'key figure' is not available for report made in report group 6P3(report group for cost element based report). Is there anyway I can pull this particular key figure in my report.
Thanks in advance !
Regards,
Mahendra DigheAlso if you're using HR data, the employee data is time dependent, so that for each employee number there are any number of records. This may be causing the aggregate reporting condition that you mentioned. In BW it's important to recognize that the master data also can play a role in how many records are returned. The infoprovider is not the only source of additional records. For example:
Employee has three records in the time range.
Salary infoprovider has only one.
Results will contain THREE records, one for each employee record, all with the same salary record. On an aggregate basis, the salary results will be multiplied by three.
Time dependent master data can be a source of much confusion. For some HR reporting, I have created a 'most current' employee master data record that is not time dependent, and is loaded daily. I then use that for data models such as salary or other separate infoproviders. -
Key figures in cost element based report
Dear All,
I have created a Cost Element based Report for the Project using report painter. In this same report, I want to pull a key figure(the key figure is 'remaining forecast planned costs") which is coming from cost forecasting report (Report 12CTC1 from transaction CJE0).
The issue is this 'key figure' is not available for report made in report group 6P3(report group for cost element based report). Is there anyway I can pull this particular key figure in my report.
Thanks in advance !
Regards,
Mahendra DigheAlso if you're using HR data, the employee data is time dependent, so that for each employee number there are any number of records. This may be causing the aggregate reporting condition that you mentioned. In BW it's important to recognize that the master data also can play a role in how many records are returned. The infoprovider is not the only source of additional records. For example:
Employee has three records in the time range.
Salary infoprovider has only one.
Results will contain THREE records, one for each employee record, all with the same salary record. On an aggregate basis, the salary results will be multiplied by three.
Time dependent master data can be a source of much confusion. For some HR reporting, I have created a 'most current' employee master data record that is not time dependent, and is loaded daily. I then use that for data models such as salary or other separate infoproviders. -
Ajax based report and pagination
Hi I have searched through the web for ajax based report in Apex. I have found the following link as very useful. http://apex.oracle.com/pls/otn/f?p=31517:98
Here content of one page is pulled to the current page. It works fine. Pagination is also working exactly as the Apex reports. But I was thinking of something different, not pulling the content from other page. I have done it myself as follows.
1. Take an HTML region called Parameter
2. Take a select list in the parameter region with LOV query
name : P2_DEPTNO
LOV : Select dname d,deptno r
from dept
3.Take an HTML region
Source : <div id=ajx></div>
4. Create an Application Item called F103_DEPTNO
5. Create an Application Process
Name : getEmpTable
Source:
declare
v_deptno number(3);
begin
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<table>');
HTP.prn ('<tr>');
htp.prn('<th>Employee Number</th>');
htp.prn('<th>Employee Name</th>');
htp.prn('<th>Salary</th>');
htp.prn('<th>Department</th>');
htp.prn('<th>Job</th>');
htp.prn('<th>Hiredate</th>');
HTP.prn ('</tr>');
foR R in (select empno,ename,sal,deptno,job,hiredate from emp where deptno= :F103_DEPTNO )
LOOP
htp.prn('<tr>');
htp.prn('<td>'||r.empno||'</td>');
htp.prn('<td>'||r.ename||'</td>');
htp.prn('<td>'||r.sal||'</td>');
htp.prn('<td>'||r.deptno||'</td>');
htp.prn('<td>'||r.job||'</td>');
htp.prn('<td>'||r.hiredate||'</td>');
htp.prn('</tr>');
END LOOP;
END IF;
HTP.prn ('</table>');
end;
6. Write a javascript Function in HTML Header
Source:
<script language = "JavaScript" type="text/javascript">
function GetEmployees()
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getEmpTable',0);
get.add('F103_DEPTNO',html_GetElement('P2_DEPTNO').value);
gReturn = get.get();
document.getElementById('ajx').innerHTML = gReturn;
get = null;
</script>
7. Go to edit page item of P2_DEPTNO and in HTML Form Element Attributes write onchange="GetEmployees()"
8. Run and test.
Ajax based report works fine.
In the link specified above pagination works fine.
In my example very few records will appear but in case there are a lot of records appear then it is a must to manage it with pagination, letting only a few records to appear in each page. But in my example I have no idea how to manage pagination. Need help from the experts. Please notify..
Regards
Hasan Al Mamun
Programmer
Bangladesh Bank
Dhaka, Bangladesh
Edited by: hasan_al_mamun on Jan 19, 2011 10:58 AM
Edited by: hasan_al_mamun on Jan 19, 2011 11:20 AM
Edited by: hasan_al_mamun on Jan 19, 2011 11:24 AMHi,
You need to work with ROWNUM of result set. Create two hidden items, one for record_start_rownum and other for record_end_rownum. You need to add where clause to your SELECT query in Application process. Then your query will look like
select *
from ( select a.*, rownum r
from ( select empno,ename,sal,deptno,job,hiredate from emp where deptno= :F103_DEPTNO ) a
where rownum < :P1_ record_start_rownum )
where r > :P1_record_end_rownumYou may find following asktom link interesting..
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:76812348057
Regards,
Hari -
Grand Total For Matrix Based Report
Hi All,
I have a matrix based report with Fields like Country ,Amount and MonthYear
So report looks like below the columns get generated dynamically :
Country Oct 2013 Nov 2013 Dec 2013
India 25,000 25,000 25,000
England 22,000 25,000 30,000
Total 57,000 50,000 55,000
So this works perfectly fine . So next step was to get difference between the months like below :
Country Oct 2013 Nov 2013 Dec 2013 Oct-Nov 2013 Nov - Dec 2013
India 25,000 25,000 25,000 0
0
England 22,000 25,000 30,000 -3000
-5000
Total 57,000 50,000 55,000
Simon_Hou Provided me a custom code for dynamically find the difference between months . Now only requirement left is the sum of the dynamically generated month difference column . As the columns are generated based on a custom code it's not allowing me
to do a sum on it.
Desired Output
Country Oct 2013 Nov 2013 Dec 2013 Oct-Nov 2013 Nov - Dec 2013
India 25,000 25,000 25,000 0
0
England 22,000 25,000 30,000 -3000
-5000
Total 57,000 50,000 55,000 -3000
-5000
Can any one please advice me how to do sum for the dynamically generated custom code column .
Code is below it might help some1 else(Simon_Hou)
Private queueLength As Integer = 2
Private queueSum As Double = 0
Private queueFull As Boolean = False
Private idChange As String=""
Dim queue As New System.Collections.Generic.Queue(Of Integer)
Public Function CumulativeQueue(ByVal currentValue As Integer,id As String) As Object
Dim removedValue As Double = 0
If idChange <> id then
ClearQueue()
idChange = id
queueSum = 0
queueFull = False
CumulativeQueue(currentValue,id)
Else
If queue.Count >= queueLength Then
removedValue = queue.Dequeue()
End If
queueSum += currentValue
queueSum -= removedValue
queue.Enqueue(currentValue)
If queue.Count < queueLength Then
Return Nothing
ElseIf queue.Count = queueLength And queueFull = False Then
queueFull = True
Return (queueSum-currentValue-currentValue)
Else
Return (queueSum-currentValue-currentValue)
End If
End If
End Function
public function ClearQueue()
Dim i as Integer
Dim n as Integer = Queue.Count-1
for i=n To 0 Step-1
queue.Dequeue()
next i
End function
Thanks in Advance
PriyaHi Priya,
According to your description, you want to add a total row at bottom of the matrix. This total row should display the both sum of amount every month and the sum of the difference between months. Right?
Since we have tried the custom code in another similar thread you have posted before (Difference
Between the grouped column) and it works properly. In this scenario, we just need to use the sum function and put it as a variable when calling the custom function in custom code, then we will get the total difference between months. This
case has been tested in our local environment (In this sample, we used the same sample data as the last thread you posted before).Here are steps and screenshots for your reference:
1. Add a row out side of group. Put the expressions into corresponding cells.
2. Save and preview. The result looks like below:
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
KE30 - Form Based Report - TDD not appearing
Dear COPA Experts,
I am facing one strange issue with reporting of Top Down Distribution of Actual Data.
After executing Top Down Distribution of Actual Data, i have checked T-Code : KE30 - Form Based Report but it does not shows me distributed data then i have created one more PA report without Form, and this basic report shows me distributed data.
I have checked T-Code : KE24 and found data is accurately posted via TDD :
But is not showing in Form Based Report :
However, it shows in Basic Report :
Please guide me how to get distributed data on Form Based Report ???
Thanks in Advance for your time !!!
Regards,
Zain BashirHello Zain,
I often face similar problems when using form based reports.
The layout which is part of your report (and where the lines and columns are defined)
includes the selections (e.g. within a column) also.
Example:
User does not find values posted on a cost center within the report.
The FI-document shows the cost center but also an SD-order item.
Result: The CC-posting is just a statistical one.
If the layout does not include the statistical posting the report does not present them.
Therefore: I advise to check the layout and the
column-, line- and general selections.
Hope it helps (and that you evaluate).
With kind regards
Thomas -
MC+E Report not giving results for One Plant
Dear All,
I am executing MC+E standard report for four plants but I am not getting the output for one plant. This report fetches data from the table S001 while executing VA01. I checked that there are no entries for that plant in this table hence obviously I cann't get the output.
Can anyone suggest me where lies the problem. My SD consultant is able to generate invoices, but the result of VA01 are not getting reflected in S001.
Regards,
Alok.Dear Alok,
Same was the problem with me, one of my seniors helped me with it. The report does not reflect data for the other one, as somebody may have made changes to the standard Info Structure.Probably a 'Z' or 'Y' update group is mainatined and proper update rules are not attached to the info structure. Ask you SD consultant to check out the update rules. It is a big risk to make changes to the info structure as it may lead to loss of Master and may stop functioning of SAP across modules. Ask a expert from SD to work onto it.
Reagards,
Ashutosh
[email protected] -
Web Based Reporting Suggestions...
Hi,
Can anyone suggest a way to be able to access data from an Oracle database and publish the results to the web (intranet or not) without using Oracle Reports. I have to implement a solution where the turnaround time needs to be fast for requirements. I will appreciate your help.
Regards
MahathiDiscoverer Viewer is a web based reporting tool that can be called from a URL. Check out the syntax at http://otn.oracle.com/products/ias/tech_tips/july01.html. You can specify query parameters by prefixing the parameter names with "qp_". Reports ("workbooks") can be created very quickly using Discoverer Desktop Edition or Discoverer Plus.
-
Sending email using PL/SQL based on a query result
Hello all,
I want to create a procedure using PL/SQL, based on a query result.Here is the scenario:
I have multiple tables in Target and Source databases that I want to compare(not the whole table but queries on these tables) and if they differ, I want to shoot an email. I have some ideas how to implement this but not sure whether it is the best approach.
select Acct_id, total from SourceTableA
minus
select Acct_id, total from TargetTableA
select Acct_id, sum from SourceTableB
minus
select Acct_id, sum from TargetTableB
If the result of any of above queries > 0 then I want to shoot an email and want to repeat this procedure in the morning every day.
I know how to implement send_mail procedure using UTL_SMTP package and how to schedule tha job by dbms_job package. But I am not sure how to implement the result of minus query. In case if minus > 0 then I also want to send the name of tables in the email message where source and target tables are not same. Should i use cursor, variable or insert the result in a new table? any help would be highly appreciated. Thanks in advance.
KhanActually these queries are the part of our daily testing that we run everyday manually(after the scheduled ETL load) to see if there are any discrepencies between our datawarehouse tables and source tables. So instead of running these queries manually everyday we want to schedula a procedure that will shoot an email in case of any discrepency and indicate which tables have problems.
-
Extremely slow performance in comparison to RDC-based report
Today our application uses the Crystal Reports RDC. In the last
ten years we have made good experience with Crystal Reports.
In the next few months we want to migrate our application to
JAVA.
Because the reports offer a great reuse-potential, we would like
to implement them via CR4E.
But during the first benchmark tests we made a very bad experience.
Running (Printing) in CR4E the reports needed from 20 up to 480 percent
more time in comparison to the RDC-based reports.
When using POJOs need from 25 up to 570 percent more time.
When printing the reports from within the CR2008 designer there is
no performance difference.
The reports have from 4 to 82 pages.
We didn´t expect such a huge performance difference.
Is CR4E in general slower than the RDC-based Crystal Reports?
Or are there any parameters in CR4E in addition to the RDC-based
solution for tuning the reports?
Edited by: Rainer Graedtke on Nov 9, 2009 2:44 PMHi Ted,
thanks for the fast response.
Is there another "datasource option" with better performance than POJO?
In the upcoming JAVA-version of our application we would like to "feed"
our reports from memory, not from the underlying database.
One more statement concerning our performance problem:
In our reports we make extensive use of subreports.
Each report has the minimum of two subreports, one for the pageheader,
one for the pagefooter.
This is necessary because we have changing headers and footers
depending on the contents of the details.
The report with the largest performance loss contains 29 subreports!
RDC-based it prints in 10 seconds, Java-based we need over 50 seconds.
Is there any suggestion how to improve the performance of our reports in
JAVA/CR4E other than reducing the number of subreports?
Another question concerning the keycode-problem:
We have designed the reports in the CR2008 Designer and we want to run
them under CR4E. Is this a valid approach?
Sincerely Rainer
Edited by: Rainer Graedtke on Nov 10, 2009 10:51 AM -
How to create the web based report without enterprise portal?
Hi experts,
We don't have enterprise portal but I like to create the web based version of the existing Bex reports and which option is the best to distribute this web based report using information broadcasting?
Can I use report designer for this?
Thanks in advance.
Sharat.Hi Sharat
In BI 7.0 the Queries which u devoleped can be broad casted by using two ways .
1. Enterprise portal
2.Web Application Designer(WAD)
So you can choose any of the option, For the Option 1 you should have seperate server for the EP or else For option 2 you have to make some setting in the BI system to enable the Web reports..
Reagrds
Satish -
Running a Dynpro-based Report as a Job/in Background mode
Hello,
i've got a report which hasn't got a selection-screen as its startscreen, but a complex dynpro and is based on different start-buttons and not only the "basic" F8/Run-Button. the users still would like to be able to run the report in background mode and as an automated weekly job. moreover they want to use their own configuration/variant for date-fields etc., just like they are used from a selection-screen. is this possible "out of the box" with a dynpro-based report or how can i archive this through my own programming logic?
thanks for your help,
dspHi,
I guess yes, but since you seem to have several processes possible at startup (those buttons), you will have to code a new bit of code at the start of your application. This to choose the correct process... you should have a new statement like
IF sy-batch IS NOT INITIAL.
"Perform batch process
ELSE.
"Perform normal run
ENDIF.
For the variant, I'm not sure to really get the idea... Do the users already use variants with the actual version? or is there no selection screen at all? If not, you should use one and set-up parameters to pre-fill your dynpro fields...
Kr,
Manu -
How can I use Server level variables in a business model based report
hi gems..
I have declared one server level variable in the BI Analytics repository.
Now I have made one business model based report.
In one column I want to use that server level varible.
I go to the formula tab of that column and then clicked on variable--> session --> put the name of the variable and click ok.
But when i viewed the report, it is not showing the dates, rather it is showing the date format I chosed i.e DD-MMM-YYYY.
please help..actually the previous problem got resolved...
Now when I am trying to apply a filter on a particular column using that server variable, then it is showing that the varible has no value definition.
I have clicked on the filter tab of that column-->add-->variables-->session variables-->then I put the name of the variable-->click OK.
the following error is comming-
Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
Odbc driver returned an error (SQLExecDirectW).
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 23005] The repository variable, Variable_name, has no value definition. (HY000)
I have made that server variable from manage-->variables-->(right click) create new initialisation block-->gave the name and wrote the query and aslo gave the connection pool name and test that and it worked fine..
Maybe you are looking for
-
I am technologically challenged senior citizen who recently upgraged to Pages 5.1 from what I think was iWorks '08. I now find that I am not able to open any of my important previously created Pages documents. I receive a pop-up that tells me that
-
How can i add music from my ipod to a new computer
i authorized my computer and i lost all my music because it crashed and now i only have most of my music on my ipod and it wont let me transfer it to my new computer, please help! Thank you!
-
Having trouble getting conneced to my airport express. Supposedly they set it up at the Apple store and said all's i needed to do would be plug it in when I got home. Not so it doesn't work!
-
Windows 7 incompatible with Adobe 5
I have a Mustek A3 USB 1200 Pro scanner, and I need to install Adobe 5 but I get an error message saying Adobe 5 is not compatible with my Windows 7.
-
Assign button or knob to show/hide instruments on channelstrips?
Hi, I am trying to assign a knob or button on my controller to show or hide the instruments on a channel strip so if I play live I can directly see what is going on. This works great with my M-Audio Garageband-controller in Logic. It would be really