‎2019 Nov 13 7:32 AM
I added a button to IW32/33 in the Enhancement tab to display a report upon button click. Once the user has seen the report and returns to the order and makes presses ENTER button, the program redirects back to the report. How do I curb this? I tried clearing SY-UCOMM in the PBO but that didn't work as in the PAI upon pressing ENTER the previous SY-UCOMM appears again.
‎2019 Nov 13 10:58 AM
I used the solution provided in the blow link and it worked perfectly.
https://answers.sap.com/questions/3641107/clearing-syucomm-in-subscreen.html
‎2019 Nov 13 7:37 AM
When you press your button, you need to clear the content of this variable before calling your report
‎2019 Nov 13 7:54 AM
‎2019 Nov 13 7:58 AM
should be something like that
Case sy-ucomm.
when 'Blabla'.
call screen 101 ..
when 'YourCommand'.
call transaction .... and return.
(or submit)
endcaseso before this, just do a
when 'YourCommand'.
clear sy-ucomm.
call transaction .... and return.
‎2019 Nov 13 8:07 AM
I have already done this.
My problem is that sy-ucomm get populated with the previous sy-ucomm value even though it is cleared.
It's cleared both at PBO and PAI but it still captures the previous value on pressing ENTER.
‎2019 Nov 13 8:55 AM
Because SY-UCOMM is not set to empty when Enter is pressed (normal behavior), SAP recommends to use the "OK field" of the dynpro, i.e. use a custom global variable.
‎2019 Nov 13 10:58 AM
I used the solution provided in the blow link and it worked perfectly.
https://answers.sap.com/questions/3641107/clearing-syucomm-in-subscreen.html
‎2019 Nov 13 3:06 PM
So, you mean clearing the OK field via dirty ASSIGN (so that to reach the OK field of the standard program).
‎2019 Nov 13 3:07 PM
This is not a solution ... I hope you have a code-review team to check that
‎2019 Nov 14 5:36 AM
Sandra Rossi & Frederic Girod: If either of you has a better solution do let me know.