OK_CODE for Enter

Hi
What is the OK_CODE for enter?
I have ALV Grid Report with one fld in edit mode. If I enter wrong input it should goto selection screen.
I have ONLI/ENTR/ENTE/space but not working.
Please help me

if u want control over selection if u give wrong I / P..
i don't know whether it is useful but,we use like this.
when ever YOUR using 2 blocks ,based on first block selection,2nd has to enable or disable.
like
after parameters:...
<b>AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
IF VAL = 1 .
SCREEN-INPUT = O.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ELSE.
VAL = 2 .
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.</b>
after AT SELECTION-SCREEN ON P_KUNNR(OR ANY OTHER)
SELECT SINGLE * FROM KNA1 WHERE KUNNR = P_KUNNR.
<b>IF SY-SUBRC <> 0.
MESSAGE I000(0) WITH ' ENTER CORRECT I/P '.
EXIT.
ELSE.
VAL = 2.
ENDIF.
(HERE CONTROL GOES TO SCREEN-INPUT = 1 )</b>

Similar Messages

  • OK_CODE for ENTER Button

    Hello Friends ,
    i used the command : field XXXX module YYYY , to call the module when the data is given in the field. Now my boss told me that he wants to execute the filling of the table ( that is waht my program makes) even if i do not fill any field.
    How do i get the ok_code when i press the enter button?
    Best Regards!

    When you press the ENTER key the PAI will be called but the OK_CODE will be empty.  If you specifically trap for OK_CODE = '' you can fill the table whenever the ENTER key is pressed.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND.
    *Call to USER_COMMAND MODULE
    MODULE USER_COMMAND INPUT.
      IF OK_CODE = ''.
    *   Fill table when the ENTER key is pressed
      ENDIF.
    ENDMODULE.
    Whenever the user presses the ENTER key the same code will be called so it could affect the speed of your program--depending on the size of the table you want to populate.
    If I'm not even close on my response to your question, I apologize.

  • OK_CODE For ENTER and Scroll key

    Hi,
    when ever i press ENTER button in the module pool screen i need to capture the action code for that, because i suppose to do some action.
    i need the same for scroll button also.
    Kindly help me in this .
    reg,
    Hariharan.

    Hi Hariharan.
    Pressing ENTER returns empty function code in PAI, so you can just check OK_CODE = space . This is why you need to (at the beggining of PAI) save value of OK_CODE and then clear it. It can still hold value of previous action and if you later ENTER was pressed, the value would be incorrect. Do the following:
    - create a screen, go to Element list tab type OK_CODE in empty field (column NAME) next to value OK (column TYPE).
    - in program declare corresponding data object with name OK_CODE, so the value will be transported between screen and program
    "in program
    data: ok_code like sy-ucomm. "this OK_CODE var will hold function code of triggered action on screen
    - write PBO and PAI modules in screen flow logic and corresponding ones in ABAP program
    "in screen flow logic
    PROCESS BEFORE OUTPUT.
      MODULE PBO.
    PROCESS AFTER INPUT.
      MODULE PAI.
    "in ABAP program
    MODULE PBO OUTPUT.
       "here you can set your GUI status
       SET PF-STATUS space.  "using  SPACE will set default GUI status
    ENDMODULE.
    "now in PAI
    MODULE PAI INPUT.
       "here you need to capture ok_code value in order to know what was the action
       data: save_ok like sy-ucomm. "our help var
        save_ok = ok_code. "first remeber what was triggered
        clear ok_code.    "now clear the contenet of ok_code to be able to catch ENTER action (as mentioned above)
        "now check if empty
         if save_ok = space.   "ENTER was hit
            "react here accordingly
         endif.  
    ENDMODULE.
    For more information please refer [Reading Function Codes|http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dbaa1335c111d1829f0000e829fbfe/frameset.htm]
    Regards
    Marcin

  • For enter

    how to use enter button instead of pushbutton for calling another screen?

    >
    Ankur Parab wrote:
    > Hi,
    > normally the ok_code for Enter is 'ENTR'. So check sy-ucomm value equal to 'ENTR' and then call the required screen.
    >
    > Regards,
    > Ankur Parab
    Sorry but this is not true. Normally pressing ENTER doesn't place any function code in sy-ucomm . This is one of the reason why you in PAI we should store ok_code in some save_code variable and then clear it. Simply after pressing ENTER in next screen without first clearing content of ok_code we might still have previous function code there, hence program logic would be wrong.
    Refer for proof [Reading Function Codes|http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dbaa1335c111d1829f0000e829fbfe/frameset.htm]
    @ Priya.R
    If you want to catch your ENTER, simply do the following
    data: ok_code like sy-ucomm,  "ok_code assigned to screen
              save_code like sy-ucomm.
    MODULE pai INPUT.
       save_code = ok_code. 
       clear ok_code.
       if save_code = space.  "as said above ENTER will generate empty function code
        CALL SCREEN ...
       endif.    
    ENDMODULE.
    Regards
    Marcin

  • How can I reinstate the warning dialog box for entering a secure site?

    I would like to reinstate the warning box that tells me when I am entering a secure site. The one that warns when I am leaving a secure site is working just fine. I probably unchecked the box for entering at one time or another but I can't find how to bring it back.

    Looks that the Warning Messages dialog for those settings is gone from Tools > Options > Security
    You can reset the related <b>security.warn_</b> prefs on the <b>about:config</b> page.

  • Sy-ucomm value for enter

    Hi,
    Can anyone plz help me with the sy-ucomm value for enter key.
    Thanks..

    Hi Renu,
    The OKCODE  or SY_UCOMM value is not same for 'ENTER' in all the cases. So its better to go for debugging .
    Whenever you want to know the ok code or sy-ucomm value  of a key , type '/h' in the command box and press enter. It shows a message on the status bar 'Debugging Switched On'. Now if you press any key , it switches to debugging mode  and type sy-ucomm in the fields list then you will get the SY-UCOMM or OK CODE.
    Incase of ALVs also you can get the SY-UCOMM. But in some cases the SY-UCOMM value may be NULL.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Mar 25, 2008 4:50 PM

  • Action for ENTER KEY is not working in alv grid output (Classical)

    Hi Experts,
      I have searched SDN around 8 hours and could not get any help on my below issue.
      I am developing ALV report using function module (Classical ALV). ALV output has 4 input enable fields, if user enters data in any of those fields and clicks on enter button from key pad..the remaining fields needs to be filled automatically.
      I am facing the issue with enter key, even if i press enter key in the output there is no action and hence no user command triggered. May be i am using wrong funcion code in wrong way.
      Could any one tell me what function code can we assign for ENTER action in PF-STATUS?
    Regards,
    Murali Mohan

    Hi
    Try this simple code, it works fine:
    TYPE-POOLS: SLIS.
    DATA: BEGIN OF ITAB1 OCCURS 0,
           BUKRS LIKE T001-BUKRS,
           BUTXT LIKE T001-BUTXT,
          END OF ITAB1.
    DATA: GT_FIELDCAT   TYPE SLIS_T_FIELDCAT_ALV,
          GT_REPID    LIKE SY-REPID.
    START-OF-SELECTION.
      SELECT BUKRS BUTXT INTO TABLE ITAB1
         FROM T001.
    END-OF-SELECTION.
      GT_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = GT_REPID
          I_INTERNAL_TABNAME = 'ITAB1'
          I_INCLNAME         = GT_REPID
        CHANGING
          CT_FIELDCAT        = GT_FIELDCAT.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = GT_REPID
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
          I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
          IT_FIELDCAT              = GT_FIELDCAT
        TABLES
          T_OUTTAB                 = ITAB1.
    FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                          RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'ENTER'. MESSAGE I208(00) WITH 'Pressed ENTER key'.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    FORM SET_PF_STATUS  USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'LIST_ALV' EXCLUDING RT_EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    Max

  • I have purchased Adobe XI Pro and created a form for entering bowling scores to submit to newspaper for my high school team.  I can not figure out how to get pdf's into my documents folder on my iPad so that I can access the files in bowling alleys where

    I have purchased Adobe XI Pro and created a form for entering bowling scores to submit to newspaper for my high school team.  I can not figure out how to get pdf's into my documents folder on my iPad so that I can access the files in bowling alleys where I do not have a Wi-Fi connections.  I need to be able access files without going to acrobat.com.  Help!!!@

    Post the PDF files to a web site. The browse to them in Safari on the iPad.  When you Open the files specify the Open to occur in Adobe Reader.  Then you can have/Save them in your Documents folder on the iPad.   An iPad has limited access to files otherwise.

  • Flex 4 does not dispatch keyboard events for ENTER key.

    Hello everyone. I think I have a strange problem with Flex 4 Beta (4.0.0.8909). My application has had event listener for keyUp event for a month now and suddenly (two days ago) I've noticed that keyUp event is not dispatched for ENTER (ALT also) key. Anyone know why? By the way, I've tried this with keyDown event, also 4.0.0.8847 version of SDK - still the same: no keyboard events for ENTER (and ALT) key.
    Here is the sample application that has got this issue:
    <s:Application
       xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/halo"
       minWidth="640" minHeight="480"
       keyUp="application1_keyUpHandler (event)">
       <fx:Script>
          <![CDATA[
             import mx.controls.Alert;
             protected function application1_keyUpHandler (event: KeyboardEvent):void
                Alert.show ("Key up: " + event.keyCode);
          ]]>
       </fx:Script>
       <s:layout>
          <s:BasicLayout/>
       </s:layout>
       <s:TextArea verticalCenter="0" horizontalCenter="0" width="200"/>
    </s:Application>
    If you run this application and try typing anything in a TextArea you will get alerts with key codes. However, if you press ENTER (or ALT), you will get no alert.
    I'm pretty sure the code above is right so that means there is a bug in latest nightly builds of SDK (i would swhitch to an older build if i knew which one does not have this bug).
    Any ideas?

    Flex harUI wrote:
    That's true, but in this case, I think the text editing code is eating ENTER key in order to prevent parents from seeing it and acting on it (like a submit button).  We'll see if we can find a way around that.
    You can get the ENTER key now by listening in capture phase.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui
    The enter key isn't being disposed of by textedit, the attached example code works without error if you a- remove the alert box and b-set the focus to your text area on initialisation. I agree that pressing the enter key then calling a dialog box will result in the enter key being "gobbled up" as  the enter key is overridden by the dialog box code.
    I think the first suggestion should be to anyone don't use dialogboxes for testing code. If for some reason debugging isn't desirable instead of a trace statement a simple label  can be used as a 'fake' trace.
    David
    Message was edited by: David_F57: I worded this wrong, imho there is no need for a work around, the textarea component works as it should. When intercepting 'system' keycodes there is a need to consider the effect of the intercept and code appropriately to that end.

  • Code  for  'enter' button in user command.

    hi experts,
                       i have developed a initial screen as selection screen for table control.
    data is displayed in second screen(table control).
    <b></b>when user enters inputs in selection screen and presses enter on keyboard
    it should execute to second screen. code for enter button. <b></b>

    Hello,
    in the PBO process should you have the next code:
    for example:
    case sy-ucomm.
    when 'ENTER'.
        CALL SCREEN 0200. " The second window
    when 'SAVE'.
    when ...
    endcase.
    You should have all conditions in the case statement, otherwise you have a error.
    Regards,

  • Is there a key for entering text on ipad mini for the schwa symbol?

    Is there a key for entering text on ipad mini for the schwa symbol?

    You're welcome.
    It is possible there is an app containing a phonetic keyboard in the app store (or not). I haven't had use for one, so have never checked. Using it would require some copy and past on your part. But it might worth a search.
    Oh, just to be clear (should have googled and not trusted my aging memory) you're basically looking for an upside-down "e", right?

  • What's the keyboard shortcut for entering time and date?

    Is there a keyboard shortcut for entering time and date?
    Hopefully one which would work in any application.
    Thank you.

    None is built-in. You can use any number of third-party utilities for creating macros. For example:
    1. TypeIt4Me
    2. TextExpander
    3. Typinator
    4. AutoTyper (part of Automaton)
    Any of the above are excellent choices. Demo/Trial downloads are found at CNet Downloads or MacUpdate.

  • Fast entry transaction for entering purchase order confirmations

    Does anyone know of fast entry transaction for entering purchase order confirmations similar to VL31N for inbound deliveries?
    Thanks

    dear John,
    if i m not mistaken you want to give confirmation control to your existing POs.
    If the case is this you can opt for a BDC to be run for updation.
    Ask your abaper to do this thing.
    revert back if this is not the the case.
    Njoy
    Ashish

  • No cursor available for entering text in an https site popup. Site is on "trusted/allowed" list. Do get cursor on same site with IE6.

    No cursor is available for entering text in an allowed https popup. Site is on "trusted/allowed" list. Cursor is available and text enters on same site using IE6. Same "no cursor" issue occurs with FF on my laptop. Both machines are Windows XP Home, SP2.
    == This happened ==
    Every time Firefox opened
    == FF was installed -- all updates for FF and extensions are current

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • Mandatory Field for Entering Delayed Reason for project during scheduling .

    Hi Friends
    Here I have a question on "Scheduling"?
    My Client want an mandatory field for entering the delay reason if any phase or tasks or project definition get delayed.
    Your input would be highly appreciated
    Regards,
    YAGHAG

    Hi Abhijit,
    Thanks for your prompt reply.
    I am implementing cprojects 4.5 in PLM 7.0 and not in PPM 5.0.
    Regards

Maybe you are looking for