What is the best way to execute immediate particular sql stored in a table

I have a string variable containing row_ids eg "12,24,35,23"
and a table
row_id, sql
1 , "insert into some_table values(23,'Happy');"
6 , "insert into some_other_table values(24,'Sad');"
12 , "insert into some_table values(23,'Crazzzy');"
15 , "insert into some_other_table values(23,'Old');"
23 , "insert into another_table values(23,'Left');"
24 , "insert into stuff_table values(23,'Gold');"
30 , "insert into old_table values(23,'Even');"
35 , "insert into archive_table values(23,"True");"
And I need to write a plsql function that takes the list of row_ids as an argument and executes the sql statements stored in the table that matches.
I am trying a combination of cursor and execute immediate statements to do it at the moment but suspect I am being very inefficient. So any suggestions or examples of similar code anyone knows about would be hugely appreciated.
Cheers
Reuben

Not sure why anyone would be doing such a thing as storing their SQL in a table and wanting to dynamically execute it (generally this is bad practice), but if you must...
SQL> select * from testdata;
    SQL_ID SQL_TEXT
         1 insert into some_table values(23,'Happy');
         6 insert into some_other_table values(24,'Sad');
        12 insert into some_table values(23,'Crazzzy');
        15 insert into some_other_table values(23,'Old');
        23 insert into another_table values(23,'Left');
        24 insert into stuff_table values(23,'Gold');
        30 insert into old_table values(23,'Even');
        35 insert into archive_table values(23,'True');
8 rows selected.
SQL> set serverout on
SQL> ed
Wrote file afiedt.buf
  1  DECLARE
  2    v_ids VARCHAR2(4000) := '12,24,35,23';
  3    CURSOR cur_fetch IS
  4      SELECT sql_text
  5      FROM   testdata
  6      WHERE  sql_id IN (SELECT TO_NUMBER(REGEXP_SUBSTR (v_ids, '[^,]+', 1, rownum))
  7                        FROM   DUAL
  8                        CONNECT BY ROWNUM <= length(regexp_replace(v_ids,'[^,]*'))+1);
  9  BEGIN
10    FOR s IN cur_fetch
11    LOOP
12      DBMS_OUTPUT.PUT_LINE(s.sql_text); -- For demo purposes show the sql text
13      -- EXECUTE IMMEDIATE s.sql_text; -- In reality, uncomment this to execute the sql text
14    END LOOP;
15* END;
16  /
insert into some_table values(23,'Crazzzy');
insert into another_table values(23,'Left');
insert into stuff_table values(23,'Gold');
insert into archive_table values(23,'True');
PL/SQL procedure successfully completed.
SQL>

