Query in interactive report
Hi All
i developed a report based on interactive report concept. this report is working fine. my question is once it is displaying the basic list i will click on company code then only it has to display secondary list ( here i keep hotspot also) but what happends in my code if i click on any filed(in basic list output) it is showing secondary list. i am sending my code below... anybody can suggest me how to fix this issue.
REPORT zmahi_testprogram1
NO STANDARD PAGE HEADING.
*"-- Tables
DATA : bsis,
bsid.
*"-- Types declaration
TYPES : BEGIN OF it_bsis,
bukrs TYPE bsis-bukrs, " Company Code
hkont TYPE bsis-hkont, " General ledger account
augdt TYPE bsis-augdt, " Clearing Date
augbl TYPE bsis-augbl, " Document Number
zuonr TYPE bsis-zuonr, " Assignment number
gjahr TYPE bsis-gjahr, " Fiscal year
belnr TYPE bsis-belnr, " Accounting document number
END OF it_bsis.
TYPES : BEGIN OF it_bsid,
bukrs TYPE bsid-bukrs, " Company Code
kunnr TYPE bsid-kunnr, " Customer number
umsks TYPE bsid-umsks, " Special G/L Transaction Type
umskz TYPE bsid-umskz, " Special G/L Indicator
augdt TYPE bsid-augdt, " Clearing Date
augbl TYPE bsid-augbl, " Document Number
zuonr TYPE bsid-zuonr, " Assignment number
END OF it_bsid.
*"-- Internal table declaration
DATA : itab_bsis TYPE it_bsis OCCURS 0 WITH HEADER LINE,
itab_bsid TYPE it_bsid OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
PARAMETER : p_bukrs TYPE bsid-bukrs. " Customer number
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM get_data. " GET DATA FROM BSIS TABLE
PERFORM get_bsid. " GET DATA FROM BSID TABLE
PERFORM display_data. " DISPLAY DATA
*& Form get_data
FORM get_data.
SELECT bukrs
hkont
augdt
augbl
zuonr
gjahr
belnr
FROM bsis
INTO TABLE itab_bsis
WHERE bukrs = p_bukrs.
ENDFORM. " get_data
*& Form get_bsid
FORM get_bsid.
CHECK NOT itab_bsis[] IS INITIAL.
SELECT bukrs
kunnr
umsks
umskz
augdt
augbl
zuonr
FROM bsid
INTO TABLE itab_bsid
FOR ALL ENTRIES IN itab_bsis
WHERE bukrs = itab_bsis-bukrs.
ENDFORM. " get_bsid
*& Form display_data
FORM display_data.
DATA : wa_bsid TYPE it_bsid.
LOOP AT itab_bsid INTO wa_bsid.
WRITE : wa_bsid-bukrs HOTSPOT ON,
wa_bsid-umsks,
wa_bsid-umskz,
wa_bsid-augdt,
wa_bsid-augbl,
wa_bsid-zuonr.
HIDE itab_bsid-bukrs.
ENDLOOP.
ENDFORM. " display_data
TOP-OF-PAGE
TOP-OF-PAGE.
WRITE : 'This is basic list'.
TOP-OF-PAGE DURING LINE-SELECTION
TOP-OF-PAGE DURING LINE-SELECTION.
WRITE : 'This is secondary list'.
AT LINE-SELECTION
AT LINE-SELECTION.
CASE sy-lsind.
WHEN '1'.
PERFORM get_bsis. " get data from vbak table
WHEN '2'.
PERFORM get_bsik.
ENDCASE.
*& Form get_bsis
FORM get_bsis.
*"-- types declaration
TYPES : BEGIN OF it_bsis,
bukrs TYPE bsis-bukrs,
hkont TYPE bsis-hkont,
augdt TYPE bsis-augdt,
augbl TYPE bsis-augbl,
zuonr TYPE bsis-zuonr,
END OF it_bsis.
*"-- internal table declaration
DATA : itab_bsis TYPE it_bsis OCCURS 0 WITH HEADER LINE,
wa_bsis TYPE it_bsis.
SELECT bukrs
hkont
augdt
augbl
zuonr
FROM bsis
INTO TABLE itab_bsis.
CHECK NOT itab_bsis[] IS INITIAL.
LOOP AT itab_bsis INTO wa_bsis.
WRITE : / wa_bsis-bukrs hotspot on,
wa_bsis-hkont,
wa_bsis-augdt,
wa_bsis-augbl,
wa_bsis-zuonr.
ENDLOOP.
ENDFORM. " get_vbak
*& Form get_bsik
FORM get_bsik.
*"-- types declaration
TYPES : BEGIN OF it_bsik,
bukrs TYPE bsik-bukrs,
lifnr TYPE bsik-bukrs,
umsks TYPE bsik-umsks,
umskz TYPE bsik-umskz,
END OF it_bsik..
*"-- internal table declaration
DATA : itab_bsik TYPE it_bsik OCCURS 0 WITH header line,
wa_bsik TYPE it_bsik.
*"--- data retrival
SELECT bukrs
lifnr
umsks
umskz
FROM bsik
INTO TABLE itab_bsik.
*"-- if table contains data
CHECK NOT itab_bsik[] IS INITIAL.
*"-- displaying the data
LOOP AT itab_bsik INTO wa_bsik.
WRITE : / wa_bsik-bukrs,
wa_bsik-lifnr,
wa_bsik-umsks,
wa_bsik-umskz.
ENDLOOP.
ENDFORM. " get_bsik
thanks,
maheedhar.t
Hi Maheendhar ,
Please paste your complete code or refer this peice of code this is working as per requirement
--GLOBAL DECLARATIONS--
THIS DEFINES GLOBAL TYPES FOR ALV.
TYPE-POOLS: slis.
TRANSPARENT TABLES USED FOR DATA FETCHING
TABLES: ekko,ekpo,eket,lfa1,ekbe.
DATA : i_fieldcat TYPE slis_t_fieldcat_alv," FOR FIELDCATALOG
i2_fieldcat TYPE slis_t_fieldcat_alv,"FOR FIELDCATALOG 2
i3_fieldcat TYPE slis_t_fieldcat_alv, "FOR FIELDCATALOG 3
i_eventcat TYPE slis_t_event, "FOR EVENTCATALOG
i_layout TYPE slis_layout_alv, "FOR LAYOUT
i_sortinfo TYPE slis_t_sortinfo_alv. "FOR SORTING
VARIABLE FOR COUNT OF PO
DATA: n TYPE i ,
i TYPE i,
po_item TYPE ebelp,
v_count(1) VALUE 'N'.
--TYPES--
--DATA DECLARATION FOR VENDOR MASTER--
TYPES: BEGIN OF t_lfa1,
lifnr TYPE lifnr, "VENDOR CODE
name1 TYPE name1_gp, "VENDOR NAME
END OF t_lfa1.
--DATA DECLARATION FOR HEADER(EKKO)--
TYPES: BEGIN OF t_ekko,
ebeln TYPE ebeln, "PURCHASE ORDER NUMBER
lifnr TYPE elifn, "VENDOR CODE
c TYPE i, "PURCHASE ORDER COUNT
END OF t_ekko.
--DATA DECLARATION FOR DETAIL(EKPO)--
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ebeln, "PURCHASE ORDER NUMBER
ebelp TYPE ebelp, "PURCHASE ORDER ITEM
menge TYPE bstmg, "PURCHASE ORDER QTY
END OF t_ekpo,
--DATA DECLARATION FOR EKET TABLE--
BEGIN OF t_eket,
ebeln TYPE ebeln, "PURCHASE ORDER NUMBER
ebelp TYPE ebelp, "PURCHASE ORDER ITEM
etenr TYPE eeten, "DELIVERY SCHEDULE LINE COUNTER
wemng TYPE weemg, "QUANTITY OF GOODS RECIEVED
END OF t_eket ,
DATA DECLARATION FOR FINAL TABLE(FIRST
SCREEN)----
BEGIN OF t_tab,
lifnr TYPE elifn,
ebeln TYPE ebeln,
name1 TYPE name1_gp,
ebelp TYPE ebelp,
menge TYPE bstmg,
etenr TYPE eeten,
wemng TYPE weemg,
c TYPE i,
END OF t_tab.
--DATA DECLARATION FOR FINAL TABLE (SECOND SCREEN)---
TYPES: BEGIN OF t_vendor,
lifnr TYPE elifn,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
menge TYPE bstmg,
wemng TYPE p,
END OF t_vendor,
--DATA DECLARATION FOR EKBE--
BEGIN OF t_ekbe,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
bwart TYPE bwart,
menge TYPE menge_d,
END OF t_ekbe.
--WORK AREA--
DATA : wa_lfa1 TYPE t_lfa1,
wa_ekko TYPE t_ekko,
wa_ekpo TYPE t_ekpo,
wa_eket TYPE t_eket,
wa_tab TYPE t_tab,
wa_vendor TYPE t_vendor,
wa_ekbe TYPE t_ekbe,
wa_grn TYPE t_ekbe,
wa_full TYPE t_vendor.
--INTERNAL TABLES--
DATA: it_lfa1 TYPE STANDARD TABLE OF t_lfa1 WITH HEADER LINE ,
it_ekko TYPE STANDARD TABLE OF t_ekko WITH HEADER LINE ,
it_ekpo TYPE STANDARD TABLE OF t_ekpo WITH HEADER LINE,
it_eket TYPE STANDARD TABLE OF t_eket WITH HEADER LINE,
it_tab TYPE STANDARD TABLE OF t_tab WITH HEADER LINE,
it_vendor TYPE STANDARD TABLE OF t_vendor WITH HEADER LINE,
it_ekbe TYPE STANDARD TABLE OF t_ekbe WITH HEADER LINE,
it_grn TYPE STANDARD TABLE OF t_ekbe WITH HEADER LINE,
it_full TYPE STANDARD TABLE OF t_vendor WITH HEADER LINE.
DATA: vendor TYPE elifn.
DATA: qty TYPE p,
c TYPE i.
--SELECTION SCREEN--
SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK main.
--AT SELECTION-SCREEN--
AT SELECTION-SCREEN.
SELECT lifnr INTO (it_lfa1-lifnr) FROM lfa1 WHERE lifnr IN
s_lifnr.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e001.
ENDIF.
--START-OF-SELECTION--
START-OF-SELECTION.
FETCH RECORDS FROM THE DATABASE INTO THE INTERNAL TABLE.
PERFORM zf_select_it_tab.
PREPARE FIELDCATALOG FOR THE MAIN (1ST LIST) REPORT.
PERFORM zf_build_fieldcat USING i_fieldcat.
DEFINE EVENT TABLE
PERFORM build_eventcat USING i_eventcat.
DETERMINE THE SORTING SEQUENCE.
PERFORM build_sort USING i_sortinfo.
DISPLAY ALV GRID.
PERFORM zf_display_alv_list.
*& Form ZF_SELECT_IT_TAB
text
--> p1 text
<-- p2 text
*SELECTING DATA FROM IT_LFA1 TABLE
FORM zf_select_it_tab .
SELECT lifnr
name1
INTO TABLE it_lfa1
FROM lfa1
WHERE lifnr IN s_lifnr.
IF sy-subrc = 0.
SORT it_lfa1 BY lifnr.
ENDIF.
*SELECTING DATA FROM EKKO TABLE
IF NOT it_lfa1[] IS INITIAL.
SELECT
ebeln
lifnr
FROM ekko
INTO TABLE it_ekko
FOR ALL ENTRIES IN it_lfa1
WHERE lifnr = it_lfa1-lifnr.
IF sy-subrc = 0.
SORT it_ekko BY ebeln.
ENDIF.
ENDIF.
*SELECTING DATA FROM EKPO TABLE
IF NOT it_ekko[] IS INITIAL.
SELECT
ebeln
ebelp
menge
FROM ekpo
INTO TABLE it_ekpo
FOR ALL ENTRIES IN it_ekko
WHERE ebeln = it_ekko-ebeln.
IF sy-subrc = 0.
SORT it_ekpo BY ebeln ebelp.
ENDIF.
ENDIF.
*SELECTING DATA FROM EKET TABLE
IF NOT it_ekpo[] IS INITIAL.
SELECT
ebeln
ebelp
etenr
wemng
FROM eket
INTO TABLE it_eket
FOR ALL ENTRIES IN it_ekpo
WHERE ebeln = it_ekpo-ebeln
AND ebelp = it_ekpo-ebelp.
SORT it_eket BY ebeln ebelp etenr.
ENDIF.
*SELECTING DATA FROM EKBE TABLE
IF NOT it_eket[] IS INITIAL.
SELECT
ebeln
ebelp
bwart
menge
FROM ekbe
INTO TABLE it_ekbe
FOR ALL ENTRIES IN it_eket
WHERE ebelp = it_eket-ebelp
AND ebeln = it_eket-ebeln
AND bwart = '101'.
ENDIF.
THIS BLOCK MOVES THE FIELDS FROM DIFFERENT *
TABLES(EKKO,LFA1,EKPO,EKET) INTO A FINAL TABLE IT_TAB *
CLEAR wa_tab.
CLEAR it_tab.
LOOP AT it_lfa1 INTO wa_lfa1.
READ TABLE it_ekko INTO wa_ekko WITH KEY lifnr = wa_lfa1-lifnr
BINARY SEARCH.
READ TABLE it_lfa1 INTO wa_lfa1
WITH KEY lifnr = wa_lfa1-lifnr
BINARY SEARCH.
IF sy-subrc = 0.
MOVE: wa_lfa1-name1 TO wa_tab-name1.
MOVE: wa_lfa1-lifnr TO wa_tab-lifnr.
ENDIF.
APPEND wa_tab TO it_tab.
CLEAR : wa_tab,wa_lfa1.
ENDLOOP.
**READ FOR SECOND SCREEN
REFRESH it_full.
CLEAR : wa_full,
wa_eket,
wa_ekpo.
LOOP AT it_eket INTO wa_eket.
READ TABLE it_ekpo INTO wa_ekpo WITH KEY ebeln = wa_eket-ebeln
ebelp = wa_eket-ebelp
BINARY SEARCH.
IF sy-subrc = 0.
READ TABLE it_ekko INTO wa_ekko WITH KEY ebeln =
wa_ekpo-ebeln
BINARY SEARCH.
IF sy-subrc = 0.
READ TABLE it_lfa1 INTO wa_lfa1 WITH KEY lifnr = wa_ekko-lifnr
BINARY SEARCH.
IF sy-subrc = 0.
wa_full-ebelp = wa_ekpo-ebelp.
wa_full-menge = wa_ekpo-menge.
wa_full-lifnr = wa_lfa1-lifnr.
wa_full-ebeln = wa_ekko-ebeln.
wa_full-wemng = wa_eket-wemng.
ENDIF.
ENDIF.
ENDIF.
APPEND wa_full TO it_full.
CLEAR : wa_ekko,wa_ekpo,wa_eket,wa_full.
ENDLOOP.
COUNT OF PO
LOOP AT it_tab.
LOOP AT it_ekko WHERE lifnr = it_tab-lifnr.
c = c + 1.
ENDLOOP.
it_tab-c = c.
MODIFY it_tab TRANSPORTING c.
CLEAR c.
ENDLOOP.
ENDFORM. " ZF_SELECT_IT_TAB
*& Form ZF_BUILD_FIELDCAT
FIELD CATALOG FOR FIRST SCREEN
-->P_I_FIELDCAT text
FORM zf_build_fieldcat USING p_i_fieldcat TYPE slis_t_fieldcat_alv.
REFRESH p_i_fieldcat.
DATA: l_fieldcat TYPE slis_fieldcat_alv.
CLEAR l_fieldcat.
l_fieldcat-col_pos = '1'.
l_fieldcat-fieldname = 'LIFNR'.
l_fieldcat-tabname = 'IT_TAB'.
l_fieldcat-key = 'X'.
l_fieldcat-emphasize = 'C410'.
l_fieldcat-seltext_l = 'VENDOR CODE'.
l_fieldcat-outputlen = 20.
APPEND l_fieldcat TO p_i_fieldcat.
CLEAR l_fieldcat.
l_fieldcat-col_pos = '2'.
l_fieldcat-fieldname = 'NAME1'.
l_fieldcat-tabname = 'IT_TAB'.
l_fieldcat-emphasize = 'C410'.
l_fieldcat-seltext_l = 'VENDOR NAME'.
l_fieldcat-outputlen = 20.
APPEND l_fieldcat TO p_i_fieldcat.
CLEAR l_fieldcat.
l_fieldcat-col_pos = '3'.
l_fieldcat-fieldname = 'C'.
l_fieldcat-tabname = 'IT_TAB'.
l_fieldcat-emphasize = 'C410'.
l_fieldcat-seltext_l = 'PO COUNT'.
l_fieldcat-outputlen = 10.
APPEND l_fieldcat TO p_i_fieldcat.
ENDFORM. " ZF_BUILD_FIELDCAT
*& Form ZF_DISPLAY_ALV_LIST
CALLING FUNCTION FOR ALV GRID DISPLAY
--> p1 text
<-- p2 text
FORM zf_display_alv_list .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'Z8AS_SHADOW_ALV_INTERACTIVE'
i_callback_user_command = 'USER_COMMAND'
is_layout = i_layout
it_fieldcat = i_fieldcat
it_events = i_eventcat
TABLES
t_outtab = it_tab
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. " ZF_DISPLAY_ALV_LIST
*& Form BUILD_SORT
SORTING OUTPUT BY PURCHASE ORDER AND LINE ITEM
-->P_I_SORTINFO text
FORM build_sort USING p_i_sortinfo TYPE slis_t_sortinfo_alv.
REFRESH p_i_sortinfo.
DATA: l_sortinfo TYPE slis_sortinfo_alv.
CLEAR l_sortinfo.
l_sortinfo-spos = '1'.
l_sortinfo-fieldname = 'LIFNR'.
l_sortinfo-tabname = 'IT_VENDOR'.
l_sortinfo-up = 'X'.
l_sortinfo-group = 'UL'.
APPEND l_sortinfo TO p_i_sortinfo.
CLEAR l_sortinfo.
l_sortinfo-spos = '2'.
l_sortinfo-fieldname = 'EBELN'.
l_sortinfo-tabname = 'IT_VENDOR'.
l_sortinfo-up = 'X'.
l_sortinfo-group = 'UL'.
APPEND l_sortinfo TO p_i_sortinfo.
ENDFORM. " BUILD_SORT
*& Form BUILD_EVENTCAT
-->P_I_EVENTCAT text
FORM build_eventcat USING p_i_eventcat TYPE slis_t_event.
REFRESH p_i_eventcat.
DATA: i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = p_i_eventcat
EXCEPTIONS
list_type_wrong = 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.
CLEAR i_event.
READ TABLE p_i_eventcat WITH KEY name = slis_ev_user_command INTO
i_event.
IF sy-subrc = 0.
MOVE 'USER_COMMAND' TO i_event-form.
APPEND i_event TO p_i_eventcat.
ENDIF.
ENDFORM. " BUILD_EVENTCAT
*& FORM USER_COMMAND
FORM user_command USING p_ucomm TYPE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'.
READ TABLE it_tab INTO wa_tab INDEX p_selfield-tabindex.
IF p_selfield-fieldname = 'LIFNR'.
vendor = p_selfield-value.
PERFORM zf_vendor_details.
PERFORM zf2_build_fieldcat USING i2_fieldcat.
PERFORM zf_display_grid.
ENDIF.
CLEAR p_selfield.
ENDCASE.
ENDFORM. " ZF_USER_COMMAND
*& Form ZF_VENDOR_DETAILS
THIS FORM IS USED FOR MOVING DATA FROM IT_TAB TO IT_VENDOR
--> p1 text
<-- p2 text
FORM zf_vendor_details .
CLEAR wa_ekko.
CLEAR it_ekko.
REFRESH it_vendor.
LOOP AT it_full INTO wa_full WHERE lifnr = vendor.
MOVE :
wa_full-lifnr TO wa_vendor-lifnr,
wa_full-ebeln TO wa_vendor-ebeln,
wa_full-ebelp TO wa_vendor-ebelp,
wa_full-menge TO wa_vendor-menge,
wa_full-wemng TO wa_vendor-wemng.
APPEND wa_vendor TO it_vendor.
CLEAR : wa_vendor.
ENDLOOP.
ENDFORM. " ZF_VENDOR_DETAILS
*& Form ZF2_BUILD_FIELDCAT
THIS FORM IS USED FOR CATALOG SCREEN 2
-->P_I_FIELDCAT text
FORM zf2_build_fieldcat USING p_i_fieldcat TYPE slis_t_fieldcat_alv.
REFRESH p_i_fieldcat.
DATA: l2_fieldcat TYPE slis_fieldcat_alv.
CLEAR l2_fieldcat.
l2_fieldcat-col_pos = '1'.
l2_fieldcat-fieldname = 'LIFNR'.
l2_fieldcat-tabname = 'IT_VENDOR'.
l2_fieldcat-key = 'X'.
l2_fieldcat-emphasize = 'C410'.
l2_fieldcat-seltext_l = 'VENDOR CODE'.
l2_fieldcat-outputlen = 20.
APPEND l2_fieldcat TO p_i_fieldcat.
CLEAR l2_fieldcat.
l2_fieldcat-col_pos = '2'.
l2_fieldcat-fieldname = 'EBELN'.
l2_fieldcat-tabname = 'IT_VENDOR'.
l2_fieldcat-key = 'X'.
l2_fieldcat-emphasize = 'C410'.
l2_fieldcat-seltext_l = 'PURCHASE ORDER NUMBER'.
l2_fieldcat-outputlen = 20.
APPEND l2_fieldcat TO p_i_fieldcat.
CLEAR l2_fieldcat.
l2_fieldcat-col_pos = '3'.
l2_fieldcat-fieldname = 'EBELP'.
l2_fieldcat-tabname = 'IT_VENDOR'.
l2_fieldcat-key = 'X'.
l2_fieldcat-emphasize = 'C710'.
l2_fieldcat-seltext_l = 'PO ITEM'.
l2_fieldcat-outputlen = 20.
APPEND l2_fieldcat TO p_i_fieldcat.
CLEAR l2_fieldcat.
l2_fieldcat-col_pos = '4'.
l2_fieldcat-fieldname = 'MENGE'.
l2_fieldcat-tabname = 'IT_VENDOR'.
l2_fieldcat-key = 'X'.
l2_fieldcat-emphasize = 'C410'.
l2_fieldcat-seltext_l = 'PO QTY'.
l2_fieldcat-outputlen = 20.
APPEND l2_fieldcat TO p_i_fieldcat.
CLEAR l2_fieldcat.
l2_fieldcat-col_pos = '5'.
l2_fieldcat-fieldname = 'WEMNG'.
l2_fieldcat-tabname = 'IT_VENDOR'.
l2_fieldcat-key = 'X'.
l2_fieldcat-emphasize = 'C450'.
l2_fieldcat-seltext_l = 'QTY RECIEVED'.
l2_fieldcat-outputlen = 20.
APPEND l2_fieldcat TO p_i_fieldcat.
CLEAR l2_fieldcat.
ENDFORM. "ZF2_BUILD_FIELDCAT
*& Form ZF_DISPLAY_ALV_LIST
text
--> p1 text
<-- p2 text
FORM zf_display_grid .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'Z8AS_SHADOW_ALV_INTERACTIVE'
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND1'
it_fieldcat = i2_fieldcat
it_sort = i_sortinfo
IMPORTING
TABLES
t_outtab = it_vendor
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. "ZF_DISPLAY_GRID
*& FORM USER_COMMAND1
FORM user_command1 USING p_ucomm TYPE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'.
READ TABLE it_vendor INTO wa_vendor INDEX p_selfield-tabindex.
IF p_selfield-fieldname = 'WEMNG'.
po_item = wa_vendor-ebelp.
PERFORM zf_grn.
PERFORM zf3_build_fieldcat USING i3_fieldcat.
PERFORM zf1_display_grid.
ENDIF.
ENDCASE.
ENDFORM. " ZF_USER_COMMAND
*& Form ZF3_BUILD_FIELDCAT
FIELD CATALOG FOR THIRD SCREEN
-->P_I3_FIELDCAT text
FORM zf3_build_fieldcat USING p_i_fieldcat TYPE slis_t_fieldcat_alv
REFRESH p_i_fieldcat.
DATA: l3_fieldcat TYPE slis_fieldcat_alv.
CLEAR l3_fieldcat.
l3_fieldcat-col_pos = '1'.
l3_fieldcat-fieldname = 'EBELN'.
l3_fieldcat-tabname = 'IT_GRN'.
l3_fieldcat-key = 'X'.
l3_fieldcat-emphasize = 'C410'.
l3_fieldcat-seltext_l = 'P.O. NO'.
l3_fieldcat-outputlen = 20.
APPEND l3_fieldcat TO p_i_fieldcat.
CLEAR l3_fieldcat.
l3_fieldcat-col_pos = '2'.
l3_fieldcat-fieldname = 'EBELP'.
l3_fieldcat-tabname = 'IT_GRN'.
l3_fieldcat-key = 'X'.
l3_fieldcat-emphasize = 'C410'.
l3_fieldcat-seltext_l = 'P.O.ITEM'.
l3_fieldcat-outputlen = 20.
APPEND l3_fieldcat TO p_i_fieldcat.
CLEAR l3_fieldcat.
l3_fieldcat-col_pos = '3'.
l3_fieldcat-fieldname = 'BWART'.
l3_fieldcat-tabname = 'IT_GRN'.
l3_fieldcat-key = 'X'.
l3_fieldcat-emphasize = 'C410'.
l3_fieldcat-seltext_l = 'MOVEMENT TYPE'.
l3_fieldcat-outputlen = 20.
APPEND l3_fieldcat TO p_i_fieldcat.
CLEAR l3_fieldcat.
l3_fieldcat-col_pos = '4'.
l3_fieldcat-fieldname = 'MENGE'.
l3_fieldcat-tabname = 'IT_GRN'.
l3_fieldcat-key = 'X'.
l3_fieldcat-emphasize = 'C410'.
l3_fieldcat-seltext_l = 'GR QUANTITY'.
l3_fieldcat-outputlen = 20.
APPEND l3_fieldcat TO p_i_fieldcat.
CLEAR l3_fieldcat.
ENDFORM. " ZF3_BUILD_FIELDCAT
*& Form ZF1_DISPLAY_GRID
text
--> p1 text
<-- p2 text
FORM zf1_display_grid .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'Z8AS_SHADOW_ALV_INTERACTIVE'
it_fieldcat = i3_fieldcat
IMPORTING
TABLES
t_outtab = it_grn
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. " ZF1_DISPLAY_GRID
*& Form ZF_GRN
text
--> p1 text
<-- p2 text
FORM zf_grn .
CLEAR wa_eket .
CLEAR it_eket.
REFRESH it_grn.
LOOP AT it_vendor INTO wa_vendor WHERE ebelp = po_item.
IF sy-subrc = 0.
READ TABLE it_ekbe INTO wa_ekbe WITH KEY
ebeln = wa_vendor-ebeln
ebelp = wa_vendor-ebelp.
IF sy-subrc = 0.
IF wa_ekbe-bwart = '101'.
MOVE: wa_ekbe-ebeln TO wa_grn-ebeln,
wa_ekbe-ebelp TO wa_grn-ebelp,
wa_ekbe-bwart TO wa_grn-bwart,
wa_ekbe-menge TO wa_grn-menge.
APPEND wa_grn TO it_grn.
CLEAR wa_ekbe.
CLEAR wa_grn.
ELSE.
MESSAGE e001.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " ZF_GRN
Reward points if helpful .
Regards,
Amber S
Similar Messages
-
Generated Query for Interactive Report
Hi folks
I am getting an error in an Interactive Report: "Column ambiguously defined".
This cannot have been triggered by the columns selected to appear in the report. Where can I see the query generated by the report after all the user-defined edits on the original query?
Regards
CSHi Chris,
I'm not sure what version it became available, but in later versions you can enable debugging at the application level and then view the debugging information when running the application as a developer. This gives you information on the actual query issued by Apex.
Andre -
Essbase query using Interactive reporting
Hi, I am trying to build a Essbase query using IR tool.. I built the following query, but when I downloaded the results, my accounts are becoming columns.Is there a way to retain the accounts in rows?
Quick Solution is to move the data to a Pivot
Put Accounts into Facts
Right Click in Pivot - Data Labels - Rows -
Tabular form validation(Checkbox) is not working for Interactive report
Hi,
I am using the oracle apex 4.0 and oracle 11g.
I have written a below select query on interactive report as
select
apex_item.checkbox(1,RESIDD)||apex_item.hidden(2,RESIDD) row_selector,
apex_item.text(3,RESNUM) as resnum
from "PDRRES"
and written the validation to display the error message( Function returning error text ) as
DECLARE
vRow BINARY_INTEGER;
BEGIN
-- apex_application.g_print_success_message := NULL;
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
vRow := apex_application.g_f01(i);
apex_application.g_print_success_message := apex_application.g_f01(i)||'-'|| apex_application.g_f03(vRow) ;
END LOOP;
END;
Output : No data found error message
As far as it work for sql report with above logic because apex built in row selector
but it fails in case of interactive report for some reason.
Please suggest.Saroj Nayak wrote:
Hi,
I am using the oracle apex 4.0 and oracle 11g.
I have written a below select query on interactive report as
select
apex_item.checkbox(1,RESIDD)||apex_item.hidden(2,RESIDD) row_selector,
apex_item.text(3,RESNUM) as resnum
from "PDRRES"
and written the validation to display the error message( Function returning error text ) as
DECLARE
vRow BINARY_INTEGER;
BEGIN
-- apex_application.g_print_success_message := NULL;
FOR i IN 1 .. apex_application.g_f01.COUNT
LOOP
vRow := apex_application.g_f01(i);
apex_application.g_print_success_message := apex_application.g_f01(i)||'-'|| apex_application.g_f03(vRow) ;
END LOOP;
END;
Output : No data found error message
As far as it work for sql report with above logic because apex built in row selector
but it fails in case of interactive report for some reason.
Please suggest.NO DATA FOUND usually occurs when an i mplicit select does not find anything. It can also occur when referencing a collection element that has not been defined.
You have 2 collectinons in the code you posted, apex_application.g_f01() and apex_applciation.g_f03. Since you are looping therough the COUNT attribute of g_f01 its reference ("I") is probably okay and the value store in vRow is probably not right. You can check this by using RAISE_APPLICTION_ERROR to see the value something like
raise_application_error(-20000,'vRow="'||vRo2||'"');Remember that working with checkboxes is tricky. If the box is not checked nothing will be sent. You may need to define a default value when no value is submitted. -
Radio buttons on interactive report
Hello all,
I've added radio buttons to an interactive report. What would be the best way to submit the form when user selects the buttons?
Thanks.Hi inka,
inka wrote:
Hello all,
I've added radio buttons to an interactive report. What would be the best way to submit the form when user selects the buttons?
Thanks.
one of the way to submit the form is use apex.submit
Check the example given below
1) Assuming you have used apex_item.radiogroup to create radio buttons.
sample sql query for interactive report
select EMPNO,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO,
apex_item.radiogroup(1, EMPNO) r
from EMP
2) Go to Report Attributes -> Edit Radio button column
Under Column Definition
Display Type : Standard Report Column
Under Column link -> do the changes given below
Link Text : #R# // here R is my radio button column name, so select yours radio button column name.
Target : URL
URL : javascript:apex.submit({request:'TEST',set:{'P6_HIDDEN':#EMPNO#}});
// here P6_HIDDEN is item where i am setting EMPNO to that column, if you want to set any value to any item that you want to use in process then create Hidden item with protected value no.
or if you want to show confirm message before submitting the page then use apex.confirm in place of apex.submit .
Hope this helps you,
Regards,
Jitendra -
Changing the default number of rows displayed in a interactive report
Hi,
I have a sql query based interactive report but i cant change the default number of pages i.e 15.
is there any way to change the number of rows displayed.
Thank you,
rakeshHi,
That was very useful document that you shared, yes that is correct we can so it this way but there is another way doing it where in if you go to the report attribute section and in that there is Layout and Pagination and under
that you can fix the number of rows, and over there we can also accept values from page item such as if the page item value changes the number of rows displayed in the report changes dynamically.
In my report i get only pagination but not a option for layout.
Any help will be appreciated.
And also where i can get the links to the similar document that you have shared ?
TY
rakesh
Edited by: rakesh119 on Apr 30, 2013 12:10 PM -
Hi All,
Yesterday i submitted a query regarding Interactive reports.and i recieved lots of reply .But the replies are all about ALV interactive report.I want to know just about the interactive reports where ew use AT LINE OF SELECTION, HIDE e.c.
PLZ send methe documents related that.
Thanks and Regards
RASHMIHi
Interactive Reports
As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers. And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21). Events associated with Interactive Reports are: 1. AT LINE-SELECTION 2. AT USER-COMMAND 3. AT PF<key> 4. TOP-OF-PAGE DURING LINE-SELECTION. HIDE statement holds the data to be displayed in the secondary list. sy-lisel : contains data of the selected line. sy-lsind : contains the level of report (from 0 to 21)
Interactive Report Events:
AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
AT PFn: For predefined function keys...
AT USER-COMMAND : It provides user functions keys.
REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
HEADING.
*TABLES DECLARATION
TABLES : KNA1, VBAK, VBAP.
*SELECT OPTIONS
SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
*INITIALIZATION
INITIALIZATION.
CUST_NO-LOW = '01'.
CUST_NO-HIGH = '5000'.
CUST_NO-SIGN = 'I'.
CUST_NO-OPTION = 'BT'.
APPEND CUST_NO.
*SELECTION SCREEN VALIDATION
AT SELECTION-SCREEN ON CUST_NO.
LOOP AT SCREEN.
IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
MESSAGE E001(ZTJ1).
ENDIF.
ENDLOOP.
*BASIC LIST SELECTION
START-OF-SELECTION.
SELECT KUNNR NAME1 ORT01 LAND1 INTO
(KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
FROM KNA1
WHERE KUNNR IN CUST_NO.
WRITE:/1 SY-VLINE,
KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
KNA1-NAME1 UNDER 'NAME',
61 SY-VLINE,
KNA1-ORT01 UNDER 'CITY',
86 SY-VLINE,
KNA1-LAND1 UNDER 'COUNTRY',
103 SY-VLINE.
HIDE: KNA1-KUNNR.
ENDSELECT.
ULINE.
*SECONDARY LIST ACCESS
AT user-command.
IF SY-UCOMM = 'IONE'.
PERFORM SALES_ORD.
ENDIF.
IF SY-UCOMM = 'ITWO'.
PERFORM ITEM_DET.
ENDIF.
*TOP OF PAGE
TOP-OF-PAGE.
FORMAT COLOR 1.
WRITE : 'CUSTOMER DETAILS'.
FORMAT COLOR 1 OFF.
ULINE.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'NAME',
61 SY-VLINE,
63 'CITY',
86 SY-VLINE,
88 'COUNTRY',
103 SY-VLINE.
ULINE.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR SECONDARY LISTS
TOP-OF-PAGE DURING LINE-SELECTION.
*TOP OF PAGE FOR 1ST SECONDARY LIST
IF SY-UCOMM = 'IONE'.
ULINE.
FORMAT COLOR 1.
WRITE : 'SALES ORDER DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'CUSTOMER NO.',
16 SY-VLINE,
18 'SALES ORDER NO.',
40 SY-VLINE,
42 'DATE',
60 SY-VLINE,
62 'CREATOR',
85 SY-VLINE,
87 'DOC DATE',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*TOP OF PAGE FOR 2ND SECONDARY LIST
IF SY-UCOMM = 'ITWO'.
ULINE.
FORMAT COLOR 1.
WRITE : 'ITEM DETAILS'.
ULINE.
FORMAT COLOR 1 OFF.
FORMAT COLOR 3.
WRITE : 1 SY-VLINE,
3 'SALES ORDER NO.',
40 SY-VLINE,
42 'SALES ITEM NO.',
60 SY-VLINE,
62 'ORDER QUANTITY',
103 SY-VLINE.
ULINE.
ENDIF.
FORMAT COLOR 3 OFF.
*END OF PAGE
END-OF-PAGE.
ULINE.
WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
SY-PAGNO.
SKIP.
*& Form SALES_ORD
*& FIRST SECONDARY LIST FORM
FORM SALES_ORD .
SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
(VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
FROM VBAK
WHERE KUNNR = KNA1-KUNNR.
WRITE:/1 SY-VLINE,
VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
16 SY-VLINE,
VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
40 SY-VLINE,
VBAK-ERDAT UNDER 'DATE',
60 SY-VLINE,
VBAK-ERNAM UNDER 'CREATOR',
85 SY-VLINE,
VBAK-AUDAT UNDER 'DOC DATE',
103 SY-VLINE.
HIDE : VBAK-VBELN.
ENDSELECT.
ULINE.
ENDFORM. " SALES_ORD
*& Form ITEM_DET
*& SECOND SECONDARY LIST FORM
FORM ITEM_DET .
SELECT VBELN POSNR KWMENG INTO
(VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
FROM VBAP
WHERE VBELN = VBAK-VBELN.
WRITE : /1 SY-VLINE,
VBAP-VBELN UNDER 'SALES ORDER NO.',
40 SY-VLINE,
VBAP-POSNR UNDER 'SALES ITEM NO.',
60 SY-VLINE,
VBAP-KWMENG UNDER 'ORDER QUANTITY',
103 SY-VLINE.
ENDSELECT.
ULINE.
ENDFORM. " ITEM_DET
REPORT demo_list_at_pf.
START-OF-SELECTION.
WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
AT pf5.
PERFORM out.
AT pf6.
PERFORM out.
AT pf7.
PERFORM out.
AT pf8.
PERFORM out.
FORM out.
WRITE: 'Secondary List by PF-Key Selection',
/ 'SY-LSIND =', sy-lsind,
/ 'SY-UCOMM =', sy-ucomm.
ENDFORM.
After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
Secondary List by PF-Key Selection
SY-LSIND = 14
SY-UCOMM = PF06
Example for AT USER-COMMAND.
REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
START-OF-SELECTION.
WRITE: 'Basic List',
/ 'SY-LSIND:', sy-lsind.
TOP-OF-PAGE.
WRITE 'Top-of-Page'.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-pfkey.
WHEN 'TEST'.
WRITE 'Self-defined GUI for Function Codes'.
ULINE.
ENDCASE.
AT LINE-SELECTION.
SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
PERFORM out.
sy-lsind = sy-lsind - 1.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'FC1'.
PERFORM out.
WRITE / 'Button FUN 1 was pressed'.
WHEN 'FC2'.
PERFORM out.
WRITE / 'Button FUN 2 was pressed'.
WHEN 'FC3'.
PERFORM out.
WRITE / 'Button FUN 3 was pressed'.
WHEN 'FC4'.
PERFORM out.
WRITE / 'Button FUN 4 was pressed'.
WHEN 'FC5'.
PERFORM out.
WRITE / 'Button FUN 5 was pressed'.
ENDCASE.
sy-lsind = sy-lsind - 1.
FORM out.
WRITE: 'Secondary List',
/ 'SY-LSIND:', sy-lsind,
/ 'SY-PFKEY:', sy-pfkey.
ENDFORM.
When you run the program, the system displays the following basic list with a the page header defined in the program:
You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
Regards
Anji -
How to combine three tables in interactive report in apex
Hi All,
How to display the below Query in interactive report apex!!
select distinct market d, marketid r from (
select market, marketid,p.productid, h.hubid, s.begin_date, s.stripname
from d_st s, d_ma x, d_hu h, d_pro p
where s.ice_strip_id=x.ice_strip_id
and x.baseproductid=p.productid
and x.hubid=h.hubid
and h.hubid=nvl(:P2__HUBID,-2)
and p.productid=nvl(:P2__PRODUCTID,-2))g
order by 2
Thanks,
Anoo..just paste your query into the source field of the interactive report.. thats it.
-
Example
Currently, when the user enters the page the interactive report runs (without the user hitting "go")and - indicates no data found because one of the "parameterized" fields is required and the sql is not setup for nulls.
I'm Looking for a way to not perform a query at all -------until the user hits go for the first time on the page - then each time they re-enter the page in the same session it would be ok to auto submit the query.
I believe I can setup a hidden item and check on my interactive report E1 not null. Then create a "computation" on "after submission" that would set this value to a value - say 1.
I can seem to be able to get this to work however.
In my interactive report - I'm wondering what "condition type" should I be using. Any thoughts would be greatly appreciated.In this case I just have 2 parameters. The goal is to allow the user to "pre filter" BEFORE rendering the interactive due to the possible size of the report. This pre fliter could be by say- order type or region or branch etc.
Right now, I believe its all one region - see below.
My first attempt, I put a branch on the after submit on the go button and then put a condition on the interactive report. This worked but caused a looping issue when trying to select a column on the interactive report itself. My guess is , because that drop down was also using that same go button.
Anyway, please advise how to best "pre filter" prior to rendering an interactive report. Should I have two seperate regions or can I use one region. Any assistance would be greatly appreciated.
Order Parameters 2
Before Header
Branches
Computations
Processes
After Header
Computations
Processes
Regions
Before Regions
Computations
Processes
Regions
Body (3)
Search
Items
P6_TEXT
P6_ITEM_NUMBER
Region Buttons P6_GO
Order Type &P6_TEXT
Report Columns
Order Type
Operating Unit
Order Number
Line Number
Item Number
Invoice Week
Items
P6_NAME
P6_ITEM_NUMBER_ALT
Position 01 Breadcrumbs
After Regions
Computations
Processes -
Interactive report errors when trying to query external table.
I'm trying to create an interactive report against an external table and getting the following error. I see a note in metalink the describes its cause, but I doesn't seem to apply here.
Query cannot be parsed, please check the syntax of your query. (ORA-06550: line 2, column 17: PLS-00302: component 'ODCIOBJECTLIST' must be declared ORA-06550: line 2, column 13: PL/SQL: Item ignored ORA-06550: line 4, column 18: PLS-00302: component 'ORACLE_LOADER' must be declared ORA-06550: line 4, column 6: PL/SQL: Statement ignored ORA-06550: line 5, column 12: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 5, column 6: PL/SQL: Statement ignored)
Metalink Note:437896.1 identifies this same error related to external tables. It says the cause is an object named 'sys' that exist in the user's schema and must be removed. I checked dba_objects and there is no object named 'sys'Please ignore thread - operator error. There was an object named sys.
-
Performance tuning of a query in Hyperion Interactive Reporting Studio.
Hi All,
Cud some one please tell me... what are the possible ways that one can enhance the performance of the query in Hyperion interactive Reporting studio.. ??
Thanks & Regards,
RajTopic Order Priority...Data Model Options
Use Hints/Directives
Ask DBA to review the SQL Generated by IR --- TopMenu - View - Query Log -
Interactive report based on dynamic query
Hello
I am using Apex 4.1 and have a requirement to create an interactive report based on a dynamic query. This option is available in Classic report but in Interactive this feature is not there. Tried using collections or just a view (thought of changing the view definition during "On load", but structure of the report is already defined based on the definition of the view at design time).
Is there any way of achieving this?
Appreciate any help!
Thanks
aksTry looking at this: http://rakeshjsr.blogspot.com/2010/10/oracle-apex-interactive-report-based-on.html
Thank you,
Tony Miller
Dallas, TX -
Interactive Report with union all in the query
I have an interactive report with the following query in the report region:
select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
suserdefined1,trans_notes,samount,detail_notes
from journal_entries
union all
select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
suserdefined1,trans_notes,stotalamount,detail_notes
from charge_entries;
This gets translated as listed below during runtime. I am trying to pass a value to both SELECT statements instead of the just the bottom select statement. Is this possible using interactive reports.
select
PROPERTY,
SADDR1,
UPOSTDATE,
SOTHERDATE1,
ACCOUNT,
SDESC,
UREF,
SUSERDEFINED1,
TRANS_NOTES,
SAMOUNT,
DETAIL_NOTES,
"JOURNAL_CONTROL-1000000000" "JOURNAL_CONTROL-1000000000"
from (
select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
suserdefined1,trans_notes,samount,detail_notes
from journal_entries
union all
select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
suserdefined1,trans_notes,stotalamount,detail_notes
from charge_entries
) r
where ("PROPERTY" = :APXWS_EXPR_1)
0.14: IR binding: ":APXWS_EXPR_1"="APXWS_EXPR_1" value="prop1"
Thanks for any help,
JimThe bottom query is actually the third query, it encompasses the two that are unioned. It is generated by APEX to allow for the search facility - to achieve what you want ignore the larger query, and get your query working in something like SQL developer. Once it's working then put it into APEX, and the search wrapper will be generated.
select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
suserdefined1,trans_notes,samount,detail_notes
from journal_entries
where property = :YOUR_CRITERIA
union all
select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
suserdefined1,trans_notes,stotalamount,detail_notes
from charge_entries
where property = :YOUR_CRITERIA;
Then you need to think about how you are using the report, if it is linked to from another report, then create a hidden variable and pass it from the parent.
If the report is standalone , then you could create an item , that can be edited and when submitted, re-executes the report based on the criteria entered.
Steve
Hot and bothered in sunny Dubai -
Implementing Interactive Reports Sorts in Report Query
My users love how the Interactive Reports work, especially being able to choose their sort fields. I have an Report Query that can use multiple sorts and many sort fields (chose from APEX page). Is it possible to implement this type of thing in the Report Query (without using decodes or dynamic SQL).
I looked at the code being executed by Interactive Reports and can see the order by changing
select
null as apxws_row_pk,
"CODE",
"CITY_NAME",
"STATE_CODE",
"PK_ID",
count(*) over () as apxws_row_cnt
from (
select * from (
select "PK_ID",
"CODE",
"CITY_NAME",
"STATE_CODE"
from "#OWNER#"."ZIP"
) r
) r where rownum <= to_number(:APXWS_MAX_ROW_CNT)
order by "CODE"Ben, Not sure I follow.
I'm passing in the column names of the order by's from my APEX page to the DB function. Right now I'm doing a huge case statement for each one.
FUNCTION get_student_demographic (l_user in varchar2,
l_owner in varchar2,
l_report_order1 in varchar2,
l_report_order2 in varchar2,
l_report_order3 in varchar2,
l_report_order4 in varchar2,
SELECT (CASE l_report_order1
WHEN '%null%' THEN ''
WHEN 'LAST_NAME' THEN A.LAST_NAME
WHEN 'FIRST_NAME' THEN A.FIRST_NAME
..... many more
ELSE ''
END ) report_order1, -
Error when process an Interactive Reporting Query - EPM 11
Hi everyone...
We are on EPM 11.1.2 working with Interactive Reporting
I already submitted a SR with Oracle, with this problem that I describe on the next lines:
If I open a document and then try to process the Query (Essbase/Oracle datasource). It throws the next error message…
*[2018]: "Failed to acquire Data Access Service with data sources that match the specified OCE";*
If try Again (like 1, 2, or 3 times) without close the document … then the query process responds without problem.
If I try to process the query again (without close the document)… eventually it throws me the same error.
Why sometimes makes the connection with the values configured and sometimes throws the error ?
Any clue, about the origin of this problem... or some tests to discard some kind of configuration
Note:
- The connections are already configure in DAS, and in some time it works well
- We have 2 DAS Services running on my environment (with the same values ) created at the beginning to work as a cluster.
Regards
Alberto MartínezYes I did.
I have written the code as given below. It is not working either. Can you please check my code.
DATA:
FM_NAME TYPE RS38L_FNAM,
FP_DOCPARAMS TYPE SFPDOCPARAMS,
FP_OUTPUTPARAMS TYPE SFPOUTPUTPARAMS.
fp_outputparams-nodialog = 'X'.
fp_outputparams-getpdf = 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'ZHR_APPT'
IMPORTING
e_funcname = fm_name.
Set form language and country (->form locale)
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
fp_docparams-fillable = 'X'.
call the generated function module
CALL FUNCTION FM_NAME
EXPORTING
/1BCDWB/DOCPARAMS = FP_DOCPARAMS
T_HR = wa_emphr1
IMPORTING
/1BCDWB/FORMOUTPUT =
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3.
Thx,
John
Maybe you are looking for
-
Why does my screen keep refreshing?
Yesterday I had to delete all of my caches and preference files. Not a big problem. However today my desktop and file windows keep refreshing about every 30 seconds. Annoying when your screen (not apps) keeps blinking. Cannot find anything in Setting
-
ABAP Web Services Exception Valorization in SOAP Fault Message
Hi, I created a Custom Function Module in ABAP with a custom exception ( "Exception1) in exception list (including a short text description of the exception ("This is the first exception!!!")). I exposed it as web services by means of 'Web service AB
-
How do i open email attachments
I've seen this question unanswered on here many times - really need an answer. How do I open my email attachments in Firefox? Are there settings somewhere? I have Power Point in my computer but it isn't working with Firefox like it did with IE. Been
-
Installing MP,DP and SUP in DMZ for IBCM
Hi all, I would like start installing MP, DP and SUP role in my DMZ to support IBCM. My DMZ is in the same forest but in different and untrusted domain. The primary site and Enterprise Root Certificate (CA) are in the same domain (intranet). An admin
-
BlackBerry 9320 unlocking itself randomly
I purchased a BlackBerry 9320 last week, and at the start of this week the phone started to unlock itself when ever it wanted, even if it was on the table and not being touched. I restored the phone to its factory defaults and this has made no differ