2014 Jan 27 6:45 AM
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
2014 Jan 27 8: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
2014 Jan 27 7:08 AM
2014 Jan 27 7: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
2014 Jan 27 7: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
2014 Jan 27 7:43 AM
Hi Sneha,
The statement CLEAR sy-ucomm is commented in Module TC_PERMITS_USER_COMMAND did you check un commenting.
More over the standard program SAPLIQS0 is getting called after Processing the Module TC_PERMITS_USER_COMMAND rite? the code for CASE sy-ucomm should be in PAI module TC_PERMITS_USER_COMMAND where have you put it?
check the sequence in which the codes are being called.
Regards,
Santhosh Yadav
2014 Jan 27 7:58 AM
I am copying ok_code to sy-ucomm and ok_code is cleared inside the module TC_PERMITS_USER_COMMAND which is as good as clear sy-ucomm.
Yes, this module is in PAI event
2014 Jan 27 7: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.
2014 Jan 27 8:01 AM
In screen exit, I have created new screen which does not allow me to add ok_code to element list.
See below,
Rest all field are editable except Ok_code
2014 Jan 27 8:14 AM
Sneha,
This seems to be related to screen sequence groups associated with such transactions.
I think you can solve it by customizing screen sequences using transaction VFBS.
Check this thread which provides the solution on a similar situtation.
You could also check this thread.
Hope that will solve your issue.
2014 Jan 27 8: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
2014 Jan 27 8:47 AM
I_TABCD holds '10\TAB02' which is fcode value of my new tab.
Screenshot of VFBS
I had tried by putting Z8ISSUE in Next location-Fucntion code as per the link suggested above. But, not working.
2014 Jan 27 12:02 PM
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.
2014 Jan 27 10:29 AM
2014 Jan 27 12:34 PM
Thanks all.
Found solution at Clearing sy-ucomm in subscreen | SCN