Similar Messages

  • What is the best way to keep my personal files stored in iCloud separate from my work-related files?

    What is the best way to keep my personal files stored in iCloud separate from my work-related files? It seems that I'm not allowed to link my iPad mini and my work iMac using two different accounts, so I'm wondering how to make my single personal account work for both, while keeping personal vs work files reasonably separated.
    Thanks for any suggestions.

    Is it possible for you to upgrade your account to iCloud Drive? That would mean, all Macs upgraded to Yosemite, and all mobile devices to iOS8?
    See:  iCloud Drive FAQ and iCloud: About using iWork for iOS and iCloud
    In iCloud Drive you could create two separate custom folders, one for work documents and one for private documents and organize your documents there.  Don't use the app specific folders (Keynote, Pages, Numbers, ...) , because you can only create one level of folders inside these folders.

  • What's the best way to delete 2.4 million of records from table?

    We are having two tables one is production one and another is temp table which data we want to insert into production table. temp table having 2.5 million of records and on the other side production table is having billions of records. the thing which we want to do just simple delete already existed records from production table and then insert the remaining records from temp to production table.
    Can anyone guide what's the best way to do this?
    Thanks,
    Waheed.

    Waheed Azhar wrote:
    production table is live and data is appending in this table on random basis. if i go insert data from temp to prod table a pk voilation exception occured bcoz already a record is exist in prod table which we are going to insert from temp to prod
    If you really just want to insert the records and don't want to update the matching ones and you're already on 10g you could use the "DML error logging" facility of the INSERT command, which would log all failed records but succeeds for the remaining ones.
    You can create a suitable exception table using the DBMS_ERRLOG.CREATE_ERROR_LOG procedure and then use the "LOG ERRORS INTO" clause of the INSERT command. Note that you can't use the "direct-path" insert mode (APPEND hint) if you expect to encounter UNIQUE CONSTRAINT violations, because this can't be logged and cause the direct-path insert to fail. Since this is a "live" table you probably don't want to use the direct-path insert anyway.
    See the manuals for more information: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#BGBEIACB
    Sample taken from 10g manuals:
    CREATE TABLE raises (emp_id NUMBER, sal NUMBER
       CONSTRAINT check_sal CHECK(sal > 8000));
    EXECUTE DBMS_ERRLOG.CREATE_ERROR_LOG('raises', 'errlog');
    INSERT INTO raises
       SELECT employee_id, salary*1.1 FROM employees
       WHERE commission_pct > .2
       LOG ERRORS INTO errlog ('my_bad') REJECT LIMIT 10;
    SELECT ORA_ERR_MESG$, ORA_ERR_TAG$, emp_id, sal FROM errlog;
    ORA_ERR_MESG$               ORA_ERR_TAG$         EMP_ID SAL
    ORA-02290: check constraint my_bad               161    7700
    (HR.SYS_C004266) violatedIf the number of rows in the temp table is not too large and you have a suitable index on the large table for the lookup you could also try to use a NOT EXISTS clause in the insert command:
    INSERT INTO <large_table>
    SELECT ...
    FROM TEMP A
    WHERE NOT EXISTS (
    SELECT NULL
    FROM <large_table> B
    WHERE B.<lookup> = A.<key>
    );But you need to check the execution plan, because a hash join using a full table scan on the <large_table> is probably something you want to avoid.
    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/

  • What is the best way of returning group-by sql results in Toplink?

    I have many-to-many relationship between Employee and Project; so,
    a Employee can have many Projects, and a Project can be owned by many Employees.
    I have three tables in the database:
    Employee(id int, name varchar(32)),
    Project(id int, name varchar(32)), and
    Employee_Project(employee_id int, project_id int), which is the join-table between Employee and Project.
    Now, I want to find out for each employee, how many projects does the employee has.
    The sql query that achieves what I want would look like this:
    select e.id, count(*) as numProjects
    from employee e, employee_project ep
    where e.id = ep.employee_id
    group by e.id
    Just for information, currently I am using a named ReadAllQuery and I write my own sql in
    the Workbench rather than using the ExpressionBuilder.
    Now, my two questions are :
    1. Since there is a "group by e.id" on the query, only e.id can appear in the select clause.
    This prevent me from returning the full Employee pojo using ReadAllQuery.
    I can change the query to a nested query like this
    select e.eid, e.name, emp.cnt as numProjects
    from employee e,
    (select e_inner.id, count(*) as cnt
    from employee e_inner, employee_project ep_inner
    where e_inner.id = ep_inner.employee_id
    group by e_inner.id) emp
    where e.id = emp.id
    but, I don't like the complication of having extra join because of the nested query. Is there a
    better way of doing something like this?
    2. The second question is what is the best way of returning the count(*) or the numProjects.
    What I did right now is that I have a ReadAllQuery that returns a List<Employee>; then for
    each returned Employee pojo, I call a method getNumProjects() to get the count(*) information.
    I had an extra column "numProjects" in the Employee table and in the Employee descriptor, and
    I set this attribute to be "ReadOnly" on the Workbench; (the value for this dummy "numProjects"
    column in the database is always 0). So far this works ok. However, since the numProjects is
    transient, I need to set the query to refreshIdentityMapResult() or otherwise the Employee object
    in the cache could contain stale numProjects information. What I worry is that refreshIdentityMapResult()
    will cause the query to always hit the database and beat the purpose of having a cache. Also, if
    there are multiple concurrent queries to the database, I worry that there will be a race condition
    of updating this transient "numProjects" attribute. What are the better way of returning this kind
    of transient information such as count(*)? Can I have the query to return something like a tuple
    containing the Employee pojo and an int for the count(*), rather than just a Employee pojo with the
    transient int inside the pojo? Please advise.
    I greatly appreciate any help.
    Thanks,
    Frans

    No I don't want to modify the set of attributes after TopLink returns it to me. But I don't
    quite understand why this matters?
    I understand that I can use ReportQuery to return all the Employee's attributes plus the int count(*)
    and then I can iterate through the list of ReportQueryResult to construct the Employee pojo myself.
    I was hesitant of doing this because I think there will be a performance cost of not being able to
    use lazy fetching. For example, in the case of large result sets and the client only needs a few of them,
    if we use the above aproach, we need to iterate through all of them and wastefully create all the Employee
    pojos. On the other hand, if we let Toplink directly return a list of Employee pojo, then we can tell
    Toplink to use ScrollableCursor and to fetch only the first several rows. Please advise.
    Thanks.

  • What is the best way to execute code at a specific time?

    Hello,
    I have a problem. I need to execute some code at a specific time: subVI A should run at e.g. 2 seconds (after start) and stop at 3.5 seconds and subVI B should execute at 3.5 seconds until 5 s. The user can choose the time points. It could also be that subVI B has to execute before subVI A or at the same time.
    Time precission is not important +/- 20 ms is ok.
    I have implemented it like that: In a loop (period time approx. 20ms) I query if the timeframe has come and then the subVI will be executed.
    See attached picture.
    I don't believe that this is an economic way. It will produce high CPU load. How can I do it better?
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    Timeframe.PNG ‏9 KB

    @HaD
    Something like this?
    Johannes
    LabVIEW 7.1 (!)
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    Timeframe.vi ‏33 KB

  • What is the best way to migrate CR2008, they are stored in the BW system

    Hi all
    We have an BO XI 3.1 system, in this system we have some Crystal Report 2008 published from BW system to BO XI 3.1.
    Now we installed a new BI 4.0 system. For the migration from BO XI3.1 to BI 4.0 we used the Upgrade Maangement Tool.
    How we can migrate the Crystal Report theyare stored in the BW system?
    If we use the Upgrade Management Tool and migrate the folder SAP - SIDCLNT100  we can't open the files with the new CrystalReport 2011.
    The next try was we open the Report from BW with CR2008 and save the report to a new folder in the BI launchpad.
    Then we migrate this report to thr new BI 4.0. The report will run but we can't open it with CR2011.
    Can someone help?
    Regards Stefan

    Hi Stefan,
    we found out that using BW publish is still neccesary if you want to have all features like online LOVs and correct display of hierarchy node variables. So you would not need to use the upgrade wizard at all. Just republish your reports using /crystal/rptadmin.
    I think it should be a good idea to open and resave your reports with CR 2011 but I am not sure it this is really needed.
    Trying to open a report based on a BEx query faild from BI4.0 directly failed for us, too. (Reports based on BEx queries are not supported was the error message). So you will still need to manage your reports in BW and use the publish feature.
    I hope this information is relevant for you.
    Regards,
    Thorsten

  • (New to C# here) What is the best way to return false in a function if it cannot be executed successfully?

    In Javascript or PHP you can have a function that could return, for example, a string in case of success and false in case of failure.
    I've noticed (in the few days I've been learning C#) that you need to define a type of value that the function will return, so you need to return that type of value but in case of failure you can't return false.
    What is the best way to achieve this behavior and is there an example I can see?
    Thank you in advance,
    Juan

    Juan, be aware that returning null won't work with value types, such as an int, which can't be null. You'd have to use a nullable value type. A nullable int would be declared with a "?", such as:
    int? someOtherFunction(int param)
    if(something goes great)
    return param * 42;
    return null;
    And you have to use it like this:
    int? result = someOtherFunction(666);
    if (result != null) // you can also use result.HasValue
    // it worked, do something with the result
    // if you're doing math with the result, no problem
    int x = result * 2;
    // but if you're assigning it to another an int, you need to use this syntax
    int y = result.Value;
    Before nullable value types came along, for a method that returned an int, I'd use a value of something that wouldn't normally be returned by that method to indicate failure, such as a -1.
    ~~Bonnie DeWitt [C# MVP]
    That's something very very important to keep in mind. Can save you from a lot of headaches!
    So if you have an int function and it might return NULL, if you are doing Math with the return value you can use it directly, but if you're assigning it to another variable you have to use .Value?
    Thanks

  • What is the best way to submit a Concurrent Request over a DB Link?

    Hi,
    We have a requirement to submit a Concurrent Request over a DB Link. What is the best way to do this?
    What I've done so far is I've created a function in the EBS instance that executes FND_GLOBAl.APPS_INITIALIZE and submits the Concurrent Request. I then call this function remotely from our NON-EBS database. It seems to work fine but I found out from metalink article id 466800.1 that this is not recommended.
    Why are Concurrent Programs Calling FND_GLOBAL.APPS_INITIALIZE Using DBLinks Failing? [ID 466800.1]
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=11129815723825&type=DOCUMENT&id=466800.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=17dodl8lyp_108
    Can anyone suggest a better approach?
    Thanks,
    Allen

    What I've done so far is I've created a function in the EBS instance that executes FND_GLOBAl.APPS_INITIALIZE and submits the Concurrent Request. I then call this function remotely from our NON-EBS database. It seems to work fine but I found out from metalink article id 466800.1 that this is not recommended.
    Why are Concurrent Programs Calling FND_GLOBAL.APPS_INITIALIZE Using DBLinks Failing? [ID 466800.1]
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=11129815723825&type=DOCUMENT&id=466800.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=17dodl8lyp_108
    Can anyone suggest a better approach?Please log a SR and ask Oracle support for any better (alternative) approach. You can mention in the SR that your approach works properly and ask what would be the implications of using it (even though it is not recommended).
    Thanks,
    Hussein

  • What is the best way to clean up your mac and make it faster and run to an optimum level?

    Hi Everyone, Hope all is well
    Iv been running my mac pro for a long time now, its a Mac pro, 2x 2.26 GHz Quad Core Intel Xeon. 12 GB 1066 MHz DDR3 Ram
    Over time now it has become slower, at the moment its still running fine but im sure over time it has probabally collected unwanted data etc. i just dont want it to become a problem as its only going to be used more and more... i now notice that some of the regular programs which i open do take a little while longer to open and i sometimes see that little round Mac loading the sign (the round multicolor wheel).., is there a way to clean the mac up? so that it can run more smoothly and just a better over all feel.,,, the machine is still running beautifully but its time i give it more care and revive it a little more..
    What are the best ways to do this, i dont trust any of these non apple based products which claim they can clean ur Mac etc.
    Any solutaion and advice that u guys can give would be great and i would be very thankful
    Thanks in advance

    For immediate speed improvements, upgrade to a Solid State Drive and upgrade your conventional hard drives to new ones, because the newer ones are faster at reading and writing than the ones from 5 years ago.
    By Re-installing your OS onto a solid state drive, the system will boot much faster, and your programs will launch much faster.
    I use a small SSD (only 60GB) which contains only OS X and all my apps.  All of my personal files are on the large mechanical hard drive.  If you still use the drive that shipped with the Mac, then it might be a good idea to replace it.
    Depending on what kind of work you do, then additional RAM will help.  Swapping CPUs should only be done if you are really in need of the improvements they would bring. 
    You appear to have the 2009 dual-CPU Mac Pro, which is the most challenging model to swap CPUs into.

  • What is the best way to keep your macbook pro in tip top condition. performance wise

    What is the best way to keep the performance of a macbook pro in tip top shape.  Over the years my computer seems to act like a pc with all of its hicups and lockups.
    I am running mountain lion and this computer is approx 2 years old.
    Not sure if there is some sort of software that will help with this or is there something else I can do.
    Thanks
    GAJ

    How to maintain a Mac
    1. Make redundant backups, keeping at least one off site at all times. One backup is not enough. Don’t back up your backups; all should be made directly from the original data. Don’t rely completely on any single backup method, such as Time Machine. If you get an indication that a backup has failed, don't ignore it.
    2. Keep your software up to date. In the App Store or Software Update preference pane (depending on the OS version), you can configure automatic notifications of updates to OS X and other Mac App Store products. Some third-party applications from other sources have a similar feature, if you don’t mind letting them phone home. Otherwise you have to check yourself on a regular basis.
    Keeping up to date is especially important for complex software that modifies the operating system, such as device drivers. Before installing any Apple update, you must check that all such modifications that you use are compatible. Incompatibility with third-party software is by far the most common cause of trouble with system updates.
    3. Don't install crapware, such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” “accelerators,” "boosters," “extenders,” “cleaners,” "doctors," "tune-ups," “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, such stuff is useless or worse than useless. Above all, avoid any software that purports to change the look and feel of the user interface.
    It's not much of an exaggeration to say that the whole "utility" software industry for the Mac is a fraud on consumers. The most extreme examples are the "CleanMyMac" and “MacKeeper” scams, but there are many others.
    As a rule, the only software you should install is that which directly enables you to do the things you use a computer for, and doesn't change the way other software works.
    Safari extensions, and perhaps the equivalent for other web browsers, are a partial exception to the above rule. Most are safe, and they're easy to get rid of if they don't work. Some may cause the browser to crash or otherwise malfunction.  Some are malicious. Use with caution, and install only well-known extensions from relatively trustworthy sources, such as the Safari Extensions Gallery.
    Never install any third-party software unless you know how to uninstall it. Otherwise you may create problems that are very hard to solve. Do not rely on "utilities" such as "AppCleaner" and the like that purport to remove software.
    4. Don't install bad, conflicting, or unnecessary fonts. Whenever you install new fonts, use the validation feature of the built-in Font Book application to make sure the fonts aren't defective and don't conflict with each other or with others that you already have. See the built-in help and this support article for instructions. Deactivate or remove fonts that you don't really need to speed up application launching.
    5. Avoid malware. Malware is malicious software that circulates on the Internet. This kind of attack on OS X was once so rare that it was hardly a concern, but malware is now increasingly common, and increasingly dangerous.
    There is some built-in protection against downloading malware, but you can’t rely on it — the attackers are always at least one day ahead of the defense. You can’t rely on third-party protection either. What you can rely on is common-sense awareness — not paranoia, which only makes you more vulnerable.
    Never install software from an untrustworthy or unknown source. If in doubt, do some research. Any website that prompts you to install a “codec” or “plugin” that comes from the same site, or an unknown site, is untrustworthy. Software with a corporate brand, such as Adobe Flash Player, must come directly from the developer's website. No intermediary is acceptable, and don’t trust links unless you know how to parse them. Any file that is automatically downloaded from the web, without your having requested it, should go straight into the Trash. A web page that tells you that your computer has a “virus,” or that anything else is wrong with it, is a scam.
    In OS X 10.7.5 or later, downloaded applications and Installer packages that have not been digitally signed by a developer registered with Apple are blocked from loading by default. The block can be overridden, but think carefully before you do so.
    Because of recurring security issues in Java, it’s best to disable it in your web browsers, if it’s installed. Few websites have Java content nowadays, so you won’t be missing much. This action is mandatory if you’re running any version of OS X older than 10.6.8 with the latest Java update. Note: Java has nothing to do with JavaScript, despite the similar names. Don't install Java unless you're sure you need it. Most people don't.
    6. Don't fill up your boot volume. A common mistake is adding more and more large files to your home folder until you start to get warnings that you're out of space, which may be followed in short order by a boot failure. This is more prone to happen on the newer Macs that come with an internal SSD instead of the traditional hard drive. The drive can be very nearly full before you become aware of the problem.
    While it's not true that you should or must keep any particular percentage of space free, you should monitor your storage use and make sure you're not in immediate danger of using it up. According to Apple documentation, you need at least 9 GB of free space on the startup volume for normal operation.
    If storage space is running low, use a tool such as OmniDiskSweeper to explore the volume and find out what's taking up the most space. Move seldom-used large files to secondary storage.
    7. Relax, don’t do it. Besides the above, no routine maintenance is necessary or beneficial for the vast majority of users; specifically not “cleaning caches,” “zapping the PRAM,” "resetting the SMC," “rebuilding the directory,” "defragmenting the drive," “running periodic scripts,” “dumping logs,” "deleting temp files," “scanning for viruses,” "purging memory," "checking for bad blocks," "testing the hardware," or “repairing permissions.” Such measures are either completely pointless or are useful only for solving problems, not for prevention.
    To use a Mac effectively, you have to free yourself from the Windows mindset that every computer needs regular downtime maintenance such as "defragging" and "registry cleaning." Those concepts do not apply to the Mac platform. A computing device is not something you should have to think about very much. It should be an almost transparent medium through which you communicate, work, and play. If you want a machine that is always whining for your attention like a neurotic dog, use a PC.
    The very height of futility is running an expensive third-party application called “Disk Warrior” when nothing is wrong, or even when something is wrong and you have backups, which you must have. Disk Warrior is a data-salvage tool, not a maintenance tool, and you will never need it if your backups are adequate. Don’t waste money on it or anything like it.

  • What is the best way to export the data out of BW into a flat file on the S

    Hi All,
    We are BW 7.01 (EHP 1, Service Pack Level 7).
    As part of our BW project scope for our current release, we will be developing certain reports in BW, and for certain reports, the existing legacy reporting system based out of MS Access and the old version of Business Objects Release 2 would be used, with the needed data supplied from the BW system.
    What is the best way to export the data out of BW into a flat file on the Server on regular intervals using a process chain?
    Thanks in advance,
    - Shashi

    Hello Shashi,
    some comments:
    1) An "open hub license" is required for all processes that extract data from BW to a non-SAP system (including APD). Please check with your SAP Account Executive for details.
    2) The limitation of 16 key fields is only valid when using open hub for extracting to a DB table. There's no such limitation when writing files.
    3) Open hub is the recommended solution since it's the easiest to implement, no programming is required, and you don't have to worry much about scaling with higher data volumes (APD and CRM BAPI are quite different in all of these aspects).
    For completeness, here's the most recent documentation which also lists other options:
    http://help.sap.com/saphelp_nw73/helpdata/en/0a/0212b4335542a5ae2ecf9a51fbfc96/frameset.htm
    Regards,
    Marc
    SAP Customer Solution Adoption (CSA)

  • What is the best way to start SAPGUI in a specific transaction

    Hello,
    What I'm trying to do is to run a Java program that will start SAPGUI (in windows format, not HTML) and present the user with a specific transaction with some data already inserted.
    I already managed to start the SAPGUI and I know how to fill in data using the SapJCo but my question is: what is the best way to navigate to a specific transaction? I can activate an RFC of BAPI_CALL_TRANSACTION but it seems like a big overhead. so, can any of you tell me what is the best way activate a specific transaction in SAPGUI using JCo?
    Thanks,
    Uri Lifshitz.

    Uri
      JCO are mostly used to executed a RFM on the Destination.
      I don't think we could call a Transaction using JCO.
    Thanks
    Jack
    <b>Allot points if my post helps !!!</b>

  • What is the best way to bring a hierarchy in R3 to BW

    Hi,
    There is a hierarchy constructed on R3 based on sales area called AMG hierarchy. Users now want the same hierarchy in BW reports based on Cube1.
    What is the best approach to handle this?
    What is the best way to bring a hierarchy in R3 to BW?
    Thanks

    Hi,
    I tried mk1 and it prompts for:
    u201CHierarchy name & Data Elementu201D
    When I tried mk2, it only prompts for u201CHierarchy nameu201D.
    1.
    Both tcodes do not allow me to browse for the list of hierarchies so it appears I need to know the tech name somehow. Should  I have been able to browse?
    2.
    Is there another way to see the list of hierarchies on R3
    (Is there a similar tcode on BW to see or create the hierarchies on BW?)
    3.
    Just to understand, what difference does it make whether the hierarchy was created with mk1 or mk2?
    4.
    So, let me get this clear, on R3, when I execute BW10, I am prompted to enter:
    "Data Element for the Logical General Hierarch"
    it is at this point that when I browse, trying to see the list of hierarchies, I get the above message.
    "No General Hierarchy Available in R/3"
    Let's assume that I know the "Data Element for the Logical General Hierarch" to be xxxxHierxxxx.
    When I enter xxxxHierxxxx, what should I expect?
    Are you suggesting that it will automatically create the same hierarchy on BW?
    Thanks

  • What is the best way to implement a scheduled task?

    Dear kind sirs...
    let us say I have a JSF application, and it is working perfectly fine...
    I need the method like
    void DoProcessing()
    *// processing code here*
    to execute everyday at 7AM...
    so what is the best way to do it? I need this to be part of the JSF application... not in a different process... and I want the method to execute at that exact time every day.
    and what are the main steps to do that?
    best regards

    Dear Mr. Chris...
    the reason I am asking about this is because we are required to provide reports for a number of customers by email every day... each report requires retrieving values from a DB.
    I made a test few hours ago about making a thread sleeps and check the time when it wakes up, it works, no problem about that...
    I placed a thread in the servlet context and started it... and it kept working for about an hour writing in the log every 5 seconds... so I guess the idea works...
    but do you think that this way of implementing the scheduler is ok? for I have not done it before and I don't know the cons of such a method.
    thanks for any advice or comment.
    best regards

  • What is the best way of Exception Handling

    There are many ways to handle the exceptions of a program.
    1: You could put every exception handler in the most upper abstract classes.
    2: You could write a generic exception that handles a lot of things.
    3: You could write exceptions handling for every class.
    4: you could group the exception handling.
    many, many more ways.
    Question:
    What is the best way to do this?

    There are many ways to handle the exceptions of a program.
    1: You could put every exception handler in the most upper abstract classes.I woldn't do that always, a class may throw an exception if it's not able to handle it prperly, but it may, so it'll catch it. Throw Exception in abract supper clases only when you are sure the children must always throw the exception, not processing it.
    2: You could write a generic exception that handles a lot of things.Bad idea, if you always throw an Exception no informtaion is provaided about whta happened, if you throw a NullPointerException and a NumberFormatException in one of your method I (for example) colud handle properly both problems, one likely to be a programming erros, so check my cod eagain, and the other like to be an user error in introduciong some data, so I wold ask him for the data again.
    3: You could write exceptions handling for every class.Write exceptions handling for every class that needs it, throwing the exception if at that moment you don't know what to do with it and catching it if yes. Do not employ too many exception handling: execution of try catch blcks is slower than usuall code.
    4: you could group the exception handling.I don't undestand this. What do youmean?
    Question:
    What is the best way to do this? In general thrwo an exception if the class dosen't know what to do with it, the class which uses yours will handle it. If your class can process the Exception, don't be too lazy and process it.
    Employ exceptions always you need them but do not abuse; thay made the code execute slower because the VM machine must check if the exceotions occur.
    abraham.

