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
Similar Messages
-
Problems in accessing Essbase cube using Interactive Reporting studio
Hi All,
I have developed a report in Interactive studio for which Essbase is the source. When i try to process my query i am getting the below error
"Request [Report] from user[username] was terminated since it exceeded the time limit"
Any idea as to how the time limit can be increased at essbase side.I still can not resolve the problem. I am pulling up an attribute dimension in my report and that seems to be the root cause of the problem. When i remove this attribute dimension and generate the report with rest of the details the report renders without any issues.
can this be becuase the attribute dimension is "Dynamic Calc and Store" in Essbase cube and IR does not support certain essbase features such as Dynamic attribute dimensions ? This is quiet urgent and hence would need a quick response from ya'll -
Problem using Interactive Report in Application Express 3.2.1.00.11
Hi All ,
I am using Interactive Report in Application Express 3.2.1.00.11
I have made report as editable by using following query
Select ROWID,
APEX_ITEM.CHECKBOX(1,IDSKILL,'UNCHECKED') "Mark",
APEX_ITEM.TEXT(2,IDSKILL)"IDSKILL",
APEX_ITEM.TEXT(3,SKILL) "SKILL",
APEX_ITEM.SELECT_LIST_FROM_LOV(4,IDBEARBEITER,'DIR_LOV'),
APEX_ITEM.TEXT(5,ÄNDERUNGSDATUM)"ÄNDERUNGSDATUM"
from SKILLS
Problem :-
When I click FILTER option in Interactive Report , It is taking under Expression "<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />" and displaying in search filter as
Skill = '<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />'
Can I make display like Skill ="ARIS"
Any suggestion is welcom ..
Thanks in advance
Cheers
Sachin SrivastavaHi,
As I know there is no fix/workaround for that.
Disable filtering and other stuff is only. But I think you of course like have filters and other nice thing of interactive report. Other vice you have done classic report.
It is better use classic report and build own custom filers.
Br, Jari -
Oracle Problem using Interactive Report in Application Express 4
Hi All ,
I am using Interactive Report in Application Express 3.2.1.00.11
I have made report as editable by using following query
Select ROWID,
APEX_ITEM.CHECKBOX(1,IDSKILL,'UNCHECKED') "Mark",
APEX_ITEM.TEXT(2,IDSKILL)"IDSKILL",
APEX_ITEM.TEXT(3,SKILL) "SKILL",
APEX_ITEM.SELECT_LIST_FROM_LOV(4,IDBEARBEITER,'DIR_LOV'),
APEX_ITEM.TEXT(5,ÄNDERUNGSDATUM)"ÄNDERUNGSDATUM"
from SKILLS
Problem :-
When I click FILTER option in Interactive Report , It is taking under Expression "<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />" and displaying in search filter as
Skill = '<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />'
Can I make display like Skill ="ARIS"
Any suggestion is welcom ..Try making your column definition as "Remove HTML and escape special characters".
I tried it and it make the column appear as editable as intended and also clicking on the column heading or on the filter in the IR bar behave properly. -
Create data models using interactive reporting
Hey guys,
I was wondering how you create data models using interactive reporting. An simple example would be great? I would really appreciate if I could get an answer.
Also, I wanted to understand a real world situation that you guys might have faced with creating data models, etc...thanks a ton :-)
-- AdiYour question is not that much clear on what you are asking for.
But for reference please have a look at the below doc which explain the Integration with IR and webanalysis what you require.
IR and WebAnalysis with Essbase
Thanks,
~KKT~ -
Using Interactive Report with SQL query accessing tables via db link
Is there a known issue with using the interactive report in version 3.1.2.00.02 with SQL that is accessing tables via a database link? I get the error 'not all variables bound', I do not get this error when using the standard report for the same SQL?
Thanks,
Edited by: [email protected] on May 26, 2009 2:59 PMVarad,
Good question, failed to check that. In fact there are errors. Dump file c:\oraclexe\app\oracle\admin\xe\bdump\xe_s002_3640.trc
Mon Jun 15 08:48:11 2009
ORACLE V10.2.0.1.0 - Production vsnsta=0
vsnsql=14 vsnxtr=3
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Windows XP Version V5.1 Service Pack 3
CPU : 2 - type 586, 1 Physical Cores
Process Affinity : 0x00000000
Memory (Avail/Total): Ph:1051M/2038M, Ph+PgF:2273M/3934M, VA:1302M/2047M
Instance name: xe
Redo thread mounted by this instance: 1
Oracle process number: 16
Windows thread id: 3640, image: ORACLE.EXE (S002)
*** ACTION NAME:(PAGE 2) 2009-06-15 08:48:11.743
*** MODULE NAME:(APEX:APPLICATION 112) 2009-06-15 08:48:11.743
*** SERVICE NAME:(SYS$USERS) 2009-06-15 08:48:11.743
*** CLIENT ID:(ADMIN:232384011651572) 2009-06-15 08:48:11.743
*** SESSION ID:(24.931) 2009-06-15 08:48:11.743
*** 2009-06-15 08:48:11.743
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_LdiDateFromArray+55] [PC:0x608B04F3] [ADDR:0x0] [UNABLE_TO_WRITE] []
Current SQL statement for this session:
select Stage,Procedure,Stp,FW,Reslt,MSG,date_run
from bi_msg_VW@dwitnm
order by 1
----- PL/SQL Call Stack -----
object line object
handle number name
2FE1EA14 1207 package body SYS.DBMS_SYS_SQL
2FE1F064 328 package body SYS.DBMS_SQL
2ABDC520 5097 package body APEX_030200.WWV_RENDER_REPORT3
2BD5E55C 1538 package body APEX_030200.WWV_FLOW_DISP_PAGE_PLUGS
2BD5E55C 366 package body APEX_030200.WWV_FLOW_DISP_PAGE_PLUGS
335BDA88 11190 package body APEX_030200.WWV_FLOW
2BDBD1C8 255 procedure APEX_030200.F
2AB58D10 30 anonymous block
----- Call Stack Trace -----
I didn't include the call stack, it is too large. Now I'm even more puzzled that the IR would work while a sql report would fail.
Bob -
Using Interactive Report Selection In A Procedure
I want someone to be able to select a set of rows using the interactive report filtering capabilities. Then I want to use the data from the selected rows in a procedure. Is there some way to obtain the query being used by the report; or, in some other way obtain the rows that are selected?
Thanks much,
Rick.Hi Rick,
Information about the IR reports are stored on tables that can be accessed through the following views:
APEX_APPLICATION_PAGE_IR
APEX_APPLICATION_PAGE_IR_CAT
APEX_APPLICATION_PAGE_IR_CGRPS
APEX_APPLICATION_PAGE_IR_COL
APEX_APPLICATION_PAGE_IR_COND
APEX_APPLICATION_PAGE_IR_RPT
The ..._COND one may be most useful but you should check all of them. I haven't tried doing this myself but I think others have - a search on this forum may help there.
Andy -
"Invalid number" error using Interactive Report search on collection
hi -- I have several interactive reports based on collections. In the IR reqion query definition,
I cast the collection values as needed (number, date, etc). Everything's been working great.
In both development and production, I can use the search feature of interactive reports
and it finds rows containing the text I type in (as well as everything else working fine...)
I just imported a new version of an application into our production database. Now, when I use the
interactive report search, I always get "invalid number". This even happens on interactive reports
that still work in the previous version of the production application... and these IRS
have not been modified at all.
If I create a filter and search for "elevation" in a string column, the filter works. If I create a filter
searching for "elevation" in a number column, I get "invalid number". (In the development
environment, I can do the latter -- it just doesn't find any rows.)
Clearly it's choking on the types of the columns in the IR... but why now and not before, and why
in the production database but not the development DB? Both are running 4.0.1.00.03.
This is a pretty major loss of functionality... and it comes at a really bad time... Help?!
Thanks,
Carolhi Andy, Tony -- Completely understand about your email address. I've actually wondered at the fact that any
of you gurus are willing to give them out.
It's not tons of stuff, so here it is.
1) The application process that creates the collection. This process that runs whenever an IR
page is being rendered. The various DB names are application items. This application can affect data
on multiple databases. You'll see see this in the process that builds the query.
IF (apex_collection.collection_exists (
p_collection_name=>'IR_COLLECTION')) then
apex_collection.delete_collection(p_collection_name=>'IR_COLLECTION');
END IF;
apex_collection.create_collection_from_query_b(p_collection_name=>'IR_COLLECTION', p_query=>meta_data_pkg.build_ir_collection_query(:TABLE_NAME, :MASTER_DB_NAME, :CZAR_DB_NAME, :DB_NAME));2) The database function that constructs the query. Called in the above create_collection statement.
FUNCTION build_ir_collection_query (table_name varchar2, master_db_name varchar2, czar_db_name varchar2, ref_db_name varchar2)
return varchar2
IS
query VARCHAR2(3000);
BEGIN
IF /* check for other table names here */ THEN
-- build queries for other tables
-- *** HDB_EXT_DATA_CODE
ELSIF (upper(table_name) in ('HDB_EXT_DATA_CODE', 'HDB_EXT_DATA_CODE_SYN')) THEN
query := 'SELECT /*+DRIVING_SITE(dcs)*/ dc.ext_data_code_sys_id, dcs.ext_data_code_sys_name, dcs.agen_id, a.agen_name, dc.primary_data_code,';
query := query||' dc.secondary_data_code, dc.hdb_datatype_id, d.datatype_name, d.unit_id, u.unit_name, d.physical_quantity_name, to_char(dc.date_time_loaded,''DD-MON-YYYY HH24:MI:SS'')';
query := query||' FROM hdb_ext_data_code_syn@'||master_db_name || ' dc, hdb_ext_data_code_sys_syn@'||master_db_name ||
' dcs, hdb_agen_syn@'||master_db_name||' a, hdb_datatype_syn@'||master_db_name||' d, hdb_unit@'||czar_db_name||' u';
query := query||' WHERE dc.ext_data_code_sys_id = dcs.ext_data_code_sys_id AND dcs.agen_id = a.agen_id(+) AND dc.hdb_datatype_id = d.datatype_id AND d.unit_id = u.unit_id';
/* continue w/ other tables */
END;3) The query that it builds for the table in question:
SELECT /*+DRIVING_SITE(dcs)*/ dc.ext_data_code_sys_id, dcs.ext_data_code_sys_name, dcs.agen_id, a.agen_name,
dc.primary_data_code, dc.secondary_data_code, dc.hdb_datatype_id, d.datatype_name, d.unit_id, u.unit_name,
d.physical_quantity_name, to_char(dc.date_time_loaded,'DD-MON-YYYY HH24:MI:SS')
FROM hdb_ext_data_code_syn@UCHDB2 dc, hdb_ext_data_code_sys_syn@UCHDB2 dcs, hdb_agen_syn@UCHDB2 a,
hdb_datatype_syn@UCHDB2 d, hdb_unit@UCHDB2 u
WHERE dc.ext_data_code_sys_id = dcs.ext_data_code_sys_id AND dcs.agen_id = a.agen_id(+)
AND dc.hdb_datatype_id = d.datatype_id AND d.unit_id = u.unit_id 4) The explain plan results on the development database
PLAN_TABLE_OUTPUT
Plan hash value: 583729845
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
| Inst |
| 0 | SELECT STATEMENT REMOTE | | 97 | 16490 | 19 (16)| 00:00
:01 | |
|* 1 | HASH JOIN | | 97 | 16490 | 19 (16)| 00:00
:01 | |
| 2 | TABLE ACCESS FULL | HDB_UNIT | 177 | 3540 | 3 (0)| 00:00
:01 | UCHDB2 |
|* 3 | HASH JOIN RIGHT OUTER | | 95 | 14250 | 15 (14)| 00:00
:01 | |
| 4 | TABLE ACCESS FULL | HDB_AGEN | 54 | 1944 | 3 (0)| 00:00
:01 | UCHDB2 |
|* 5 | HASH JOIN | | 95 | 10830 | 12 (17)| 00:00
:01 | |
| 6 | MERGE JOIN | | 112 | 5936 | 6 (17)| 00:00
:01 | |
| 7 | TABLE ACCESS BY INDEX ROWID| HDB_EXT_DATA_CODE_SYS | 15 | 405 | 2 (0)| 00:00
:01 | UCHDB2 |
| 8 | INDEX FULL SCAN | HDB_EXT_DATA_CODE_SYS | 15 | | 1 (0)| 00:00
:01 | UCHDB2 |
|* 9 | SORT JOIN | | 112 | 2912 | 4 (25)| 00:00
:01 | |
| 10 | TABLE ACCESS FULL | HDB_EXT_DATA_CODE | 112 | 2912 | 3 (0)| 00:00
:01 | UCHDB2 |
| 11 | TABLE ACCESS FULL | HDB_DATATYPE | 711 | 43371 | 5 (0)| 00:00
:01 | UCHDB2 |
Predicate Information (identified by operation id):
1 - access("A2"."UNIT_ID"="A1"."UNIT_ID")
3 - access("A4"."AGEN_ID"="A3"."AGEN_ID"(+))
5 - access("A5"."HDB_DATATYPE_ID"="A2"."DATATYPE_ID")
9 - access("A5"."EXT_DATA_CODE_SYS_ID"="A4"."EXT_DATA_CODE_SYS_ID")
filter("A5"."EXT_DATA_CODE_SYS_ID"="A4"."EXT_DATA_CODE_SYS_ID")
Note
- fully remote statement 5) The explain plan results on the production database
PLAN_TABLE_OUTPUT
Plan hash value: 583729845
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 97 | 16490 | 19 (16)| 00:00:01 |
|* 1 | HASH JOIN | | 97 | 16490 | 19 (16)| 00:00:01 |
| 2 | TABLE ACCESS FULL | HDB_UNIT | 177 | 3540 | 3 (0)| 00:00:01 |
|* 3 | HASH JOIN RIGHT OUTER | | 95 | 14250 | 15 (14)| 00:00:01 |
| 4 | TABLE ACCESS FULL | HDB_AGEN | 54 | 1944 | 3 (0)| 00:00:01 |
|* 5 | HASH JOIN | | 95 | 10830 | 12 (17)| 00:00:01 |
| 6 | MERGE JOIN | | 112 | 5936 | 6 (17)| 00:00:01 |
| 7 | TABLE ACCESS BY INDEX ROWID| HDB_EXT_DATA_CODE_SYS | 15 | 405 | 2 (0)| 00:00:01 |
| 8 | INDEX FULL SCAN | HDB_EXT_DATA_CODE_SYS | 15 | | 1 (0)| 00:00:01 |
|* 9 | SORT JOIN | | 112 | 2912 | 4 (25)| 00:00:01 |
| 10 | TABLE ACCESS FULL | HDB_EXT_DATA_CODE | 112 | 2912 | 3 (0)| 00:00:01 |
| 11 | TABLE ACCESS FULL | HDB_DATATYPE | 711 | 43371 | 5 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("D"."UNIT_ID"="U"."UNIT_ID")
3 - access("DCS"."AGEN_ID"="A"."AGEN_ID"(+))
5 - access("DC"."HDB_DATATYPE_ID"="D"."DATATYPE_ID")
9 - access("DC"."EXT_DATA_CODE_SYS_ID"="DCS"."EXT_DATA_CODE_SYS_ID")
filter("DC"."EXT_DATA_CODE_SYS_ID"="DCS"."EXT_DATA_CODE_SYS_ID") 6) This is the source query for the interactive report in question. The application process that creates the
collection runs before this region is rendered.
Select /*+ NO_QUERY_TRANSFORMATION */
to_number(C001) Ext_Data_Code_Sys_Id,
C002 Ext_Data_Code_Sys_Name,
to_number(C003) Agen_Id,
C004 Agen_Name,
C005 Primary_Data_Code,
C006 Secondary_Data_Code,
to_number(C007) Hdb_Datatype_Id,
C008 Datatype_Name,
to_number(C009) Unit_Id,
C010 Unit_Name,
C011 Physical_Quantity_Name,
C012 Date_Time_Loaded
from apex_collections
where collection_name = 'IR_COLLECTION'
order by 1,5,7Well, maybe it is alot... !
Happy New Year!
Carol -
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.tHi 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 -
Cl_gui_docking_container Using Interactive Report?
1.Please explain me about cl_gui_docking_container.
2.My Requirment is using cl_gui_docking_container to develop a interactive report.
3.Tell me the difference between cl_gui_docking_container and cl_gui_custom_container.
Please help me.
Regards,
Thrimu1. cl_gui_docking_container:
There are some standard SAP delivered examples available. Check the reports RSDEMO_DOCKING_CONTROL
RSDEMO_SPLITTER_CONTROL
you can see below sample snippet example code.
**************** - ALV in a docking container
2. cl_gui_custom_container:
Have a look at this SAP ABAP Tutorial - ALV Grid Example with cl_gui_alv_grid and Screen Painter tutorial explanation with sample snippet
difference between cl_gui_docking_container and cl_gui_custom_container.
Read more at Custom Controls (SAP Library - SAP NetWeaver by Key Capability) -
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 -
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 -
Dynamic action with interactive report region refresh
Hi!
I'm using APEX 4.02
I've got a page with 2 regions.
Region1 is a (input) form
Region2 is an interactive report on the same table as region 1
When entering values on the form I'm trying to dynmically lookup similar records in the table with the interactive report.
I've made a dynamic action on the change of the form fields which should refresh the interactive report region. I can see this one fires if I add a alert to debug if it fires.
The dynamic report is based on a query with bind variables pointing to the form fields, for example
where
field1 = :P2_FIELD1
This works great on the page load, so no dynamic action is fired but I can see the rows in the report region are the ones I am looking for.
But the refresh of the report region is not working, it is never refreshing and/or showing the correct data after a change of the form fields, so it looks like the dynamic action "refresh region" is not working on the interactive report.
Any ideas why this can go wrong ?
I would like to solve this using standard dynamic actions and preferrably not via PL/SQL or JS, shoudl be possible if I should believe the documentation... ;)
Cheers
Bas
Edited by: bklerk on 26-apr-2011 3:07Hi,
When you change value to item, I assume you do not set value to session state.
Use interactive report advanced attributes "Page Items to Submit" , set items session state before report is refreshed.
http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/app_comp.htm#sthref1235
Similar post/issue here
Hide and show region - hides on refresh
Regards,
Jari -
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
Maybe you are looking for
-
How to display the NULL records by multiple XMLTABLE()
First, let me provide the testing data of INSERT and CREATE TABLE sql: create table xml_t2 (xml_raw XMLTYPE);insert sql, a bit long.....just copy and paste then run it will be OK! the system warns: Your message exceeds the maximum length of 30000 cha
-
Location JDBC jar file while building Jetspeed2
Hi, At the moment I'm trying to get Jetspeed2 installed. Reading the manuals it seems soooo easy. I installed Jetspeed using the default installation method, and wanted to change the database from derby to MySQL. To change the database from derby to
-
Hi Experts, I would like to know the best storage configuration for redologs. My OS is RHEL 6.3 and database release is 11.2.0.4 2-node RAC. 1. Is it good and recommended practice to place the redologs on ASM? or 2. RAID 10 is the best for redologs i
-
Tuning Tree View Object (10g)
Hi all, Description: I have a tree/form layout which is based on two view objects: one for the parent level and the other for children. These two view objects based on database table with more than 1000 records. For tuning I did the following: As the
-
I had not realized until yesterday that my email was inaccessible to others (since it shows up plain as day when I look at my profile while logged in). I've poked around a bit, but I can't seem to figure out how to make a publicly accessible email li