Using EXIT command b/w  IF and END IF

I have below query in the code , could you let me know why exit is used b/w IF and END IF .
for a in 1..siteuse_code.count()
LOOP
IF cust.site_use_code = siteuse_code(a)
THEN v_valid_site_use := 'Y';
exit;
END IF;
END LOOP;
Thanks.

931832 wrote:
Alberto Faenza :
But, what happens if siteuse_code has multiple values.
if the first value satisfies the the condition, will it exit the LOOP ??
if , Yes. what about remaining values in siteuse_code ?Simply the code will exit from the loop at the first element of the collection siteuse_code that is equal to cust.site_use_code and it will go through other elements of the collection.
for a in 1..siteuse_code.count()
LOOP
IF cust.site_use_code = siteuse_code(a)
THEN v_valid_site_use := 'Y';
exit;
END IF;
END LOOP;
{code}
Suppose that you have 10 elements and the third satisifies the condition. The code will exit from the loop and a will have a value of 3.
I hope it is clear.
Regards.
Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • I tried using the Voice Memos iPhone app and ended up with a red banner on top of the screen that flashes "recording 00.00" but I can't locate what I thought I was recording.  can you help me?

    I tried using the Voice Memos iPhone app and ended up with a red banner on top of the screen that flashes "recording 00.00" but I can't locate what I thought I was recording.  can you help me?
    jacknil

    I found an answer to this on another page (I was having the same problem) This worked for me:
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    more here: https://discussions.apple.com/thread/5596831

  • System asking me to fill MANDATORY fields, even I used EXIT-COMMAND for F3

    HI Experts,
    issue- there is mandatory field in the screen, so, am using the folllowing code, system asking me to fillup the mandatory field.
    then, i used exit-command, but, still its asking me to fill the mandatory fiels???????????
    code is,
    process after input.
    ***Exit command
    module cancel at exit-command.
    module cancel.
    module user_command_9001.
    module cancel input.
    case: ok_code.
    when wa_con_back.
    clear ok_code.
    set screen 0.
    leave screen.
    when wa_con_exit.
    clear ok_code.
    set screen 0.
    leave screen.
    endcase.
    endmodule. " cancel INPUT
    thanq

    I am not sure but try making a specific module for your exit handling, for instance:
    module do_exit at exit-command.
    module cancel
    module user_command_9001.
    Hope it helps you,
    Bert

  • IMAP commands are very slow and end up having the connection terminated by the server

    Could you please help us on this topic ?
    https://answers.microsoft.com/en-us/outlook_com/forum/oemail-osend/imap-commands-are-very-slow-and-end-up-having-the/652390ea-9658-4db6-ae2c-c8fff12a9142

    Hi,
    Sorry that I am not familiar with Outlook.com account and its server connection. This forum focuses on user clients issue when connect to Exchange server 2013 which is generally an on-premises mail server in domain environment.
    Since your issue is related to Outlook.com account, I suggest we can also ask a question in Microsoft Outlook.com forum for more help:
    http://answers.microsoft.com/en-us/outlook_com/forum?sort=lastreplydate&dir=desc&tab=Threads&status=&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=All&tm=1418613687794
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thank you for your understanding.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Unable to exit a PL/SQL Begin and End Statement

    All,
    OS: Solaris Unix
    DB: Oracle 9.2.0.4
    I'm calling and SQL files from the SQL PLUS prompt using
    @mysqlfile.sql
    which contains the following:
    declare
    current_month varchar2(20) := trim(to_char(sysdate,'Month'));
    current_year varchar2(20) := trim(to_char(sysdate,'YYYY'));
    begin
    PR_BUILD_REPORTS(current_month,current_year);
    end;
    This call to mysqlfile.sql is called from a Unix Shell script.
    The shell script hangs because the operation does not exit from teh mysqlfile.sql call. I have tried including and explict exit command after the proc call. I have also tried using exec <proc_name>;
    Can anyone shed some light on the above?

    Your anonymous pl/sql block will not run without a forward slash :
    current_year varchar2(20) := trim(to_char(sysdate,'YYYY'));
    begin
    PR_BUILD_REPORTS(current_month,current_year);
    end;
    AMM

  • VA42 user exit to update contract start and end dates at Item level

    Hi  Experts,
                      I need to update contract start and end dates at Item level in 'VA42' transaction, for this i am using user-exit 'USEREXIT_FIELD_MODIFICATION' in the include 'MV45AFZZ'. i am able  to display the data into item level through my coding but the data is not getting updated into 'VEDA'
    Note: No need to change contract start date and end date in header level. Only at item level i want to change dates.
    Thanks,
    Sateesh.

    Thanks For your reply Vikram,
          i tried with 'USEREXIT_MOVE_FIELD_TO_VBAP' user-exit earlier it self its not working. Can you suggest me any another way how we can achieve this functionality. modification of Contract start date and end date in only item level. 
    'USEREXIT_MOVE_FIELD_TO_VBAP':
    FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(3) Form USEREXIT_MOVE_FIELD_TO_VBAP, Start                                                                                                           A
    *$*$-Start: (3)---------------------------------------------------------------------------------$*$*
    ENHANCEMENT 1  ZSD_CONT_DATE.    "active version
    DATA : lv_var TYPE CHAR10.
      lv_var = '0040000219'.
      if sy-tcode = 'VA42'.
    IF VBAK-VBELN EQ lv_var.
    VEDA-VBEGDAT = '20140502'.
      XVEDA-UPDKZ = 'X'.
    VEDA-VENDDAT = '20140602'.
      XVEDA-UPDKZ = 'X'.
    ENDIF.
    ENDIF.
    ENDENHANCEMENT.

  • VA42 user exit to update contract start and end dates at header

    Hi.
    My requirement : In VA42, if a user changes a contract end date at item level, I want the change to be reflected at header level automatically.
    I have looked in MV45AFZZ, USEREXIT_SAVE_DOCUMENT and USEREXIT_SAVE_DOCUMENT_PREPARE. I am unable to affect the contract end date in those user exits, whatever I put in VEDA-VENDDAT or XVEDA-VENDDAT or whateverVEDA-VENDDAT, does not have any effect on the actual contract dates.
    Can anyone help?
    Please note that we are running 46C.
    Thank you.

    Thanks For your reply Vikram,
          i tried with 'USEREXIT_MOVE_FIELD_TO_VBAP' user-exit earlier it self its not working. Can you suggest me any another way how we can achieve this functionality. modification of Contract start date and end date in only item level. 
    'USEREXIT_MOVE_FIELD_TO_VBAP':
    FORM USEREXIT_MOVE_FIELD_TO_VBAP.
    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(3) Form USEREXIT_MOVE_FIELD_TO_VBAP, Start                                                                                                           A
    *$*$-Start: (3)---------------------------------------------------------------------------------$*$*
    ENHANCEMENT 1  ZSD_CONT_DATE.    "active version
    DATA : lv_var TYPE CHAR10.
      lv_var = '0040000219'.
      if sy-tcode = 'VA42'.
    IF VBAK-VBELN EQ lv_var.
    VEDA-VBEGDAT = '20140502'.
      XVEDA-UPDKZ = 'X'.
    VEDA-VENDDAT = '20140602'.
      XVEDA-UPDKZ = 'X'.
    ENDIF.
    ENDIF.
    ENDENHANCEMENT.

  • Using exit command

    I have a canvas class which is invoked by another class:
    public class Play extends Canvas implements CommandListener
      Play
    }In this class I want to have the option to exit and go back to the first class (Game).
    Im sure this is possible although I cannot do it with this code:
         public void commandAction(Command c, Displayable s)
              if(c == exitCommand)
                   try
                        Geme game = new Game();
                        game.startApp();
                   catch(MIDletStateChangeException e)
         }As I get this error at runtime:
    java.lang.SecurityException: Application not authorized to access the restricted API
         at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+40)
         at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+7)
         at com.sun.midp.midletsuite.MIDletSuiteImpl.checkIfPermissionAllowed(+8)
         at com.sun.midp.midlet.MIDletState.<init>(+83)
         at javax.microedition.midlet.MIDletProxy.<init>(+5)
         at javax.microedition.midlet.MIDlet.<init>(+13)
         at Game.<init>(+4)
         at Play.commandAction(+15)
         at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
         at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
         at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
         at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
         at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+186)
         at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+57)
    Please make any suggestions.

    I have a canvas class which is invoked by another class:
    public class Play extends Canvas implements CommandListener
      Play
    }In this class I want to have the option to exit and go back to the first class (Game).
    Im sure this is possible although I cannot do it with this code:
         public void commandAction(Command c, Displayable s)
              if(c == exitCommand)
                   try
                        Geme game = new Game();
                        game.startApp();
                   catch(MIDletStateChangeException e)
         }As I get this error at runtime:
    java.lang.SecurityException: Application not authorized to access the restricted API
         at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+40)
         at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+7)
         at com.sun.midp.midletsuite.MIDletSuiteImpl.checkIfPermissionAllowed(+8)
         at com.sun.midp.midlet.MIDletState.<init>(+83)
         at javax.microedition.midlet.MIDletProxy.<init>(+5)
         at javax.microedition.midlet.MIDlet.<init>(+13)
         at Game.<init>(+4)
         at Play.commandAction(+15)
         at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)
         at javax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
         at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
         at com.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)
         at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.handleVmEvent(+186)
         at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+57)
    Please make any suggestions.

  • Why hasen't Itunes been updated from the ground up? I would love to use Itunes as my be all and end all entertainment player. That would include playing hard media such as DVDs and Blu Rays.

    I would just like to know why Itunes isn't the be all/end all when it comes to being the center of anyone's home entertainment system?
    I would also like to know why Itunes hasn't changed ANY in many years?
    Just curious ...
    Greg

    It has changed and it is bloated enough as it is.  Since the early days they have added Ping, Match, Genius, a whole media store interface, concomitant movie playing, the whole syncing business with a multitude of i-devices.
    There is no need to add a DVD player since DVD Player stands alone quite nicely as it is.  Additionally Apple is phasing out DVDs (note the demise of iDVD, all software now being downloads only, and the disappearance of DVD drives from newer models) since of course you're supposed to just get your movies from the iTunes Store.

  • EXIT command behaviour in ABAP code?

    Hi Experts,
    Pls. let me clarify that, the behaviour of EXIT command, like,
    - in IF statement
    - in LOOP
    - in PERFORM/FORM
    -in DO
    thanq

    to exit out of the event blocks and the loops we will use exit command.
    see these links for more info.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9af135c111d1829f0000e829fbfe/content.htm
    terminating the loop using exit
    DO 10 TIMES.
      IF sy-index = 3.
        EXIT.
      ENDIF.
      WRITE sy-index.
    ENDDO.
    The list output is:
    1 2
    module exit input.
    if ok_code = 'REFR'.
    call transaction 'ZMEDEMP'.
    elseif ok_code = 'BACK'.
    set screen 0.
    leave to screen 0.
    elseif ok_code = 'EXIT'.
    leave program.
    endif.
    endmodule.
    For E.g
    AT EXIT-COMMAND code.
    In your flow logic, you create a module as so:
    MODULE md_exit_command AT EXIT-COMMAND.
    Then in PF-status, you configure the Cancel (red button on toolbar) as exit button by setting Type of button as 'E'. Put OKCODE as 'CANC'.
    Then, in the module
    MODULE md_xit_command INPUT.
    CASE OKCODE.
    WHEN 'CANC'. LEAVE TO SCREEN 0. ENDCASE.
    ENDMODULE.
    Also refer,
    AT Exit
    Reward points..

  • Despite using "USER_EXIT" command, getting an empty report when ran the concurrent program.

    Hi,
        In my report I am using "OE_ORDER_HEADERS_V" view in my data group query. This view is operating unit(OU) specific so, i am using "USER_EXIT" commands in before report and after report triggers correctly.
    Despite making above two setups when i ran my concurrent program from front end getting an empty report.
    Please help in fixing this.
    Thanks
    Sandeep.G

    Hi All,
              Solved the issue !!!
    Reason: I am writing report for custom application(XXKES) where i diddn't checked my profile(mo: Operating Unit).
    which is 912.
    And my OM responsibility is in 204 OU so, this is resolved by changing the OU profile of my custom application to 204.
    Next you do this on custom app. make sure your all other coordinating apps are also having same OU profile.
    Regards
    Sandeep.G

  • Find start and end execution time of a sql statement?

    I am have databases with 10.2.0.3 and 9.2.0.8 on HP UNIX 11i and Windows 200x.
    I am not in a position to turn on sql tracing in production environment. Yet, I want to find when a sql statement started executing and when it ended. When I look at v$sql, it has information such FIRST_LOAD_TIME, LAST_LOAD_TIME etc. No where it has information last time statement began execution and when it ended execution.. It shows no of executions, elapsed time etc, but they are cumulative. Is there a way to find individual times (time information each time a sql statement was executed. – its start time, its end time ….)? If I were to write my own program how will I do it?
    Along the same line, when an AWR snapshot is shown, does it only include statements executed during that snapshot or it can have statements from the past if they have not been flushed from shared memory. If it only has statements executed in the snapshot period, how does it know when statement began execution?

    Hi,
    For oracle 10g you can use below query to find start and end time, you can see data for last seven days.
    select min(to_char(a.sample_time,'DD-MON-YY HH24:MI:SS')) "Start time", max(to_char(a.sample_time,'DD-MON-YY HH24:MI:SS')) "End Time", b.sql_text
    from dba_HIST_ACTIVE_SESS_HISTORY a,DBA_HIST_SQLTEXT b where
    a.sql_id=b.sql_id
    order by 1;
    Regards
    Jafar

  • At selection-screen on exit-command

    hi to all  my querry is as  follows . pls tell what is the usse of
    at selection-screen on exit-command  event where do we  use it . can u pls give some sample coding . points will be rewarded definitely .

    Hi
    We use<b> exit-command </b> in Module pool programs to come out of the Program, without entering data in the madatory fields  on screen.
    We don't use exit commands for selection screens in Reports
    So you are asking this exit command for selection screens
    see the sample code for Module pools programs
    PROCESS AFTER INPUT.
    Forced Exit from the transaction
      MODULE exit AT EXIT-COMMAND.
    *&      Module  exit  INPUT
    Exit from the Transaction
    MODULE exit INPUT.
      CASE okcode.
        WHEN 'EXIT' OR 'CANCEL'.
          CLEAR okcode.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " exit  INPUT
    Reward points for useful Answers
    Regards
    Anji

  • Design Question: Can I use Rest-CsPoolRegisterState command in order start Front End Service when Quorum is lost and less than 85% of FES are available?

    Hi, 
    Assuming below setup for Enterprise edition Lync 2013
    Single Pool Stretched architecture with 4 FES servers
    Site A Data Center
    Site B Data Center
    FES
    2
    2
    SQL
    1 Primary
    1 Mirror
    Fact: In a situation when we lose network connectivity to Site A DC, and due to less than 50% FES servers, Quorum will be lost and as a result Front End Service will stop after 5 minutes. 
    The question is, would I be able to do a manual intervention by using this command
    Reset-CsPoolRegistrarState –PoolFqdn <pool name fqdn> –ResetType QuorumLossRecovery , and start FES with just 2 FES servers in Site B DC and 1 SQL
    Server?
    The reason I am asking this question is because it is mentioned in one of the Lync manuals that at least 85% of the servers must be available to recover once the Quorum has lost. The same manual also mentions to use above
    mentioned command in order to recover from Quorum Loss despite the fact that the lost FES servers are still not available.
    Thanks in Advance

    Hi,
    In Lync server 2013 Stretched pools are not supported for the Front End, Edge, Mediation, and Director server roles. It need two Lync pools.
    If one pool fail to connect, An administrator can declare an emergency and fail over the pool to the backup pool.  That is done by using the:
    Invoke-CsPoolFailover –PoolFQDN <Pool fqdn> –DisasterMode –Verbose
    More details:
    http://blog.avtex.com/2012/07/26/understanding-lync-2013-server-failover/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information
    found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Iphone 4 voice Dial used to work great, but now, I can't get it to recognize voice commands. When i give it a command to call someone, it ends up repeating someone elses name and starts the call. Does anyone know how to solve this problem?

    I have an I phone 4 with 32g.  The voice dial used to work just fine, but now it doesn't recognize the words and ends up saying someone elses name and starts calling the wrong person.  It even won't recognize a number when spoken to it and speaks back and calls the wrong numbers.
    Lately, the phone has really slowed down.  I am not sure if this is the problem.. I have closed all the open apps and deleted any extra picture off the card and extra songs that I have downloaded and the slow problem still exists. 
    Would a reset work to restore the phone to factory settings and if I then resync the phone, would all contacts pictures and songs be restored?
    Ron
    Oklahoma

    What is wrong with your Mac?  You still haven't told us what the problem is. Is the computer still under warranty or Apple Care?
    the next time i attempted to use the computer it wasn't fine
    What do you mean by "wasn't fine".  We can't see your computer so you'll have to describe what your're experiencing in detail without the editorializing.
    Download and run Etrecheck.  Copy and paste the results into your reply. It's a diagnostic tool that was developed by one of the most respected users here in the ASC to help identify the more obvious culprits.

Maybe you are looking for