Maybe you are looking for

  • TS1425 when connected to itunes its not showing my music library on computer

    When I connect my ipod to my computer it registers that it is my ipod but doesnt show the music library that is on the ipod.  This is not the original computer but I registered the ipod to the new computer,

  • I need to create a  Notification in CRM WebUI  When we create a new contract

    Hi Experts, I am working in Utility Industry and as per the business requirement I need to create a  Notification in CRM WebUI When we create a new contract & click on apply button. As per my knowledge we are not maintaining Notification information

  • Material Subject to Batch Management

    Dear All,         In production client, the user by mistake has put the tick for batch management while creating material.Actually, the material was not subject to batch management. Later, PO was created. At the time of GR against this PO, the store

  • Special Ledger Data Transfer GCU1 Splitting rule "Z12/SKIP/0001"

    Hello experts, when transfering documents from financial accounting into a special ledger (GCU1) I get the error message "Keine Aufteilungsregel definiert zu Z12/SKIP/0001" (No splitting rule defined for Z12/SKIP/0001). Under Financial Accounting (Ne

  • Java File Concept

    hi guys, have some problem in console window, i want to print (AuditRecord object) attribute and this file(logInfo.log) have contain some object that is AuditRecord information and my code is FileInputStream file = new FileInputStream(new File("logIn