Display details of CO46 Report
Hi,I get a very strange result when I use the T-Code CO46.
I key in a SO number and then run the report,in the results,the same item material have two lines,and each field of the two lines are all the same.How could this happen and why?
In the SO,this item material is nothing different with others.
Ofcoz I've checked the SO,there's only one.and in MD4C report,the result is the same.
And actually,this scenario happened before in the PS structure;There's only one material in an activity,and in the co46 report there are two lines,and all the data is the same.
Similar Messages
-
Issue in displaying header details in ALV report
Hi,
I have used slis_t_listheader and REUSE_ALV_COMMENTARY_WRITE to display the header details in ALV report.I want the details to be displayed as below.
Requester : ---------------------- Page: 1
Program: ----------------------- Date:---------
Title of Report
But when I use the structure slis_t_listheader to display the header details,all the fields are coming one below the other.
How can I get the fields as shown in the above format
Edited by: Abaper12345 on Jun 25, 2009 7:54 AMHi,
Go through following code... its showing the data exactly the way you want....
REPORT TEST3.
TYPE-POOLS:slis.
TABLES:MARA.
*Type Declaration
TYPES:BEGIN OF t_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
END OF t_mara.
*Internal Table
data:it_mara type standard table of t_mara.
*Work Area
data:wa_mara type t_mara.
DATA:i_repid TYPE sy-repid .
i_repid = sy-repid.
*Declaration for field catalog
DATA : fcat TYPE slis_t_fieldcat_alv,
wa_fcat TYPE slis_fieldcat_alv.
*Declaration for Layout
data : WA_LAYOUT type SLIS_LAYOUT_ALV.
*Initializing ColumnWidth_Optimize For Layout
WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
START-OF-SELECTION
START-OF-SELECTION.
*Fetching data into internal tables
PERFORM get_data.
*Buil Fieldcatalog
PERFORM build_fcat.
*Display ALV Report
PERFORM alv_display.
*Build Fieldcat
FORM build_fcat .
wa_fcat-tabname = 'IT_MARA'.
wa_fcat-fieldname = 'MATNR'.
wa_fcat-inttype = 'C'.
wa_fcat-seltext_m = 'Material Number'.
wa_fcat-outputlen = 25.
wa_fcat-col_pos = 1.
APPEND wa_fcat TO fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'IT_MARA'.
wa_fcat-fieldname = 'ERSDA'.
wa_fcat-inttype = 'C'.
wa_fcat-seltext_m = 'Date'.
wa_fcat-outputlen = 25.
wa_fcat-col_pos = 1.
APPEND wa_fcat TO fcat.
CLEAR wa_fcat.
wa_fcat-tabname = 'IT_MARA'.
wa_fcat-fieldname = 'ERNAM'.
wa_fcat-inttype = 'C'.
wa_fcat-seltext_m = 'User'.
wa_fcat-outputlen = 25.
wa_fcat-col_pos = 1.
APPEND wa_fcat TO fcat.
CLEAR wa_fcat.
endform.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
form GET_DATA .
select matnr ersda ernam from mara into table it_mara.
endform. " GET_DATA
*& Form ALV_DISPLAY
text
--> p1 text
<-- p2 text
form ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = i_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = fcat
TABLES
t_outtab = it_mara
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.
endform. " ALV_DISPLAY
*& Form html_top_of_page " I_CALLBACK_HTML_TOP_OF_PAGE "
FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
CALL METHOD document->add_text
EXPORTING
text = 'Program'
sap_color = document->list_group
sap_fontstyle = document->standard
sap_emphasis = document->strong.
CALL METHOD document->new_line
EXPORTING
repeat = 1
CALL METHOD document->add_text
EXPORTING
text = 'Requester'
sap_color = document->list_group
sap_fontstyle = document->standard
sap_emphasis = document->strong.
CALL METHOD document->new_line
EXPORTING
repeat = 1
CALL METHOD document->add_gap
EXPORTING
width = 125
CALL METHOD document->add_text
EXPORTING
text = 'This Is Test Data'
sap_color = document->list_group
sap_fontsize = document->LARGE
sap_fontstyle = document->standard
sap_emphasis = document->strong.
ENDFORM. "HTML_TOP_OF_PAGE
Thanks & Regards
Ashu SIngh -
I want to display invoice details(MIRO) in REPORT
Hi,
i am new for abap can any one please send code for to display miro details in a report based on below logic.
Pass the RSEG-BELNR & RSEG-GJAHR joined together into BKPF-AWKEY to get the MIRO Doc date BKPF-BUDAT, vendor invoice number BKPF-XBLNR& Vendor invoice date BKPF-BLDAT.
Pass the RSEG-BELNR & RSEG-GJAHR joined together into BKPF-AWKEY to get the BKPF-BELNR & BKPF-GJAHR to pass this into BSEG-BELNR BSEG-GJAHR to get the BSEG-LIFNR, BSEG-DMBTR, BSEG-ZTERM corresponding to the vendor code.Set the option PRINT OBJECT ON to First Page, I think this might resolve your problem.
-
How to print the display 2D Barcode details in Oracle Reports
Hi Experts,
Can you pleas share the approach to print the 2d Bar code in reports
we have requirement from our Customer to
display 2D Barcode details in Oracle Reports (In the Invoice print or in
Annexure).
Following are details we have carried out so far :-
1. We have got JAR file from the Vendor.
2. We have loaded the JAR File in the FND_TOP.
3. Then we tried to call the same in the report.
But we got struck here, didn't know how to proceed further because the
JAVA Class is not loaded in Oracle Database.
Kindly help us as to how to achieve the same.What jar is it? What is fnd_top? To load java in the database there are several methods. Please use google to find them, or oracle documentation.
Version of reports?
Edited by: Lars Sjöström on Nov 25, 2012 11:37 PM -
hi,
what are the minimum requirements to display logo in alv report at the top of the page.
i searched forums but did n't get the required answer.Hi
This code is to display logo in the report through alv grid
*& Report ZALVDEMO *
REPORT ZALVDEMO.
TABLES : J_1IEXCHDR, " header table
J_1IEXCDTL, " item table
J_1IPART2, " Excise Part II details
LFA1, " vendor master table
J_1IMOVEND, " vendor excise details table
MSEG, " Document Segment: Material
MKPF, " Header: Material Document
DD07T, " domain text table
T001W. " Plant and Branch Details
DATA : BEGIN OF IT_CHDR OCCURS 100,
DOCNO LIKE J_1IEXCHDR-DOCNO,
DOCYR LIKE J_1IEXCHDR-DOCYR,
EXNUM LIKE J_1IEXCHDR-EXNUM,
EXDAT LIKE J_1IEXCHDR-EXDAT,
WERKS LIKE J_1IEXCHDR-WERKS,
EXBED LIKE J_1IEXCHDR-EXBED,
EXCCD LIKE J_1IEXCHDR-EXCCD,
ECS LIKE J_1IEXCHDR-ECS,
END OF IT_CHDR.
DATA : BEGIN OF IT_CDTL OCCURS 100,
DOCYR LIKE J_1IEXCDTL-DOCYR,
DOCNO LIKE J_1IEXCDTL-DOCNO,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
LIFNR LIKE J_1IEXCDTL-LIFNR,
MATNR LIKE J_1IEXCDTL-MATNR,
MAKTX LIKE J_1IEXCDTL-MAKTX,
CHAPID LIKE J_1IEXCDTL-CHAPID,
EXBAS LIKE J_1IEXCDTL-EXBAS,
EXBED LIKE J_1IEXCDTL-EXBED,
ECS LIKE J_1IEXCDTL-ECS,
MENGE LIKE J_1IEXCDTL-MENGE,
MEINS LIKE J_1IEXCDTL-MEINS,
RDOC2 LIKE J_1IEXCDTL-RDOC2,
END OF IT_CDTL.
DATA TEXT(10).
DATA : BEGIN OF IT_OUT OCCURS 0,
SERIALNO LIKE J_1IPART2-SERIALNO,
TEXT1 LIKE TEXT,
EXNUM LIKE J_1IEXCDTL-EXNUM,
EXDAT LIKE J_1IEXCDTL-EXDAT,
NAME LIKE LFA1-NAME1,
DDTEXT LIKE DD07T-DDTEXT,
EXCCD LIKE J_1IEXCHDR-EXCCD,
BUDAT LIKE MKPF-BUDAT,
EXBAS LIKE IT_CDTL-EXBAS,
EXBED LIKE IT_CDTL-EXBED,
ECS LIKE IT_CDTL-ECS,
MATNR LIKE IT_CDTL-MATNR,
MAKTX LIKE IT_CDTL-MAKTX,
CHAPID LIKE IT_CDTL-CHAPID,
MENGE LIKE IT_CDTL-MENGE,
MEINS LIKE IT_CDTL-MEINS,
DEL_IND(1),
END OF IT_OUT.
DATA IT_PART2 LIKE J_1IPART2 OCCURS 0 WITH HEADER LINE.
DATA S_NO(4) .
DATA DB_CNT LIKE SY-TABIX.
DATA EBELN_T LIKE MSEG-EBELN .
TYPE-POOLS : SLIS.
DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
DATA : LIST_HEADER TYPE SLIS_T_LISTHEADER,
FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
LS_FTCAT TYPE LVC_S_FCAT,
SORTCAT TYPE SLIS_T_SORTINFO_ALV,
SORTCAT_LN LIKE LINE OF SORTCAT,
G_REPID LIKE SY-REPID,
G_BACK_GROUND(70), "like bapibds01-objkey,
GS_VARIANT LIKE DISVARIANT,
G_SAVE ,
GT_EVENTS TYPE SLIS_T_EVENT,
ALV_EVENT TYPE SLIS_ALV_EVENT,
EVENTCAT TYPE SLIS_T_EVENT,
EVENTCAT_LN LIKE LINE OF EVENTCAT,
LAYOUT_IN TYPE SLIS_LAYOUT_ALV,
LAYOUT_IN1 TYPE SLIS_LAYOUT_ALV.
CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
'TOP_OF_PAGE',
GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
'USER_COMMAND',
GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
'BEFORE_OUTPUT'.
ALV_EVENT TYPE SLIS_ALV_EVENT,
DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
DATA REGTYP_1 LIKE J_1IPART2-REGTYP.
SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
PARAMETERS WERKS TYPE J_1IEXCHDR-WERKS.
SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
R2 RADIOBUTTON GROUP GRP.
SELECTION-SCREEN END OF BLOCK B.
INITIALIZATION.
G_REPID = SY-REPID.
G_SAVE = 'A'.
PERFORM BUILD_EVENT USING GT_EVENTS[].
PERFORM ALV_EVENT_INIT.
AT SELECTION-SCREEN.
REFRESH LIST_HEADER.
PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
START-OF-SELECTION.
PERFORM ALV_EVENT_INIT.
G_REPID = SY-REPID.
G_BACK_GROUND = ' ' .
IF R1 = 'X'.
CLEAR R2. CLEAR : REGTYP_1.
REGTYP_1 = 'A'.
set titlebar 'BALAJI' with DB_CNT.
ELSEIF R2 = 'X'.
CLEAR R1.CLEAR : REGTYP_1.
REGTYP_1 = 'C'.
set titlebar 'BALAJI1' with DB_CNT.
ENDIF.
SELECT * FROM J_1IPART2
INTO CORRESPONDING FIELDS OF TABLE IT_PART2
WHERE REGTYP = REGTYP_1 AND
TRNTYP = 'GRPO' AND
BUDAT IN BUDAT.
DOCYR = IT_CDTL-DOCYR AND
DOCNO = IT_CDTL-DOCNO.
LOOP AT IT_PART2.
SELECT SINGLE * FROM J_1IEXCHDR
INTO CORRESPONDING FIELDS OF IT_CHDR
WHERE TRNTYP = 'GRPO' AND
DOCYR = IT_PART2-DOCYR AND
DOCNO = IT_PART2-DOCNO AND
WERKS = WERKS AND
exdat IN BUDAT.
ORDER BY EXDAT.
IF SY-SUBRC = 0.
APPEND IT_CHDR.
ELSE.
CONTINUE.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE E084.
ENDIF.
ENDLOOP.
LOOP AT IT_CHDR.
SELECT * FROM J_1IEXCDTL
INTO CORRESPONDING FIELDS OF IT_CDTL
FOR ALL ENTRIES IN IT_CHDR
WHERE
TRNTYP = 'GRPO' AND
DOCNO = IT_CHDR-DOCNO AND
DOCYR = IT_CHDR-DOCYR AND
EXNUM = IT_CHDR-EXNUM AND
EXDAT = IT_CHDR-EXDAT AND
WERKS = IT_CHDR-WERKS.
IF SY-SUBRC = 0.
APPEND IT_CDTL.
ELSE.
CONTINUE.
ENDIF.
ENDSELECT.
ENDLOOP.
LOOP AT IT_CDTL.
CLEAR TEXT.
DB_CNT = DB_CNT + 1.
READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM.
READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
IT_OUT-SERIALNO = IT_PART2-SERIALNO.
SELECT SINGLE NAME1 FROM LFA1
INTO IT_OUT-NAME
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM LFA1
WHERE LIFNR = IT_CDTL-LIFNR.
IF LFA1-LAND1 EQ 'IN'.
TEXT = 'INVOICE'.
IT_OUT-TEXT1 = TEXT.
ELSE.
TEXT = 'BOE'.
IT_OUT-TEXT1 = TEXT.
ENDIF.
SELECT SINGLE * FROM J_1IMOVEND
WHERE LIFNR = IT_CDTL-LIFNR.
SELECT SINGLE * FROM DD07T
INTO IT_OUT-DDTEXT
WHERE DOMNAME = 'J_1IVTYP' AND
DDLANGUAGE = 'EN' AND
DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
OR
DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
DD07T-DDTEXT = 'Dealer'.
ENDIF.
IT_OUT-DDTEXT = DD07T-DDTEXT.
ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
*goods'.
DD07T-DDTEXT =
CLEAR EBELN_T.
SELECT SINGLE LFBNR FROM MSEG
INTO EBELN_T
WHERE MBLNR = IT_CDTL-RDOC2 .
SELECT SINGLE * FROM MSEG
WHERE BWART = '106' AND
LFBNR = EBELN_T ."and
ebeln = ebeln_t.
IF SY-SUBRC = 0.
IT_OUT-DEL_IND = 'X'.
ELSE.
IT_OUT-DEL_IND = ' '.
ENDIF.
SELECT SINGLE BUDAT FROM MKPF
INTO IT_OUT-BUDAT
WHERE MBLNR = EBELN_T ."MSEG-LFBNR.
IT_OUT-EXNUM = IT_CDTL-EXNUM.
IT_OUT-EXDAT = IT_CDTL-EXDAT.
IT_OUT-EXCCD = IT_CHDR-EXCCD.
IT_OUT-EXBAS = IT_CDTL-EXBAS.
IT_OUT-EXBED = IT_CDTL-EXBED.
IT_OUT-ECS = IT_CDTL-ECS.
IT_OUT-MATNR = IT_CDTL-MATNR.
IT_OUT-MAKTX = IT_CDTL-MAKTX.
IT_OUT-CHAPID = IT_CDTL-CHAPID.
IT_OUT-MENGE = IT_CDTL-MENGE.
IT_OUT-MEINS = IT_CDTL-MEINS.
APPEND IT_OUT.
EX_NO = IT_CDTL-EXNUM.
ENDLOOP.
Title Portion
IF REGTYP_1 = 'A'.
SET TITLEBAR 'BALAJI' WITH DB_CNT.
ELSEIF REGTYP_1 = 'C'.
SET TITLEBAR 'BALAJI1' WITH DB_CNT.
ENDIF.
AFIELD-COL_POS = 1.
AFIELD-FIELDNAME = 'SERIALNO'.
AFIELD-SELTEXT_L = 'INPUTS'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 2.
AFIELD-FIELDNAME = 'TEXT1'.
AFIELD-SELTEXT_L = 'TYPE OF DOC'.
AFIELD-JUST = 'L'.
AFIELD-DECIMALS_OUT = '0'.
AFIELD-NO_ZERO = 'X'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 3.
AFIELD-FIELDNAME = 'EXNUM'.
AFIELD-SELTEXT_L = 'DOC.NO'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 4.
AFIELD-FIELDNAME = 'EXDAT'.
AFIELD-SELTEXT_L = 'DOC.DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 5.
AFIELD-FIELDNAME = 'NAME'.
AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 6.
AFIELD-FIELDNAME = 'DDTEXT'.
AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 7.
AFIELD-FIELDNAME = 'EXCCD'.
AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
AFIELD-NO_ZERO = 'X'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 8.
AFIELD-FIELDNAME = 'BUDAT'.
AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 9.
AFIELD-FIELDNAME = 'EXBAS'.
AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
AFIELD-DO_SUM = 'X'.
AFIELD-JUST = 'R'.
AFIELD-DECIMALS_OUT = '2'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 10.
AFIELD-FIELDNAME = 'EXBED'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 11.
AFIELD-FIELDNAME = 'ECS'.
AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
AFIELD-JUST = 'R'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 12.
AFIELD-FIELDNAME = 'MATNR'.
AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 13.
AFIELD-FIELDNAME = 'MAKTX'.
AFIELD-SELTEXT_L = 'DESCRIPTION'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 14.
AFIELD-FIELDNAME = 'CHAPID'.
AFIELD-SELTEXT_L = 'TARIFF-ID'.
AFIELD-JUST = 'L'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 15.
AFIELD-FIELDNAME = 'MENGE'.
AFIELD-SELTEXT_L = 'QUANTITY'.
AFIELD-JUST = 'R'.
AFIELD-DO_SUM = ' '.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 16.
AFIELD-FIELDNAME = 'MEINS'.
AFIELD-SELTEXT_L = 'UOM'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
AFIELD-COL_POS = 17.
AFIELD-FIELDNAME = 'DEL_IND'.
AFIELD-SELTEXT_L = 'Deleted'.
AFIELD-JUST = 'C'.
APPEND AFIELD TO FIELDCAT.
* LAYOUT FOR ZEBRA CATLOG
LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT_IN-ZEBRA = 'X'.
LAYOUT_IN-GET_SELINFOS = 'X'.
LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
LAYOUT_IN-DETAIL_POPUP = 'X' .
SORTCAT-decimals = '0'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_SAVE = G_SAVE
IS_VARIANT = GS_VARIANT
IT_FIELDCAT = FIELDCAT
IT_SORT = SORTCAT
IS_LAYOUT = LAYOUT_IN
IT_EVENTS = EVENTCAT
I_BACKGROUND_ID = g_back_ground
TABLES
T_OUTTAB = IT_OUT.
*& Form TOP_OF_PAGE_LIST_HEADER
text
-->LIST_HEADERtext
FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
DATA : HLINE TYPE SLIS_LISTHEADER,
TEXT(60) TYPE C.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'ROOTS INDUSTRIES LTD' TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'PLANT :' TO TEXT.
WRITE WERKS TO TEXT+8.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-NAME1 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-STRAS TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE T001W-ORT01 TO TEXT.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
CLEAR : HLINE,TEXT.
HLINE-TYP = 'H'.
WRITE 'DATE :' TO TEXT.
WRITE BUDAT-LOW TO TEXT+7.
IF BUDAT-HIGH NE ''.
WRITE 'TO' TO TEXT+18.
WRITE BUDAT-HIGH TO TEXT+22.
ENDIF.
HLINE-INFO = TEXT.
APPEND HLINE TO LIST_HEADER.
ENDFORM. "TOP_OF_PAGE_LIST_HEADER
*& Form ALV_EVENT_INIT
text
FORM ALV_EVENT_INIT .
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
APPEND ALV_EVENT TO EVENTCAT.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
APPEND ALV_EVENT TO GT_EVENTS.
CLEAR ALV_EVENT.
ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
APPEND ALV_EVENT TO GT_EVENTS.
ENDFORM. "ALV_EVENT_INIT
*& Form ALV_TOP_OF_PAGE
text
FORM ALV_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = LIST_HEADER
I_LOGO = 'ENJOYSAP_LOGO'.
ENDFORM. "ALV_TOP_OF_PAGE
*& Form BUILD_EVENT
text
-->P_GT_EVENTS[] text
FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = P_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
ALV_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
APPEND ALV_EVENT TO P_EVENTS.
ENDIF.
ENDFORM. " BUILD_EVENT
this wud help u -
How to Summarize a Detailed Debtors Aging Report
Dear All,
I have written a Query for a Detailed Debtors Aging Report - i.e a report which lists ALL unpaid invoices. It works smoothly.
I use SAP B1 8.8.
Now, I want to create a Summarized Debtors Aging Report which groups all the unpaid invoices for a particular debtor and displays only 1 row for each debtor.
I use the following commands: SUM(), GROUP BY to modify the original query.
A very simplified version of my Detailed report is in Screen 1.
The modifications I made to it to convert it to a Summarized report are in Screen 2. It does not work!
I have traced the error to the following:
SUM ((SELECT T0.BalDueDeb - T0.BalDueCred WHERE DateDiff(mm, T0.TaxDate,@taxdt) = 1))
AS '1 Mth Ago'
This is the code I use to put the amount due in the appropriate Age Bracket.
The SQL Error Message is:
Cannot perform an aggregate function on an expression containing an aggregate or a sub query
Could you please help me rewrite this so that it works?
Thanks
Leon Lai
Screen 1 : The Original DETAILED report
declare @taxdt datetime
set @taxdt
/*select 1 from jdt1 t0 where t0.TaxDate*/ = [%1]
SELECT
CASE
WHEN T0.Account = 1220101 THEN 'Prim Cust'
WHEN T0.Account = 1220102 THEN 'Fgn Cust'
WHEN T0.Account = 1220103 THEN 'Local Cust'
WHEN T0.Account = 1220104 THEN 'Staff Loan'
WHEN T0.Account = 1220105 THEN 'Dep with TP'
WHEN T0.Account = 1220106 THEN 'Adv to Cust'
WHEN T0.Account = 1220108 THEN 'Sund Drs'
ELSE 'Error ! ! !'
END AS 'Control A/c',
T1.CardCode AS 'BP Code',
T2.Notes2 AS 'BP Name',
(T0.Debit - T0.Credit) AS 'Orig. Rs',
(T0.BalDueDeb - T0.BalDueCred) AS 'Bal. Rs',
(SELECT T0.BalDueDeb - T0.BalDueCred WHERE DateDiff(mm, T0.TaxDate, @taxdt) = 1)
AS '1 Mth Ago'
FROM JDT1 T0
INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
LEFT OUTER JOIN OCPR T2 ON T1.CardCode = T2.Cardcode
LEFT OUTER JOIN OJDT T3 ON T0.TransID = T3.TransID
LEFT OUTER JOIN OINV T4 ON T3.TransID = T4.TransID
LEFT OUTER JOIN ORIN T5 ON T3.TransID = T5.TransID
WHERE
T1.CardType = 'C'
and (Balance) != 0
and (T0.BalDueDeb - T0.BalDueCred) != 0
Screen 2 : The Modified SUMMARY report
declare @taxdt datetime
set @taxdt
/*select 1 from jdt1 t0 where t0.TaxDate*/ = [%1]
SELECT
CASE
WHEN T0.Account = 1220101 THEN 'Prim Cust'
WHEN T0.Account = 1220102 THEN 'Fgn Cust'
WHEN T0.Account = 1220103 THEN 'Local Cust'
WHEN T0.Account = 1220104 THEN 'Staff Loan'
WHEN T0.Account = 1220105 THEN 'Dep with TP'
WHEN T0.Account = 1220106 THEN 'Adv to Cust'
WHEN T0.Account = 1220108 THEN 'Sund Drs'
ELSE 'Error ! ! !'
END AS 'Control A/c',
T1.CardCode AS 'BP Code',
T2.Notes2 AS 'BP Name',
SUM ((T0.Debit - T0.Credit)) AS 'Orig. Rs', /* Added SUM()*/
SUM ((T0.BalDueDeb - T0.BalDueCred)) AS 'Bal. Rs', /*Added SUM()*/
SUM ((SELECT T0.BalDueDeb - T0.BalDueCred
WHERE DateDiff(mm, T0.TaxDate, @taxdt) = 1))
AS '1 Mth Ago' /*Added SUM() PROBLEM IS HERE! */
FROM JDT1 T0
INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
LEFT OUTER JOIN OCPR T2 ON T1.CardCode = T2.Cardcode
LEFT OUTER JOIN OJDT T3 ON T0.TransID = T3.TransID
LEFT OUTER JOIN OINV T4 ON T3.TransID = T4.TransID
LEFT OUTER JOIN ORIN T5 ON T3.TransID = T5.TransID
WHERE
T1.CardType = 'C'
and (Balance) != 0
and (T0.BalDueDeb - T0.BalDueCred) != 0
GROUP BY T0.Account, T1.CardCode, T2.Notes2 /*Added GROUP BY*/Hi,
Try:
declare @taxdt datetime
set @taxdt
/*select 1 from jdt1 t0 where t0.TaxDate*/ = [%1]
SELECT
CASE T0.Account
WHEN 1220101 THEN 'Prim Cust'
WHEN 1220102 THEN 'Fgn Cust'
WHEN 1220103 THEN 'Local Cust'
WHEN 1220104 THEN 'Staff Loan'
WHEN 1220105 THEN 'Dep with TP'
WHEN 1220106 THEN 'Adv to Cust'
WHEN 1220108 THEN 'Sund Drs'
ELSE 'Error ! ! !'
END AS 'Control A/c',
T1.CardCode AS 'BP Code',
T2.Notes2 AS 'BP Name',
SUM (T0.Debit - T0.Credit) AS 'Orig. Rs', /* Added SUM()*/
SUM (T0.BalDueDeb - T0.BalDueCred) AS 'Bal. Rs', /*Added SUM()*/
(SELECT SUM (T6.BalDueDeb - T6.BalDueCred) FROM JDT1 T6
WHERE DateDiff(mm, T6.TaxDate, @taxdt) = 1 AND T6.TransID=T1.TransID)
AS '1 Mth Ago' /*Added SUM() PROBLEM IS HERE! */
FROM JDT1 T0
INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
LEFT JOIN OCPR T2 ON T1.CardCode = T2.Cardcode
LEFT JOIN OJDT T3 ON T0.TransID = T3.TransID
LEFT JOIN OINV T4 ON T3.TransID = T4.TransID
LEFT JOIN ORIN T5 ON T3.TransID = T5.TransID
WHERE
T1.CardType = 'C'
and (Balance) != 0
and (T0.BalDueDeb - T0.BalDueCred) != 0
GROUP BY T0.Account, T1.CardCode, T2.Notes2 /*Added GROUP BY*/
Thanks,
Gordon -
REPOST -Summarizing a Detailed Debtors Aging Report
Dear All,
I use a Query (SAP B1 8.8) for Detailed Debtors Aging Report - i.e a report which lists all unpaid invoices and sends each amount to a column representing the age bracket.
Now, I want to create a Summary Debtors Aging Report which groups all the unpaid invoices for a particular debtor and displays only 1 row for each debtor. The total due by the debtor is analysed in 1 or more Age Brackets.
I use the SUM() and GROUP BY claused to modify the original query.
A very simplified version of my Detailed report is in Screen 1.
The modifications I made to it to convert it to a Summarized report are in Screen 2. It does not work!
I have traced the error to the following:
SUM ((SELECT T0.BalDueDeb - T0.BalDueCred
WHERE DateDiff(mm, T0.TaxDate,@taxdt) = 1))
AS '1 Mth Ago'
Error is:
Cannot perform an aggregate function on an expression containing an aggregate or a sub query
I also tried this code:
(SELECT
SUM (T6.BalDueDeb - T0.BalDueCred)
FROM JDT1 T6
WHERE DateDiff(mm, T0.TaxDate, @taxdt) = 1
AND T6.TransID = T0.TransID)
AS '1 Mth Ago'
Error is:
'JDT1.TransID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Could you help me write the code correctly?
Thanks
Leon Lai
ADDITIONAL INFO
Screen 1 : The Original DETAILED report
declare @taxdt datetime
set @taxdt
/*select 1 from jdt1 t0 where t0.TaxDate*/ = [%1]
SELECT
CASE
WHEN T0.Account = 1220101 THEN 'Prim Cust'
WHEN T0.Account = 1220102 THEN 'Fgn Cust'
WHEN T0.Account = 1220103 THEN 'Local Cust'
WHEN T0.Account = 1220104 THEN 'Staff Loan'
WHEN T0.Account = 1220105 THEN 'Dep with TP'
WHEN T0.Account = 1220106 THEN 'Adv to Cust'
WHEN T0.Account = 1220108 THEN 'Sund Drs'
ELSE 'Error ! ! !'
END AS 'Control A/c',
T1.CardCode AS 'BP Code',
T2.Notes2 AS 'BP Name',
(T0.Debit - T0.Credit) AS 'Orig. Rs',
(T0.BalDueDeb - T0.BalDueCred) AS 'Bal. Rs',
(SELECT T0.BalDueDeb - T0.BalDueCred WHERE DateDiff(mm, T0.TaxDate, @taxdt) = 1)
AS '1 Mth Ago'
FROM JDT1 T0
INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
LEFT OUTER JOIN OCPR T2 ON T1.CardCode = T2.Cardcode
LEFT OUTER JOIN OJDT T3 ON T0.TransID = T3.TransID
LEFT OUTER JOIN OINV T4 ON T3.TransID = T4.TransID
LEFT OUTER JOIN ORIN T5 ON T3.TransID = T5.TransID
WHERE
T1.CardType = 'C'
and (Balance) != 0
and (T0.BalDueDeb - T0.BalDueCred) != 0
Screen 2 : The Modified SUMMARY report
declare @taxdt datetime
set @taxdt
/*select 1 from jdt1 t0 where t0.TaxDate*/ = [%1]
SELECT
CASE
WHEN T0.Account = 1220101 THEN 'Prim Cust'
WHEN T0.Account = 1220102 THEN 'Fgn Cust'
WHEN T0.Account = 1220103 THEN 'Local Cust'
WHEN T0.Account = 1220104 THEN 'Staff Loan'
WHEN T0.Account = 1220105 THEN 'Dep with TP'
WHEN T0.Account = 1220106 THEN 'Adv to Cust'
WHEN T0.Account = 1220108 THEN 'Sund Drs'
ELSE 'Error ! ! !'
END AS 'Control A/c',
T1.CardCode AS 'BP Code',
T2.Notes2 AS 'BP Name',
SUM ((T0.Debit - T0.Credit)) AS 'Orig. Rs', /* Added SUM()*/
SUM ((T0.BalDueDeb - T0.BalDueCred)) AS 'Bal. Rs', /*Added SUM()*/
SUM ((SELECT T0.BalDueDeb - T0.BalDueCred
WHERE DateDiff(mm, T0.TaxDate, @taxdt) = 1))
AS '1 Mth Ago' /*Added SUM() PROBLEM IS HERE! */
FROM JDT1 T0
INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
LEFT OUTER JOIN OCPR T2 ON T1.CardCode = T2.Cardcode
LEFT OUTER JOIN OJDT T3 ON T0.TransID = T3.TransID
LEFT OUTER JOIN OINV T4 ON T3.TransID = T4.TransID
LEFT OUTER JOIN ORIN T5 ON T3.TransID = T5.TransID
WHERE
T1.CardType = 'C'
and (Balance) != 0
and (T0.BalDueDeb - T0.BalDueCred) != 0
GROUP BY T0.Account, T1.CardCode, T2.Notes2 /*Added GROUP BY*/Hi ,
Try this:
declare @taxdt datetime
set @taxdt
/*select 1 from jdt1 t0 where t0.TaxDate*/ = [%1]
SELECT
CASE
WHEN T0.Account = 1220101 THEN 'Prim Cust'
WHEN T0.Account = 1220102 THEN 'Fgn Cust'
WHEN T0.Account = 1220103 THEN 'Local Cust'
WHEN T0.Account = 1220104 THEN 'Staff Loan'
WHEN T0.Account = 1220105 THEN 'Dep with TP'
WHEN T0.Account = 1220106 THEN 'Adv to Cust'
WHEN T0.Account = 1220108 THEN 'Sund Drs'
ELSE 'Error ! ! !'
END AS 'Control A/c',
T1.CardCode AS 'BP Code',
T2.Notes2 AS 'BP Name',
SUM ((T0.Debit - T0.Credit)) AS 'Orig. Rs', /* Added SUM()*/
SUM ((T0.BalDueDeb - T0.BalDueCred)) AS 'Bal. Rs', /*Added SUM()*/
((SELECT SUM(T0.BalDueDeb) - Sum(T0.BalDueCred)
WHERE DateDiff(mm, T0.TaxDate, @taxdt) = 1))
AS '1 Mth Ago' /*Added SUM() PROBLEM IS HERE! */
FROM JDT1 T0
INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
LEFT OUTER JOIN OCPR T2 ON T1.CardCode = T2.Cardcode
LEFT OUTER JOIN OJDT T3 ON T0.TransID = T3.TransID
LEFT OUTER JOIN OINV T4 ON T3.TransID = T4.TransID
LEFT OUTER JOIN ORIN T5 ON T3.TransID = T5.TransID
WHERE
T1.CardType = 'C'
and (Balance) != 0
and (T0.BalDueDeb - T0.BalDueCred) != 0
GROUP BY T0.Account, T1.CardCode, T2.Notes2 ,T0.TaxDate
Thanks,
Neetu -
Problem in displaying detail along with Aggregate data.
Hi
I am new to BIP and I am facing problem to display detail as well as aggregate values at a time.
My data is like below
Security Value
S1 10
S2 20
S3 30
S3 40
S4 50
S5 60
S5 70
I want to display data in report as
Security Value
S1 10
S2 20
S3 30
S3 40
Total S3 70
S4 50
S5 10
S5 70
Total S5 80
I tried using for <?for-each-group:G_2;./Security?> but I am getting following output:
Security Value
S1 10
S2 20
S3 30
Total S3 70
S4 50
S5 10
Total S5 80
Template:
<?for-each-group:G_2;./Security?> <?Security?>:<?Value?>
<?if:count(current-group()/SECNAME)>1?> Total <?Security?>:<?sum(current-group()/Value)?> <?end if?> <?end for-each-group?>
The problem is I need to display detail as well as aggregate data. Please suggest.Hi Kavipriya
Thanks for your response.
I tried the code you provided but I am getting blank PDF report from RTF template.
Also I didn’t understand <?variable:GRP;G2?>, is this declaration of group variable or something?
Below is my xml:
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Oracle BI Publisher 11.1.1.3.0-->
<DATA_DS>
<G_1>
<SECURITY>S1</SECURITY>
<VALUE1>10</VALUE1>
</G_1>
<G_1>
<SECURITY>S2</SECURITY>
<VALUE1>20</VALUE1>
</G_1>
<G_1>
<SECURITY>S3</SECURITY>
<VALUE1>30</VALUE1>
</G_1>
<G_1>
<SECURITY>S3</SECURITY>
<VALUE1>40</VALUE1>
</G_1>
<G_1>
<SECURITY>S4</SECURITY>
<VALUE1>50</VALUE1>
</G_1>
<G_1>
<SECURITY>S4</SECURITY>
<VALUE1>30</VALUE1>
</G_1>
</DATA_DS>
And following is the code I used in RTF template
<?variable:GRP;G1?>
<?for-each-group:G1;./SECURITY?> <?xdoxslt:set_variable($_XDOCTX,'SEC',./SECURITY)?>
<?for-each:$GRP[./SECURITY= xdoxslt:get_variable($_XDOCTX,'SEC')]?>
<?SECURITY?>:<? VALUE1?> <?end for-each?>
<?if:count(current-group()/SECURITY)>1?> Total <?SECURITY?>:<?sum(current-group()/VALUE1)?> <?end if?>
<?end for-each-group?> -
SPM Detailed Role level Reports don't show and other minor usage issues
We have successfully installed SPM on our DEV and QA boxes and are trying to test our reporting. We have setup role based firefighter and have got it to work on the ABAP side as well as on the Java side. However, when I go to the Role Reports in the web UI for SPM, and I run the Log Report, I have a problem.
The Log Report pulls the role firefighter data from the backend and displays it. There is an icon at the top right called "Display Detailed Reports", and upon clicking it, it tells me there's no match or conflict found.
However if I go into the firefighter tcode and then look at the same logs, there is a little more detail which I'd have expected to see in the web based detail report.
Do you know what I'm missing? I already checked the trace for any auth failures, and there is no auth failure.
Thanks,
SantoshSantosh,
Which traces have you run? I have a few similar issues which may benefit from running a trace.
The only other authorisations I would check is that the RFC / Connector user has the authorisations to be full logs in both the backend and web versions.
Simon -
IP SLA Detailed daily, weekly Report could not be found
Hello.
I use Cisco Prime LMS 4.2.1. When i generate IPSLA Detailed UDP Jitter Report with granularity "Minute" "Hourly" everything is OK, but when i with "Daily" "Weekly" i get this message: "Report could not be found". Report "Availability" and "Latency" generate well.
In IPSLA System summary i see again only "Availability" and "Latency" reports.
System Consolidation Daily Job generates every day. And inside job i can see that UDP Jitter rows is proccesed.
By the way, I can generate UDP Jitter report from CLI.
In Relise notes LMS 4.2 i saw open bug CSCtv11780:
An error message "Report could not found" is displayed when you generate a report using:
•System: Management Type in the Report Attributes column, and
•any other attributes, such as Location from System Inventory Group in the Rules for Attributes column.
Someone help me, please.SharePoint guys figured it out. That error about the missing DLL is very misleading because it's still not there after we got it all working.
needed to install sql 2012 sp2 msas oledb driver
some users didn't have limited read access to the root web app
Jakub @ Adelaide, Australia Blog -
How to set the number of rows displayed in a classical report at runtime?
Hi,
Our customer has several standard client hardware configuration and would like to enable end users to choose their 'display profile' at login time. This 'display profile' would contain predefined values for these hardware configurations and supposed to set various paramters that should define the number of rows displayed in a classical report region.
I tried to provide parameters on the report region but it refused to accept anything but numerical values. Is it possible to do this?
Regards, TamasThe link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
It sounds like you have been trying to enter—unsuccessfully—an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application. -
Display Comments in Webi Report
Hi All,
We have a requirement, to display comments (2 or 3 paragraph in each page of report).The text needs to preserve the format (bold, bullets and colored text) i.e the format from the source data should be retained when displayed in the webi report.
Say for example the source is the excel and the text is coloured red or green , some part of the text is bold, all these formats should be preserved in the webi report also.
Can you please suggest, how to implemet this in webi report?
Thanks,
Sudhayou can take the formatted text in a word document, take a screen shot, put it in mspaint and select the required part. now place this picture in the blank cell's background image. this will preserve the formats of all kinds.
but u cant change the text dynamically.
usually we do this to give users an introduction page(tab1 in report followed by report tabs.) describing the application.
Thanks,
karthik -
Hi all,
I have a requirment in my report where in i would not like to display the -ve values as negative in the columns. I do not have the option to use NODIM() at the query level, because i am simultaneously switching between the column displaying actual values as well as being input ready. How can we eliminate the -ve sign from the values being displayed, so that the report display just the absolute numbers.
Kindly help.Hey
Create Calculate KeyFigure where (YOURKF<0)(YORKF*-1)+(YOURKF>0)(YORKF).
I think in this way your will get absolute value
Aharon -
Conditional display in a SQL-Report/Report Region
Hi,
here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
First you have to put the following javascript code in the Page HTML-Header:
<script type="text/javascript">
<!--
// SOURCE
// W:\oracle\PRJ DWLS\javascript.07.js
// Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
// Help (Substitution Strings):
// http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
// HTML Expression:
// <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
function ex_conditional_td
( p_id
, p_rownum
, p_cellnum
var l_td;
l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
// hier die Bedingung definieren
if (true) {
l_td.style.color = '#808080';
} // -- eof ex_conditional_td -- //
// Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
// HTML Expression:
// <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
function ex_conditional_tr
( p_id
, p_rownum
var l_tr; // TABLE.TR
var l_td; // TABLE.TR.TD
if (true) {
l_tr = vd_getRow(p_id, p_rownum);
l_tr.onmouseover = null;
l_tr.onmouseout = null;
for (var i=0; i<l_tr.cells.length; i++) {
l_td = l_tr.cells;
l_td.style.backgroundColor = '#DDDDDD';
} // -- eof ex_conditional_tr() -- //
var g_DEBUG = false;
var g_TBODY = null;
// Liefert das Body-Element der Tabelle mit der ID <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// Return
// das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getBody
( p_id
if (g_TBODY == null) {
var l_table = null;
l_table = document.getElementById( p_id );
if (l_table == null) {
l_table = document.getElementByName( p_id );
if (l_table != null) {
if (vd_debug()) {
alert("Tabelle gefunden, " + l_table.nodeName);
g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
return g_TBODY;
} // -- eof vd_getBody() -- //
// Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// Return
// die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getRow
( p_id
, p_rownum
var l_body = vd_getBody(p_id);
if ( l_body != null
&& l_body.nodeName == 'TBODY'
&& l_body.children[p_rownum].nodeName == 'TR') {
return l_body.children[p_rownum];
else {
return null;
} // -- eof vd_getRow() -- //
// Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
// Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// p_column - der Index der Spalte / Zelle
// Return
// die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
function vd_getColumn
( p_id
, p_rownum
, p_column
var l_tr = vd_getRow(p_id, p_rownum);
if ( l_tr != null
&& l_tr.nodeName == 'TR'
&& l_tr.children.length >= p_column
&& l_tr.children[p_column].nodeName == 'TD') {
return l_tr.children[p_column];
else {
return null;
} // -- eof vd_getColumn() -- //
// Rekursives Suchen nach einem Node.
// Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
// SQL-Report.
// Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
// darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
// Klasse <p_class> befindet.
// Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
// "t10data" formatiert.
// Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
// Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
// selbst ermittelt werden.
// Der Beispielaufruf:
// var l_body;
// var l_node = document.getElementById( 'R112233' );
// l_body = search( l_node, 'TD', 't10data', 'TBODY');
// durchsucht also das mit der Id "R112233" versehene Element [der Report, für
// den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
// die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
// definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
// Parameter
// p_node - das Ausgangselement
// p_searchIn - der Knotenname, der durchsucht werden soll
// [node.nodeName == p_searchIn]
// p_class - der Name der CSS Klasse
// [node.classList[<index>] == p_class
// p_parentName - der Name [node.parentNode.nodeName == p_parentName]
// des Elements, das zurückgeliefert werden soll. Wird als
// p_parentName der Suchname p_searchIn angegeben, wird
// das Element selbst zurückgegeben.
// Return
// das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
function vd_search
( p_node
, p_searchIn
, p_class
, p_parentName
var LN = "vd_search";
var l_element = null;
// DEBUG
if (vd_debug()) {
alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
// 1) der aktuelle Knoten ist der, der durchsucht werden soll
if (p_node.nodeName == p_searchIn) {
if (p_node.classList.length > 0) {
for(var c=0; c<p_node.classList.length; c++) {
if (p_node.classList[c] == p_class) {
// Parent Node dynmisch suchen
l_node = p_node;
if (l_node.nodeName == p_parentName) {
return l_node;
while(l_node != null && l_node.parentNode != null) {
if (l_node.parentNode.nodeName == p_parentName) {
return l_node.parentNode;
else {
l_node = l_node.parentNode;
// 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
// weitersuchen
if (p_node.children.length > 0) {
var i = 0;
while (i<p_node.children.length && l_element==null) {
l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
i++;
return l_element;
} // -- eof vd_search() -- //
// Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
// Return
// true - debug ist eingeschaltet
// false - debug ist ausgeschaltet
function vd_debug()
return g_DEBUG;
-->
</script>
Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
Second is, that you set an static id for your report region. I prefer this structure:
R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
<script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
<script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum
c) the cellnum (here we have to subtract 1 to get the "real" cell index)
The "ex_conditional" functions are just a representation of how to get the row or cell node.
Hope this help a bit.
TomI would use a CASE statement in the select....
each CASE would be an img src tag for a different button if the button is an image.
does that make sense? I can include an example if you would like... -
Can we insert new Detail Section After Report Footer in Crystal Report
Hi All,
Is it possible to insert new 'detail' section after ' Report Footer' in the Crystal Report, i know this is possible in 'detail' section where you can insert new detail one after another, but i want to insert another ' detail' section after Report Footer according my required result.
Regards
RahulHi Rahul...........
Open Crystal Report and go to Insert option and select SubReport. From here you can create Subreport........
Check below links....
http://msdn.microsoft.com/en-us/library/ms227520%28v=vs.80%29.aspx
http://www.youtube.com/watch?v=JVNkhj_rnMY
Regards,
Rahul
Maybe you are looking for
-
I've created more than one Edge Animate "Object" for the website, but can't seem to get them both to load into Dreamweaver. Is it possible to have more than one "Object" on a site? I'm using Windows 8.1
-
IPhoto doesn't show up in iMovie media browser
I have the fully installed iLife 06, and when I am in iMovie and go to the media browser to pick an image, nothing shows up to populate the browser. It seems as if the browser is not seeing iPhoto. I have tried this with iPhoto open and closed. No di
-
Cannot manually download music to my iPhone.
I bought songs off of iTunes and when I go to drag them to my iPhone to be downloaded, it doesn't form the blue box around it and let me download it to my iPhone. It doesn't say anything, it just won't let the song download. The iPhone is connected v
-
Combined more Data Fields from different segments in single report
Hi all, i want to combined report from more then one segment(like 2 fields from Sales & Distribution & one Field from Inventory) then what should i do so far, should i create cubes in respective segment, either i create that but when i add it into Se
-
hi every one, any one plz help me to let me know the reason why we need to create the directory strucutre like the doucument root under which the WEB-INF under which the classes and lib directories.I am a beginner in J2EE,so plz let me know why we ne