Ok_code for next_line

Hi Everybody,
Can any of you experts tell me the ok_code for next line  in table control.
thanks,
Rajesh K.
Moderator message: Welcome to SCN!
Moderator message: please search for available information before asking.
[Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
[Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
Locked by: Thomas Zloch on Jun 10, 2011 1:56 PM

Hi
It depends on which program you're speaking about.
Anyway: usually there's no ok-code for next line, it's P+ for nex page.
Max

Similar Messages

  • No Ok_Code for scrolling in table control

    Hi,
      I m using Tcode FPP1 (PSCD module) for creating business
      partners while creating the industry type I have a table
      control where I need to entre values but when values are
      getting exceeded the table control does not scroll in batch
      input mode nor while recording it gave any kind of Ok_code
      for this.
    How do I now scroll I have tries '=P+' and '=PAUA_T' but it does not work can some one help on this.
    Thanks,
    Vaibhav B Gawali.

    You can try and put a Loop within your perform statements,at  poin where you need to do this scrolling.
    you can take help of a counter variable to keep track of you record and perfor m the scrolling operation.
    Say the screen can take 6 record at a time. you can initialise the couter CNT with value 1 and loop in this statement till the counter reaches 7. Once the counter reaches 7,you can perform BDC_CODE = 'P+' and reset the counter to 1 again.
    This is just a logic,you can implement it as per you code.
    Thanks n Regs,
    Bhavin

  • 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>

  • Dynamically generating Ok_Code for select option of HUMO t-code

    Hi Gurus ,
    I have used BDC call transaction method in my program to call the HUMO t-code and populating the handling unit in the select option . The ok_code of the select option is written in the program as :
    PERFORM bdc_field USING 'BDC_OKCODE'
                            '=%00120100000003011'.
    Now these ok_code value is changing inside the ECC landscape , In all Non-production system the value remains same but in the production system the ok_code value is different , because of this program is successfully executing in non-production but not in production .
    If anyone of you have come across situation like this , please help me how to help hold of this ok_code or can we generate in dynamically . For temporary solution i have coded it based on the system like shown below but I am looking for a permanent solution
    IF syst-sysid = 'EWP'.
        PERFORM bdc_field USING 'BDC_OKCODE'
                            '=%00120100000003011'.
      ELSE.
        PERFORM bdc_field USING 'BDC_OKCODE'    
                          '=%00120100000718796'.               
      ENDIF.
    Regards
    Anshuman

    Hi Gurus ,
    I have used BDC call transaction method in my program to call the HUMO t-code and populating the handling unit in the select option . The ok_code of the select option is written in the program as :
    PERFORM bdc_field USING 'BDC_OKCODE'
                            '=%00120100000003011'.
    Now these ok_code value is changing inside the ECC landscape , In all Non-production system the value remains same but in the production system the ok_code value is different , because of this program is successfully executing in non-production but not in production .
    If anyone of you have come across situation like this , please help me how to help hold of this ok_code or can we generate in dynamically . For temporary solution i have coded it based on the system like shown below but I am looking for a permanent solution
    IF syst-sysid = 'EWP'.
        PERFORM bdc_field USING 'BDC_OKCODE'
                            '=%00120100000003011'.
      ELSE.
        PERFORM bdc_field USING 'BDC_OKCODE'    
                          '=%00120100000718796'.               
      ENDIF.
    Regards
    Anshuman

  • 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

  • OK_CODE for screen 200

    Hi everyone,
    I have problem with serve screen number 200.
    First I call screen 100, when I push button I need to go to screen 200.
    I do that and everything is fine.
    Now on displayed screen 200 are two pushbuttons (B1, B2).
    When i push the button2 I want to back to screen 100, but only when i push B1 not B2.
    I think that I have to check ok_code varable in PAI 200 and I do that exactly.
    But in result ok_code seems to be empty.
    In PAI sreen's 100 it works fine.
    Please help..
    Regards
    Greg.

    Hi,
      REPORT demo_dynpro_subscreens.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: number1(4) TYPE n VALUE '0110',
          number2(4) TYPE n VALUE '0130',
          field(10) TYPE c, field1(10) TYPE c, field2(10) TYPE c.
    CALL SCREEN 100.
    MODULE status_100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    MODULE fill_0110 OUTPUT.
      field = 'Eingabe 1'(001).
    ENDMODULE.
    MODULE fill_0120 OUTPUT.
      field = field1.
    ENDMODULE.
    MODULE fill_0130 OUTPUT.
      field = 'Eingabe 2'(002).
    ENDMODULE.
    MODULE fill_0140 OUTPUT.
      field = field2.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE save_ok INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
    ENDMODULE.
    MODULE user_command_0110 INPUT.
      IF save_ok = 'OK1'.
        number1 = '0120'.
        field1 = field.
        CLEAR field.
      ENDIF.
    ENDMODULE.
    MODULE user_command_0130 INPUT.
      IF save_ok = 'OK2'.
        number2 = '0140'.
        field2 = field.
        CLEAR field.
      ENDIF.
    ENDMODULE.
    MODULE user_command_100 INPUT.
      CASE save_ok.
        WHEN 'SUB1'.
          number1 = '0110'.
        WHEN 'SUB2'.
          number1 = '0120'.
          CLEAR field1.
        WHEN 'SUB3'.
          number2 = '0130'.
        WHEN 'SUB4'.
          number2 = '0140'.
          CLEAR field2.
      ENDCASE.
    ENDMODULE.
    The next screen number of screen 100 is 100 (statically-defined). Its layout is as follows:
    There are four pushbuttons with the function codes SUB1 to SUB4, and two subscreen areas AREA1 and AREA2.
    In the same ABAP program, there are four subscreen screens 110 to 140. Each of these fits the subscreen area exactly. The layout is:
    The input/output field of all four subscreen screens has the name FIELD. The function codes of the pushbuttons on the subscreen screens 110 and 130 are OK1 and OK2.
    The screen flow logic for screen 100 is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE status_100.
      CALL SUBSCREEN: area1 INCLUDING sy-repid number1,
                      area2 INCLUDING sy-repid number2.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      MODULE save_ok.
      CALL SUBSCREEN: area1,
                      area2.
      MODULE user_command_100.
    The screen flow logic of subscreen screens 110 and 130 is:
    PROCESS BEFORE OUTPUT.
      MODULE fill_0110|0130.
    PROCESS AFTER INPUT.
      MODULE user_command_0110|0130.
    The screen flow logic of subscreen screens 120 and 140 is:
    PROCESS BEFORE OUTPUT.
      MODULE fill_0120|0150.
    PROCESS AFTER INPUT.
    When you run the program, a screen appears on which subscreens 110 and 130 are displayed. The pushbuttons on the main screen allow you to choose between two subscreen screens for each screen area. The pushbuttons on the subscreens allow you to transfer the data from subscreens 110 and 130 to subscreens 120 and 140.
    Since the same field name FIELD is used on all subscreens, the identically-named ABAP field is transferred more than once in each PBO and PAI event of the main screen. For this reason, the values have to be stored in the auxiliary fields FIELD1 and FIELD2 in the ABAP program.
    The pushbuttons on the subscreen screens have different function codes, and they are handled normally in an ABAP field. If the function codes had had the same names, it would again have been necessary to use auxiliary fields.
    Don't foget to reward if useful.....

  • Regarding sy-ucomm and ok_code

    hi experts,
    gud morning,
    i got something for sy-ucomm and ok_code....
    <b>answer:::</b>
    In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM <b>receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event.</b> Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTERS). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
    cud u plz explain the meaning of the bold part how can we see that the contents are also copied in the pbo side as done in pai.......
    null

    SAP recommends that in dialog program always use OK_Code instead of sy-ucomm. Here is what the help says
    In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:
    In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba99935c111d1829f0000e829fbfe/content.htm
    This is a long standing issue dating back many years. The general answer is that you control the OK_CODE field while SAP controls the SY-UCOMM field. You assign field OK_CODE to the OK code field in the screen painter and SAP copies SY-UCOMM to your OK_CODE field. Now you have control over the value. If you start invoking other code, like SAP utilities that display screens, you can be guaranteed that the value in OK_CODE will still be there, while you have no idea what SAP might be doing with SY-UCOMM.
    This is a design decision that was probably made about 20 years ago when screen processing was introduced. In most cases, you can probably use SY-UCOMM and not have any problems but there are probably cases out there where SAP has done something tricky and you will have a problem.
    Because there are unknowns out there, I always define an OK_CODE and do not use SY-UCOMM for standard screen processing. For me this is a long standing habit.
    OK_Codes are like function code for each button or for any action on the screen.
    When you press SAVE or when you Press some Button on the screen, your every action is recorded by using the OK_COde.
    for example for ENTER button it is '/00'.
    While you record BDC's using SHDB you will come to know all these OK codes.

  • Exit for va02 when line item is deleted

    Hi,
    I have requirement that in va02 when an item is selected and '-' (delete) button is pressed, it  should display error message :To enter reason for rejection" and not to delete the item.
    Can anyone help with what enhancement can be used user exit or something else. If user exit then which one to be used a i have tried several.
    Versio used is ECC 6
    thnks.

    put  debugger on .. search for an implicit enhancement whenever delete button is pressed..
    check for the tcode if va02 . then check for the ok_code for deletion..
    call a function module in that call a screen with i/p field on which user would type the reason..
    If you can display the reasons which are pre defined then you can use RS_VALUES_BOX function module and store the pre defined reasons in a Z table.

  • Regarding BDC for CO02

    Hi All,
    Iam facing a peculiar problem in BDC for CO02  for Collective orders. While recording, I have captured the ok_code for the Push button 'Read Order' . But while processing it , it stops exactly after displaying the list. Here I need to click manually on 'Read Order' to continue the processing. I think the problem comes because the list displayed is a ALV tree.Can anybody please suggest a solution if they faced it earlier.
    Please let me know if you need any details. Points will be rewarded to the useful answers.
    Thanks,
    Manjula.S

    HI Manjula
    I am facing a similar kind of issue to process the BDC for tree sture
    Please advice

  • BDC ok_code

    Hi,
      Please let me know BDC ok_code for scroll down functionality in ME21n. i tried using '=P+' it is not working.
    Please suggest.
    Thank you.
    Regards,
    venkatesh

    Hi Venkatesh,
    These are the list of available ok codes for scrolling .
    P- :  Back
    P-- : Scroll to previous page
    P+ :  Scroll to next page
    P++  Scroll to last page
    PL- : Scroll to first line in page
    PL-n : Scroll back n lines
    PL+ : Scroll to last line in page
    PL+n Scroll forward n lines
    PP- : Scroll back one page
    PP-n Scroll back n pages
    PP+ scroll forward one page
    PP+n : scroll forward n page
    PPn : Scroll to start of page n
    Ps- : Scroll to first column
    PS++ Scroll to last column
    Choos the one which suits your requirement.
    Regards
    Abhii

  • OK_CODE of Double Click Event

    Hi all,
    I have created one module pool ...
    Now when i check OK_CODE of double click event ( By debugging /H ) ,its showing SV. So is this Fix? means all program having same OK_CODE for double click because in my second module pool also it showing SV for Double Click...
    Thanks in advance....

    hi
    <b>yes it is fixed ie SV</b>
    regards'
    ravish
    <b>plz dont forget to reward if useful</b>

  • Double clikc on oo alv and trigger OK_CODE?

    I work with oo alv ,how to do it when I double clikc mouse then just like I push the detail button?
    what i want to do is when I double click mouse ,it works just like push the detail button on the toolbar , I did debug and get the function code just
    when i double click mouse , and I use
    CL_GUI_CFW=>SET_NEW_OK_CODE to do it ,but it not work as i wanted!
    in the class cl_gui_alv_grid the constants :
    constants MC_FC_DETAIL type UI_FUNC value '&DETAIL'. what is the ok_code for it ? i debug i and get the ok_code but it not work!
    can anyone give me some suggest ?

    Hi,
       Can you make your question a bit clear?
      Try to use events to perform double click

  • How can I get the table control up arrow or down arrow SCROLL OK_CODE?

    Dear All,
    I want get the table control up or down Scroll OK_CODE (not button, is arrow click), But I debugged have not found when I click the up or down scroll.
    Please give me some help.
    Thanks

    Hi Sun,
    PBO..
                               Loop with control T1.
                       module get_Looplines.
                    Endloop.
                        Module get_looplines.
                          Looplines = sy-loopc.      "<< by using this you can get the scroll bar...
                        Endmodule.
    if you wan the ok_code for scroll bar in table control...
    the ok_code is not generated for scroll bar..
    but if you do not clear the ok_code in PBO it will carries the ok_code when ever you press scroll bar up and down...same ok_code is repeated..
    Regards,
    Prabhudas

  • 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

Maybe you are looking for

  • Price Condition at the Header Level

    Dear SAPfans, Can we set the pricing procedure at the header level of sales order, i would like to configure the rounding mechanism work  on the header condition on the sales order, can it be done thru pricing procedure ?

  • SQL Developer 1.2 for Win hangs on startup

    Hi. I have a problem with starting SQL Developer (1.2, JRE included) on certain Windows XP machines - after closing the start-up extensions preferences dialogue window the interface hangs. A shadow of the dialogue window is still visible and the inte

  • Atg.xml.XMLFileException: contains no entity resource

    Hi, i got the below error after created a new repository in ATG , i added my repositoy with initial.properties atg.xml.XMLFileException: The XML file[file path] contains no entity resource names error. thanks 333

  • Accessing Security Cameras Remotely

    I have security cameras attached to a DVR. The DVR is plugged into my Airport Extreme. I have a static IP address from my ISP. I am vaguely aware that I need to assign the DVR a local IP address and use port forwarding to access the DVR remotely. How

  • Can I restore lost Reminders from a backup?

    Hi, After recently setting up my sync via iCloud for Calendars, I noticed today that all my Reminders have disappeared in this process. I looked on my iPad, also set up to sync, and it tantalisingly flashed up all my old Reminders when I opened that