Delete "false"-values from queue?

Hello experts,
I wrote an UDF to delete "false"-values from a queue:
String f = "false";
for(int i=0;i<list.length;i++)
if (list<i>.equals(f))
       result.addSuppress();
else
       result.addValue(list<i>);
I am adding a SUPPRESS for each "false"-value and I am not happy with that.
Question: Can I somehow delete the false-values from my queue?
Thank you for your help and best regards,
Peter

Hi,
it's hard to answer without knowing your complete scenario, but maybe you don't need the suppress values.
Then you could write
String f = "false";
for(int i=0;i<list.length;i++)
if (!list<i>.equals(f))
       result.addValue(list<i>);
Or maybe you could assure that you don't have false values in your queue.
Regards
Patrick

Similar Messages

  • How to delete the values from TKOMV at runtime after creating PO

    Hi,
      How to delete the values from TKOMV at runtime after creating PO from IDOC. I am creating PO through IDOC, subsequently need to create Sales order and again need to create 2nd PO with reference of Purchase Requestion(created with sales order). At the time creation of 2nd PO the Header conditions are appearing twice and net price value is appearing wrong.
    Thanks in advance.

    Hi Padma
    Can you do this activity once the company code is in to production. I guess you can not do this activity, if the company code is already in to live. Setting or resetting of the recon accounts will hinder the previous actitivity. Infact resetting of the company code is also not a good option.
    Any how, thanks for the inputs. Please let me know whether i can do this activity only at the subledger level which will not impact other modules. The one solution i can figured out is , reverse all the transactions for the corresponding asset in the year of takeover and pass the entries again in the same year correctly which will have effect in Subledger and also in general ledger. But the business people will not allow this, since for a big client it will require lot of authorizations and approvals. Infact the vendor also, is cleared. So we have to reverse the cleared documents as well which is again a task and require approvals as well.
    Thanks and regards
    Seshu.

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

  • How to delete a value from the nested structure?

    Hi Friends!
    I have a nested structure such as
    multimap<int, map<int ,set<int>>> FinalMul
    It contains sample values
    1=>4--->1
    6=>4--->1
    6=>9--->4
    11=>4--->1
    11=>5--->1   4
    11=>9--->4
    12=>2--->1   4   5
    I want to delete the value 4 from the second and third column,
    So, it looks like
    1=>
    6=>
    6=>9--->
    11=>
    11=>5--->1 
    11=>9--->
    12=>2--->1  5
    after deleting 4, if I have a key(first) (1, 6, 11) and secondkey (second)(6=>9--->,  11=>9--->) with no values, then delete them also.
    Finally it looks like
    11=>5--->1 
    12=>2--->1  5
    Can anyone help me how to solve it?
    I just tried something;
    set<int> tempV;
    map<int, set<int>> tempM;
    multimap<int, map<int, set<int>>> FinalMul
    tempV.insert(1);
    tempM.insert(make_pair(4, tempV));
    FinalMul.insert(make_pair(1, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1);
    tempM.insert(make_pair(4, tempV));
    FinalMul.insert(make_pair(6, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(4);
    tempM.insert(make_pair(9, tempV));
    FinalMul.insert(make_pair(6, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1);
    tempM.insert(make_pair(4, tempV));
    FinalMul.insert(make_pair(11, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1); tempV.insert(4);
    tempM.insert(make_pair(5, tempV));
    FinalMul.insert(make_pair(11, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(4);
    tempM.insert(make_pair(9, tempV));
    FinalMul.insert(make_pair(11, tempM));
    tempV.clear();
    tempM.clear();
    tempV.insert(1); tempV.insert(4); tempV.insert(5);
    tempM.insert(make_pair(2, tempV));
    FinalMul.insert(make_pair(12, tempM));

    Check this attempt:
    typedef
    set<int>
    SET;
    typedef
    map<int,
    SET>
    MAP;
    typedef
    multimap<int,
    MAP>
    MULTIMAP;
    // remove '4' from second column
    for_each( FinalMul.begin(), FinalMul.end(),
    []( MULTIMAP::value_type
    & mmv )
    MAP & m =
    mmv.second;
    m.erase( 4 );
    // remove '4' from third column and remove empty entries
    for_each( FinalMul.begin(), FinalMul.end(),
    []( MULTIMAP::value_type
    & mmv )
    MAP & m =
    mmv.second;
    for(
    auto i = m.begin(); i != m.end(); )
    SET & s = i->second;
    s.erase( 4 );
    if( s.empty() )
    i = m.erase( i );
    else
    ++i;
    // remove empty entries
    for(
    auto i = FinalMul.begin(); i != FinalMul.end(); )
    MAP & m = i->second;
    if( m.empty() )
    i = FinalMul.erase( i );
    else
    ++i;

  • How can I delete null values from List Item?

    Hi Friends,
    I used List item for field job_Type, I entered values in List item at design time through property pallet. When I run form I will see null values in this List Item.
    How can I remove these null values from the List?
    Best regards,
    Shahzad

    Dear Shahzad,
    It can be removed by adding the following code in the When-new-Form-Instance.
    Set_item_property('List name', required, property_true);
    :block_name.list_name := <put your default value here>; (If you didn't oput the default value, then you will get some problem and the cursor may not navigate away from the list).
    Senthil Alagu .P.

  • Unable to Delete Pending Mail from Queue

    I have a large number of emails in the APEX_MAIL_QUEUE that are actually getting sent, but are not being cleared out of the mail queue. So they keep getting retried, which sends them out multiple times. Is there a way to manually delete these from the queue?
    I am using APEX 4.2.0.00.27.

    The solution is to use
    PUSH_QUEUE Procedure
    Oracle Application Express stores unsent email messages in a table named APEX_MAIL_QUEUE. You can manually deliver mail messages stored in this queue to the specified SMTP gateway by invoking the APEX_MAIL.PUSH_QUEUE procedure.
    Oracle Application Express logs successfully submitted message in the table APEX_MAIL_LOG with the timestamp reflecting your server's local time.Keep in mind, the most efficient approach to sending email is to create a background job (using a DBMS_JOB package) to periodically send all mail messages stored in the active mail queue.
    If this question is answered, please mark the thread as closed and assign points where earned..
    Regards
    Mahmoud

  • Delete duplicate values from a table

    Hi All
    I have a table like this
    table:
    id name   plan   code
    1   sam  normal   5
    1   sam  normal   6
    1   sam  special  5
    1   sam  Special  6I need to delete data in such a way that one entry with normal and one entry with special plan should remain and should be with different code. Does not matter whether normal stays with 5 or 6 code.
    Can anyone tell me how to do the same? I tried with rowid but it deletes either both normal or both special or returns same code for normal and special.

    It is not that trivial, if I correctly understand your reqs. If there are as many plans as thare are codes and you have a row for each combination:
    SQL> select  *
      2    from  tbl
      3  /
            ID NAM PLAN          CODE
             1 sam normal           5
             1 sam normal           6
             1 sam special          5
             1 sam special          6
    SQL> delete tbl
      2    where rowid not in (
      3                        with t as (
      4                                   select  rowid rid,
      5                                           row_number() over(partition by id,name,code order by plan) plan_rn,
      6                                           row_number() over(partition by id,name,plan order by code) code_rn
      7                                     from  tbl
      8                                  )
      9                        select  rid
    10                          from  t
    11                          where plan_rn = code_rn
    12                       )
    13  /
    2 rows deleted.
    SQL> select  *
      2    from  tbl
      3  /
            ID NAM PLAN          CODE
             1 sam normal           5
             1 sam special          6
    SQL> SY.

  • Deleting wrong values

    hi when i click mt delete button it delete wrong information or values,it does not delete the value from the table it goes and delete value from my forms i drag and drop the correct delete button,am in jdeveloper 11.1.1.6.0
    my button is
    <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                            text="Remove Member"
                                            id="cb8" immediate="true"/>

    hi this is what i have done
    <af:commandButton actionListener="#{bindings.Delete1.execute}"
                                            text="Delete"
                                            id="cb10">
                            <af:setActionListener from="#{true}"
                                                  to="#{pageFlowScope.addMember.deleteAction}"/>
                          </af:commandButton>
        private boolean deleteAction = false;
        private boolean EditAction = false;
        private boolean createAction = false;
        private ViewRowImpl selectedJobs;
        public void setDeleteAction(boolean deleteAction) {
            this.deleteAction = deleteAction;
        public boolean isDeleteAction() {
            OIDOperations   oIDOperations= new  OIDOperations();
            Map<Object,String> mp=new HashMap<Object, String>();
            mp.put(getusrname(),getusrname());
            oIDOperations.dropUsrRole(getorgname(), mp);
            System.out.println("deleted user" +mp);
            return deleteAction;
        public void setEditAction(boolean EditAction) {
            this.EditAction = EditAction;
        public boolean isEditAction() {
            FacesContext ctx = FacesContext.getCurrentInstance();
            ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
            ValueExpression ve = ef.createValueExpression(ctx.getELContext(), "#{row.Username}",String.class);
            //ValueExpression ve1 = ef.createValueExpression(ctx.getELContext(), "#{row.jobId}",String.class);
            String Username  = (String)ve.getValue(ctx.getELContext());
            if(this.getSelectedJobs() != null){
                this.EditAction=getSelectedJobs().getAttribute("Username").equals(Username);
            return EditAction;
        public void setCreateAction(boolean createAction) {
            this.createAction = createAction;
        public boolean isCreateAction() {
            return createAction;
        public void setSelectedJobs(ViewRowImpl newselectedJobs) {
            this.selectedJobs = newselectedJobs;
            if(this.selectedJobs != null){
                this.EditAction = true;
            }else{
                this.EditAction = false;
                this.createAction = false;
                this.deleteAction = false;
        public ViewRowImpl getSelectedJobs() {
            return selectedJobs;
        }

  • IP : Delete a value in e cell without entering zero

    We have an input ready planning layout created with WAD. In WEB user deletes a value in a cell without entering zero instead. When we refresh data former value appears again. When the user enters zero to the cell we have no problem. When we execute the query with BEX and delete the value in cell without entering zero, there is no problem also. Is there a parameter in WAD to check this?

    Hi
    If you create a "Delete" function and provide the same on layout it will delete the same from the cube. However, the user need to enter the line # which he/she wants to delete from the layout. Ofcourse, entering zero in the input for Key Figure will help delete the values from cube but if it has any corresponding calculations (say salary or revenue)....it will not get nullified. It is always good idea to provide a standard delete function on the layout.
    Regards
    Srinivas

  • How to restrict the user(Schema) from deleting the data from a table

    Hi All,
    I have scenario here.
    I want to know how to restrict a user(Schema) from deleting the values from a table created in the same schema.
    Below is the example.
    I have created a table employee in abc schema which has two values.
    EMPLOYEE
    ABC
    XYZ
    In the above scenario the abc user can only fire select query on the EMPLOYEE table.
    SELECT * FROM EMPLOYEE;
    He should not be able to use any other DML commands on that table.
    If he uses then Insufficient privileges error should be thrown.
    Can anyone please help me out on this.

    Hi,
    kumar0828 wrote:
    Hi Frank,
    Thanks for the reply.
    Can you please elaborate on how to add policies for a table for just firing a select DML statement on table.See the SQL Packages and Types manual first. It has examples. You can also search the web for examples. This is sometimes called "Virtual Private Database" or VPD.
    If you have problems, post a specific question here. Include CREATE TABLE and INSERT statements to create a table as it exists before the policies go into effect, the PL/SQL code to create the policies, and additonal DML statements that will be affected by the policies. Show what the table should contain after each of those DML statements.
    Always say which version of Oracle you're using. Confirm that you have Enterprise Edition.
    See the forum FAQ {message:id=9360002}
    The basic idea behind row-level security is that it generates a string that is automatically added to SELECT and/or DML statement WHERE clauses. For example, if user ABC is only allowed to query a table on Sunday, then you might write a function that returns the string
    USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'So whenever any user says
    SELECT  *
    FROM    table_x
    ;what actually runs is:
    SELECT  *
    FROM    table_x
    WHERE   USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'
    ;If you want to prevent any user from deleting rows, then the policy function can return just this string
    0 = 1Then, if somone says
    DELETE  employee
    ;what actually gets run is
    DELETE  employee
    WHERE   0 = 1
    ;No error will be raised, but no rows will be deleted.
    Once again, it would be simpler, more efficient, more robust and easier to maintain if you just created the table in a different schema, and not give DELETE privileges.
    Edited by: Frank Kulash on Nov 2, 2012 10:26 AM
    I just saw the previous response, which makes some additional good points (e.g., a user can always TRUNCATE his own tables). ALso, if user ABC applies a security policy to the table, then user ABC can also remove the policy, so if you really want to prevent user ABC from deleting rows, no matter how hard the user tries, then you need to create the policies in a different schema. If you're creating things in a different schema, then you might as well create the table in a different schema.

  • Getting all values from a queue

    Hi all,
    I have a queue as follows:
    [123] - intital Context
    [sollinger Str]
    [123] - CC
    [Solinger Str]
    [123] - Final context
    An image of the queue looks as follows:
    [http://i42.tinypic.com/hsj052.jpg]
    Iam getting this queue in a userdefined function. I want to get or copy all the values from this queue to a new array as follows without any contexts.
    That is, I want to have a queue as follows from the above queue.
    [123]
    [sollinger Str]
    [123]
    [Solinger Str]
    [123]
    How could that be done...
    Thanks
    P

    Hi guys...thanks 1 more thing
    If My inbound queue "a" is as follows:
    SUPRESS
    AP
    YG
    LF
    contextChange
    YG
    LF
    Final Context
    In my Queue "b" which is as follows
    SUPRESS
    123
    sollinger...
    123
    Sollinger...
    123
    FinalContext
    My requirement is in my "b" queue , I want to put a CC as follows by using a  standard node function if possible
    SUPRESS
    123
    sollinger...
    123
    contextChange
    Sollinger...
    123
    FinalContext
    IF THAT dont work Inside my UDF I want to put thE CC for the b queue.
    How will the loop behave then?
    What will be passed to my input queue "a" and "b" when execute "all values on context" is set.
    "a" has a context and "b" doent have one.
    My UDF
    public static void Test(String[] a,
                                           String[] b,
                                           ResultList result,
                                           Container container){
    //Contains no context change
        String b[] = {ResultList.SUPPRESS,"12","sollinger","12","sollinger","12",
                      ResultList.CC};
    I make the following steps
    copy to an arraylist. add a context change in between.
    copy back to string b.

  • Retrieving old column values from a after delete trigger dynamically

    I have a single audit table for deletions
    and the table structure has the following columns
    1: table_name
    2: column_name
    3: column_value
    I am writing a trigger on tables for which i want to have delete audits and i am dynamicaly
    retrieving the column names but i am unable to retrieve the column value dynamically;
    I tried to use the following statement but doesn't return the column value
    sql_stmt:= 'select :1 from dual';
    execute immediate sql_stmt into col_value using
    ':old.'| |v_col_name;
    where v_col_name is the name of the column which i retrieve dynamically using the
    dbms_sql.describe_columns procedure.
    Is their any way if i can retrieve the old column values in the trigger dynamically if i already
    have the column names in variables..
    Thanks in advance.
    null

    I don't know if Kevin's tip Help Mr. Sameer, but it did help me gain access to pre-deleted row column values.
    I did discover, however, that if the columns from the about-to-be-deleted row are used as inserts into another table, Oracle serves up a nasty-gram informing the user that values from the about-to-be-deleted table are unreliable.
    I was able to circumvent this constraint by assigning the about-to-be-deleted column values to local PL/SQL varables, then perform the insert using the variable values.
    -Bill McNamee
    NHDOT
    [email protected]

  • Wants to eliminate null values from mapping queue

    Hi All,
    How can I eliminate null values from 'display queue' of a target mapping.
    Can it be done through a UDF? Kindly help.
    Because of null value, it is creating issue in the mapping logic.
    Thanks,
    John

    We can remove null values using node functions.
    Check the below thread:
    Re: How to remove [] form Message Mapping Display Queue
    Or
    Try with the below UDF:
    for (int i=0; i<a.length;i++)
    if (! a<i>.equals(ResultList.SUPPRESS) || ! a<i>.equals(""))
    result.addValue(a<i>);
    Thanks,

  • How to delete values from extension collection field through importer?

    Hi Experts,
    We have created one extension collection field in Master Agreement.
    We are able to add values to that collection field using Extension collection template CSV file through importer.
    Now we have a requirement to delete values from the Extension collection field through importer using CSV file.
    If anyone have template or idea please share with us.
    Thanks in advance!!
    Regards,
    Lava.

    Hi Agrawal,
    Thanks for you helpful information.
    Regards,
    Lava.

  • How to delete the messages from JMS Queue

    Hi,Can anybody help how to delete the messages from the JMS Queue.Thanks in advance.

    You can dequeue the message using a JMS client or delete it using Weblogic Admin Console -
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/jms_modules/queues/ManageQueues.html
    Regards,
    Anuj

Maybe you are looking for

  • Fault message in sender SOAP scenario

    Hi mates, I've a o/b synch MI which is exposed as a web service. I've specified the fault message with faultcode, faultstring, faultactor and detail. I've a BPM as the receiver for this synch infterface. This BPM implements synch-asynch bridge. Now t

  • Need help creating script for specific instance

    I am having trouble coming up with a working script for this part of the pricing form I am editing. I am trying to get the calculation fields to the right to change and populate in the respective field based on the selection in the Material Type drop

  • Skype has stopped working. BEX?

    skype stops working and needs to close every time i start it but doesnt actually close and i have to end its task manually. it was working just fine till today now it gives me this. look at the dxdiag ive attached for pc specs Problem signature: Prob

  • IMovie Crashes When I Hook Up Canon VIXIA - New Problem

    Hi all - I have a Canon VIXIA HF200 camera, which has worked perfectly with iMovie until this weekend. I have iMovie 8 (7.1.4) and like I said it's worked great until recently. Now, iMovie launches fine but when I hook up the Canon video camera via U

  • Alarms on WAE 512

    Hello, Just got few alarms in one of WAE's saying router unreachable. I put the right wccp passwords, reset the cms tables and database, bounced the device but still no good. It can register with the CM but there is no traffic going through. Major Al