Skip to Content
author's profile photo Former Member
Former Member

SY-UCOMM holds old function code

Hi,

I have implemented screen exit for IW21 transaction where user can assign permits to notifications. I have added it as a new tab. Problem is when I click on any pushbutton in my screen, it works fine. Next, when I just simply press 'ENTER' key of keyboard, in PAI sy-ucomm holds old value which I had pressed earlier. I have cleared value of sy-ucomm before exiting screen exit. Though, it takes old value, as soon as it enters the standard code.

Regards,

Sneha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    Posted on Jan 27, 2014 at 08:22 AM

    Hi Sneha

    The enhancement has an exit EXIT_SAPMIWO0_008 to transfer data to subscreen. This FM has a parameter I_TABCD... What value does it hold each time..?

    Yes please check screen sequence which Sushmita has mentioned above. Most like this can be the cause. In screen sequence you have to maitnain the OK codes as you have some buttons on custom tab.

    Nabheet

    Add a comment
    10|10000 characters needed characters exceeded

    • Have you made the required entries in T185* table?

      If still not working, try to clear it this way.

      FIELD-SYMBOLS: <fs_okcode> TYPE any.

      data : save_ok type sy-ucomm.

      CONSTANTS: c_okcode(17) TYPE c VALUE '(SAPLIQS0)OK-CODE'.

      ASSIGN: (c_okcode) TO <fs_okcode>.

      IF <fs_okcode> IS ASSIGNED.

      save_ok = <fs_okcode> .

      if save_ok = 'Z8IS'.

      * Do processing

      endif.

      * To clear the ok code.

      CLEAR: <fs_okcode>.

      ENDIF.

  • Posted on Jan 27, 2014 at 07:48 AM

    HI Sneha,

    It is not wise to clear system fields like sy-ucomm.

    Instead you use another variable to use the ok code and the following logic.

    DATA: ok_code LIKE sy-ucomm,
    save_ok LIKE sy-ucomm.


    and in the PAI.


    MODULE user_command_100 INPUT.

    save_ok = ok_code.
    CLEAR ok_code.

    CASE save_ok.
    WHEN...
    ...
    ENDCASE.

    ENDMODULE.


    where ok_code is the ok code declaration in your screen.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 07:08 AM

    post screen shots of the new tab added. and source code.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 07:09 AM

    Hi Sneha,

    If my understanding is correct, it is not that it holds the old value, your new sy-ucomm value 'ENTER' is not getting picked or called in PAI. Please check the pf-status of the screen.

    Or can you please explain the issue briefly again.

    Regards,

    Santhosh Yadav

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 07:22 AM

    Hi,

    I am clearing SY-UCOMM in my exit(SAPLXQQM), after all the corresponding steps are executed for that function code.

    But, as soon as it enters standard code(SAPLIQS0), it again gets old value which I don't want.

    Now, if I press 'Enter' key after this, it will hold same sy-ucomm(Z*ISSUE) value because of which wrong code is getting executed.

    I can't add PF-status, as this is a subscreen. Screen exit does not allow normal screen.

    Regards,

    Sneha


    Capture1.PNG (47.8 kB)
    Capture2.PNG (43.3 kB)
    Capture3.PNG (32.3 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 10:29 AM

    Any update guys?

    Regards,

    Sneha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 12:34 PM

    Thanks all.

    Found solution at Clearing sy-ucomm in subscreen | SCN

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.