Conditional start of MGP

Hi,
I have some questions about job scheduler and MGP process.
a) Is there a way to setup job to be run only during the nights, but not during the day?
b) Is there a way to start MGP process conditionally, for example, as soon as specific row is put into a specific table?
We have a batch job that nightly synchronizes main database with database used with mobileadmin. We would like to start MGP only after batch job has finished, but not while it's still running, otherwise mgp has to do same thing all over again. Is there a way to somehow setup/trigger MGP to start only on special condition?
Thank you in advance!

Dear Marc,
Thanks for quick answer and some great ideas. I really like the idea of running mgp manually from the command line after running our synchronization scripts. I will think about a way to automate it in future. The only thing that I don't like about it is the necessity to stop job scheduler.
Regarding question A) Unfortunately, I don't see here http://download.oracle.com/docs/cd/B14156_01/doc/B12262/html/newjob_bottom.gif any way to schedule the job to run only during the night :(

Similar Messages

  • BPM with conditional start not getting triggered

    Hi
    I have developed a BPM which collects a few IDocs with a correlation based on the message content.
    When triggering the BPM in Development, everything works as intended. (Messages are collected together based on the value of the correlation)
    After this we decided to transport the BPM to Test by using NWDI. The deployment was successful, but when we try to run the scenario, the message gets delivered successfully in the monitor, but no BPM process is being triggered.
    Audit log in monitor:
    I've tried the same with the BPM in Dev but there it works fine, when trying in Test or Production, the BPM isn't getting triggered. Same when trying to trigger the process through the WS Navigator or SoapUI.
    The endpoint url we use is always the: http://host:port/MessagingSystem/receive/JPR/XI
    I can see the process in the process repository (but due to a conditional start, I cannot start it from there with a test).
    Do you have any suggestions on how to troubleshoot this?
    I can see nothing in the NWA Logs / Developer Traces either.
    Our system is a PO 7.40 SP5.
    Thanks in advance.
    Best regards,
    Nicolas

    Hi Nick
    thanks for the quick reply.
    The runtime version of the BPM is indeed the same for DEV and TEST.
    The BPM Actions don't show anything unfortunately, so doesn't seem to have triggered anything.
    The user has the SAP_BPM_TRIGGER_EVENT role so it should be able to trigger the process.
    The NWA Logs don't show up anything besides:
    JPR successfully processed the message
    And the following logs for the BPM:
    Returned destination xxxx.com/collectlabel~bpm*1400504350735*0, type WSProvider to user xxxx
    I can see the BPM Service in running state on the Java Services/Applications as well, so I would think everything is alright.
    br,
    Nicolas

  • Financial Reporting - don't work condition "starts with"

    Hi All,
    I want exclude rows from report where dimension members name start with "9", I try suppress row with condition "starts with", but this don't work.
    When I explore Conditional Suppression feature I got positive take only for "contains" condition.
    Please help me how I can exclude rows from my report.

    I make sense, condition "starts with" work perfect, error in hierarchy on my dimension.
    Hyperion Financial Reporting the best :8}

  • Starting MGP as service

    Hello
    We are trying to run MGP as service from the comman prompt.
    d:\>net start Oracle MGP service
    It is not accepting the service name...
    The service name for MGP is 'Oracle MGP service' after we registered it as a service(mgpsrv -i -SCHEMA mobileadmin -pass mobileadmin)
    How to run this from the command prompt because all the service names doesnt contain any spaces in it..
    May be we are missing something..
    any help is greatly appreciated...
    thanks
    Yugandhar
    ([email protected])

    Hi,
    Have you tried:
    net start "Oracle MGP Service"?
    Or look in the Registry to see what the short name for the service is and use that.
    Simon.

  • CRM 5.0 IPC Group Condition

    Friends,
    We have a requirement to implement a group condition in CRM IPC 5.0.  We have it implemented in R/3 and it works fine.  We have replicated the code in the IPC and it is being hit.  The code is quite simple.  We copy to subtotal 1 a the net line value if the condition ZDC1 exists on the line.  We then want the group basis calculation to only include the totalling of those lines that had ZDC1.
    As I mentioned, this works fine in R/3.  In CRM it is including the value of all the lines regardless of whether there is a ZDC1 condition or not.  The Java code is getting hit and doing the transfer of the value to subtotal 1 at the right time. 
    Is there something else we should be setting up in the custom fromula for a group condition?  I see in the IMG in CRM where I can add formula and implementation attributes.  Is this something I need to do to get the group condition to work correctly?
    Regards.
    KB

    We put code in to write the condition out to a log file to ensure that the correct values were being calculated.  Once we did this, the condition started working.  No clue why.

  • Start process -"Start using Metachain or API"

    Dear Experts,
                   I have a process chain,PC2 that needs to be scheduled after completion of process chain, PC1. Now can I use the condition "Start using Metachain or API". But I have no idea how it works. I referred to documentation service.sap.com but they dont tell me much about this. Can somebody please tell me or refere me to some kind of documentation on how this condition works?
    Thanks.

    Hi Visu,
           Make PC2 as a local chain in PC1. and use 'start using meta chian option' for PC2, so that PC2 will automatically trigger when ever the PC1 is completed.
    Regards-
    MM

  • Start Event Triggers

    In BPMN 1.1 specification, there are 6 Start Event Types.
    I can Timer in BPM 10g studio.
    Does Message Wait and Send Message in BPM 10g implement Message trigger at BPMN 1.1?
    Where are None, Conditional, Signal, and Multiple in OBPM 10g?

    In BPMN 1.1 specification, there are 6 Start Event Types.I can Timer in BPM 10g studio.
    Does Message Wait and Send Message in BPM 10g implement Message trigger at BPMN 1.1?
    Where are None, Conditional, Signal, and Multiple in OBPM 10g? >
    It's a valid point. In Oracle BPM 10g, you can achieve the effect of the 6 BPMN start events, but the icons representing the most of the start events did not all show up in the process modeling tool until 11g.
    Plain - this event is the default Begin activity in the Oracle BPM 10g process. While BPMN 1.1 specifies that the first activity can be one of the 6 listed here, Oracle BPM 10g always uses the Plain start event in its model.
    Message - I know this is non-intuitive, but process instances can be created in a variety of different ways (e.g. PAPI, a subprocess flow invoking it, a Global Creation, logic from inside an activity, etc.). As it gets created you have a choice to use the default set of input arguments - this is the "BeginIn" mapping. Alternatively, you can create any number of other mappings with different sets of input argument variables. If you use an argument mapping other than the default "BeginIn", then you can right mouse click the Begin activity and click "Add a Message Based Transition". This creates a BPMN message transition. In Oracle BPM 10g you will see that the process still has a Plain start event, but in this scenario you will see a Message transition coming out of the Begin. It's functionally working the same, but modelled differently than what you might expect to see.
    Timer - this is one where the functionality is suppported but the icons do not show up in the process. You can create a timer start event by using a Global Automatic activity and setting it to create instances at specific times or intervals. Visually, you will see a Plain start event in the process, but you will also see a Global Automatic activity separate from the process. The Global Automatic controls the timer and is separate from the Begin activity. It's functionally working the same, but modelled differently than what you might expect to see.
    Conditional - this is supported somewhat from both modeling and execution. Again there is not Conditional start trigger. There is still a Plain start event, but you achieve the same result by adding a conditional transition and have it leave the Begin activity in the process. it's functionally working the same, but modelled differently than what you might expect to see.
    Signal - this is supported from inside the process, but the start event is handled by the Plain start event.
    Multiple - this too is supported from inside the process, but the start event for Multiple is also caught by the Plain start event.
    Dan

  • Creating condition(Price) records in product

    hi,
    I am trying to create condition records for a product.For a sales order (TA) i create, the pricing procedure determined is RVCXUS. But i dont see any of the condition type which matches condition type for a product (in F4) and condition type maintained in RVCXUS.
    Please let me know where from the condition type(in F4) comes in a product. It will not include all condition type we see in spro?
    Regards,
    Rahul

    Hi Rahul,
    I got your problem, actually the condition pr00 is not a CRM condition ( all standard CRM conditions start with "0" like 0PR0), it is a condition type of connected R/3 system, hence, for this condition type, there are no maintanable tables in the CRM system, hence, you can not maintain it in CRM. If maintenance for such condition records is required in CRM system, this must be set up in Customizing:
    Customer Relationship Management -> Basic Functions -> Pricing -> Pricing in the Business Transaction ->Define Mapping for Condition Types from Application BBP to Application CRM
    or
    I guess, you can maintain them in R/3 & do a delta download for your product master..!!!
    Best Regards,
    Vishant Jain

  • Start a proces chain with event

    How to start a process chain with "after event"??

    i followed these steps
    1. i created a event some "Ztest1"  with sm62
    after that i created a process chain start conditions(start varient) like after event i that i mentioned "ztest1"
    after that i went to sm64
    i triggered that event but my chain was not started????/
    any sugg..... y it happened

  • JMS-related sun-appserver-pe8.0.0_01 default server start failure

    On Dell Dimension 2400 XP system, appserver startup always fails after trying for 60 seconds to verify if the JMS service startup succeeded. This condition started 10 July. What is JMS? Why does it fail? What to do? Rich

    Hi
    The Java Message Service (JMS) is a messaging standard that allows application components based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.
    JMS is bundled and installed with Application Server 8. JMS runs on a port 17676. If this port is occupied by any other process, the JMS will not start. Please check if this port is occupied by any other process or change the default JMS port in domain.xml (<Creator-root>/Appserver8/domains/creator/config/domain.xml)
    Thanks
    SG

  • MGP script monitoring

    Hi all.
    We are testing the mgp script to see if that solves our performance problem.
    It seems that there is no script/command/binary to properly stop/get status/start the mgp script/process (something like opmnctl for opmn, for instance).
    Can you confirm? Have you created such script?
    Thanks in advance,
    Jerome

    Problem is consperf does not work, for it does not write anyhting in the c$consperf table, and manually adding into this table is not supported.

  • Kernel panics whenever RAID card conditions battery

    I have an early 2008 Mac Pro running 10.5.8, with an Apple RAID card with M-2.0.5.5 firmware. This has two Seagate Barracuda drives attached, formatted as RAID 0, and this RAID 0 is the OS drive.
    Periodically, the RAID card conditions the battery. In the past I've been able to work while this was happening but, about three weeks ago, the conditioning started and the computer became completely unusable: there were kernel panics every minute or two and, on restarting, the report showed "AppleRAIDCard Controller Panic...". I eventually gave up and left it alone until the conditioning finished, and it's worked fine since.
    This situation has just started again. It's only three weeks since the last conditioning; the gap was 6 weeks last time; and 12 weeks the time before that. Is the battery failing? Does that explain the constant AppleRAIDCard Controller-initiated kernel panics?
    I didn't set up this computer and could happily live without RAID but this OS drive now has lots of software installed, much of which needed to be authorised by challenges/responses and explanations to software manufacturers as to why it was being reinstalled etc. Reformatting and reinstalling everything again would be a major PITA.
    Is it possible to move the drives to a software RAID 0 without reformatting them? Is this likely to be less problematic than the Apple RAID card?
    Thanks in advance,
    Steve = : ^ )

    I'd just like someone to comment on whether they think the battery alone could be responsible for unending KPs whenever the controller is conditioning the battery, or whether the card might be faulty.
    I wonder about both points.
    Did some searching, and there are several reports of other users with battery problems.
    For some, the battery fixed the problem, for others, no remedy.
    One example:
    http://forums.macrumors.com/showthread.php?t=439873
    For troubleshooting, identifying the source through eliminating causes related to the symptoms would be a reasonable approach.
    Since the KP's occur only during battery conditioning, it places the most suspicion on the battery.
    Personally, I see this as most telling.
    Since you can't run without the battery, a replacement is the only way that I can think of to test the battery.
    Other possibilities could be firmware related.
    Is the card and the MP running the most current firmware?
    If the firmware of the card and the MP are up to date, the battery, again, comes to the top of the suspect list.
    And, of course, there is always the possibility that a component on card has failed.
    Unfortunately, as with the battery, a replacement is needed to test.
    I wouldn't move on this point until the battery theory were tested.
    Not to dismiss the potential for software involvement, I'm wondering what are the OS X kexts that are involved with the processes leading to the KP's?
    Logs in Console may provide some information.
    Portions of the KP report immediately after the word "backtrace" also provide the best information.

  • Mgp as a service

    Hello all,
    Has anyone been able to make the mgp run as a windows service ?
    The way it is implemented now, i have to log on to the control center everytime I start the mobile server, and mannually start it.
    There is a mgp.bat batch file, but if i run it in order to start the mgp service, the message on the control center stays on "stopped" and it won't change even if i refresh the page.
    Thanks a lot in advance for your help.
    Julian

    Been here.. This is the information that I was furnished. If there is an alternative, I would very much be interested also. Meanwhile, managing the mgp process/task is supposed to be improved in later versions according to Metalink response from a TAR I submitted. Here is Oracle's Metalink TAR RESPONSE:
    "Unfortunately there is no way to stop the mgp process from the command line. It must be started/stopped either from the control center or by running the mgp.bat script directly.
    I have heard of people using a 3rd party product called Firedaemon http://www.firedaemon.com which allows you to run normal executables and batch scripts as services. The software is free which is an added bonus.
    If you use this method, remember to set up the MGP service as being dependant on the webtogo service so that it waits for the webtogo process to start before starting itself.
    Hope this helps.Cameron" END METALINK RESPONSE..
    All you see is a java.exe with 10 threads in the Tasks/Processes. I haven't figured out a work around to-date. I use the Control Center and clean up processes when database server is bounced, or things hang. I have not looked at the Firedaemon freeware, with hopes that the administrative features of the product suite are going to be enhanced. It would be advantageous to have an administrative shutdown, startup capability enabled by a script that would facilitate server administration.
    Here is the mgp.bat that the Mobile Server Control Center calls, passing the params:
    title MGP
    rem MGPApp <delay in seconds> <number of cycles between restart><schema><password>
    set CLASSPATH=.;d:\ORACLE\iSuites\MOBILE\classes\CONSOLIDATOR.JAR;d:\ORACLE\iSuites\MOBILE\SERVER\BIN\WEBTOGO.JAR;d:\ORACLE\iSuites\JDBC\LIB\classes12.zip;%CLASSPATH%
    :recycle
    java MGPApp %1 %2 %3 %4
    if ERRORLEVEL 1 goto finish
    goto recycle
    :finish
    echo MGP.bat will exit.
    exit

  • Scheduling jobs with condition-after job programatically

    Hi,
    Could anybody please tell me how can we schedule jobs from programs(prgramatically) with condition-start after job(after a particular job completed) like we have the same option in sm36.
    Thanks,
    Rahul.

    Hello Rahul,
    Check the following Link Page Number 41.
    "Sample Program: Wait for Predecessor Job with
    JOB_CLOSE"
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCDWBLIB/BCDWBLIB.pdf
    Regards,
    Abhishek Jolly

  • How to split a varchar parameter say (2,4,7,24) and get each of the value

    Hi
    I have to create a function which takes in 2 paramters,
    first one is date
    second one is a list of codes within parentheses (varchar2) ex:- '(2,4,7,24)'
    Each of this number value brings out a table information such as
    table name
    where condition
    start and end dates and soon
    I need to build a dynamic SQL ..for each table information got from each value.
    In this case, their will be 4 select queries which needs to be joined.
    To start of, I want to know, how many codes have been passed in the second parm.
    Please let me know, if their is a function which contains the number of delimiters and a function which can be used to get each value
    basically from (2,4,7,24)
    I want
    the count of delimiters (here it is 3)
    using the count of delimiters (3+1 , will be giving me the count of numbers present)
    using the delimiter, I want to get each number
    ie.,
    2 first time and create the SQL
    4
    7
    24
    Atlast will join all 4 sql queries and create one which runs to produce my output
    Thank You
    I appreciate your help

    Sir,
    I did the same think, what you have posted, but I want some simpler way, and I dont know how to do it.
    create or replace
    PACKAGE BODY PKG_EXTRACT_FACILITY AS
    -- GET THE FACILITY INFO FOR A GIVEN YEAR .
    FUNCTION F_MAIN_FACILITY(PI_DATE DATE,PI_ORGEXT_ID varchar2) RETURN GC_RESULT_SET AS
    C_RESULT_SET GC_RESULT_SET;
    VN_TABLE VARCHAR2(20);
    VN_COLUMN VARCHAR2(40);
    VN_WHERE VARCHAR2(20);
    VD_START VARCHAR2(40);
    VD_END VARCHAR2(40);
    VN_MULTI NUMBER(2);
    VN_SQL VARCHAR2(4000);
    VC_QUERY VARCHAR2(2000);
    BEGIN
    DBMS_OUTPUT.PUT_LINE(PI_ORGEXT_ID);
    DBMS_OUTPUT.PUT_LINE(''''|| PI_ORGEXT_ID ||'''');
    --VN_SQL := 'SELECT REPLACE(' PI_ORGEXT_ID ','"' ,'') FROM dual' ;
    --DBMS_OUTPUT.PUT_LINE(VN_SQL);
    --PI_ORGEXT_ID := EXECUTE IMMEDIATE(VN_SQL);
    OPEN C_RESULT_SET FOR
    --SELECT ORGEXT_TABLE,count(*), ORGEXT_COLUMN, ORGEXT_WHERE,
    -- ORGEXT_START, ORGEXT_END, ORGEXT_MULTI
    -- FROM ORG_EXTRACT
    -- WHERE ORGEXT_ID IN
    -- (SELECT regexp_substr(''''|| PI_ORGEXT_ID ||'''','[^,]+', 1, level) from dual connect by regexp_substr(''''|| PI_ORGEXT_ID ||'''', '[^,]+', 1, level) is not null )
    -- group by ORGEXT_TABLE, ORGEXT_COLUMN, ORGEXT_WHERE,
    -- ORGEXT_START, ORGEXT_END, ORGEXT_MULTI;
    --SELECT ORGEXT_ID,ORGEXT_TABLE, ORGEXT_COLUMN, ORGEXT_WHERE,
    -- ORGEXT_START, ORGEXT_END, ORGEXT_MULTI
    -- FROM ORG_EXTRACT
    -- WHERE INSTR(''''|| PI_ORGEXT_ID ||'''',ORGEXT_ID) > 0 ORDER BY ORGEXT_ID;
    SELECT ORGEXT_TABLE, ORGEXT_COLUMN, ORGEXT_WHERE,
    ORGEXT_START, ORGEXT_END, ORGEXT_MULTI
    FROM ORG_EXTRACT
    WHERE ORGEXT_ID IN
    (SELECT * FROM TABLE(in_list(PI_ORGEXT_ID)));
    -- DBMS_OUTPUT.PUT_LINE(VN_SQL);
    LOOP
    FETCH C_RESULT_SET INTO VN_TABLE, VN_COLUMN, VN_WHERE, VD_START, VD_END, VN_MULTI;
    EXIT WHEN C_RESULT_SET%NOTFOUND;
    -- dbms_output.put_line('record '|| VN_TABLE || ' ' || VN_COLUMN );
    IF ( VN_MULTI > 0 ) THEN
    IF ( VD_START IS NULL AND VN_WHERE IS NOT NULL ) THEN
    --SELECT QUERY WITH XML FUNC NOT INCLUDING START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' || VN_WHERE || '
    GROUP BY ORG_ID) Q1
    WHERE M.ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('FIRST CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NULL AND VN_WHERE IS NULL ) THEN
    --SELECT QUERY WITH XML FUNC INCLUDING START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM rateprep.' || VN_TABLE || '
    GROUP BY ORG_ID) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('SECOND CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NOT NULL ) THEN
    --SELECT QUERY WITH XML FUNC INCLUDING START AND END DATES, BUT NOT INCLUDING WHERE CLAUSE.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' || VN_WHERE || ' AND
    (TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| ')
    GROUP BY ORG_ID) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('THIRD CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NULL ) THEN
    --SELECT QUERY WITH XML FUNC INCLUDING START AND END DATES, AND INCLUDING WHERE CLAUSE.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    (SELECT ORG_ID, RTRIM(XMLAGG(XMLELEMENT(E, ' || VN_COLUMN || ' || '','')
    ORDER BY ' || VN_COLUMN || ').EXTRACT(''//text()''), '','') AS ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE (TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| ')
    GROUP BY ORG_ID) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('FOURTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    END IF;
    ELSE
    IF ( VD_START IS NULL AND VN_WHERE IS NOT NULL ) THEN
    --SELECT QUERY WITHOUT XML FUNC AND WITHOUT START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID, Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' ||VN_WHERE || '
    ) Q1
    WHERE M.ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('FIFTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NULL AND VN_WHERE IS NULL ) THEN
    --SELECT QUERY WITHOUT XML FUNC AND WITHOUT WHERE CLAUSE AND START AND END DATES.
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID,Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    ) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('SIXTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NOT NULL ) THEN
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID,Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE ' || VN_WHERE || ' AND
    (TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| ')
    ) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('SEVENTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    ELSIF ( VD_START IS NOT NULL AND VN_WHERE IS NULL ) THEN
    VC_QUERY := 'SELECT ORG_MAIN.ORG_ID,Q1.' || VN_COLUMN || '
    FROM ORG_MAIN,
    ( SELECT ORG_ID, ' || VN_COLUMN || '
    FROM ' || VN_TABLE || '
    WHERE TO_DATE( ' ||''''|| PI_DATE ||''''|| ', ''DD-MON-YY'') BETWEEN ' ||''|| VD_START ||''|| ' AND ' ||''|| VD_END ||''|| '
    ) Q1
    WHERE ORG_MAIN.ORG_ID = Q1.ORG_ID(+)
    ORDER BY ORG_ID';
    DBMS_OUTPUT.PUT_LINE('EIGHTH CONDITION ' || VC_QUERY);
    EXECUTE IMMEDIATE VC_QUERY;
    END IF;
    END IF;
    -- VC_SQL := 'SELECT ORG_MAIN.ORG_ID,' ||
    -- VC_EXT :=
    END LOOP;
    OPEN C_RESULT_SET FOR VC_QUERY;
    RETURN C_RESULT_SET;
    CLOSE C_RESULT_SET;
    END F_MAIN_FACILITY;
    FUNCTION in_list (p_in_list  IN  VARCHAR2) RETURN t_in_list_tab PIPELINED
    AS
    l_text  VARCHAR2(32767) := p_in_list || ',';
    l_idx   NUMBER;
    BEGIN
    LOOP
    l_idx := INSTR(l_text, ',');
    EXIT WHEN NVL(l_idx, 0) = 0;
    PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
    l_text := SUBSTR(l_text, l_idx 1);+
    END LOOP;
    RETURN;
    END;
    END PKG_EXTRACT_FACILITY;
    SET SERVEROUTPUT ON;
    Declare
    VC_OUT NUMBER;
    VC_OUT1 VARCHAR2(80);
    VC_RES PKG_EXTRACT_FACILITY.GC_RESULT_SET;
    begin
    VC_RES := PKG_EXTRACT_FACILITY.F_MAIN_FACILITY('01-JAN-10','9,2,3');
    LOOP
    fetch VC_RES INTO VC_OUT,VC_OUT1;
    EXIT WHEN VC_RES%NOTFOUND;
    dbms_output.put_line('data ' || VC_OUT ||' ' || VC_OUT1 );
    END LOOP;
    close VC_RES;
    end;
    The function I wrote, right now is at building each Select query from each result record produced from passing the second parm to the select query to extract all other table information from
    ORG_EXTRACT table.
    Any help to solve the business role I wrote in my earlier mail, is appreciated.Thank You.
    Edited by: user8703472 on Sep 21, 2012 7:37 AM
    Edited by: user8703472 on Sep 21, 2012 7:40 AM
    Edited by: user8703472 on Sep 21, 2012 7:44 AM
    Edited by: user8703472 on Sep 21, 2012 7:44 AM
    Edited by: user8703472 on Sep 21, 2012 7:46 AM

Maybe you are looking for

  • Playlists with videos won't go away

    iPod doesn't support playlist folders. As a result, the music playlists menu is annoying to use unless I trim it down to only include some of my playlists. The obvious way to get rid of unwanted playlists is to uncheck them in the "Music" tab under t

  • Is Maxtor Personal Storage 3200 compatible with MacBook OSx 10.6?

    I can't see the external hard drive on my MacBook.  Is there a compatibility issue?

  • Application bean or session bean

    hello everyone, Everytime a web user hits a couple pages, the same SQL queries are called. It's about 2 separate queries. I would like to CACHE the results of that query into a vector and stick it in an application bean. So that people will just call

  • Workflow builder

    oracle workflow builder save a process diagram in flate file with extension .wft; Ineed the bnf according to the workflow builder check the validation of process definition; I need it becuse I build application generate file has the same format of .w

  • StarOffice8 Solaris 10 sparc: how to install only in the global zone?

    hello all, i have installed SO8 on T2000 Solaris 10 according this doc: [http://notallmicrosoft.blogspot.com/2005/10/installing-staroffice-8-on-solaris-nfs.html|http://notallmicrosoft.blogspot.com/2005/10/installing-staroffice-8-on-solaris-nfs.html]