Is is possible to avoid hard-coding the Item in a shared Select List Query?

I created a "Select List" in the Shared Components area as follows:
My goal is to create a shared select list that can be used on any form for a particular Field.
IF :P10_FK_RSTA_CODE is NULL THEN
RETURN
          'select col_description, col_code_pk
          from CODE_TABLE
          where col_active_ind = ''Y''';
ELSE
RETURN
          'select col_description, col_code_pk
          from CODE_TABLE
          where col_code_pk = :P10_FK_RSTA_CODE';
END IF
Which works great, but how can I make the select list work for the same column on a different form?
Because :P10_FK_RSTA_CODE is hard-coded in the function, I can't reuse this Function from a different form.
(I could rename the Field on every form to the same name, but I'm hoping there is a better way.)
Is there a way I can pass in a variable from the Field Item to make this dynamic where I can use it on any form?
Also, I am very new at this, so if there is a better way to do this, I would greatly appreciate any input.
Thanks in advance.
MF

>
Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "956902".
When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
I created a "Select List" in the Shared Components area as follows:
My goal is to create a shared select list that can be used on any form for a particular Field.
IF :P10_FK_RSTA_CODE is NULL THEN
RETURN
          'select col_description, col_code_pk
          from CODE_TABLE
          where col_active_ind = ''Y''';
ELSE
RETURN
          'select col_description, col_code_pk
          from CODE_TABLE
          where col_code_pk = :P10_FK_RSTA_CODE';
