2012 Jun 06 7:25 AM
Hi Gurus,
I am facing a problem in dialog programming taht the value of ok_code(sy-ucomm) is dynammic it keep on changing.
I m not able to capture the value of ok_code in when case,value of ok_code is comming from standard class.
plz help.
<removed by moderator>
Message was edited by: Thomas Zloch
Hi Gurus,
I am facing a problem in dialog programming taht the value of ok_code(sy-ucomm) is dynammic it keep on changing.
I m not able to capture the value of ok_code in when case,value of ok_code is comming from standard class.
plz help.
<removed by moderator>
Message was edited by: Thomas Zloch
2012 Jun 06 7:40 AM
Hi,
mention senario where you not able to get OK_CODE,,,in PAI of your screen?,,,,,provide some light with code,,,,
thank and regards
2012 Jun 06 7:46 AM
Hi Lingaraj,
In my scenario if I am on same session then the value of ok_code is same .
but If i logout of the server and logged in again its value is changed.
Its also happening in Standard SAP program - salv_demo_tree_functions
debug find button on ALV tree control and check out value of sy-ucomm.
then log out from the server and again check the value of sy-ucomm.
You can see from there that value of sy-ucomm is changed.
2012 Jun 06 7:41 AM
Hi Abhinav,
Is your module pool program a custom one? If so, you can assign a function code to that FIND button and then use it as your ok_code. If not, try using the event on click for the FIND button.
Hope this helps you.
Regards,
Sindhu Pulluru.
2012 Jun 06 7:54 AM
Hi Abhinov,
Can you explain the problem a bit clearly please.
And is your Module Pool a Custom Designed.
Regards.
2012 Jun 06 8:02 AM
Hi Rohan,
Yes its a customised design and the value of ok_code is coming from sap standard functionality of find button.
And rest of scenario I have explained above.
2012 Jun 06 8:09 AM
HI Abhi,
First Make sure u have given Function Code for each Button,
also check in Element List Tab which is previous to Flow Logic tab whether you have mentioned the OK_CODE. in last row.
Regards.
2012 Jun 06 8:16 AM
2012 Jun 06 8:20 AM
Hi Jake,
That Function code is dynamically changing i.e Sy-Ucomm.
2012 Jun 06 8:26 AM
Hey Jake,
Function Code is nothing but a code which represent a particular Button.
2012 Jun 06 8:29 AM
Hey Abhi,
Do like This,
Data ok_code like sy-ucomm.
in top include.
in PAI.
Case Ok_code.
When 'Function Code' (I hope you have checked it)
Business Logic.
2012 Jun 06 8:43 AM
I think you don't get my question or my question is not clear?
What I mean is, what is the function code of the standard FIND button? Is it '%SC'?
Regards,
Jake
2012 Jun 06 9:15 AM
Hi Jake and Rohan,
The Possible values of Sy-Ucomm are as follows:
when '%_GC 117 1' or '%_GC 131 1' or '%_GC 132 1' or '%_GC 133 1'
or '%_GC 150 1' or '%_GC 152 1'.
I have put or condition but its value can again change and it would not work.
Also hardcoding is not good practice.
Hope u ppl got the thing right.
2015 Dec 28 10:48 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |