Where condition

Hi all,
My 2nd select query is not working.
Plz tell where i m wrong.
if itab_lfa1[] is not initial.
if p_bukrs is  initial.
  select lifnr bukrs
  from lfb1
  into  corresponding fields of table i_lfb1
  for all entries in itab_lfa1
  where lifnr =  itab_lfa1-lifnr.
  else.
  select lifnr bukrs
    from lfb1
  into  corresponding fields of table i_lfb1
  for all entries in itab_lfa1
  where lifnr =  i_lfa1-lifnr
    and bukrs eq p_bukrs.
  endif.
  endif.
Showing the error msg in 2nd select this:
The WHERE condition does not refer to the FOR ALL ENTRIES table.           
But when we remove for all entries in itab_lfa1,
then it show no error, but doesn,t able to pick all records.
Best Regards,
Aastha.

hi,
Check out in this way  ..
call function 'CONVERSION_EXIT_ALPHA_INPUT'
          exporting
                  input = p_bukrs
          importing
                 output = p_bukrs.
loop at itab_lfa1.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
          exporting
                  input = itab_lfa1-lifnr
          importing
                 output = itab_lfa1-lifnr.
  modify itab_lfa1 index sy-tabix.
endloop.
if not itab_lfa1[] is initial.
select lifnr bukrs
from lfb1
into corresponding fields of table i_lfb1
for all entries in itab_lfa1
where lifnr = itab_lfa1-lifnr
and bukrs = p_bukrs. " Assuming p_bukrs is declared as parameter
endif.