END IF
Which works great, but how can I make the select list work for the same column on a different form?
Because :P10_FK_RSTA_CODE is hard-coded in the function, I can't reuse this Function from a different form.
(I could rename the Field on every form to the same name, but I'm hoping there is a better way.)
Is there a way I can pass in a variable from the Field Item to make this dynamic where I can use it on any form?Reference the value of an application item rather than a page item in the LOV query, setting the value using a process or computation on each form page.

Similar Messages

  • In TOTALYTD function is it possible to avoid hard-coding year_end_date?

    Suppose you have a fiscal year of 9/30. The TOTALYTD function looks like:
      YTD Actual $:=TOTALYTD( [Actual $], 'Date'[Date], ALL('Date'), "9/30")
    But I want to avoid hard coding "9/30", and assuming I have a settings table from where I can get a date with the yearend, I tried this: 
      YTD Actual $:=TOTALYTD ([Actual $], 'Date'[Date], ALL('Date'), DISTINCT( 'Settings'[YearEndDate]))
    I get no errors but it calculates like "12/31". I tried to use Format but with no luck.
    Is there a way to make this work?

    I didn't try it, but I guess a max should work (assuming that there is only one date in the settings table).
    YTD Actual $:=TOTALYTD ([Actual $], 'Date'[Date], ALL('Date'), MAX( 'Settings'[YearEndDate])
    Can you try it out?
    Cheers,
    Jason | www.SqlJason.com
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

  • How can I avoid hard-coding this where clause in the inner select?

    This is extremely fast, but I have to hard-code the inner-most where clause, and I obviously can't do that. I know how to work-around it by creating a function that takes the CUSTOMER_ID and returns the ORDER_ID from the most recent payment, and that's reasonably fast, but I thought it would be worthwhile to see if there was a way to do this in straight SQL. I also know that better design could make the problem go away.
    Very much appreciate it if you could take a look and let me know if there's any way to get this kind of performance without hard-coding.
    Thanks,
    create or replace view customer_view as
    select customer.customer_id,
              customer.customer_name,
                   select t.order_id
                        from (
                                  select payment.order_id
                                       from payment
                                       where payment.customer_id = 1 -- <-- Here's the line where I'm hard-coding the customer_id. Is there any way to reference the customer_id without hard-coding this?
                                       order by payment.payment_date desc
                             ) t
                        where rownum = 1
              ) as latest_order_id
         from customer
    select * from customer_view where customer_id = 1; <-- I want that inner-most select to use this customer_id, without having to hard-code it.

    Hi Matt,
    Something like this could be a possibility (Not tested)
    create or replace view customer_view as
      select customer.customer_id,
             customer.customer_name,
             (select min (t.order_id)
                       keep (dense_rank first order by payment.payment_date desc)
              from   payment
              where  payment.customer_id = customer.customer_id)
               as latest_order_id
      from   customer;Regards
    Peter

  • Tips on avoiding hard coded paths and make a java app platform independent

    HI all,
    I would like to gather some tips on how to avoid hard coded file paths, which are plenty in the application I work on and which I inherited from previous programmers.
    Also, when deploying to the production server, my app goes from a Windows platform to a Linux machine.
    I am curious to know what tricks and tools other programmers find useful in similar contexts.
    I am sure many of us would benefit from the discussion.
    Thank you !

    Actually, Java does this for you; you can use unix-style paths and they will still work, even on Windoze. To wit:
    public static void main(String[] args) {
            File f = new File("/");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\
    public static void main(String[] args) {
            File f = new File("/Program Files");
            System.out.println(f.getAbsolutePath());
    }Yields: C:\Program Files

  • How to avoid hard coding in Programming

    Hi,
    For preparing a Sales report we need to fetch Excise, Tax and
    Education cess.
    While doing the programming condition types of excise, tax and education cess were given to technical consultants.
    It is like hard coding the programming. In future if a new condition type is created then it wont be calculated.
    What are the ways to avoid hard coding?
    regards,
    sathya

    You can create a Z-Table that you are using for referencing your data e.g. condition type. This way this is customizable.
    In a project I worked before we even had a more sophisticated way for avoiding hardcoding. We had one generic table including Program name, "Function to be exextued" (e.g. determination of condition) and the key value. And we had a function module reading these parameters from the gerneric table. Everytime you would need a specific value from this table you called this table via the function module.This way you had a customizable table and no more hardcoding was needed, the function module provided you with the values.

  • Parse schema name - Avoiding hard-coded schema names

    Hi all,
    I have been trying to find a similar thread but had no luck. I want to avoid hard-coding schema names in my reports. I have tried to use a Substitution string but I don't seem to be able to reference it by just doing :default_schema. I already reference the parsing schema like this: #OWNER# which is saving me a lot of time. Is there any way to create additional variables like that one instead of those substitution strings that can't be parsed in a query?
    Thanks a lot for your help.
    Regards,
    werot.

    Werot wrote:
    I have been trying to find a similar thread but had no luck. I want to avoid hard-coding schema names in my reports. I have tried to use a Substitution string but I don't seem to be able to reference it by just doing :default_schema. I already reference the parsing schema like this: #OWNER# which is saving me a lot of time. Is there any way to create additional variables like that one instead of those substitution strings that can't be parsed in a query?
    Will you actually get any benefit from using substitution strings? They are also hard-coded at design time. You could use application items if you need something dynamic.
    Bind variable syntax (:default_schema) will not work for lexical substitution of substitution string and application item values in report queries. You have to use static text (&DEFAULT_SCHEMA.) references (and be aware of the potential for SQL injection that this exposes).
    I wouldn't recommend using schema qualifiers directly in APEX applications. I would use grants, synonyms and views at the database level.

  • How to use model clause without hard coding the values in it?

    Query
    select acct_no,
           gl_code,
           CASE
             WHEN entry_type_label IN ('Earned Revenue') THEN
              'Earned Revenue'
             ELSE
              'Deferred Revenue Credit'
           END AS entry_type_label,
           CASE
             WHEN entry_type_label IN ('Opening Balance') THEN
              'Opening Balance'
             WHEN entry_type_label IN ('Deferred Revenue Credit') THEN
              'Invoice Amount'
             WHEN entry_type_label IN ('Earned Revenue') THEN
              'Earned Revenue'
             WHEN entry_type_label IN ('Closing Balance') THEN
              'Closing Balance'
             ELSE
              'Deferred Revenue Credit'
           END AS label,
           entry_type_no,
           orig_chg_start_date,
           period_no,
           -amt as amt
      from revrec_test
    WHERE acct_no = 1788562
       AND entry_type_no IN (2, 4) model dimension by(acct_no,
              gl_code,
              entry_type_label,
              entry_type_no,
              orig_chg_start_date,
              period_no) measures(amt) rules upsert
    all(amt 1788562,
               'UNEARNED-10011561',
               'Opening Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               190 = 0,
               amt 1788562,
               'UNEARNED-10011561',
               'Closing Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               190 = amt 1788562,
               'UNEARNED-10011561',
               'Deferred Revenue Credit',
               2,
               '02-OCT-17 08.30.00 AM',
               190 - amt 1788562,
               'EARNED-10011561',
               'Earned Revenue',
               4,
               '02-OCT-17 08.30.00 AM',
               190,
               amt 1788562,
               'UNEARNED-10011561',
               'Opening Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               191 = amt 1788562,
               'UNEARNED-10011561',
               'Closing Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               190,
               amt 1788562,
               'UNEARNED-10011561',
               'Deferred Revenue Credit',
               2,
               '02-OCT-17 08.30.00 AM',
               191 = 0,
               amt 1788562,
               'UNEARNED-10011561',
               'Closing Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               191 =
               (amt 1788562, 'UNEARNED-10011561', 'Opening Balance', 2,
                '02-OCT-17 08.30.00 AM', 191 + amt 1788562, 'UNEARNED-10011561',
                'Deferred Revenue Credit', 2, '02-OCT-17 08.30.00 AM', 191) - amt
               1788562,
               'EARNED-10011561',
               'Earned Revenue',
               4,
               '02-OCT-17 08.30.00 AM',
               191,
               amt 1788562,
               'UNEARNED-10011561',
               'Opening Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               192 = amt 1788562,
               'UNEARNED-10011561',
               'Closing Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               191,
               amt 1788562,
               'UNEARNED-10011561',
               'Deferred Revenue Credit',
               2,
               '02-OCT-17 08.30.00 AM',
               192 = 0,
               amt 1788562,
               'UNEARNED-10011561',
               'Closing Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               192 =
               (amt 1788562, 'UNEARNED-10011561', 'Opening Balance', 2,
                '02-OCT-17 08.30.00 AM', 192 + amt 1788562, 'UNEARNED-10011561',
                'Deferred Revenue Credit', 2, '02-OCT-17 08.30.00 AM', 192) - amt
               1788562,
               'EARNED-10011561',
               'Earned Revenue',
               4,
               '02-OCT-17 08.30.00 AM',
               192,
               amt 1788562,
               'UNEARNED-10011561',
               'Opening Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               193 = amt 1788562,
               'UNEARNED-10011561',
               'Closing Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               192,
               amt 1788562,
               'UNEARNED-10011561',
               'Deferred Revenue Credit',
               2,
               '02-OCT-17 08.30.00 AM',
               193 = 0,
               amt 1788562,
               'UNEARNED-10011561',
               'Closing Balance',
               2,
               '02-OCT-17 08.30.00 AM',
               193 =
               (amt 1788562, 'UNEARNED-10011561', 'Opening Balance', 2,
                '02-OCT-17 08.30.00 AM', 193 + amt 1788562, 'UNEARNED-10011561',
                'Deferred Revenue Credit', 2, '02-OCT-17 08.30.00 AM', 193) - amt
               1788562,
               'EARNED-10011561',
               'Earned Revenue',
               4,
               '02-OCT-17 08.30.00 AM',
               193)
    ORDER BY period_no, entry_type_no;
    The above query works fine. But i have hard coded the values. I want to do the same operation for different account number which is going to have different periodic no. How can I achieve it?
    Thanks in advance.

    Create Statement
    CREATE TABLE table_one(
    ACCT_NO             NUMBER(38),                                               
    GL_CODE             VARCHAR2(300),
    ENTRY_TYPE_LABEL    CHAR(50),                                                  
    ENTRY_TYPE_NO       NUMBER,                                                    
    ORIG_CHG_START_DATE TIMESTAMP(0) WITH LOCAL TIME ZONE,
    ORIG_CHG_END_DATE   TIMESTAMP(0) WITH LOCAL TIME ZONE,
    PERIOD_NO           NUMBER(38),
    AMT                 NUMBER(38,10)
    Insert Statement
    INSERT ALL
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'U-11561','Deferred Revenue Debit',3,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',100,13.87)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'E-11561','Earned Revenue',4,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',102,-14.83)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'E-11561','Earned Revenue',4,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',101,-14.35)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'E-11561','Earned Revenue',4,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',100,-13.87)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'U-11561','Deferred Revenue Debit',3,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',103,0.95)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'U-11561','Deferred Revenue Debit',3,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',102,14.83)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'U-11561','Deferred Revenue Debit',3,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',101,14.35)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'E-11561','Earned Revenue',4,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',103,-0.95)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1001,'U-11561','Deferred Revenue Credit',2,'02-OCT-17 08.30.00 AM','01-JAN-18 01.30.00 PM',100,-44)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',106,44.91)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Accounts Receivable',1,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',104,60)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,3.93)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',106,11.75)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',107,6.86)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,-7.82)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',106,-23.47)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',107,-13.69)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',107,-6.86)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,7.82)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',106,23.47)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',107,13.69)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',104,-9.13)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,-44.91)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',106,-44.91)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',107,-35.91)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,-3.93)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,44.91)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',104,9.13)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Earned Revenue',4,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',106,-11.75)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Credit',2,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,38.48)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Credit',2,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,-19.24)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Credit',2,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',104,-60)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Accounts Receivable',1,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,38.48)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Accounts Receivable',1,'20-DEC-13 09.30.00 AM','16-FEB-14 09.30.00 AM',105,19.24)
    INTO table_one(acct_no, gl_code, entry_type_label, entry_type_no, orig_chg_start_date, orig_chg_end_date, period_no, amt) VALUES(1002,'Recurring Flat Fees COA Code','Deferred Revenue Debit',3,'17-NOV-13 09.30.00 AM','16-FEB-14 09.30.00 AM',107,35.91)
    SELECT * FROM dual;
    Expected Result
    S.NO
    ACCT_NO
    GL_CODE
    ENTRY_TYPE_LABEL
    ENTRY_TYPE_NO
    ORIG_CHG_START_DATE
    PERIOD_NO
    AMT
    DESCRIPTION
    1
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    100
    0
    Opening Account
    2
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    100
    44
    Invoice
    3
    1001
    E-11561
    Earned Revenue
    4
    02-OCT-17 08.30.00 AM
    100
    13.87
    Invoice Paid
    4
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    100
    30.13
    Closing Account
    5
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    101
    30.13
    Opening Account
    6
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    101
    0
    Invoice
    7
    1001
    E-11561
    Earned Revenue
    4
    02-OCT-17 08.30.00 AM
    101
    14.35
    Invoice Paid
    8
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    101
    15.78
    Closing Account
    9
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    102
    15.78
    Opening Account
    10
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    102
    0
    Invoice
    11
    1001
    E-11561
    Earned Revenue
    4
    02-OCT-17 08.30.00 AM
    102
    14.83
    Invoice Paid
    12
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    102
    0.95
    Closing Account
    13
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    103
    0.95
    Opening Account
    14
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    103
    0
    Invoice
    15
    1001
    E-11561
    Earned Revenue
    4
    02-OCT-17 08.30.00 AM
    103
    0.95
    Invoice Paid
    16
    1001
    U-11561
    Deferred Revenue Credit
    2
    02-OCT-17 08.30.00 AM
    103
    0
    Closing Account
    Description
    We must start opening account as zero and end with closing account as zero by doing manipulation with invoice and invoice paid.
    Process
    Initial Stage
    Subsequent stage
    Opening Account
    0
    (=closing Account)
    Invoice
    max value of account no which has entry type no 2
    0
    Invoice Paid
    taken from the  field amount which has entry type no 4
    taken from the  field amount which has entry type no 4
    Closing Account
    (=[opening account + invoice] - invoice paid)
    (=[opening account + invoice] - invoice paid)
    Note
    1) Each account may have different periodic no.
    2) Some account may have more than 4 distinct period no and less than 4 distinct periodic no.
    3) Description column from expected result is not an part of table. It is been added for easier understanding.

  • How to edit the records value fetched by select statement query in sqldever

    How to edit the records value fetched by select statement query in sqldever 2.1.1.
    EX-
    SELECT * FROM emp WHERE ename like 'Jaga%'
    Edited by: user9372056 on Aug 31, 2010 2:16 AM

    Hi,
    Although some forum members may be using that tool, there is still a dedicated forum for SQL Developer.
    SQL Developer
    Maybe your chances are better there.
    Regards
    Peter

  • How to display the display value of a select list

    I want to display the display value instead of the return value of a select list but don't know how to do it, can someone help me?

    When you created the select list item, you are ask to provide a list of values query which can either be a SQL query or a Static List, which both follows the pattern of
    Dispaly;Return.
    Example:
    SQL query -
    select 'Yes' col1, 'Y' col2
    from dual
    Static -
    STATIC:Yes;Y
    which will display 'Yes' but will actually, return 'Y'.
    how did you set your select list item?
    Thanks,
    Marilyn

  • How to avoid hard coding

    hello experts,
    in one of the requirements i asked to design the selection screen with some of the fields, those fields are having some constant values while filtering the data.
    to avoid that hard coding they asked me to design the selection screen with those fields can anyone suggest me how to do that...?
    thanks a lot for your anticipation...
    SRI

    hi
    good
    you can create a f4 search helo,store those hard coded values in a internal table and fetch those interal table value into that f4 help.
    thanks
    mrutyun^

  • BufferedImage type parameter -- way to avoid hard-coding?

    My situation:
    I'm creating a new BufferedImage, then populating it with the Graphics of
    a component. I'm using the Component's height and width as two of
    the paramters, but I also need to specify the type. Right now I've got
    TYPE_INT_RGB hard-coded, but I seem to recall this is a Bad Idea.
    My question:
    Is there a (more) correct way to identify/specify the type when creating my
    BufferedImage?
    final BufferedImage myImage =
        new BufferedImage(myComponent.getWidth(), myComponent.getHeight(),
            BufferedImage.TYPE_INT_RGB);
    final Graphics2D g2d = myImage.createGraphics();
    myComponent.paint(g2d);

    Hm. I totally missed that method. Unfortunately, I really need a BufferedImage. I'm invoking ImageIO.write() later on, and that requires a RenderedImage, of which BufferedImage is the only implementation.
    Thanks, though. I'll definitely keep that method in mind for later!

  • Not hard coding the iexplorer path

    Hi
    I was looking around and saw this piece of code posted by Cotton.m:
    public class IETest{
      public final static String browserPath ="C:\\Program Files\\Internet Explorer\\iexplore.exe";
      public static void main(String args[])throws Exception{
        String[] urls = {"http://forum.java.sun.com","http://www.cnn.com","http://www.google.com"};
        for(int i=0;i<urls.length;i++){
          launchPage(urls);     
    public static void launchPage(String pageName)throws Exception{
    String[] launchPath = new String[2];
    launchPath[0] = browserPath;
    launchPath[1] = pageName;
    Runtime.getRuntime().exec(launchPath);
    Does anyone know how to not hardcode the browserPath? or is that impossible... I'm doing something similar but I open files... is there a way that I don't need to hard code the path name? or am i asking too much?
    Cheers>

    **  Here is a pure Windows solution
    **  Run the code and you will be taken to a tutorial that may provide
    **  a more generic solution
    public class WindowsProcess
         public static void main(String[] args)
              throws Exception
              String[] cmd = new String[4];
              cmd[0] = "cmd.exe";
              cmd[1] = "/C";
              cmd[2] = "start";
              cmd[3] = "http://www.javaworld.com/javaworld/javatips/jw-javatip66.html";
    //          cmd[3] = "notepad";
    //          cmd[3] = "will.xls";
    //          cmd[2] = "a.html";
    //          cmd[3] = "file:/c:/java/temp/a.html";
              Process process = Runtime.getRuntime().exec( cmd );
    }

  • How can I avoid hard coding this width?

    I have something like this:
    <s:SkinnableDataContainer
                                  width="200"
                                  itemRenderer="MyItemRenderer"
                                  dataProvider="{ dp }">
    If I have 4 items each 50px wide, I would set the width to 200px.
    However, I want to avoid hardcoding the width.
    How can I extract the width from the item renderer?

    You might want to try not setting a width and setting requestedColumnCount on the layout instead.
    <s:List>
        <s:layout>
            <s:HorizontalLayout requestedColumnCount="2" />
        </s:layout>
        <s:dataProvider>
            <s:ArrayList>
                <fx:String>0000</fx:String>
                <fx:String>1000</fx:String>
                <fx:String>2000</fx:String>
                <fx:String>3000</fx:String>
            </s:ArrayList>
        </s:dataProvider>
    </s:List>

  • Can I change the target of a Pagination Select List?

    Hi,
    Basically what I want to know is this. In a report with pagination using a select list, is it possible to modify the target of where it will redirect?
    Because again, with the 0 session, if i currently using the 0 session, the select list will submit the page and put the real session ID in the address bar. So I lose the 0 session. But for the next and previous links, I can work around it by using PPR reports though.

    I'm bumping this, because I very interested in knowing if what I'm asking is possible.

  • How to create the same size of all Select lists?

    I have a form with select list. Each of it has the size of max length of its content.
    It is possible to made it all the same?
    Regards Kostya

    Kostya,
    In the HTML Form Element Attributes of your select list put the following:
    style="width:195px"
    and all the select list items will have the width of 195px.
    Denes Kubicek

Maybe you are looking for

  • I HAVE PROBLEM WITH UPDATE IN NOKIA N86

    Hello I'm having trouble to update the Nokia N86 At first things are correctly but then fails to update I use the Nokia OVI and error code 12 017 I hope to help me as soon as possible Look at the attachments Attachments: 1.PNG ‏17 KB 3.PNG ‏18 KB 2.P

  • Is Discoverer Plus compatible to the Microsoft Excel 2007?

    Hi, I have a Discoverer Report in which the data is formated with Bold,underlines, $ signs and different background color for the grnad totals etc.. When i export the data to microsoft excel 2007 i loose all the formatting. Microsoft Excel 2003 did n

  • Possible to recover data from dead HD?

    in July of this year, my HD stopped working for whatever reason. i got the folder icon when i started my Mac mini that day and did lots of troubleshooting with no luck. i ended up putting a new one in and all is fine now. EXCEPT all my pics and whatn

  • RAM Upgrade

    I have a late 2006 24" iMac with Intel processor. I have two 1-gig memory cards that I took out of new MacBook Pro. These are DDR3 while iMac specs call for DDR2. Will the DDR3 cards work in the iMac?

  • ITunes 11 sounds really bad any fix?

    I noticed that the new iTunes sounds really bad compared to other players like VLC or Quicktime any idea how to fix this. I tried to adjust the equalizer and the sound enhancer and no luck, it is definitely not the speakers because the same song soun