Dynamic Summary of List in Second Table

I've run into a bit of a problem, and about 5 hours of internet research hasn't turned up an answer so to posting I go. Here is my problem:
In a table called Hours, I have a prepopulated table with a bunch of data about hours I have worked. In this table one of the columns (Hours :: I) is the name of the company where I did the work.
In another table (called Summary) I would like to automatically create a list of the unique values in Hours :: I (the list of companies that I have worked at) and have it update automagically if a new company is added to Hours :: I column.
Thanks for your help!
Jerry Smith

Hi Jerry,
Here's a similar solution, but with one less extra column and no error traps in the equations:
In Row 2 of Company Index (TimeLog::D2) enter:
=IF(COUNTIF( $B$1:B2,B) = 1, MAX($D$1:D1)+1, "")
and Fill Down.
In TimeSummary::A2 enter:
=IF(ROW()-1<=MAX(TimeLog::D), INDEX(TimeLog, MATCH(ROW()-1, TimeLog::D), 2), "")
and Fill Down.
In TimeSummary::B2 enter:
=IF(LEN(A)>0, SUMIF(TimeLog :: B, A, TimeLog :: C), "")
and Fill Down.
I like to avoid error traps where possible because they can mask other problems.
Jerry

Similar Messages

  • Dynamic Drop-Down list in a table row or subform

    Hi,
    I need to display multiple drop-down list elements dynamically. Each of these DDLs will have different values.
    For example:
    The table will have 2 columns (Student Name text field and Courses drop-down)
    Row 1: Student 1 & Courses of Student1 in DDL
    Row 2: Student 2 & Courses of Student2 in DDL
    When I execute my app, both the drop-downs (i.e. for both the students) are displaying all the courses of all the students. I tried a lot with binding options..
    $record.Students[].Courses[]
    is refering to all elements of the node. If I use the index 0 for Students node, I am getting 1st element rows.. if I use 1, I am getting 2nd element rows,,,
    But How can I set the binding so that Row 1 has only Student 1 courses and Row 2 has Student 2 courses?
    IS THERE A WAY TO DYNAMICALLY SET THE BINDING USING JAVASCRIPT?
    I tried with tables, subforms.. it is not working. It is working fine in plain web dynpro table but not in an interactive form. I am using NW 2004s SP11, Web Dynpro Java. LiveCycle Designer 7.1, Adobe Reader 7.09.
    There are some other posts talking about similar issue.. I tried the solutions mentioned there as well, but nothing worked.
    I would really appreciate if any one can provide a solution or pointer to my problem.
    Thanks
    Ram

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • Dynamic drop down list in Adobe forms

    I have created a drop down list using enumerated drop down list from webdynpro native tab and binded in the object palette by giving $record.sap-vhlist.DESCR\.DATA\.FIELD.item[]* in the list items dynamically.DESCR is the field in the internal table into which i fetched data from the database table .I have written this code in a BADI.I dont know whether my form's display type is activex or native? I am not getting any values in the drop down list.can anybody please tell me what might be missing and how should i know whether my form is ActiveX or Native?
    My form is called from portal so i have used BADI to connect portal to form

    Hi sarang,
    I have done a dynamic drop down list in which DESCR field comes from database table and pops into the drop down dynamically. I was working for a PCR scenario so the adobe form was called from portal.I will tell u all the required steps.It might work for u as it is working for me:
    1.In the form:
    I used two elements from library first is a "ENUMERATED DROP DOWN LIST NO SELECT" from web-dynpro native tab and second is "ISR_TEXT DISPLAY INVISIBLE ON EDIT MODE" from ISR controls tab.Place them one on other inthe form.
    For drop down list the setting are:
         In object, field tab click on list items there in ITEMS put :$record.sap-vhlist.DESCR\.DATA\.FIELD.item[*].in ITEMS TEXT write text in ITEMS KEY write key.
         In binding,in default binding put $record.DESCR.DATA[*].FIELD.
    For text element the settings are:
         In binding,default binding put Normal.
         when we select ISR_TEXT DISPLAY INVISIBLE ON EDIT MODE it automatically comes with calculated read only int he value tab.so open script editor and place the below code:
    $record.DESCR.DATA.FIELD (in calculate).
    2.Now the code in BADI is as follows:
    In BADI we have to write the code for drop down list in the METHOD "SCENARIO_SET_ADDITIONAL_VALUES"
    As i didnt change the standard BADI i added an enhancement spot in which i wrote a function module which fills ADDITIONAL_DATA. and the below code fills the ADDITIONAL_DATA .
    DATA: t_t572b TYPE STANDARD TABLE OF t572b WITH HEADER LINE,
            t_t554t TYPE STANDARD TABLE OF t554t WITH HEADER LINE.
      SELECT * FROM t572b INTO TABLE t_t572b WHERE sprsl EQ 'E'.
      CLEAR ls_additional_data-fieldindex.
      LOOP AT t_t572b.
        ADD 1 TO ls_additional_data-fieldindex.
        ls_additional_data-fieldname ='DESCR_KEY'.
        ls_additional_data-fieldvalue = t_t572b-descd.
        APPEND ls_additional_data TO additional_data.
        ls_additional_data-fieldname ='DESCR_LABEL'.
        ls_additional_data-fieldvalue = t_t572b-descr.
        APPEND ls_additional_data TO additional_data.
        CLEAR t_t572b.
      ENDLOOP.
    For DESCR field the we have to declare  DESCR_KEY and DESCR_LABEL in the place holders for key values and palce holders for default values in characteristics tab(where all the fields for the form are defined) of ur respective scenario.(where ur pcr scenario is defined)
    Hope ur problem got resolved.
    Please let me know if any doubts.
    If ur form is not called from portal and u want a dynamic drop down list the difference is put a data drop down list and in object, field tab click on list items there in ITEMS select the field into which u populated the data from the database table (this code shud be written in code Initialization in the respective interface) and in ITEMS TEXT put $ in ITEMS KEY put $.and in binding as we normally do bind it to the respective field in which the data is populated from database table.
    It should work.

  • Cteate 2 Dynamic drop down list

    Hi all
    i want to create 2 dynamic drop down list using struts and hibernate
    i want the first one to display countries name then if i select a country name the second drop down list will automatic display the country cities .
    i'm using database here and my tables like that :-
    country table
    country_id number(3) pk
    country_name varchar(50)
    city table
    city_id number(5) pk
    country_id(3) fk references country(country_id)
    city_name varchar(50)
    thank you in advance

    Hi Omar,
    I have solution for you
    To populating or refreshing the lists you can use
    two procedures:
    One of them - generic, which can be used for all types of list
    Another is specific which contain a SQL statement to retrieve the data for
    particular list.
    1. Specific procedure:
    PROCEDURE GET_DEPARTMENT_LIST
    IS
    sql_stat VARCHAR2(32767);
    ret_code NUMBER;
    BEGIN
    -- SQL Statement for Drop-down List
    -- (must have two columns for label and value - both VARCHAR2)
    sql_stat := ' SELECT DEPARTMENT_NAME,TO_CHAR(DEPT_ID)'
    ||' FROM SCHEMA.DEPARTMENT';
    POPULATE_MY_LIST('BLOCK.DEPARTMENT_LIST',sql_stat,ret_code);
    END;
    2. Generic procedure:
    PROCEDURE POPULATE_MY_LIST
    (item_name VARCHAR2,
    sql_stat VARCHAR2,
    out_code OUT NUMBER)
    IS
    rg_id RECORDGROUP;
    rg_name VARCHAR2(100);
    ret_code NUMBER;
    item_id ITEM;
    BEGIN
         item_id := FIND_ITEM(item_name);
         IF ID_NULL(item_id) THEN
              out_code := -1;
              RETURN;
         END IF;
         --Creating Record Group with Unique Name
         rg_name := 'RG_'||SUBSTR(item_name,INSTR(item_name,'.',1)+1,LENGTH(item_name));
         --Checking Record Group Name for existance
         rg_id := FIND_GROUP(rg_name);
         --If Group does exist - delete it
         IF NOT ID_NULL(rg_id) THEN
              DELETE_GROUP(rg_id);
         END IF;
         --Creating Record Group
         rg_id := CREATE_GROUP_FROM_QUERY(rg_name,sql_stat);
    ret_code := POPULATE_GROUP(rg_id);
    IF (ret_code <> 0) THEN
         out_code := ret_code;
         RETURN;
    END IF;
    POPULATE_LIST(item_name,rg_id);
    IF NOT FORM_SUCCESS THEN
         out_code := -2;
         RETURN;
    ELSE
    out_code := 0;     
    END IF;
    DELETE_GROUP(rg_id);
    END;
    Hope it help.
    Dmitry

  • Reporting Services - How to open a second table inside report, for each number of client (each apears in first table)

    Reporting Services - How to open a second table inside report, for each number of client (each apears in first table)?
    Exemple:
    Table1
    Cliente name:
    John
    Client number:
    12345
    Survay number of negative answers:
    3
    Table2
    Questions and answers that were negative:
    Question: How much time where you waiting
    Avaluation: 3 (from 1 to 10)
    Answer: They only called me 1 mouth later
    Can you please help me?

    Hi,
    Based on the description, I understand that you want to add subreport in the main report. When previewing the main report, the subreport can be shown in detail. Please see the screenshots on my test:
    In Reporting Services, we can create parameters and pass them from main report to subreport in order to control the data dynamically.
    References:
    Subreports (Report Builder and SSRS)
    Add a Subreport and Parameters (Report Builder and SSRS)
    If I have any misunderstanding, please feel free to contact me.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • How to populate data from dynamic drop down list to the text field

    Hi,
    I tried to populate data from dynamic drop down list to city field. I would like to concat data from drop down list.When selecting add button to add the item and select item from drop down list, data should be displayed in the text field. However, Please help. I spent alot of time to make it works I am not successful.
    Please see the link below.
    https://acrobat.com/#d=SCPS0eVi6yz13ENV0cnUdw
    Thanks for your help
    Cindy

    Hi Rosalin,
    Loop the hidden table, get the values and populate drop down in each iteration.
    DropDownList1.addItem("Text","Value");
    You can use one more solution for this scenario. If it is a matter of 2,3 dropdowns, put three dropDowns in the form layout and give seperate static data binding to them. At run time make the dropDowns hide/visible as per the requirement.
    Hope this helps.
    Thanks & Regards,
    Sanoosh

  • Dynamic retrieval in list boxes using JSP

    Dear All,
    I have a list box in a form which is created by extracting data from oracle database. There are approximately 26000 records which are added dynamically in the list box. There are five rows in the form and each row has to have a list box with all records. Now if i retrieve all records for all list boxes, the page takes high time to load. I also tried using String array to read once and write them using loops in list box. But even then the loading time is quiet high. Is there some better way so that the page loads fast enough. I am using Oracle Database and the table is indexed.
    Thanks & Regards,
    Gagan Arora

    Well, it's big enough to make any page slow... but you can try to load all the list boxes in the client side with javascript.
    i make that usually, create a javascript strings array and on the "onLoad" event fill all the list boxes with the values in that array.
    but anyway is too much data.

  • Dynamically build parameter list

    I'm after an easy way to dynamically build a list of ALL the defined parameters within the additional PL/SQL code section on a portal report. I then want to use p_arg_names / p_arg_values to retrieve and store the passed values in a table.
    To clarify, the report may have 10 parameters of which say only 5 are passed on a particular run. I need to then populate 10 columns which includes nulls for the parameters not passed. This way parameter values will always be written to the same column.
    I aiming to use this as generic code to apply to several other reports which will write to the same table.
    Ron

    In case anyone else needs this I'll post the solution myself.
    1. p_arg_names and p_arg_values (shows only the populated parameters / values)
    2. l_arg_names and l_arg_values (shows all the parameters / values)
    So in my case I needed to reference l_arg_names and l_arg_values.

  • Dynamic SQL statement to select the tables which are updated today...

    Hi Guys,
    I need to find the names of all the tables which contain rows that are inserted/updated in a given time stamp...
    Below statement gives me the list of all the tables in the database...
    select t.table_name from all_tables t;All these tables in the database have a column called rowversion which gives the updated/inserted date of a record. I need to write a select statement (probably dynamic) which will give me the table names which contain the rowversion value 24-01-2013....
    Any help is very much appreciated...

    Napster wrote:
    Hi Karthick,
    Thanks for your reply...
    But when I execute your select statement I am getting an error saying table SYS.DBMS_XMLGEN does not exist.
    Probably something wrong in my environment?Yes you can, here is a quick untested code
    declare
      my_filter date := to_date('24-01-2013', 'dd-mm-yyyy');
      my_count integer;
    begin
      for i in (select table_name from user_tables)
      loop
         execute immediate q'[select count(*) from ]' || i.table_name || q'[ where rowversion = :1]'
         using my_filter
         into my_count;
         if my_count > 0 then
             dbms_output.put_line(i.table_name);
         end if;
      end loop;
    end; 
    /

  • List of HR TABLES

    I Want list of hr table
    please send

    DD01L Domains 
    DD02L SAP tables 
    DD03L Table Fields 
    DD03T DD: Texts for fields (language dependent) 
    DD04L Data elements 
    DD04T R/3 DD: Data element texts 
    DD05S Foreign key fields 
    DD06L Pool/cluster structures 
    DD20L Matchcode Ids 
    DD24S Fields of a matchcode ID 
    T000    Clients 
    T001    Company Codes 
    T001E  Company code-dependent address data 
    T001P  Personnel Areas/Subareas 
    T012    House banks 
    T012K House bank accounts 
    T012T House bank account names 
    T500L Personnel Country Grouping 
    T500P Personnel Areas 
    T500T Personnel Country Groupings 
    T501    Employee Group 
    T501T Employee Group Names 
    T502T Marital Status Designators 
    T503    Employee Groups / Subgroups 
    T503K Employee subgroup 
    T503T Employee Subgroup Names 
    T504A Benefits - Default Values (NA) 
    T504B Benefit Option Texts (North America) 
    T504C Benefit Type (NA) 
    T504D Benefit Credit Group Amount 
    T504E Benefit Amount 
    T504F Benefit Costs 
    T508A Work Schedule Rules 
    T508T Texts for Employee Subgroup Groupings for Work Schedules 
    T510   Pay Scale Groups 
    T510A Pay Scale Types 
    T510F Assign Pay Scale > Time Unit, Currency 
    T510G Pay Scale Areas 
    T510H Payroll Constants with Regard to Time Unit 
    T510I Standard Working Hours 
    T510J Constant Valuations 
    T510L Levels 
    T510M Valuation of pay scale groups acc. to hiring date 
    T510N Pay Scales for Annual Salaries (NA) 
    T510S Time Wage Type Selection Rule 
    T510U Pay Scale Groups 
    T510Y Special Rules for Wage Type Generation 
    T511    Wage Types 
    T512R Cumulation Wage Types in Forms 
    T512S Texts for Cumulation Wage Types in Forms 
    T512T Wage Type Texts 
    T512W Wage Type Valuation 
    T512Z   Permissibility of Wage Types per Infotype 
    T513    Jobs 
    T514S Table Name Texts 
    T514T Field Name Texts 
    T51D2 Wage Type Classes 
    T51D3 Reduction Rules 
    T51D4 Cumulation Rules 
    T527X Organizational Units 
    T528B Positions - Work Centers 
    T528C Wage Type Catalog 
    T528T Position Texts 
    T529A Personnel Event 
    T529F Fast Data Entry for Events 
    T529T Personnel Event Texts 
    T52BT Texts For HR Objects 
    T52C0 Payroll Schemas 
    T52C1 Payroll Schemas 
    T52C2 Texts for Personnel Calculation Schemas 
    T52C3 Texts for Personnel Calculation Schemas 
    T52C5 Personnel Calculation Rules 
    T52CC Schema Directory 
    T52CD Schema Directory 
    T52CE Directory of Personnel Calculation Rules 
    T52CT Text Elements 
    T52CX Cross References via Generated Schemas 
    T52D1 Valid Processing Classes 
    T52D2 Valid Values for Processing Classes 
    T52D3 Valid Evaluation Classes 
    T52D4 Permitted Values for Evaluation Classes 
    T52D5 Wage Type Groups 
    T52D6 Wage Type Group Texts 
    T52D7 Assign Wage Types to Wage Type Groups 
    T52D8 Valid Processing Classes - Texts 
    T52D9 Valid Values for Processing Classes - Texts 
    T530 Reasons for Events 
    T530E Reasons for Changes 
    T530F Reasons for Changes 
    T530L Wage Types for Special Payments 
    T530T Event Reason Texts 
    T531 Deadline Types 
    T531S Deadline Type Texts 
    T533 Leave Types 
    T533T Leave Type Texts 
    T539A Default Wage Types for Basic Pay 
    T539J Base Wage Type Valuation 
    T539R Events for Standard Wage Maintenance 
    T539S Wage Types for Standard Wage Maintenance 
    T548 Date Types 
    T548S Date Conversion 
    T548T Date Types 
    T548Y Date Types 
    T549A Payroll Areas 
    T549B Company Features 
    T549C Decision Trees for Features (Customers) 
    T549D Feature Directory 
    T549L Date modifiers 
    T549M Monthly Assignment: Payroll Period 
    T549N Period Modifiers 
    T549O Text for date modifier 
    T549P Valid Time Units for Payroll Accounting 
    T549Q Payroll Periods 
    T549R Period Parameters 
    T549S Payroll date types 
    T549T Payroll Areas 
    T549M Monthly Assignment: Payroll Period 
    T549N Period Modifiers 
    T549O Text for date modifier 
    T549P Valid Time Units for Payroll Accounting 
    T549Q Payroll Periods 
    T549R Period Parameters 
    T549S Payroll date types 
    T549T Payroll Areas 
    T554S Absence and Attendance Types 
    T554T Absence and Attendance Texts 
    T554V Defaults for Absence Types 
    T554Y Time Constraints in HR TIME 
    T555A Time Types 
    T555B Time Type Designations 
    T559A Working Weeks 
    T559B Name of Working Week 
    T572F Event Texts 
    T572G Allowed Values for Events 
    T572H Event Value Texts 
    T582A Infotypes 
    T582B Infotypes Which Are Created Automatically 
    T582S Infotype Texts 
    T582V Assignment of Infotypes to Views 
    T582W Assigns Infotype View to Primary Infotype 
    T582Z Control Table for PA Time Management 
    T584A Checking Procedures - Infotype Assignment 
    T588A Transaction Codes 
    T588B Infotype Menus 
    T588C Infotype Menus/Info Groups 
    T588D Infogroups for Events 
    T588J Screen Header Definition 
    T588M Infotype Screen Control 
    T588N Screen Modification for Account Assignment Block 
    T588O Screen Modification for Assignment Data 
    T588Q Screen types for fast entry 
    T588R Selection Reports for Fast Data Entry 
    T588S Screen Types for Fast Entry 
    T588T Menu and Infogroup Designations 
    T588V Business object type 
    T588W Event types for infotype operations 
    T588X Cust. composite definition of event types for IT operations 
    T588Z Dynamic Events 
    T591A Subtype Characteristics 
    T591B Time Constraints for Wage Types 
    T591S Subtype Texts 
    T596F HR Subroutines 
    T596G Cumulation wage types 
    T596H _Cumulation wage type texts 
    T596I Calculation rule for cumulation wage types 
    T596U Conversion Table 
    T599B Report Classes 
    T599C Report Classes 
    T599D Report Categories 
    T599F Report Classes - Select Options 
    T777A Building Addresses 
    T777T Infotypes 
    T777Z Infotype Time Constraints 
    T778T Infotypes 
    T778U Subtypes 
    Error Messages tables 
    T100 Messages 
    T100A Message IDs for T100 
    T100C Control of messages by the user 
    T100O Assignment of message to object 
    T100S Configurable system messages 
    T100T Table T100A text 
    T100V Assignment of messages to tables/views 
    T100W Assign Messages to Workflow 
    T100X Error Messages: Supplements
    Warm Regards

  • Dynamically deleting a List Item

    i have a doubt as to can we dynamically delete a element in a List Item. I know, adding elements in a list but, can we delete it.
    I hope, my question is clear. Please help in solving the doubt.
    Regards.

    hi
    I Have filled 10 list dynamically with same records of a table from database. If user selected anyone record from 1st list,that item will not appear in next 9 list.again on selection of item in 2nd list,that item will not appear in next 8 list.....and so on.....I try to use DELETE_LIST_ELEMENT() but here how i can provide dynamically index value of item in list

  • Header not getting  displayed in the next page in the second table

    Dear Experts ,
    I have a query regarding Header not getting  displayed in the next page in the second table of the main window. .Let me elobrate the issue.
    I have a smartform in which there are  2 tables TABLE 1 and TABLE 2 in the smartform MAIN window. TABLE 1 is for pending PO and TABLE 2 is  for future delivery date P O separated by text in between.
    Now the header for both the tables and the data are getting displayed properly if the total output is in only one page. But If there are more entries in the TABLE 1 the Header for the TABLE 2 is not getting displayed. Header for TABLE 1 yet gets displayed properly in the next page in case of more entries.
    Only issue is that Header for TABLE 2 is not getting displayed in second page but it gets displayed if the entries are less in TABLE 1 and the total output is in one page .
    Please provide a elobrate solution on this problem as the requirement is urgent.
    Thanks,
    Regards,
    Sachin Hada

    Hi Sachin,
    you need to cteate two pages FIRST and NEXT.
    in first page --> FIRST
        next       --> NEXT
    in next page
      page---> NEXT
      next ---> NEXT.
    you copy the first page main window is the same in next page
    aslo
    I think help ful for you
    thanks & Regards
    BHUPAL.

  • Dynamic generation of form to show table entries

    Dear experts,
    I am aware of how to dynamically program for form generation when the layout static and is already defined in transaction SFP.
    However I have a requirement wherein the form layout is not available . But the form should get generated dynamically and display values from a table in a simple field - value format. ( Just the way SE16 displays table content , the only difference being output should be in a PDF)
    Any pointers how I can progress on this.
    Appreciated your inputs.
    Thank you.
    With regards,
    Sahir.

    How does default checked checkboxes work for checkboxes of type String[]?
    The following code works, but it is for form property of type String, instead of String[]:
    <form-property name="prop" type="java.lang.String" />
    form.set("prop", "true");
    <html:checkbox property="prop" value="true"> // checked by defaultThis is what I tried for type String[], modelling it off the ideas of the above code, but it does not work:
    <form-property name="prop" type="java.lang.String[]" />
    String[] propArray = {"1", "4"};
    form.set("prop", propArray[]);
    <html:checkbox property="prop" value="1">  //should be checked by default, but is not
    <html:checkbox property="prop" value="2">
    <html:checkbox property="prop" value="3"> 
    <html:checkbox property="prop" value="4"> //should be checked by default, but is notWhy does it work for String but not String[]? How do I make it so that they are checked by default for type String[]?

  • How to send mail to distribution list and another table list

    Hi
    I am facing a problem. I need to send mail to the user who is creating the SO/PO and a distribution list.
    Problem is only one thing can be used at the same time. ie either Distribution list or list from internal table.
    How can we use both in 1 function module. Like it should call the internal table and then the distribution list for sending the mail .
    Regards,
    Varun

    Hi,
    Refer to following link,
    http://www.sap-img.com/abap/make-e-mail-sender-of-po-the-po-creators-name.htm
    http://www.sap-img.com/fu016.htm
    Reward pts. if helpfull.
    Regards,
    Dhan

  • How to dynamically get default value from a table column

    Hi all,
    Here's my problem: Our front end application sends insert and update queries to a pl/sql package. I've got a procedure that gets a PL/SQL table with all the column names an values, a table-name and a primary key name and value. That procedure creates an insert or update statement. So far, so good.
    Now the problem: our front end doesn't know what the default value for a column is. So when a number field doesn't get a value in the front-end, it's inserted with a value '0' though is should ben NULL. My sollution for this is to know the default value of a column: when there's a default of '0', then the value that will be inserted is '0'. When there's no default value and the column can ben NULL, it'll be inserted as NULL. if the column has a not null constraint, a '0' will be inserted.
    Ofcourse I can get the default value from the system-views all_tab_columns or user_tab_columns, but our application is installed at some 100 clients, and has various database installations. Most of the times, the tables are in the same schema as our procedure that performs the insert or update, but sometimes some of the tables are in another schema (in the same database) and also sometimes some tables are stored in another database. In all these situations, a synonym for that table exists in the schema.
    Is there a api function or procedure that I can call to get the default value of a column? I looked at dbms_sql and dbms_metadata, but those packages don't give me that perticular information. if not, I'll stuck with the 'does table exists in schema' yes->use table, no query user_synonyms to look for the owner of the table (and database link) and query all_tab_columns to get the default value. Only this seems a bit overkill to me.
    I hope I'm clear enough? And please don't reply with "don't do inserts this way"! I know, this is not the most optimal sollution, but it does gives us a couple of advantages in our application...

    there is no way that I can think of, apart from what you have already discovered (i.e. views), where you can determine if a column has a defuault value defined against it.
    The other option is triggers, but I guess doing that across 600 tables would not be an option, and besides I stay clear of triggers.
    A different approach therefore, if you cannot pre-determine the data, is to consider a post problem handler, hence I suggested the use of an exception handler.
    The exception handler works regardless of whether the statement is dynamic or not.
    SQL> truncate table abc;
    Table truncated.
    SQL>
    SQL> declare
      2    NULLVAL exception;
      3    pragma exception_init(NULLVAL, -01400);
      4 
      5  begin
      6 
      7    begin
      8 
      9      execute immediate 'insert into abc (y) values (1)';
    10 
    11      exception
    12        when NULLVAL then
    13          -- handle the error
    14          execute immediate 'insert into abc (x,y) values (0,1)';
    15 
    16    end;
    17 
    18    commit;
    19   
    20  end;
    21  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from abc;
             X          Y
             0          1

Maybe you are looking for

  • Displaying the column values of a wizard-generated form

    Hello, I created a Master-Detail page following the examples in the various Apex guides. The form is not working correctly, unfortunately. When I click the Add Row button a row is added at the bottom of the table. Once I enter data into that row and

  • My mac has only a windows partition that is not working!!! please help!

    Ok this is the story. While trying to installing windows on a partition of my mac book air I have installed a software that allows mac book air to see a bootable usb like a dvd. It worked perfectly than I pressed the wrong button while installing win

  • FM for CUSTOM FIELDS added in BP transaction

    Hi all,   We have added few custom fields in the BP transaction.   Now the thing is we need to update those using Function module.   Could any one please help me like in which Function Module can i found those   fields once i add in the BP transactio

  • Why does my download of iTunes keep getting 'interrupted'?

    I keep trying and trying to download iTunes but its just not working! It comes up in my downloading bar, and then just says 'interrupted' each and every time and i have no idea why! I have an original Windows computer, and i'm using Google chrome, if

  • Possible to have different names on one account?

    Is it possible to have my account name different from the name on the registered credit card? My mother is allowing me to use her credit card for my Apple ID but on things like the iCloud it shows her name, since that's the name on the credit card. S