Multiple statements within an if statement

I am trying to add multiple statements within the ELSE part of an IF statement. Basically I display an error message if the fields are blank.  But if all conditions are met, I want to update a collection then save that collection.
For example,
If  (condition, UpdateContext({strError:"Please complete all fields."}), do statement1, statement2)
For now I have removed the if statement to get the update collection and save collection to work.

I am trying to add multiple statements within the ELSE part of an IF statement. Basically I display an error message if the fields are blank.  But if all conditions are met, I want to update a collection then save that collection.
For example,
If  (condition, UpdateContext({strError:"Please complete all fields."}), do statement1, statement2)
For now I have removed the if statement to get the update collection and save collection to work.
I may have found a workaround with multiple buttons.
If a save button if pressed and all fields are completed, then the else part of the statement display a rectangle with two buttons, yes and no.  I can add all my code to the yes button select section.  the no button hides the rectangle and buttons.
However, I would still like to know hos to utilize multiple statements within an if.  Any comments would be greatly appreciated.

Similar Messages

  • Using a different default component state within each page state

    I am using a custom component in multiple page states but would like to have a different default state (for the same custom component) within each page state.
    Is there anyway to use a different default component state within each page state .
    When I change the default state at a component level it seems to go across all my page states.  Any solutions?
    Thank you

    I guess I can just add that interaction for that component!
    I think my brain is just catching up

  • If statement within a view is not working correctly ?

    Hi all,
    maybe i am wrong but i think the if statement within a view is not working correctly. See code down below.
    I would like to use the Hallo World depending on the page attribute isFrame with or without all the neccessary html tags. Therefore i have embedded the htmlb tags in an if statement. But for any reason if isframe is initial it isn't working. It would be great if anybody could help me.
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if not isframe is initial. %>
      <htmlb:content design="design2003">
         <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    hallo world
    <% if not isframe is initial. %>
         </htmlb:page>
      </htmlb:content>
    <% endif. %>
    thanks in advance and best regards
    Matthias Hlubek

    Matthias,
    The short answer: your example is <b>NOT</b> going to work. The long answer will probably 5 pages to describe. So first let me rewrite the example so that it could work, and then give a short version of the long answer. Do not be disappointed if it is not totally clear. It is rather complicated. (See the nice form of IF statements that are possible since 620.)
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if isframe is <b>NOT</b> initial. %>
    <htmlb:content design="design2003">
      <htmlb:page title = "Top Level Navigation view">
        hallo world
      </htmlb:page>
    </htmlb:content>
    <% else. %>
      hallo world
    <% endif. %>
    So why does your example not work? Let us start with a simple tag:
      <htmlb:page title = "Top Level Navigation view">
      </htmlb:page>
    Now, for each tag, we have effectively the opening part (<htmlb:page>), an optional body, and then the closing part (</htmlb:page>). We are now at the level of the BSP runtime processing one tag. What the runtime does not know, is whether the tag wants to process its body or not. Each tag can decide dynamically at runtime whether the body should be processed. So the BSP compiler generates the following code:
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
      ENDIF.
      tag->DO_AT_END( ).
    You should actually just debug your BSP code at ABAP level, and then you will immediately see all of this. Now, let us mix in your example with our code generation. First you simplified example:
    <% if isframe is NOT initial. %>
      <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    <% if isframe is NOT initial. %>
      </htmlb:page>
    <% endif. %>
    And then with our generated code. Look specifically at how the IF/ENDIF blocks suddenly match!
    if isframe is NOT initial.
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
    endif.
    if isframe is NOT initial.
      ENDIF.
      tag->DO_AT_END( ).
    endif.
    You can see that your ENDIF statements are closing IF blocks generated by the BSP compiler. Such a nesting will not work. This is a very short form of the problem, there are a number of variations, and different types of the same problem.
    The only way to solve this problem, is probably to put the body into a page fragment and include it like I did above with the duplicate HelloWorld strings. But this duplicates source code. Better is to put body onto a view, that can be processed as required.
    brian

  • How can i use multiple row subquery in update statement

    Hai All
    I using group function in my update statement.. and i need to update more rows so i need to use multiple row
    subquery pls tell me how to use multiple row subquery in update statement
    For example
    while i am using this like this i got an error
    update dail_att set outtime in (select max(r2.ptime) from temp_att where empcode=r2.enpno and
    barcode=r2.cardn and attend_date=r2.pdate group by enpno,pdate,cardn);
    Pls tell me how to use with example
    Thanks & regards
    Srikkanth.M

    Hai Man
    Thanks for ur response Let me clear what i need
    First step Fetch the records as text file and stores into table T1
    and the next step is i have seperated the text using substring and stores in different columns of a table
    There are two shifts 0815 to 1645 and 1200 and 2000
    Here I rep IN and O rep OUT
    Empno date time inout
    001 01-01-10 0815 I
    002 01-01-10 0815 I
    003 01-01-10 0818 I
    001 01-01-10 1100 0
    001 01-01-10 1130 I
    002 01-01-10 1145 0
    002 01-01-10 1215 I
    004 01-01-10 1200 I
    005 01-01-10 1215 I
    004 01-01-10 1315 O
    004 01-01-10 1345 I
    001 01-01-10 1645 0
    002 01-01-10 1715 0
    003 01-01-10 1718 0
    004 01-01-10 2010 0
    005 01-01-10 2015 0
    This is my T1 table i have taken data from text file and stored in this table from this table i need to move data to another table T2
    T2 contains like this
    Empno Intime Intrin Introut Outtime Date
    001 0815 1100 1130 1645 01-01-10
    002 0815 1145 1215 1715 01-01-10
    003 0818 1718 01-01-10
    004 1200 1315 1345 2010 01-01-10
    005 1215 2015 01-01-10
    This what i am trying to do man but i have little bit problems Pls give some solution with good example
    And my coding is
    declare
         emp_code varchar2(25);
    in_time varchar2(25);
    out_time varchar2(25);
    Cursor P1 is
    Select REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    From temp_att
    group by REASON,ECODE,READMODE,EMPD,ENPNO,FILL,PDATE,PTIME,INOUT,CARDN,READERN
    ORDER BY enpno,pdate,ptime;
    begin
         for r2 in p1 loop
    declare
    bar_code varchar2(25);
    begin
    select barcode into bar_code from dail_att where empcode=r2.enpno and attend_date=r2.pdate;
    For r3 in (select empcode,empname,barcode,intime,intrin,introut,addin,addout,outtime,attend_date from dail_att)loop
    if r2.inout ='O' then
    update dail_att set outtime =(select max(r2.ptime) from temp_att where empcode=r2.enpno and barcode=r2.cardn and attend_date=r2.pdate group by r2.cardn,r2.enpno,r2.pdate );
    end if;
    end loop;     
    exception
         when no_data_found then
         if r2.inout ='I' then
                   insert into dail_att(barcode,empcode,intime,attend_date)(select r2.cardn,r2.enpno,min(r2.ptime),r2.pdate from temp_att group by r2.cardn,r2.enpno,r2.pdate );
         end if;
    end;
    end loop;
    commit;     
         end;
    Pls tell me what correction i need to do i the update statement i have used a subquery with group function but when i used it will return only one row but my need is to return many rows and i need to use multiple row subquery
    and how can i use it in the update statement
    Thanks In Advance
    Srikkanth.M

  • Possible to have if statement within filters code?

    Hi
    I have some filters set up, and have assigned some global vars to them, which I then use in my Filters code to display the filters:
    myText:Filters [globals.data.glow1, globals.data.stroke1, globals.data.shad1]
    Works perfectly.
    Now I want to assign a global var to each global filter var to determine if it should be shown or not.  So...
    globals.data.glow1On = true;
    globals.data.stroke1On = true;
    globals.data.shadOn = true;
    ... and then somehow incorporate these new vars into an if conditional to determine if the filter global vars get included in the myText:Filters code.
    However, I cannot seem to code the if conditional into the myText:Filters code correctly.
    I even tried seperating it out like so:
    if (globals.data.glow1On = true) {myText:Filters [globals.data.glow1];
    if (globals.data.stroke1On = true) {myText:Filters [globals.data.stroke1];
    if (globals.data.shad1On = true) {myText:Filters [globals.data.shad1];
    But Flash only makes the last filter true (kinda makes sense to me now why).
    Is there a way to do it without having to make an if conditional with 7 permutations?
    Cheers
    Shaun

A: Possible to have if statement within filters code?

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

  • Using a var within an Include statement

    What syntax do I use in order to put a variable within an Include statement...
    <%@ include file="<%= varhere %>.htm" %>
    Thanks for any help!

    use
    <include>
    <param name=" something " value="34"/>
    </include>

  • Case statement within where clause

    How can i write a case statement within Where clause of SQL statement.
    Ex:
    If sysdate is less than Dec 31 of 2009 then run the query for 2009 else run the query for 2010.
    belwo query is not working. Please let me know how can i write a case statement within where clause.
    Select * from table
    where
    Case
    when to_char(sysdate,'yyyymmdd')<=20091231 then tax_year=2009
    else tax_year=2010
    End

    Hi,
    You can get the results you want like this:
    Select  *
    from      table
    where   tax_year = Case
                      when  to_char(sysdate,'yyyymmdd') <= 20091231
                      then  2009
                      else  2010
                 End
    ;A CASE expression returns a single value in one of the SQL data types, such as a NUMBER, VARCHAR2 or DATE. There is no boolean type in SQL.

  • Anonymous PL/SQL block within a select statement

    I read somewhere that it was possible to build an anonymous pl/sql block within a sql statement. Something along the lines of:
    select
    begin
    i = 0;
    return i;
    end;
    from dual;
    However, for the life of me, I can't find documentation on this. Could someone please point me to the right place, assuming I'm not just imagining it.
    Thanks.

    Did you mean, executing a pl/sql block generated from an sql.
    declare
    cmd varchar2(100);
    begin
    select 'declare i pls_integer := 0; begin i:=1; end;' into cmd from dual;
    execute immediate cmd;
    end;
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Using 'NOT IN' Within a SQL Statement

    Does anyone know why the following SQL statement does not return any values? The problem is with the SELECT statement within the 'NOT IN' clause. When explicitly typing in the part_ids returned from the select statement, everything works as expected.
    Thanks for any help.
    SELECT Distinct Part_Id, Trans_Date
         FROM Invctrl
         WHERE Trans_Type = 0
         AND Trans_Date BETWEEN To_Date( '1-Mar-2006 00:00:00', 'dd-mon-yyyy hh24:mi:ss' )
         AND To_Date( '31-Jan-2007 23:59:59', 'dd-mon-yyyy hh24:mi:ss' )               
         AND Part_Id NOT IN (SELECT part_Id From InvCtrl WHERE Trans_Date < To_Date( '1-Mar-2006 00:00:00', 'dd-mon-yyyy hh24:mi:ss'))

    'NOT IN' should be avoided where ever we can.
    Change your query to 'IN' clause as below and it should work.
    SELECT DISTINCT part_id, trans_date
               FROM invctrl
              WHERE trans_type = 0
                AND trans_date BETWEEN TO_DATE ('1-Mar-2006 00:00:00',
                                                'dd-mon-yyyy hh24:mi:ss'
                                   AND TO_DATE ('31-Jan-2007 23:59:59',
                                                'dd-mon-yyyy hh24:mi:ss'
                AND part_id IN (
                       SELECT part_id
                         FROM invctrl
                        WHERE trans_date BETWEEN TO_DATE ('1-Mar-2006 00:00:00',
                                                          'dd-mon-yyyy hh24:mi:ss'
                                             AND TO_DATE ('31-Jan-2007 23:59:59',
                                                          'dd-mon-yyyy hh24:mi:ss'
                       MINUS
                       SELECT part_id
                         FROM invctrl
                        WHERE trans_date <
                                 TO_DATE ('1-Mar-2006 00:00:00',
                                          'dd-mon-yyyy hh24:mi:ss'
    [pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Nexus: multiple ip distribute-list eigrp statements allowed ?

    Hi,
    I need to clarify if Nexus 7K (NX-Os 6.1(3) ) supports multiple "ip distribute-list eigrp" statements in interface configuration.
    Currently, there is already one statement to only allow default GW (0.0.0.0) routing information be sent.
    I need to allow a few more specific routes to be shared with the facing device.
    Can i have several distribute-list statements on the same interface ?
    Or it it mandatory to handle this at the ip prefix-list level with multiple allow/deny rules.
    I'm in a situation where i want to ammend the configuration without modifying existing objects or have to removed those who turned unused.
    According to Cisco general EIGRP documentation, multiple seems to be accepted.
    However, GNS3 simulator with a 7200VXR show that the new statement replaces the former one !
    Moreover, Nexus logic is often different and i didn't capture any clear statement for this in Nexus specific documentation.
    Needless to says that I have no test plateforme and no possibility to test that for the moment.
    If someone can confirm it's supported, i would appreciate.
    Thx

    Hi,
    I don't have a setup where I can try to see if this actually has the effect you're after, but you can certainly apply more than one distribute-list to an interface.
    N7K-2(config-if)# ip distribute-list eigrp DIST_LIST route-map FRED outN7K-2(config-if)# ip distribute-list eigrp DIST_LIST1 route-map FRED1 outN7K-2(config-if)# ip distribute-list eigrp DIST_LIST2 route-map FRED2 outN7K-2(config-if)# sh run int eth3/1!Command: show running-config interface Ethernet3/1!Time: Mon Feb  3 23:04:01 2014 version 5.2(1)interface Ethernet3/1  ip address 1.1.1.1/24  ip distribute-list eigrp DIST_LIST route-map FRED out  ip distribute-list eigrp DIST_LIST1 route-map FRED1 out  ip distribute-list eigrp DIST_LIST2 route-map FRED2 out  no shutdown N7K-2(config-if)#
    Regards

  • Multiple selects() within a single VM

    Is anyone aware of any contention issues when running multiple threads within a VM where each thread has it's own select statement?
    I have an home grown app server that allows me to run multiple applications within a single VM. The applications are unrelated however they sometimes communicate with each other via TCP. All of them are very network intensive ( 500 messages a second where each message is around 200 bytes ). These apps are usually single threaded where the main thread is a select() loop.
    Therefore, each application is a single threaded select() loop but there are multiple applications running within a single VM.
    I am seeing performance issues when two apps running within the same VM try to send messages to one another via TCP. When the two apps are running on different boxes one app can send about 10,000 messages a second to the other app. However, when the apps are running within the same VM ( localhost TCP connection ) I can only transfer about 1000 messages a second.
    Are 2 selectors running within the same VM a problem? Is it synchronized within the VM so that only one select can fire at a time?
    I am running on a dual proc RH3 box with plenty of memory.
    Any ideas?

    Works for me, though I'm trying on Windows. Test program below. I get >10,000 replies and responses per second over loopback with both "java SelectPingPong both" (one VM) and running client and server on separate VMs.
    Does this program get only 1000 messages/s on Linux? What VM version?
    import java.util.*;
    import java.net.*;
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    public class SelectPingPong
        private static final int MESSAGE_SIZE = 200;
        private String server_name;
        private Selector selector;
        private HashMap clients = new HashMap();
        static class Client
         ByteBuffer buf = ByteBuffer.allocate(MESSAGE_SIZE);
         long connect_time = System.currentTimeMillis();
         int number_of_messages;
        public SelectPingPong(int port, String server_name)
         throws IOException
         this.server_name = server_name;
         selector = Selector.open();
         ServerSocketChannel server_channel = ServerSocketChannel.open();
         server_channel.configureBlocking(false);
         server_channel.socket().bind(new InetSocketAddress(port));
         server_channel.register(selector, SelectionKey.OP_ACCEPT);
        public Socket connect(String host, int port)
         throws IOException
         SocketChannel channel = SocketChannel.open();
         Socket socket = channel.socket();
         socket.connect(new InetSocketAddress(host, port));
         configureSocket(socket);
         channel.configureBlocking(false);
         channel.register(selector, SelectionKey.OP_READ);
         clients.put(channel, new Client());
         return socket;
        private void configureSocket(Socket socket)
         throws IOException
         // Let's say we have a request-reply protocol with modest requirements
         socket.setReceiveBufferSize(1024);
         socket.setSendBufferSize(1024);
        public void mainLoop()
         while (true) {
             try {
              selector.select();
              for (Iterator iter = selector.selectedKeys().iterator(); iter.hasNext(); ) {
                  SelectionKey key = (SelectionKey) iter.next();
                  iter.remove();
                  if (!key.isValid())
                   continue;
                  if (key.isAcceptable())
                   acceptClient(key);
                  if (key.isReadable())
                   readFromClient(key);
             } catch (Exception e) {
              System.out.println(server_name + ": error in selector loop: " + e);
              e.printStackTrace();
        private void acceptClient(SelectionKey key)
         throws IOException
         ServerSocketChannel server_channel = (ServerSocketChannel) key.channel();
         if (server_channel == null)
             return;
         SocketChannel channel = server_channel.accept();
         if (channel == null)
             return;
         configureSocket(channel.socket());
         channel.configureBlocking(false);
         channel.register(selector, SelectionKey.OP_READ);
         clients.put(channel, new Client());
         System.out.println(server_name + ": got a new client; " +
                      clients.size() + " clients");
        private void readFromClient(SelectionKey key)
         throws IOException
         SocketChannel channel = (SocketChannel) key.channel();
         Client client = (Client) clients.get(channel);
         ByteBuffer buf = client.buf;
         int count;
         try {
             count = channel.read(buf);
         } catch (IOException e) {
             System.out.println(server_name + ": error reading, closing connection: " + e);
             clients.remove(channel);
             channel.close();
             return;
         if (count == -1) {
             clients.remove(channel);
             System.out.println(server_name + ": client disconnected; " +
                          clients.size() + " clients");
             channel.close();
             return;
         if (buf.position() == MESSAGE_SIZE) {
             if (++client.number_of_messages % 10000 == 0) {
              long now = System.currentTimeMillis();
              System.out.println(server_name + ": " + client.number_of_messages +
                           " messages in " + (now - client.connect_time) + " ms");
             buf.flip();
             // RFE write without blocking
             writeFully(channel, buf);
             buf.rewind();
        public static void writeFully(SocketChannel channel, ByteBuffer buf)
         throws IOException
         while (buf.remaining() != 0)
             channel.write(buf);
        private static void startClient()
         throws Exception
         SelectPingPong client = new SelectPingPong(6667, "client");
         Socket socket = client.connect("localhost", 6666);
         // Send initial message
         ByteBuffer buf = ByteBuffer.allocate(MESSAGE_SIZE);
         buf.put(new byte[MESSAGE_SIZE]);
         buf.flip();
         socket.getChannel().write(buf);
         client.mainLoop();
        public static void main(String args[])
         throws Exception
         if (args.length == 1 && args[0].equals("server")) {
             SelectPingPong server = new SelectPingPong(6666, "server");
             server.mainLoop();
         } else if (args.length == 1 && args[0].equals("client")) {
             startClient();
         } else if (args.length == 1 && args[0].equals("both")) {
             new Thread() { public void run() {
              try {
                  SelectPingPong server = new SelectPingPong(6666, "server");
                  server.mainLoop();
              } catch (Exception e) {
                  System.err.println("error in server");
             } }.start();
             startClient();
         } else {
             System.err.println("usage: SelectPingPong [client | server | both]");
    }

  • Decode Statement Inside the Case statement

    Can we use Decode Statement inside a CASE Statement as show below --
    It is giving an error -- Is the a better way to write with out any error
    create or replace
    function test (a varchar2) RETURN VARCHAR2
    is
    m varchar2(20);
    begin
    m :=
    CASE
    WHEN a IN (
    '1009' -- (soon obsolete)
    ,'1010'
    ,'1019'
    ,'1051'
    ,'XGP'
    ,'XSC')
    THEN (SELECT DECODE(v_lef_cd,'NAM','71','GLB','99','01') into m FROM DUAL)
    -- ) THEN '01' -- UNITED STATES OF AMERICA
    WHEN a IN (
    '1069' -- South Africa
    ,'SAO' -- South Africa
    ,'SA' -- South Africa
    ) THEN '26' -- South Africa
    ELSE NULL
    END;
    return m;
    end;

    Hi,
    You can only use DECODE in SQL statements.
    Your SELECT DECODE (...) INTO statement would work anywhere a PL/SQL statement is allowed; but PL/SQL statements are not allowed within CASE expressions.
    Remember, the expression that comes after THEN in a CASE expression must be a single value.
    I would write a function like this using IF ... ELSIF statements. It's a little more typing than CASE, but a lot easier to code, test and maintain.
    If you want to use CASE, here's one way:
    ...     m := CASE
              WHEN  a  IN ('1069', 'SAO', 'SA')
                   THEN  '26'     -- South Africa
              WHEN  a  NOT IN ('1009', '1019', '1051', 'XGP', 'XSC')
              OR    a  IS NULL
                   THEN  NULL
              WHEN  v_lef_cd = 'NAM'
                   THEN  '71'
              WHEN  v_lef_cd = 'GLB'
                   THEN  '99'
                   ELSE  '01'     -- USA
              END;This assumes that you have a variable v_lef_cd defined.
    If you want, you can nest CASE expressions, like this:
    ...     m := CASE
              WHEN  a  IN ('1069', 'SAO', 'SA')
                   THEN  '26'     -- South Africa
              WHEN  a  IN ('1009', '1019', '1051', 'XGP', 'XSC')
                   THEN  CASE  v_lef_cd
                          WHEN  'NAM'
                             THEN  '71'
                          WHEN  'GLB'
                             THEN  '99'
                             ELSE  '01'     -- USA
                         END
              END;Always format your code, so you can see where the CASE expressions and each of the WHEN clauses begin and end.
    When posting formatted text on this site, type these 6 characters:
    (all small letters, inside curly brackets) before and after sections of formatted text, to preserve spacing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • Is there a way to create an email button to multiple addresses within a PDF?

    I have to regularly update a list of committee members and their email addresses which is then sent to all of the members. 
    Does anyone know if there a way of creating a button for each of the committees in the list which, when clicked, creates an email to all the  members contained within that committee?  I will need to add up to 14 email addresses to the one button. I need to know this because the various members in the committees are  fed up of copying and pasting all the email addresses into their email messages.
    I am now using Acrobat XI but I still can't figure out if this is even possible. If not a button, is there some other way of being able to launch an email to multiple addresses within a PDF?
    Thanks in advance for any help.

    Not really. But you can combine the data from multiple forms into a single (new) spreadsheet via Tools - Forms - More Form Options - Merge Data Files into Spreadsheet...

  • Application is in 'Prepared' state instead of 'Active' state.

    I m using below code to deploy an application on weblogic 11g
    import java.io.*;
    import java.util.Hashtable;
    import weblogic.deploy.api.tools.*;  //SesionHelper
    import weblogic.deploy.api.spi .*;  //WebLogicDeploymentManager
    import javax.enterprise.deploy.spi.TargetModuleID;
    import javax.enterprise.deploy.spi.status.ProgressObject;
    import javax.enterprise.deploy.spi.status.DeploymentStatus;
    import javax.enterprise.deploy.shared.ModuleType;
    import javax.enterprise.deploy.spi.Target;
    import javax.management.MBeanServerConnection;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    public class WeblogicTest
         public static void main(String ar[]) throws Exception
              System.out.println("Start Deploying");
              WebLogicDeploymentManager deployManager=SessionHelper.getRemoteDeploymentManager( "t3", "10.0.0.47", "7003", "weblogic",
              "weblogic123");
              System.out.println("Deploy Manager  :  " + deployManager);
              DeploymentOptions options = new DeploymentOptions();
              options.setName("TC33");          //TODO
              Target targets[] = deployManager.getTargets();
              System.out.println("Target  :  " + targets);
              Target deployTargets[]=new Target[1];     
              int temp=0;
              for (temp=0; temp < targets.length; temp++){
                   if(targets[temp].getName().equals("managed_2")){
                        deployTargets[0]=targets[temp];
              ProgressObject processStatus=deployManager.distribute(deployTargets, new                
                        File("\\\\10.0.0.47\\Builds\\VertexTest\\domain1\\tc3.3b74_6.2.2011.19\\test.ear"), null,options);
              DeploymentStatus deploymentStatus=processStatus.getDeploymentStatus() ;
              System.out.println("UnDeploymentStayus.getMessage(): "+deploymentStatus.getMessage() );
    System.out.println("Start sleeping");
              Thread.sleep(10000);
    System.out.println("End sleeping");
              TargetModuleID[] targetModuleIDs=deployManager.getAvailableModules(ModuleType.EAR, deployTargets);
              System.out.println("\n\t targetModuleIDs [] = "+targetModuleIDs);
              for (int j=0;j<targetModuleIDs.length;j++){
                   System.out.println("\n\t "+targetModuleIDs[j]);
                   deployManager.start(targetModuleIDs);
                   deployManager.start(targetModuleIDs);
    }This code successfully deployed my application on desired managed server but my application is in 'Prepared' state instead of 'Active' state.
    Currently, I have to manually update my application's state to 'Active'.
    Can anybody tell me if I am missing something in my code.

    It actually looks fine, but what could be the problem is the time to deploy your application and
    the sleep command of ten seconds. When your sleep is finished, is your application deployment finished?
    Maybe you can add a while loop using the isCompleted method of the DeploymentStatus class, for example,
    ProgressObject processStatus = deployManager.distribute(deployTargets, new File("\\\\10.0.0.47\\Builds\\VertexTest\\domain1\\tc3.3b74_6.2.2011.19\\test.ear"), null,options);
    DeploymentStatus deploymentStatus = processStatus.getDeploymentStatus() ;
    while (!deploymentStatus.isCompleted()) {
        Thread.sleep(1000);
    TargetModuleID[] targetModuleIDs = deployManager.getAvailableModules(ModuleType.EAR, deployTargets);
    System.out.println(targetModuleIDs);
    if (targetModuleIDs.length > 0) {
        deployManager.start(targetModuleIDs);
    }Or something else along those lines.

  • Maybe you are looking for