Problem in Dynamic ALV - inserting values in proper field of a table.

Hi gurus,
As per the user requirement I need to create a dynamic alv report. The fields will be display according to the period entered.
I have already build the alv and it is working fine. But My questio is how can I append data into internal table in its proper field.
suppose I have enter period 1 to 3 in selection screen. Then my table structure will be
JAN |  FEB | MAR
Upto this is is working fine, fields are generated dynamically , but how can I insert data only in perticular field.
like
itab-JAN = 001.
itab-FEB = 002.
itab-MAR = 003.
append itab
JAN |  FEB | MAR
001    002   003
Please give me a solution of that. waiting for reply.

hI,
loop at <dyn_table> assigning <wa>.
lv_count = 001.
*perform get_short_tet of month in a varibale say lv_var
assign component LV_VAR of structure <wa> to <dyn_field1>.
<dyn_field1> = lv_count.
lv_count = lv_count + 1.
endloop.
Regards,
mrunal
Edited by: Mrunal Shyamkant Patki on Nov 5, 2009 10:53 AM
Edited by: Mrunal Shyamkant Patki on Nov 5, 2009 10:54 AM

Similar Messages

  • Refreshing the value of a field in a table and displaying it on the screen.

    how do i mimimize calls to the database in the following scenario?
    I need to show the latest value of a field in a table in a database through a java program. in a concurrent access environment, there are chances of multiple users getting stale values. how do I overcome this problem through code?
    please advise.

    There are many ways of doing this. However its worth noting that RDBMS database are not messaging, event driven systems and are not best suited to do what you want to do. You should only consider doing this if you have a low rate of changes.
    You can
    - Poll the database table and look for changes.
    - Add a trigger to the table to record the keys which have changed. The have a query to find just the key which have changed.
    - When a field changes, also send a broadcast/topic message.
    - Add a trigger which sends a JMS message when a change occurs. (This is entirely DB/JMS specific, you need to find if this is possible)
    Again, databases are not ideally suited to event driven, real time updates. There is no simple, clean solution.

  • Problem in dynamic alv

    hi,
       i am making a dynamic alv  and i am facing a problem
    i have only one loop in which i perform all the operation
    now i want at end of lot no. which is (prueflos) append in to main table.please solve my problem.
        the code for that loop is as follows.
    loop at t_qamv into w_qamv.
         read table t_qals into w_qals with key prueflos = w_qamv-prueflos.
           if sy-subrc = 0.
          at new prueflos.
             MOVE W_QALS-WERK TO W_MAIN-WERK.
             move w_qals-prueflos to w_main-prueflos.
               SELECT SINGLE NAME1 INTO W_MAIN-NAME1
                 FROM T001W WHERE SPRAS = 'EN'
                   AND WERKS = W_QALS-WERK.
          endat.
           endif.
              v_count = v_Count + 1.
              read table t_qamr into w_qamr with key PRUEFLOS = W_QAls-PRUEFLOS MERKNR = W_QAMV-MERKNR.
                if sy-subrc = 0.
                if w_qamr-merknr = w_qamv-merknr.
                   concatenate 'w_main-f' v_count into v_field.
                    CONDENSE V_FIELD.
                     ASSIGN (v_field) to  <value>.
                      if w_qamr-pruefbemkt is initial.
                        WRITE w_qamr-mittelwert TO v_pak EXPONENT 0 DECIMALS 3.
                       else.
                        write w_qamr-pruefbemkt to v_pak.
                      endif.
                       <value>  =  v_pak.
                 endif.
    endloop.

    Hi Aisurya,
                    Your dynamic node is only refering to TEST_BLOCK. But you have not given any values to the node.
                    You first bind your values (i.e internal table values) using BIND_TABLE method.
                   dyn_node = wd_context->get_child_node( name = 'TEST_BLOCK' ).
                   dyn_node->BIND_TABLE ( itab ).
    Regards,
    Harry

  • Inserting values from a cursor to a table

    Hi,
    I need to insert the values from a cursor into a table,this i the part of code which trieds to do it...i get error stating "select stmt missing"...pls help out...
    OPEN  p_cursor for V_SQLSTATEMENT;
            ---for i in p_cursor
            LOOP
              FETCH p_cursor INTO v_cursor_type;      
              insert into TEMPCHARTVALUES(HOP,AMOUNT,EFFECTIVE_FROM,EFFECTIVE_TO,CURRENCY)
                   values (v_cursor_type.PMC1_HOP_CODE,
                         v_cursor_type.PMC1_Amount,
                         v_cursor_type.PMC1_EFFECTIVE_FROM,
                         v_cursor_type.PMC1_EFFECTIVE_UPTO,
                         v_cursor_type.PMC1_CURRENCY);
                                                           --dbms_output.put_line(v_cursor_type.KEYCODE1);
              EXIT WHEN p_cursor%ROWCOUNT = v_REC_COUNT;
              end loop;

    Hi, here it is..
    create or replace
    procedure  prm_sp_charts_db (P_CURSOR OUT SYS_REFCURSOR,CHARTCode VARCHAR,tablename varchar)
    IS
    v_COUNT varchar2(200);
    v_REC_COUNT NUMBER;
    V_SQLSTATEMENT VARCHAR2(2000);
    v_cursor_type  TEMPCHARTVALUES%ROWTYPE;
        begin
         v_COUNT:='SELECT COUNT(*) FROM PRM_M_Chart_' || CHARTCode;
         execute immediate v_COUNT into v_REC_COUNT;
         V_SQLSTATEMENT := 'SELECT ';
         V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F1_CODE Keycode1,';
          open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F2_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F2_CODE Keycode2,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F3_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F3_CODE Keycode3,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
           open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F4_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F4_CODE Keycode4,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F5_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F5_CODE Keycode5,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F6_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F6_CODE Keycode6,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F7_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F7_CODE Keycode7,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F8_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F8_CODE Keycode8,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F9_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F9_CODE Keycode9,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F10_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F10_CODE Keycode10,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          V_SQLSTATEMENT := V_SQLSTATEMENT ||'PMC' || CHARTCode || '_HOP_CODE HOPCode,PMC' || CHARTCode || '_AMOUNT ,PMC'|| CHARTCode || '_EFFECTIVE_FROM Effective_From,PMC' || CHARTCode || '_EFFECTIVE_UPTO Effective_Upto,PMC' || CHARTCode || '_CURRENCY Currency FROM PRM_M_CHART_' || CHARTCode ;
          DBMS_OUTPUT.PUT_LINE(V_SQLSTATEMENT);
           OPEN  p_cursor for V_SQLSTATEMENT;
            ---for i in p_cursor
            LOOP
              FETCH p_cursor INTO v_cursor_type;      
              insert into TEMPCHARTVALUES(HOP,AMOUNT,EFFECTIVE_FROM,EFFECTIVE_TO,CURRENCY)
                   values (v_cursor_type.PMC1_HOP_CODE,
                         v_cursor_type.PMC1_Amount,
                         v_cursor_type.PMC1_EFFECTIVE_FROM,
                         v_cursor_type.PMC1_EFFECTIVE_UPTO,
                         v_cursor_type.PMC1_CURRENCY);
                                                           --dbms_output.put_line(v_cursor_type.KEYCODE1);
              EXIT WHEN p_cursor%ROWCOUNT = v_REC_COUNT;
              end loop;
    end prm_sp_charts_db;

  • Auto insert values to addition fields from a comma seperate value input?

    I pray someone (Gunter :) ) knows how to do this or perhaps a better approach.
    I have a google map api geocoding application that I created by following some sample files from the google api documentation. Works really well.
    It gets the address information from an address field that has its values put in this format
    "Street# Street, city, state/province" So... it would like like "123 fake ave, toronto, ON"
    It is able to generate the longitude and latitude perfectly. How ever on the front end I would like the user to pull down show me based on just the city.
    so.. show me "New york" or "Bowling green"... I was thinking of adding a city field into my table to facilitate this. It just seems redundant since the user already is going to put the address (which includes the cityname) above in the format I detailed. This is so the geocoding works.
    So in the admin section when they add a new record is it possible to have some hidden fields that take the second comma seperated value (which would be the city)from the "address form field" (which is formatted with commas liek above) and input it into my "city column" in my table ?
    any help of guidance is greatly appreciated, as always

    Hi Kevin,
    PHP´s function "explode" (http://de2.php.net/explode) would allow you to split a comma separated string and echo the individual substrings wherever you want, however...
    is it possible to have some hidden fields that take the second comma seperated value
    ...it seems you´d like to have the hidden fields "value" attribute dynamically updated based on the selected menu item, correct ? This will be much more complicated, as you´ll need some custom javascript to make this happen.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • How to remove numeric value in the fields of a table

    Environment: SQL Server 2008R2
    Tools: MSMS
    Code:
    a. Table Definition 
    USE [DLPT_CMS1_RESTORE]
    CREATE TABLE [dbo].[Mocha]
    [id] [int] IDENTITY(80,1) NOT NULL,
    [Login_ID] [char](10) NULL,
    [PE4] [varchar](8000) NULL,
    [PE9] [varchar](8000) NULL,
    [PE11] [varchar](8000) NULL,
    [PE15] [varchar](8000) NULL,
    [PE17] [varchar](8000) NULL,
    [PE20] [varchar](8000) NULL,
    [PE22] [varchar](8000) NULL,
    [PE25] [varchar](8000) NULL,
    [PE28] [varchar](8000) NULL,
    [PE29] [varchar](8000) NULL,
    [PE27] [varchar](8000) NULL
    b. data
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293595,293595,293737,293737,293737,293737,293737,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293841,293841,293841,293841,'293841 I feel that the product should be more holistic'
    ,'293841 I would like for the customer support to give more immediate feedback'
    ,'293841 Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss',
    293841,293841,293841,293841,293841,293841)
    Challenge: 
    1. Delete / Remove login_ids from a string found in one or more of the fields in Mocha table 
    Example: the following string contains login_id '293841 I would like for the customer support to give more immediate feedback' , remove the login_id in the narrative field which could be PE4, PE22. or PE28
    2. Count the response or narrative field for each column after the deletion is completed 
    My script and still working progress
    SELECT * FROM MOCHA
    WHERE ISNUMERIC(PE4) = 1 and [PE4] like '%[0-9]%'
    Thanks for the support

    I added a new data which shows inaccurate results using your last updated code. The mistake appears in the 3rd row culomn name PE25 is null but counts it as 1 
    CREATE TABLE [dbo].[Mocha]
    [id] [int] IDENTITY(80,1) NOT NULL,
    [Login_ID] [char](10) NULL,
    [PE4] [varchar](8000) NULL,
    [PE9] [varchar](8000) NULL,
    [PE11] [varchar](8000) NULL,
    [PE15] [varchar](8000) NULL,
    [PE17] [varchar](8000) NULL,
    [PE20] [varchar](8000) NULL,
    [PE22] [varchar](8000) NULL,
    [PE25] [varchar](8000) NULL,
    [PE28] [varchar](8000) NULL,
    [PE29] [varchar](8000) NULL,
    [PE27] [varchar](8000) NULL
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293737,293737,293737,293737,NULL,293737,NULL,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],
    [PE15],[PE17]
    ,[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293841,293841,293841,293841
    ,'293841 I feel that the product should be more holistic'
    ,'%%293841%% I would like for the customer support to give more immediate feedback'
    ,'%%293841%% Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss'
    ,293841,NULL,NULL,293841,293841)
    Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
    Values (293735,'293735 my name',NULL,NULL,NULL,NULL,NULL,NULL,'%%293735%%I dont think',293735,293735,'this helps to fight free radicals and ward off disease')
    select
    Replace(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE4
    ,Replace(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE9
    ,Replace(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE11
    ,Replace(Replace([PE15],RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE15
    ,Replace(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','')PE17
    ,Replace(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE20
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE22
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE25
    ,Replace(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE28
    ,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE29
    ,(case when len(PE4)-Len(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe4] is null or Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP4
    ,(case when len(PE9)-Len(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe9] is null or Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP9
    ,(case when len(PE9)-Len(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe11] is null or Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP11
    ,(case when len(PE15)-Len(Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe15] is null or Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP15
    ,(case when len(PE17)-Len(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe17] is null or Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP17
    ,(case when len(PE20)-Len(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe20] is null or Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP20
    ,(case when len(PE22)-Len(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe22] is null or Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP22
    ,(case when len(PE25)-Len(Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe25] is null or Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP25
    ,(case when len(PE28)-Len(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe28] is null or Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP28
    ,(case when len(PE29)-Len(Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe29] is null or Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP29
    from mocha

  • Length of value of c field in internal table

    Hi experts,
    how do I find out the lenght of the value which is an CHARACTER field in an internal table.
    I get a .XLS file from the customer. To check where the real entries starts I need to know the length of one field in the internal table.
    How do I do this?
    I tried it with DESCRIBE, but it doesn't work because the c field is interpreted hexadecimal.
    Example:
    all fields in my table are c(30), the value in one column is max. 3 letters. I want to find out the row where the entry in this field is 3 letters long.
    Edited by: Heiko Kany on Sep 3, 2008 8:49 AM

    Hi Heiko,
    You can find the length using the STRLEN function as given below;
    DATA : ipstr TYPE string.
    DATA : len TYPE i VALUE 0.
    ipstr = 'Sample String'.
    len = STRLEN( ipstr )
    After execution len will contain 13.
    Regards
    Karthik D

  • How to insert values from different region into one table

    Hi everyone
    I have created a page which contains 4 html regions like region1,region 2 ...region 4
    in region 1 i created 2 text items like (emp_name,emp_id).
    in region 2 i created 2 date fields (start_date,end_date).
    In region3 i created a tabular form which contains(job , hire_date).
    in region 4 i created a textfield (%of Hike)
    So i want to create a button(submit) .when i press the button it will insert all the informations provided by the user in different regions will be inserted to a table called employee_information.
    Can i do this?
    If it is possible please tell me how to do this
    if not then tell me any alternative solution.
    Thanks,
    Regards,
    Sabyasachi

    Sabyasachi wrote:
    Hi fac586
    Can you please tell me step by step how to do it or can you please make an example in apex.oracle.com and give me the credentials so that i can know clarify my doubts.1. Create a Form using a Wizard. This will create the items and processes necessary to retrieve data from, and perform DML on, the table. The items will be contained in a single default region.
    2. Create custom HTML regions on page.
    3. Move items and buttons from the default region created by the Form Wizard by changing the Region value in the "Displayed" section of the item attributes page, or Page Items page; or reassign items to regions using the Reassign Region Items page.

  • Set Default Value based on Field from another table for a custom object

    I'm trying to set the default value on a custom object field to the value of an account field. I have tried the syntax 50 different ways, and just am getting no where. The account field label displays as DBA, the integration tag is ltDBA_ACCT, and it shows up in reporting fx area as Account.Text_22.
    The custom object field I'm triying to update is also called DBA, which was originally the "NAME" required field. Does the table name, Account, have to be included? Do I need a function in front of the field?
    I have been updating the external ID using the row ID with syntex <ID> (Less than ID greater than) so I know it is possible to set the Default Value, but <DBA>, <ltDBA_ACCT>, "Account"."DBA", and so on just don't not work.
    If anyone knows how to enter this I'd really appreciate the help.

    Ok, so if you want to default a field to the value from another object, you have to use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure that you do.
    Next, this will only work as a default if the record is created from the object that you wish to join on because a default works at record creation and the ID needs to be available for it to work properly. It will not work if you choose the related object record after the custom object record is created. You could set the value as a post-default, but that does not seem to meet your requirements.
    The syntax for the Default Value would be as follows: JoinFieldValue(ref_record_type, foreign_key, field_name).
    In your case, ref_record_type is '<Account>', foreign_key is &#91;<AccountId>&#93;, and field_name is '<YourFieldName>'. The best way to determine what the field name is would be to create a new workflow for Account and use the Workflow Rule Condition expression builder to pick your field ("DBA") from the list. The value that is returned by the expression builder should be placed in the field_name variable in the JoinFieldValue function (minus the brackets and in single quotes).
    Give this a shot and let me know how you do.
    Thom

  • Get the Last Value of Status Field from SQL TABLE using SQL 2008

    I have a table with Fields such as
    UploadstartTime, UploadEndtime, STATUS From TBLA.
    The STATUS Field, has values =7 and 11 are failed and 12 is SUCCESS. I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get STATUS For that record. How can I do that using 1 SQL Query?
    My current code is: The issue is
    select
      TBLNAME
    MaxUploadstarttime
    =
    max(UploadStartTime),
    MaxUploadEndtime
    =
    max(UpLoadEndTime),
         Status=max(status)
    from  DB.DBO.LOGTABLE
    p1

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed! Temporal
    data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I have a table with Fields such as <<
    Fields are not columns! There is no generic status in RDBMS. Putting “tbl-” in a table name is called tibbling and we make fun of people who do it (Google Phil Factor's humor columns. If you were polite is this what you wanted to post? 
    CREATE TABLE Something_Uploads
    (upload_source_name CHAR(15) NOT NULL,
     upload_start_timestamp DATETIME2(0) NOT NULL,
     PRIMARY KEY (upload_source_name, upload_start_timestamp),
     upload_end_timestamp DATETIME2(0),
     CHECK(upload_start_timestamp < upload_end_timestamp),
     upload_status INTEGER NOT NULL 
       CHECK (upload_status IN (7,11,12, ..))
    >> I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get upload_status For that record [sic]. How can I do that using 1 SQL Query?  <<
    Since you told us nothing and gave no sample data, want to correct this postign? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Passing values according to fields in a table

    Hi
    I am using Tomcat 6, JDK 6, Win XP.
    I have first.jsp , which collects information from a file and and displays it in the table, plus some common operations , for example :
    A1 A2 select update delete
    B1 B2 select update delete
    C1 C2 select update delete
    So my first row of information consists of A1 and A2 and three operations which are hyper links to the next page, second.jsp:
    Data fields : A1, A2 and
    Select Update Delete
    This is my Question:
    first.jsp should send the correct parameters to second.jsp. Meaning, if user clicks the update in 2nd row, second.jsp should get B1,B2 and operation update and build a update.jsp page accordingly.
    Could you tell me how first.jsp can pass these values to second.jsp ?
    Thank you

    hope u build the table using for() loop .
    <a href = "select.jsp?id=<%=primarykeyvalue%>">select</a>
    <a href = "update.jsp?id=<%=primarykeyvalue%>">Update</a>
    <a href = "delete.jsp?id=<%=primarykeyvalue%>">Delete</a>
    Try this

  • How to transfer the current value of a field of the table in a Java-variable?

    Subj....

    Use the ImmediateAccess class -- there's quite a lot of info on
    how to use it in the help.

  • Meaning of EE in the value in the field ARCKEY of table EDIDC.

    Pls ignore ths thread
    Edited by: Arnab Mondal on Apr 21, 2009 1:14 PM

    Seems no 1 nows the answer. So closing the forum
    Regards,
    Arnab

  • ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"

    Hi,
    Oracle version :
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    Funny issue,
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT ta.as
                          FROM   tac ta
                          WHERE  ta.acn         = '145'
                          AND    ta.ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );When i try to run this , get
    Error report:
    SQL Error: ORA-38101: Invalid column in the INSERT VALUES Clause: "acn"
    38101. 00000 - "Invalid column in the INSERT VALUES Clause: %s"
    *Cause:    INSERT VALUES clause refers to the destination table columns
    *Action:
    Now, when I try n remove the alias name from the insert clause, i.e.
    MERGE INTO tfc         cb1
                   USING (SELECT 5351    fs,
                                 1    cs
                          FROM   DUAL)       dual1
                        ON (cb1.fs           =    dual1.fs
                            AND cb1.asgn_cs  =    dual1.cs)
              WHEN MATCHED
              THEN
                   UPDATE
                   SET       cb1.acn          =    '145'         ,
                             cb1.cbs       =    (SELECT ta.as
                                                        FROM   tac ta
                                                        WHERE  ta.acn         = '145'
                                                        AND    ta.ent = 2),
                             cb1.bfs    =    3  ,
                             cb1.efd     =    '28-OCT-09'   ,
                             cb1.uui     =    'A'  ,
                             cb1.ut          =    sysdate
                   WHERE     cb1.fs       =    5351
                   AND       cb1.asgn_cs  =    1
              WHEN NOT MATCHED
              THEN
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,
                         dual1.cs,
                         (SELECT as
                          FROM   tac
                          WHERE  acn         = '145'  -------- remove alias from here i.e. 'ta'
                          AND   ent = 2),    
                         dual1.fs,
                         3,
                         '145',
                         '28-OCT-09',
                         'A',
                         'A'
                        );The above statement fine.
    Edited by: user8650395 on Mar 12, 2010 6:10 AM
    Edited by: user8650395 on Mar 12, 2010 6:19 AM

    Hi,
    Nice formatting!
    The first value in the INSERT clause looks suspicious:
    MERGE INTO tfc         cb1
                   INSERT
                        (cb1.fund_cbs,
                         cb1.asgn_cs,
                         cb1.cbs,
                         cb1.fs,
                         cb1.bfs,
                         cb1.acn,
                         cb1.efd,
                         cb1.cre_usr_id,
                         cb1.uui
                   VALUES
                        (tfc.NEXTVAL,     ...If tfc is a table name, then it can't be a sequnece name.
    Perhaps you meant something like
    ...            VALUES
                        (tfc_id_seq.NEXTVAL,     ...I hope that solves the problem.
    If not, post a little sample data (CREATE TABLE and INSERT statements) for the tables as they exist before the MERGE.
    Edited by: Frank Kulash on Mar 12, 2010 9:34 AM

  • Error while inserting value Qualified field in the main table

    Hello,
    I am trying to populate Qualified field in the main table when a new record is inserted in the Products Repository.
    The field is Reference Price and its a qualified lookup field. I am using the below code to create qualified lookup value and create qualified link values.
    QualifiedLookupValue qlvRefPrice = new QualifiedLookupValue();
    TableId qltabid = repSchema.getTableId("ReferencePrices");
    FieldId qlfieldid = repSchema.getFieldId("ReferencePrices","RP_ReferncePrices");
    RecordId rdRefPrice = getRecordId(connPool,session,"RP",qlfieldid,qltabid);
    HashMap map = new HashMap();
    map.put(repSchema.getFieldId("ReferencePrices","StartDate_ReferencePrice"),new DateTimeValue(cal));
    map.put(repSchema.getFieldId("ReferencePrices","EndDate_ReferencePrice"),new DateTimeValue(cal));
    map.put(repSchema.getFieldId("ReferencePrices","ListPrice"),new FloatValue(Float.parseFloat("123.3")));
    map.put(repSchema.getFieldId("ReferencePrices","Currency"),new LookupValue(getLookupRecordId(connPool,session,"Currencies","Currency_Currencies","EUR")));
    QualifiedLinkValue qlvLinkValue = MdmValueFactory.createQualifiedLinkValue(rdRefPrice,map);
    qlvRefPrice.addValue(qlvLinkValue);
    emptyRecord.setFieldValue(fieldIdRefPriceHistory,qlvRefPrice);
    However when the createrecord command is executed I get the following error.
    java.lang.RuntimeException: No matching validation Id 97. at com.sap.mdm.internal.validation.ValidationInfoHelper.retrieveValidations(ValidationInfoHelper.java:71) at com.sap.mdm.data.commands.CreateRecordCommand.execute(CreateRecordCommand.java:246) at com.alcatel_lucent.productdetail.ProductItemDetail_Comp.createProduct(ProductItemDetail_Comp.java:2927) at com.alcatel_lucent.productdetail.wdp.InternalProductItemDetail_Comp.createProduct(InternalProductItemDetail_Comp.java:656) at com.alcatel_lucent.productdetail.ProductItemAddView.onActionSave(ProductItemAddView.java:971) at com.alcatel_lucent.productdetail.wdp.InternalProductItemAddView.wdInvokeEventHandler(InternalProductItemAddView.java:662) at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87) at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132) at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335) at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143) at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:332) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:761) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:696) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253) at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149) at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73) at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:869) at com.sap.tc.webdynpro.portal.pb.impl.localwd.LocalApplicationProxy.sendDataAndProcessAction(LocalApplicationProxy.java:77) at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1356) at com.sap.portal.pb.PageBuilder.SendDataAndProcessAction(PageBuilder.java:327) at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:869) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717) at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136) at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335) at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143) at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:332) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:741) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:694) at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:253) at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62) at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(AccessController.java:219) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)      
    I spoke to my MDM team and they say there is no validation which they have put for Reference Price field. I have tried inserting values in another field of type qualified lookup in the same main table and that works without any issue.
    The code is as below:
    QualifiedLookupValue qlvRating = new QualifiedLookupValue();
    TableId qlvtable = repSchema.getTableId("ProductRatings");
    FieldId qlvratinglink = repSchema.getFieldId("ProductRatings","RatingLink");                    
    RecordId rdidPR = getRecordId(connPool,session,"CI",qlvratinglink,qlvtable);
    wdComponentAPI.getMessageManager().reportSuccess("rdidPR "+rdidPR);
    HashMap mapPR = new HashMap();
    mapPR.put(repSchema.getFieldId("ProductRatings","AvailRating"),new LookupValue(getLookupRecordId(connPool,session,"AvailabilityRatings","AvailabilityRating_AvailabilityRatings","CI")));
    mapPR.put(repSchema.getFieldId("ProductRatings","EffectiveDate"),new DateTimeValue(cal));
    mapPR.put(repSchema.getFieldId("ProductRatings","FERAIndic"),new LookupValue(getLookupRecordId(connPool,session,"ReplacementIndicators","Code","FE")));
    mapPR.put(repSchema.getFieldId("ProductRatings","FERAOrdItem"),new LookupValue(getLookupRecordId(connPool,session,"ReplProducts","ProdID","100008200")));
    QualifiedLinkValue qlvLink = MdmValueFactory.createQualifiedLinkValue(rdidPR,mapPR);
    qlvRating.addValue(qlvLink);
    emptyRecord.setFieldValue(fieldIdRatingHistory,qlvRating);     
    I would really appreciate if someone can help in solving the issue.
    Thanks in advance,
    Aamod

    Hi Aamod,
    Sees that some validation/assignments are getting triggered as soon as you make changes to the record in MDM. Please check once after removing validations/workflow that you may have. This way you may debug the issue.
    Hope this helps!!
    Cheers,
    Arafat

Maybe you are looking for

  • How do I change the artist of an album on my iPhone?

    I bought a new album a couple days ago and my phone lists the artist as "unknown". I switched my iPhone's settings on iTunes so I can manage my music manually and deleted the album. Then I loaded it again and it still says the artist is unknown. How

  • How to change "next" "previous" in ADF table ?

    **hi ,** **I am using oracle jdev 10.1.3.4** **I want to put my own text instead of "next" "previous" in ADF table , also I have the same problem in shuttle box ,** **I want to change the default javascript validation (ex: shuttle box alerts)** **I d

  • I changed my hard drive and now the software will not update to maverick, i have 10.6.8 now

    I used the start up disc to get the software and now i can't update to maverick

  • QM Notification

    Hi, In QA32 I am doing defect recording after that I want special approval for that defects; so I raised A3 type notification from that screen itself, I recorded respective data and released that , now when I send that notification for approval the a

  • NI-PAL Service Manager has encountered a problem and needs to close

    Hello, I am getting this error after a few hours of running a Labview 7.1 program installed on an XP machine. A reboot and start up of the program seems to go as expected but after the error will pop up again after a few hours.The program appears to