Similar Messages

  • CASE Statement in Where Condition with Multi Valued parameter in SSRS

    Hi All,
    I am little confused while using CASE statement in Where condition in SSRS. Below is my scenario:
    SELECT
    Logic here
    WHERE
    Date IN (@Date)AND
    (CASE
    WHEN NAME LIKE 'ABC%' THEN 'GROUP1'
    WHEN ID IN ('123456', '823423','74233784') THEN 'GROUP2'
    WHEN ABC_ID IS NULL THEN 'GROUP3'
    ELSE 'GROUP4'
    END ) IN (@GROUP)
    So above query uses WHERE condition with CASE statement from @GROUP parameter. I want to pass this parameter as multi- valued parameter and hence I have used CASE statement IN (@GROUP).
    For @Date one dataset will pass the available and default values and
    for @GROUP parameters, another dataset will pass the available and default values.
    But this is not working as expected. Please suggest me where I am making mistake in the query.
    Maruthu | http://sharepoint-works.blogspot.com

    Hi Maruthu,
    According to your description, I create a sample report in my local environment. It works as I expected. In your scenario, if the selected values from the Date parameter contains some of the Date field values, the selected values from the GROUP parameter
    contains some of GROUPS (‘GROUP1’,’GROUP2’,’GROUP3’,’GROUP4’) and the corresponding when statement is executed , then the dataset returns the corresponding values.
    In order to trouble shoot this issue, could you tell us what results are you get and what’s your desired results? If possible, you can post the sample data with sample dataset, then we can make further analysis and help you out.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Concatenation error - when i use text column value in where condition.

    Hi,
    i am creating Materialized view using few columns from two tables and as per requirement i need to prepare select statement with where condition in another column.(new column)
    i tried like below....
    create materialized view MAIN
    refresh force on demand
    as
    select
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '|| b.trial_name||';' "QUERY"
    from
    exp_csv_tB a,
    exp_csv_tr b;
    a.table name value is : monitoring_table
    a.column_name value is : study
    b.trial_name = fty777
    Materialized view created with extra column but it is not added '' (codes) to text value in where condition.
    output which i got is :
    select * from monitoring_table where study = fty777;
    but
    i need output like
    select * from monitoring_table where study = 'fty777';
    fty777 value should be in codes like 'fty777'. i read some articles but didnt get this example.
    please help.

    Try this:
    CREATE MATERIALIZED VIEW main
    REFRESH FORCE ON DEMAND
    AS
    SELECT
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '''|| b.trial_name||'';'' "QUERY"
    FROM
    exp_csv_tb a,
    exp_csv_tr b;
    You have to give double single codes for semi-colons ..
    Regards..

  • Checkbox Value in where condition of query

    Hi,
    I have a check box which shows values based on the LOV's . If i check on the checkbox the values that are selected on the check box must be used in the where condition to update the table.
    Please suggest me how to take the check box values.
    Am using the below methos to update but its not happening
    Declare
    old_cohort_name varchar2(500);           
    new_cohort_name varchar2(500);
    l_cohort_id apex_application_global.vc_arr2;
    begin
    l_cohort_id := apex_util.string_to_table(:P64_CASCADE_COHORT_NAMES);
    select cohort_name into old_cohort_name from study_cohort
    where cohort_id = :p64_cohort_id;
    select :P64_COHORT_NAME into new_cohort_name from dual;
    if old_cohort_name <> new_cohort_name then
    update study_cohort
    set      
    cohort_name = new_cohort_name
    where cohort_id = :p64_cohort_id and
    cohort_id = l_cohort_id; // here is the variable i am using when checkbox is checked
    End if;
    End;
    Please suggest me how to modify the code
    Tx
    Sudhri

    Hi Sudhri,
    where cohort_id = :p64_cohort_id and
    cohort_id = l_cohort_id; // here is the variable i am using when checkbox is checked If this is the code you are actually using, then the condition would only be met if l_cohort_id = :p64_cohort_id because you are using an AND condition over the same column in the where clause, so it will only return rows when both values are the same. Then, I think that it seems not to be working for you because :p64_cohort_id and l_cohort_id have different values, and no row is getting updated then. If the values you are selecting in your checkboxes are several ids of rows to update, besides the one with id :p64_cohort_id, then maybe the condition you need is something like this:
    WHERE cohort_id = :p64_cohort_id OR instr(l_cohort_id, cohort_id) != 0;Hope that helps.
    Regards,
    Sergio

  • Num and Value in Where condition

    Hi all,
    I have table:
    create table T1
       f1 fixed (1),
       f2 boolean
    then:
       insert into T1 values (1,null)
    and query:
       select f2,Num(Value(f2,False)),Num(Value(null,False)) from 
       (select max(f1) x from t1)
       left join t1 on x=f1
       where 22 =Num(Value(f2,False))
    Statement 'select f2 from      (select max(f1) x from t1)    left join t1 on x=f1    where 22 ...' successfully executed in 0 ms.
    Result: ?;0;0
    This is a bug? Known bug?
    KR Lukasz.

    Hi Holger,
    sorry it does nothing. Query still returns rows.
    Thank you for help and explanation very much. I'm waiting to next MAXDB relase(s).
    BTW
    I have fixed this problem in that way:
    select f2,Num(Value(f2,False)),Num(Value(null,False)) from
    (select max(f1) x, 22 k from t1)
    left join t1 on x=f1
    where Num(Value(f2,False))=k
    query does not return rows but... execution plan contains &#17752;&#20562;&#17747;&#21321;&#20302;&#8279;&#18772;&#18464;††††††††††††††††††††††††. 
    Simple correction in where condition:
    select f2,Num(Value(f2,False)),Num(Value(null,False)) from
    (select max(f1) x, 22 k from t1)
    left join t1 on x=f1
    where Num(Value(f2,False))-k=0
    And execution plan is proper too.
    KR Lukasz.

  • Single quote in dynamic where condition

    BAPI_STUDENT_IDENTIFIC_ADD has a field called IDENTIFICATIONNUMBER.  This field is later used in a dynamic where condition and causes a short dump when it contains a single quote.  I will change the program that calls the BAPI to check for single quotes, but is there anything else I need to check for to ensure a correct where condition?
    Thanks,
    Dan

    Hi Dan,
    The best way to ensure correctness of syntax of a dynamic where condition is:
    Run the program in debugging mode, Get the Query that is generated dynamically and write it to some other ABAP program and perform syntax check.
    This will help you to remove all the syntax errors.
    Regards,
    Darshil

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • How Can I Change the  Where Condition In the First SQL Query?

    SELECT IND_SSN, BEG_SVC_DT, END_SVC_DT,
    TRUNC(MONTHS_BETWEEN((TO_DATE('19'||END_SVC_DT,'YYYYMMDD')),BEG_SVC_DT)/12),
    mod(trunc(months_between((to_date('19'||end_svc_dt,'YYYYMMDD')),BEG_SVC_DT)),12),
    DECODE((SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1),-1,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -2,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -3,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -4,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -5,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -6,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -7,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -8,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -9,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -10,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -11,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -12,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -13,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -14,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -15,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -16,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -17,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -18,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -19,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -20,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -21,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -22,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -23,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -24,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -25,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -26,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -27,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -28,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -29,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -30,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -31,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    30,0,
    (SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1))
    FROM SVC_OCCURRENCES
    WHERE end_svc_dt not in ('PRESENT')
    AND SUBSTR(END_SVC_DT,1,1) IN '9'
    AND SUBSTR(END_SVC_DT,5,2) NOT IN ('31')
    and (SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1) not in ('30')
    UNION
    SELECT IND_SSN, BEG_SVC_DT, END_SVC_DT, NULL, NULL, NULL
    FROM SVC_OCCURRENCES
    WHERE SUBSTR(END_SVC_DT,1,1) IN 'P'
    The above code works fine and I get the correct numeric values from the SQL
    query when the varchar2 end_svc_dt field is numeric however if I have encoded
    the word 'PRESENT' in the varchar2 end_svc dt field the SQL query aborts at
    the last statement in the WHERE condition. The beg_svc_dt field is a Date field.
    and (SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1) not in ('30')
    I get the following error message
    ERROR ORA-0722 INVALID NUMBER
    I encode the word 'PRESENT' in a varchar2 end_svc_dt field on an Oracle form. This is the only word that can be encoded.
    Is there some way that I can bypass the last statement in the where condition and
    compute the values from the SQL query without having the SQL query abort?
    Eventually I want to do this in a report. I know that this sounds strange but can it be done?

    The above code works fine and I get the correct
    numeric values from the SQL
    query when the varchar2 end_svc_dt field is numeric
    however if I have encoded
    the word 'PRESENT' in the varchar2 end_svc dt field
    the SQL query aborts at
    the last statement in the WHERE condition.Ouch!
    Storting dates in VARCHAR2 columns is bad practice, poor design and makes for horrible code.
    The beg_svc_dt field is a Date field.
    and (SUBSTR(END_SVC_DT,5,2) -
    SUBSTR(BEG_SVC_DT,1,2)+1) not in ('30')If it's a date field then why on earth are you trying to SUBSTR it. SUBSTR = sub-string i.e. take a sub section of a string not sub-date.
    I get the following error message
    ERROR ORA-0722 INVALID NUMBERAnd you're surprised by this?
    Is there some way that I can bypass the last
    statement in the where condition and
    compute the values from the SQL query without having
    the SQL query abort?Store your dates properly, use additional flag columns for non-date information and code your SQL properly.
    Eventually I want to do this in a report. I know
    that this sounds strange but can it be done?Yes, most things are possible.

  • WHERE condition in OBIEE 11g

    HI gurus,
                    How can I use a WHERE condition in obiee 11g in the Column formula or in the BMM layer in the repository .
    Thanks in advance
    Reg,
    Niv

    Hi,
    In the Column formula, the functions like Case When clause (Category: Expressions) can always be used in the building the expression.
    For the above, there is always two options
    1. Derived from Physical Mappings - this will list only the physical tables that are pulled into the LTS of the logical table
    2. Derived from existing columns using an expression - this will list all the Logical tables in the RPD
    If you want to apply the filter i.e where clause on the entire table, then go to Content Tab of the LTS
    Enter your WHERE clause filters in the section - Use this "WHERE clause".....
    The above modifications will apply where clause on all the columns
    Please mark if it is helpful
    Srikanth

  • For all entries Where condition character length partilally has to be used

    Hi,
    I need to fetch all the data reocrds of one internal table into the other with the condition that in one of the field of first internal table only partial length of the character has to be used as a where condition.
    Example:
    Select xxxx
              yyyyy
              zzzzz
    into it_tab2
    for all entries in itab1
    where field2 = itab1-field1(4).
    where field1 of itab1 has length of 8 and field2 belongs to itab2.
    As it throws the error msg :
    it will ignore the length restriction mentioned in where condition of the for all entries

    Hi.
    If you are trying to fetch from any database table based on your modified table use this logic.
    Dfine another internal table same as itab1, with field one lenght as 4 char.
    ex:
    data: begin of it_tab2.
            field1(4),
    end of it_tab2.
    loop at it_tab1.
    it_tab2 = itab1+0(4).
    append it_tab2.
    clear it_tab2.
    endloop.
    now you can fetch from database table....using it_tab2.
    Select xxxx
    yyyyy
    zzzzz
    into it_tab3
    for all entries in itab2
    where field2 = itab2-field1(4).
    If you only want to move the entries form one internal table to another internal table and truncate the field1 of itab1.
    then no need to use any for all entries...
    apply this logic
    data: begin of it_tab2.
            field1(4),
    end of it_tab2.
    loop at it_tab1.
    it_tab2 = itab1+0(4).
    append it_tab2.
    clear it_tab2.
    endloop.
    Regards,
    Satish

  • Can we use EXISTS in where condition

    hi all,
    can we use EXISTS (instead of IN) in where condition of a query which is not part of a subquery ?
    for e.g:
    update gpf_vou_sm set up_amt=0 where src_cd exists ('1101','1201');
    the query works fine with the IN operator in place of EXISTS.
    anybody please help.
    thomas k prakash

    Hi:
    You can use EXISTS in where clause but not in that syntax.
    UPDATE gpf_vou_sm g
       SET up_amt = 0
    WHERE EXISTS (SELECT 1
                     FROM gpf_vou_sm
                    WHERE src_cd IN ('1101', '1201') AND id = g.id);Using IN in your case is better...
    Saad,

  • Field symbols as Table name and in where condition in a select statement

    Hello All,
    I have a scenario where I need to get user input on table name and old field value and new field value. Then based on user input, I need to select the record from the database. The column name for all the tables in question is different in the database, however there data type is the same and have same values.
    I am not able to use a field symbol for comparing the old field value to fetch the relevant record in my where clause.
    I cannnot loop through the entire table as it has 10 millilon records, please advice on how to add the where clause as field symbol as the table name is also dynamically assigned.
    Here is my code:
    DATA: TAB       LIKE SY-TNAME,
          TAB_COMP1 LIKE X031L-FIELDNAME,
          TAB_COMP2 LIKE X031L-FIELDNAME,
          NO_OF_FLD TYPE N.
    DATA: BEGIN OF BUFFER,
            ALIGNMENT TYPE F,
            C(8000)   TYPE C,
          END OF BUFFER.
    FIELD-SYMBOLS: <WA>   TYPE ANY,
                  <COMP1> TYPE ANY,
                  <COMP2> TYPE ANY.
    GET TABLE NAME GIVEN BY USER IN LOCAL VARIABLE
      TAB = TAB_NAME.
    CREATE FIELD NAME BASED ON THE TABLE NAME ENTERED.
      CASE TAB_NAME.
      WHEN 'OIUH_RV_GL'.
          KEY FIELD
            TAB_COMP1  = 'GL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OPSL'.
          KEY FIELD
            TAB_COMP1  = 'OPSL_GL_SYS_NO'.
            NO_OF_FLD  = 1.
      WHEN 'OIUH_RV_OTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'OTAX_GL_SYS_NO'.
            TAB_COMP2  = 'OTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN 'OIUH_RV_GTAX'.
          NOT THE ONLY KEY FIELD
            TAB_COMP1  = 'GTAX_GL_SYS_NO'.
            TAB_COMP2  = 'GTAX_TAX_POS_NO'.
            NO_OF_FLD  = 2.
      WHEN OTHERS.
            EXIT.
      ENDCASE.
    SET FIELD SYMBOL WITH APPROPRIATE TYPE TO BUFFER AREA.
    ASSIGN BUFFER TO <WA> CASTING TYPE (TAB).
    How to add where clause and remove the if condition in the select -- endselect
    SELECT * FROM (TAB) INTO <WA>. 
      ASSIGN COMPONENT TAB_COMP1 OF STRUCTURE <WA> TO <COMP1>.
      IF NO_OF_FLD = 2.
        ASSIGN COMPONENT TAB_COMP2 OF STRUCTURE <WA> TO <COMP2>.
      ENDIF.
      IF <COMP1> = OLD_SYS_NO.
        code for updating table would come here
          WRITE: 'MATCH FOUND'.
          EXIT.
      ENDIF.
    ENDSELECT.
    Please advice. Thanks much.
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:33 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:34 PM
    Edited by: Shipra Jhunjhunwala on Jul 22, 2009 1:35 PM

    1. Create single column table for holding field name depending on the table entered.
    2. Take input from user: for e.g. table_name
    3. Using case load single column table with required fields
       for e.g.
      CASE TAB_NAME.
       WHEN 'OIUH_RV_GL'.
             Append 'GL_GL_SYS_NO' to KEY_FIELD --> KEY_FIELD is the single line internal table as mentioned in step 1.
       WHEN 'OIUH_RV_OPSL'.
             Append 'OPSL_GL_SYS_NO'.
       WHEN 'OIUH_RV_OTAX'.
             Append 'OTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN 'OIUH_RV_GTAX'.
             Append 'GTAX_GL_SYS_NO' to KEY_FIELD.
               APPEND 'OTAX_TAX_POS_NO' to KEY_FIELD.
       WHEN OTHERS.
          EXIT.
       ENDCASE.
       Now depending on the table name you have required column ready
    4. Create dynamic internal table using following sudo code
       Fill the fieldcatlog using the single column field table and DD03L table, See what all columns from DD03L you want to fill in field catlog table
       loop at internal table with all the fields.
        move it to field catalog.
        append field catalog.
       endloop.
    5. Pass this field catalog table to static method create_dynamic_table method
       DATA table TYPE REF TO DATA. --> data object for holding handle to dynamic internal table.
       call method cl_alv_table_create=>create_dynamic_table
       exporting
          it_fieldcatalog = fieldcatalog_tab
       importing
          ep_table = table.
    6. Now assign table reference to field symbol of type table.
       ASSIGN table->* to <field-tab>.
    7. Also create work area <field-wa> using refrence of table.
       create data object wa LIKE LINE OF <field-tab>.
       ASSIGN wa->* to <field-wa>.
    8. Also define field symbol for field name.
       for e.g. <field_name>
    4. Dynamic internal table is ready
    5. Now execute the select statement as follows:
       SELECT (KEY_FIELD)
         INTO <ITAB> --> created dynamically above
          FROM (TABLE_NAME)
         WHERE (WHERE).  --> WHERE is single line internal table having line type of CHAR72. So for every old value there will be one line
         Where condition is same as like we give in static way only difference in this case it will stored in internal table line wise.
        In this case you need to append all your where condition line by line in to WHERE.     
    5. To fill this dynamic internal table using ASSIGN COMPONENT <Comp_number> OF STRUCTURE <field-wa> TO <field-name>
       So in this case if first field of structure STRUCT1 is user_id then sudo-code will be
       loop at internal table containing list of fields into field_wa --> single column field table
           ASSIGN COMPONENT field_wa OF STRUCTURE <field-wa> TO <field>. "Here field_wa is wa area for single column internal table holding all the fieldnames.
           Now <field-name> points to user_id field. Move some value into it as nornally we do with variables.
           Move <your_new_value> to <field-name>. --> Assign new value
            or
            <field-name> = <your_new_value>.
       Endloop.
    6. After completing all the fields one row will be ready in <field_wa>.
       APPEND <field_wa> to <field_tab>.
    Hope this helps you.
    Thanks,
    Augustin.

  • Where condition for a column in BMM

    Hi Gurus,
    I have a requirement where in the BMM(The LTS for this logical table is say 'Fact'), I need a logical column with the following definition.
    count(Dim.status) where Dim.status = ' Accepted' (I didnt add the Dim table to the LTS yet, should I?)
    I know that we can do a count(Dim.status) in the column source . but for the where Dim.status = ' Accepted' part im not sure what to do.
    Should I bring the Dim table as a LTS and define the 'where' condition in the content tab? will that work?
    but what if I have another logical column where I need dim.Status = 'Declined'( we have many more status)
    Plz help

    The suggest statement as Filter(count(Fact.Dollars) Using("dim.status = 'accepted'))
    is based on Answers, this would care about the column is available in Subject Area or not thats it.
    The same kind of functionality can get the using rpd.
    There you might need to map/add (fact source properties and then map using pencil icon on 11g add button in 10g) the dim table to the fact
    so that you can get the expression based on physical columns as
    case when dim.status = 'accepted' then Fact.Dollars else 0 end
    use Aggregate tab for sum;
    Since you are using Fact.Dollars it suppose to be sum, ROW_WIDs go by counts
    Hope this helps :) for more Qs send email
    If helps mark

  • How to use "where" condition when we use update or delete in a dbadapter?

    Hi
    I want to update/delete a record in a database table based on one of its fields. Which means I have to use "where" condition to check the value of the field and only then I can decide whether or not the record can be updated/deleted.
    When I try to use the dbadapter update/delete options, I dont see any provision for writing the "where" condition.(May be I am missing something).
    I know that I can use the custom sql option and write an sql command to achieve this.
    But I would like to know if this can be done when using the update/delete option itself in the dbadapter.
    Thanks in anticipation.
    Ravi

    Hi,
    You can use the logical delete option. In that case you can supply a value for the column that indicates if a record is changed and have it picked up by the db adapter.
    Andre

  • How to use wildcards in ABAP query where condition?

    Hi,
    Please tell me how to use wildcards in ABAP qurey where condition.
    e.g. select * from mara where matnr = * (wildcard we need to use.
    Thanks & Regards,
    Gaurav T

    Do you want to query asterix * ?
    select * from mara where matnr = '*'.  "then just put it in apstrophes
    or you want certain part of string be used as * ?
    select * from mara where matnr like '%*'  "then use % sign before it
    or maybe you want something like this
    select * from mara where matnr like '%1' . "then it will look for all materials having '1' inside it
    Regards
    Marcin

  • Apply "WHERE CONDITION" in "MASTER/DETAIL FORM" in "ORACLE APEX

    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan

    uzairmalik wrote:
    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan
    Probably a syntax error.  Check the syntax of the new clause very carefully.
    Can you post the query indicating which predicate is the new one?  If you need to change the column and table names for confidentiality

Maybe you are looking for

  • Can no longer get native resolution on monitor

    For the better part of a year I had two twin Viewsonic monitors set at 1440x900 with my Mac Pro (late 2011) Radeon 5770. One plugged right into the DVI, then another with an Apple Mini-DP to VGA adapter. Everything was fine, and I'm not sure what cha

  • IMac G3 won't boot to Mac OS 9 CD

    My iMac G3 (slot-loading) has no OS on it right now and I'm trying to install Mac OS 9 from a Mac OS 9 retail CD I have. It's a full install CD, not an upgrade. So I power it on and it shows the question mark because it has no OS on it so I put in th

  • Problem in insert image function

    Hi there...I'm brand, spanking new to Dreamweaver CS3, and I just started working through tutorials to try to learn the software. I'm having a little issue with something that is problem very easily fixable to the gurus here. When I tell Dreamweaver

  • Downgrade to 5.1.1 - Apple *****

    Any suggestions on how to downgrade from just released ios6 to ios 5.1.1 on iphone 4s? ios6 *****. Tons of problems.

  • JSTL-c:import tag and c:param with portlets

    I am writing a JSP file in a portlet application to use the c:import JSTL tag to include a JSP file. However, I am trying to pass a parameter via c:param to this included file but the parameter is not being passed. The included JSP file gets "null" w