Next statement of RUN_REPORT_OBJECT is getting executed before it finishes
Hi
I am generating a report using RUN_REPORT_OBJECT(repid, List_id)
And after this statement I am sending this report as an attachment (with some subject and message).
Sometimes before generating the report the email is going with no attachement.
Could you please tell me how can I avoid this?
regards
Try something like the following after the RUN_REPOR_OBJECT
-- Get the Report Status
vcStatus := Report_Object_Status(vcJob);
WHILE (vcStatus IN ('RUNNING','OPENING_REPORT','ENQUEUED')) LOOP
vcStatus := Report_Object_Status(vcJob);
END LOOP;where vcjob is the retrunvalue of RUN_REPORT_OBJECT
Edited by: Andreas Weiden on 31.05.2010 20:09
Similar Messages
-
Default java / jsp file which gets executed before DAM asset rendering
Hi,
I have a requirement to implement access control on DAM assets on the basis of a metadata property (tags).
Is there a default JAVA / JSP file which gets executed before rendering a DAM asset?
If yes, how can I override it?
If no, how can I add a new JSP / JAVA file to be executed before rendering of each DAM asset?
Thanks in advance,
AnuragHello Anuran,
I dont think there is any api which is executed when you rendering any DAM asset on page component because for each type of DAM asset there are different APIs available which you use the render those dam asset like "Image" class to render the image asset.
Each dam asset also support having different rendition format and if you are interested in that then refer http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/api/DamEvent.Type.html
Please let me know if you need more information
Thanks,
Pawan -
Waiting for the actions to get executed before submitting it
Hi Guys,
We have a peculiar peoblem wherein we are submitting a report via a job and returning to FM .
In the report we have to execute soame actions on the vehicle being submitted.
The problem is submit is doing its job much before the looping on actions and the status is getting changed with which when it is trying to execute actions its giving an error message sayingh vehicle locked by user/Data has been changed meanwhile.
Its very helpful if anyone providea us a way to submit via job but wait till the report is executed and rerun.
Thanks and Regards,
RajHI Rajashree,
If i have understood your problem properly,
You want to submit a job and return and and want to perform the next few statements only after processing for submitted report is over.
ENQUE_SLEEP is a FM, insert it after submit job..return statement.
you can do that by clicking the pattern button.provide some data for seconds, so it will wait before executing next statement and by the time the submitted report will be processed.
Please give reward point to correct answer and close the thread once you get the correct answer. -
VO is not getting executed or retains the previous state of execution
Hi,
We have a UI for the Party Site. Under this UI, you see the address for the party. When u change the address for the party, the old party site is inactivated and a new party site would be created. Assume that all the possible set of locations already exists in the system.
Structure of the Business Components
Page is linked to PartyAM
PartySitesVO -> Linked to PartySiteEO
PartySiteVO is linked to PartyAM
Validation VO - PartySiteInCustomerAccountSiteVVO is part of AM - PartyVAM
In the PartySiteEO - When we double click, open the EO and go to Properties section, we see the below.
Properties
======
VAMDef : xxx.oracle.apps.xxad.schema.server.PartyVAM
We call partysiterow.validate() to call the validateEntity() function of the PartySiteEO which is overridden.
protected void validateEntity()
super.validateEntity();
PartyEntityExpert expert = PartySiteEOImpl.getEntityExpert(getOADBTransaction());
if (expert.isPartySiteInCustomerAccountSite(getPartySiteId().toString())
System.out.println("Throwing the exception");
else
System.out.println("Not Throwing the exception");
Package xxx.oracle.apps.xxad.schema.server;
public class PartyEntityExpert extends OAEntityExpert
public boolean isPartySiteInCustomerAccountSite(String partySiteId)
PartySiteInCustomerAccountSiteVVOImpl vvo =
(PartySiteInCustomerAccountSiteVVOImpl)
findValidationViewObject("PartySiteInCustomerAccountSiteVVO");
vvo.initQuery(partySiteId);
return vvo.hasNext();
public class PartySiteInCustomerAccountSiteVVOImpl extends OAViewObjectImpl
public void initQuery(String partySiteId)
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, partySiteId);
executeQuery();
PartySiteInCustomerAccountSiteVVO
=======================
SELECT 1
FROM hz_cust_accounts a, hz_cust_account_sites_all b
where a.cust_account_id = b.cust_account_id
AND a.status = 'A'
AND b.status = 'A'
AND b.party_site_id = :1
Using this VO we want to check, if we have an active account site linked to party site or not.
Assume we have two party site Ids 100, 200
PS - 100 is not linked to AccountSite
PS - 200 is linked to Active Account Site.
Now the problem is, we have a FOR loop where we loop through all the PartySiteIDs fetched.
When the partySiteRow.validate() is called for the first time with say PartySiteID = 100, the PartySiteInCustomerAccountSiteVVO gets executed and no rows will be fetched, so false would be returned.
When the next itteration happens and partysiteRow,validate() is called, PartySiteID = 200 is passed to PartySiteInCustomerAccountSiteVVO and still no row is returned. Ideally, I should get a row. When I run the same PartySiteInCustomerAccountSiteVVO query in toad for PartySiteUD = 200, I get 1 as the output.
I am not quite sure, if using the PartyVAM and PartyAM and something around transaction state or VO state has anything to do with the VO cache.
Please let me know, if you see any logical error into the above kind of setup. Aslo, let me know, if you have any questions in understanding this.
Thanks
Saurabh
Edited by: SaurabhAg on Mar 7, 2012 10:43 AMHi,
I am just pasting the log messages near to the VO execution. What I have done is, I have hard coded the same PartySiteID, just before calling the executeQuery in VOImpl. If you look at the log message, when the first time the VO executes, it fetches the row which is correct. But when the VO is executed again for the same or different party site id, to me it looks like, it is not at all executing the query.
In this case, since the PartySiteID is hard coded, it should return 1 row each time the executeQuery is called from VOImpl.
public void initQuery(String partySiteId)
partySiteId = "25880390";
System.out.println("party site id in initQuery : " + partySiteId);
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, partySiteId);
executeQuery();
[2254] Loading from /xxx/oracle/apps/xxad/schema/server/PartySiteInCustomerAccountSiteVVO.xml file
party site id in initQuery : 25880390
[2255] Column count: 1
[2256] ViewObject : Created new QUERY statement
[2257] PartySiteInCustomerAccountSiteVVO>#q computed SQLStmtBufLen: 274, actual=234, storing=264
[2258] select party_site_id cust_account_site_exists
from ar.hz_cust_accounts ca
, ar.hz_cust_acct_sites_all cas
where CA.STATUS = 'A'
and CA.CUST_ACCOUNT_ID = CAS.CUST_ACCOUNT_ID
and CAS.STATUS = 'A'
and cas.party_site_id = :1
[2259] Binding param 1: 25880390
Row party site id : 25880390
Row is not null, Account Site exists : 1
party site id in initQuery : 25880390
[2356] Column count: 1
[2357] ViewObject : Reusing defined prepared Statement
[2358] Binding param 1: 25880390
Please see, if you can provide me some directions or approaches which I can try.
Thanks
Saurabh
Edited by: SaurabhAg on Mar 8, 2012 1:33 AM -
Return statement executed before soapresult is set
In my method i'm doing a soap call.
The return statement is executed before de soapresultset is read.
is there a way to "delay" the return statementYour question doesn't make any sense. Execution leaves the method when it ends or when the return statement is reached. If you want something to happen before the return, then do it before you call return.
My guess at this point is that you're using exceptions poorly. -
Insert statement executes before If statements
Hello All,
I am trying to validate few fields before inserting them into table.
for example:
IF params('txtID') IS NULL THEN
"SOME MSG";
ELSIF params('txtName') IS NULL THEN
"SOME MSG";
END IF;
INSERT INTO TABLE T1
VALUES(params('txtID'),params('txtName');
What I want to do is : I want to validate two fields before inserting.
Can anyone help me?
Thank you,
H.It directly executes insert statement. If I delete insert, it executes that IF statement.
It is strange.Let's be clear about this, it is not strange. Your original IF statements did execute before the INSERT but they did not raise an exception. Consequently the INSERT statement was processed. Your "SOME MSG" mechanism is obviously only triggered after the procedure completed. Walter's solution worked for you because it raise exceptions, which prevented the INSERT statement from executing.
Anyway, it is obvious that you haven't got NOT NULL enforced on your table, which is A Bad Thing. You shoudn't be enforcing such constraints through a procedure.
Cheers, APC
blog: http://radiofreetooting.blogspot.com
Edited by: APC on Feb 3, 2009 5:48 PM
Only because the OP edited their final post, and removed the lines I quoted. -
After entering "Country or Region" United States, I do not get a next button to advance through the process. What might be the cause?
Try This...
Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
Reset ( No Data will be Lost )
Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
http://support.apple.com/kb/ht1430 -
Workflow step is not getting executed
Hi all,
I have designed a workflow in which I have a Decision step. after taking the a decision then it is taking so much time to execute the next step which is a background step.
The waiting time is varying from time to time some times it is getting executed in 20 min, some time it is taking 1 hr no fixed time.
I have used SAP_WAPI_DECISION_COMPLETE function module and I am passing space to the DO_COMMIT becuse of this the workitem is getting completed but it is not going to the next step. This fm is called under a button Approve of a WD application. after completeing the entire cycle of the WD application we are using the statement COMMIT WORK but still the execution is not going to the next step.
In this regard , please, can any body share their views and ideas.
And it is mandatory that only after the webdynpro application execution finishes they want to COMMIT the work.
One more thing while searching forums I found like there are terms like DB COMMIT and simple COMMIT WORK what is the difference between them .
Thanks&Regards
PavanHello,
I wasn't asking about the commit.
In the first post you said:
"The waiting time is varying from time to time some times it is getting executed in 20 min, some time it is taking 1 hr no fixed time."
And in the latest post you said:
"but no matter it is not moving to the next step"
Which one is true?
And anyway, commiting the result of a decision step is not, I think, something that can be delayed.
regards
Rick Bakker
Hanabi Technology -
When Validate Trigger is getting executed when Execute_query
i have a data block in which i have 2 text item. i have defined when validate item.
when the form is starting up i have given execute_query. before fetching the values my when validate item is getting executed. i dont want to do this. can one help me out in this caseHi,
Can you pls. check any initial value is given or not? Otherwise for quick solution you can declare a parameter upon which when-validate will validate the value. You can change value before and after 'EXECUTE_QUERY' statement. This is not a good idea. -
Update statement taking too long to execute
Hi All,
I'm trying to run this update statement. But its taking too long to execute.
UPDATE ops_forecast_extract b SET position_id = (SELECT a.row_id
FROM s_postn a
WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME)))
WHERE position_level = 7
AND b.am_id IS NULL;
SELECT COUNT(*) FROM S_POSTN;
214665
SELECT COUNT(*) FROM ops_forecast_extract;
49366
SELECT count(*)
FROM s_postn a, ops_forecast_extract b
WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME));
575What could be the reason for update statement to execute so long?
Thankspolasa wrote:
Hi All,
I'm trying to run this update statement. But its taking too long to execute.
What could be the reason for update statement to execute so long?You haven't said what "too long" means, but a simple reason could be that the scalar subquery on "s_postn" is using a full table scan for each execution. Potentially this subquery gets executed for each row of the "ops_forecast_extract" table that satisfies your filter predicates. "Potentially" because of the cunning "filter/subquery optimization" of the Oracle runtime engine that attempts to cache the results of already executed instances of the subquery. Since the in-memory hash table that holds these cached results is of limited size, the optimization algorithm depends on the sort order of the data and could suffer from hash collisions it's unpredictable how well this optimization works in your particular case.
You might want to check the execution plan, it should tell you at least how Oracle is going to execute the scalar subquery (it doesn't tell you anything about this "filter/subquery optimization" feature).
Generic instructions how to generate a useful explain plan output and how to post it here follow:
Could you please post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your statement. Please use the {noformat}[{noformat}code{noformat}]{noformat} tag before and {noformat}[{noformat}/code{noformat}]{noformat} tag after or the {noformat}{{noformat}code{noformat}}{noformat} tag before and after to enhance readability of the output provided:
In SQL*Plus:
SET LINESIZE 130
EXPLAIN PLAN FOR <your statement>;
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Note that the package DBMS_XPLAN.DISPLAY is only available from 9i on.
In 9i and above, if the "Predicate Information" section is missing from the DBMS_XPLAN.DISPLAY output but you get instead the message "Plan table is old version" then you need to re-create your plan table using the server side script "$ORACLE_HOME/rdbms/admin/utlxplan.sql".
In previous versions you could run the following in SQL*Plus (on the server) instead:
@?/rdbms/admin/utlxplsA different approach in SQL*Plus:
SET AUTOTRACE ON EXPLAIN
<run your statement>;will also show the execution plan.
In order to get a better understanding where your statement spends the time you might want to turn on SQL trace as described here:
When your query takes too long ...
and post the "tkprof" output here, too.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/ -
Queries are not getting executed in the EJB
Hi,
I am using Stateless EJB for database transactions. I have one getConnection() method in it which I am calling in every method for connection. I have created one more method in that I am executing one simple query for count(*) from one table and returning the count in the Web dynpro application. But I am not getting the count. It seems the query is not getting executed. I have added classes12 jar externally to the EJB and also to the WebDynpro application. Is there anything I am missing????
Thanks,
Swati GaurHi Swati Gaur,
Did you print any logs in the your code to print the count after executing the query?
For debugging purpose you can try
System.err.println("Count after executing the query "+count);
count is the variable which contains the count after executing the sql query.
Check for the above statement in default trace. If count is printing in default trace then the problem is in your webdynpro code.
Hope this helps!
Regards,
Jaya. -
Does an inline view execute before the rest of the select?
Hi,
The O'Reilly book Mastering Oracle Sql defines an inline view simply as a
subquery in a select FROM clause. This conforms to the definitions in
the Oracle 9i and 10g docs.
But unlike the Oracle docs, the O'Reilly book says the inline view is,
like a WITH clause, executed before the rest of the query. I can't see
how this can be done unless the inline view makes no reference to
other tables joined in the FROM clause.
Is there a species of inline view in 9i/10g that IS restricted as above -
no refs to other tables in the FROM clause - and what is it called?
Thanks for any help.
Ken QuiriciAs explained above, Oracle can choose to merge the query if feasible to do so. Look at the two queries and their plans below. The plan in second query changes to creating a temporary VIEW since in that case, Oracle is unable to perform the merge:
SQL> select *
2 from scott.emp e,
3 (select * from scott.dept d where d.deptno = 10) dd
4 where
5 e.deptno = dd.deptno
6 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO DEPTNO DNAME LOC
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10 10 ACCOUNTING NEW YORK
7839 KING PRESIDENT 17-NOV-1981 5000 10 10 ACCOUNTING NEW YORK
7934 MILLER CLERK 7782 23-JAN-1982 1300 10 10 ACCOUNTING NEW YORK
3 rows selected.
Execution Plan
Plan hash value: 3570059291
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 3 | 171 | 2 (0)| 00:00:01 |
| 1 | NESTED LOOPS | | 3 | 171 | 2 (0)| 00:00:01 |
| 2 | TABLE ACCESS BY INDEX ROWID| DEPT | 1 | 20 | 1 (0)| 00:00:01 |
|* 3 | INDEX UNIQUE SCAN | PK_DEPT | 1 | | 0 (0)| 00:00:01 |
| 4 | TABLE ACCESS BY INDEX ROWID| EMP | 3 | 111 | 1 (0)| 00:00:01 |
|* 5 | INDEX RANGE SCAN | IDX_EMP_DEPTNO | 3 | | 0 (0)| 00:00:01 |
SQL> select *
2 from scott.emp e,
3 (select * from scott.dept d where d.deptno = 10 and rownum > 0) dd
4 where
5 e.deptno = dd.deptno
6 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO DEPTNO DNAME LOC
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10 10 ACCOUNTING NEW YORK
7839 KING PRESIDENT 17-NOV-1981 5000 10 10 ACCOUNTING NEW YORK
7934 MILLER CLERK 7782 23-JAN-1982 1300 10 10 ACCOUNTING NEW YORK
3 rows selected.
Execution Plan
Plan hash value: 1670713873
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5 | 280 | 2 (0)| 00:00:01 |
| 1 | NESTED LOOPS | | 5 | 280 | 2 (0)| 00:00:01 |
| 2 | VIEW | | 1 | 19 | 1 (0)| 00:00:01 |
| 3 | COUNT | | | | | |
|* 4 | FILTER | | | | | |
| 5 | TABLE ACCESS BY INDEX ROWID| DEPT | 1 | 20 | 1 (0)| 00:00:01 |
|* 6 | INDEX UNIQUE SCAN | PK_DEPT | 1 | | 0 (0)| 00:00:01 |
| 7 | TABLE ACCESS BY INDEX ROWID | EMP | 5 | 185 | 1 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | IDX_EMP_DEPTNO | 5 | | 0 (0)| 00:00:01 |
SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>
can it, in it's WHERE clause, reference other tables in the FROM clause?No. it cannot. but as said above, tha may not stop Oracle from merging the queries.
SQL> select *
2 from scott.emp e,
3 (select * from scott.dept d where d.deptno = 10 and e.sal > 1000) dd
4 where
5 e.deptno = dd.deptno
6 /
(select * from scott.dept d where d.deptno = 10 and e.sal > 1000) dd
ERROR at line 3:
ORA-00904: "E"."SAL": invalid identifier
SQL> -
Can a class or Module be executed before the sender File Adapter execute?
Hi
In case of sender adapter the module in the module processor gets executed after the adapter has performed its operation.
Is there a way I can execute the module before the sender adapter starts execution?
Or Is it possible to specify a java class to be executed before adapter, through configuration in the communication channel or some other way?
Thanks
VijendraHI Vijendra,
The File module adapter is the first one to get executed.
The only thing you can do is to run shell scripts if you have to do any activity in the folder or on the file.
Regards
Vijaya -
Infopackage not getting executed through Process Chain
Hi All,
I am facing a strange issue in BW Process Chain. Sometimes 3 Infopakages in my Process Chain is not getting executed and the variants get stucked in Yellow state. I checked the status of variants in RSPCPROCESSLOG table and they went in Undefined State.
Can anyone tell why this happening and how to resolve that issue permanently.
Thanks,
JavedHi Javed,
When you trigger the process manually, it might work.
But, as Raman told - some times due to huge number of loads running at the same time, the Back ground processes will be heavily occupied and loads will stuck. By the time, you trigger them manually; they will be successful due to some of the back ground processes which becomes free by that time.
Though this will not happen all the time. But this can also be the reason. Try checking, if the loads are getting stuck in yellow with "Target event" "with parameter" getting generated in display messages --> chain tab or not.
Thanks,
Vikranth. -
Hi,
My sql below is not getting executed.There are no errors but even after long time it is not producing any thing (error or result).
I am getting results till the statement SELECT D.budeptmap_v88_dept_id ,
but when I right the last statement on top of this nothing is coming.
select u.dw_code_skey,u.dw_code from dw.agg_inscope_top_nodes t, dw.dw_codes u
where
t.TOP_NODE_TR_HDR_SKEY = u.DW_CODE_TR_HDR_SKEY
and u.DW_CODE_SUPERTYPE_CODE = 'DEPT'
and u.DW_CODE_DW_CUR_IND = 'Y'
and u.DW_CODE_DW_DEL_IND = 'N'
and u.DW_CODE in(
SELECT D.budeptmap_v88_dept_id
from DW.CLIENT_ACCOUNTS C,DW.AON_V75_V88_BU_DEPT_MAP_SDO D
WHERE D.budeptmap_v75_dept_id = '-1'
AND D.budeptmap_v75_bu_id IN(C.cli_acct_producing_offICE_code)
AND C.CLI_ACCT_DW_CUR_IND='Y'
AND CLI_ACCT_SKEY IN (
SELECT A.CLI_SUM_CLI_ACCT_SKEY
FROM PROFIT.FACT_CLIENT_SUMMARIES A
WHERE A.CLI_SUM_PERIOD_SKEY = 3
AND A.DM1_TOT_ADJUSTED_REV_AMT =
(SELECT MAX(DM1_TOT_ADJUSTED_REV_AMT)
FROM PROFIT.FACT_CLIENT_SUMMARIES B
WHERE B.CLI_SUM_ENTITY_SKEY =A.CLI_SUM_ENTITY_SKEY
AND B.CLI_SUM_PERIOD_SKEY =3)))
any help in tunning is highly appreciated.
Thanks in advancehow long does this query takes to complete?
SELECT D.budeptmap_v88_dept_id
from DW.CLIENT_ACCOUNTS C,
DW.AON_V75_V88_BU_DEPT_MAP_SDO D
WHERE D.budeptmap_v75_dept_id = '-1'
AND D.budeptmap_v75_bu_id IN (C.cli_acct_producing_offICE_code)
AND C.CLI_ACCT_DW_CUR_IND = 'Y'
AND CLI_ACCT_SKEY IN (SELECT A.CLI_SUM_CLI_ACCT_SKEY
FROM PROFIT.FACT_CLIENT_SUMMARIES A
WHERE A.CLI_SUM_PERIOD_SKEY = 3
AND A.DM1_TOT_ADJUSTED_REV_AMT =
(SELECT MAX(DM1_TOT_ADJUSTED_REV_AMT)
FROM PROFIT.FACT_CLIENT_SUMMARIES B
WHERE B.CLI_SUM_ENTITY_SKEY =A.CLI_SUM_ENTITY_SKEY
AND B.CLI_SUM_PERIOD_SKEY =3))
Maybe you are looking for
-
Group Membership under Settings/My Account is not updating
We use an External table for User permissions/Groups to get updated in Group Membership. We use our custom tool to create/update new/existing users with the permissions. Then our ETL picks up the changes from the OLTP tables and update User Permissio
-
CRMXIF_ORDER_SAVE add or update pricing conditions
Hi Experts, I'm working in a requirement where I have to add items into a quotation via CRMXIF_ORDER_SAVE this is working now. The problem is that I'm not able to add or update either standar nor "Z" pricing conditions (e.g. XBRT or ZPRU). For this
-
I am running an nvidia graphics card with twinview to support dual monitors. I used "nvidia --config" to get my xorg.conf file and then manually created 10-monitor. If fonts in the xorg sever are rendered jaggedly, is that likely to be a xorg.conf
-
Converting Oracle Reports to XML Publisher
Hello, I've been trying to convert my Oracle Reports to use XML Publisher templates and make the canned reports more visually appealing. I've been following the steps described in note 295409.1 on metalink to change OR output to XML and calling the X
-
Hi all, Is there any way to change the used JCO at runtime? Aviad