02-18-2008 12:52 PM
Dear all,
I found several messages at the forum to this problem but no one solved my problem:
We defined a customer subscreen on a tab at QM - Change notification (TA qm01/qm02).
At the customer subscreen there is a function code defined to add and delete lines to an alv list. Everything works fine, except that the funktion code at sy-ucomm is kept alive. Means: If I trigger the function, clear it after processing the code and hit i.e. "Enter" the old funtioncode is used again. The code is only cleared if I switch to another tab.
I tried several ways to clear the code of the main report but everytime I'm leaving my subscreen module and come to the mainreport the sy-ucomm is filled again.
Any ideas?
Thank you!
Klaus
02-20-2008 8:55 PM
Hi,
i´ve used this and it worked for me:
In module user_command_0100 of PAI
* Here i get the OK-CODE of the main screen
CONSTANTS: c_okcode(17) TYPE c VALUE '(SAPLMR1M)OK-CODE'.
DATA: wa_okcode TYPE sy-ucomm.
CLEAR wa_okcode.
FIELD-SYMBOLS: <fs_okcode> TYPE any.
ASSIGN (c_okcode) TO <fs_okcode>.
data: l_okcode like sy-ucomm.
clear l_okcode.
l_okcode = <fs_okcode>.
IF l_okcode = 'DOSOMETHING'.
perform do_something.
To initialize the OK-CODE of the main screen
clear l_okcode.
<fs_okcode> = l_okcode.
ENDIF.
Best regards.
11-01-2020 9:43 AM
10-01-2010 8:13 PM
Hi Vince,
Try this way:
FIELD-SYMBOLS: <fs_ucomm> TYPE t185f-fcode.
ASSIGN: ('(SAPLIQS0)OK-CODE') TO <fs_ucomm>.
IF <fs_ucomm> IS ASSIGNED.
CLEAR: <fs_ucomm>.
ENDIF.
Regards,
Paganini
10-01-2010 8:15 PM
Hi Vince,
Try this way:
FIELD-SYMBOLS: <fs_ucomm> TYPE t185f-fcode.
ASSIGN: ('(SAPLIQS0)OK-CODE') TO <fs_ucomm>.
IF <fs_ucomm> IS ASSIGNED.
CLEAR: <fs_ucomm>.
ENDIF.
Regards,
Paganini
06-05-2013 9:05 AM
It's not necessary to do this if function code begins by '$$'.
Best regards,
Josep
11-13-2019 12:30 PM