04-28-2010 11:28 AM
Hi Experts,
I have some function code of the Menu's created ,and some funtion created at the tool bar level.
How can i know that the Function code if triggered from the Menu.
Regards.
04-28-2010 11:34 AM
Hi,
Use system variable sy-ucomm.
Then put Case sy-ucomm and keep break-point where your function code triggers.
You will understand.
Regards and Best wishes.
04-28-2010 11:34 AM
Hi,
Use system variable sy-ucomm.
Then put Case sy-ucomm and keep break-point where your function code triggers.
You will understand.
Regards and Best wishes.
04-28-2010 11:37 AM
Thnaks, In my case i have same SY-UCOMM for both, But i want to differentiat it,because i need to do some validation if it is triggered from Menu
04-28-2010 11:41 AM
Hi,
Try maintain different function codes.
Example in your menu if you have menuitem has function code is '+FCO1'.
Then in the program write:
Case sy-ucomm.
when '+FCO1'
write your logic.
endcase.
Regards and Best wishes.
04-28-2010 11:43 AM
If i understand correctly you want to check whether the UCOMM is triggered from the application tool bar or the menu bar. Correct ? I don't see any way of doing this.
BTW what exactly is your business requirement ?
BR,
Suhas
04-28-2010 11:50 AM
OK i will try to explain it more clearly,
I have a tree,and the User can see the data of node of the tree from a button that is placed in its tool bar.
But if the user tries to see the data using the Menu I need to validate if some node is selected.
For this i would need to differentiate wheather it is clicked from Tool Bar or Menu Item
04-28-2010 11:59 AM
Hi, Raz
I am agree with Saha i think there is no way with having Same F-Codes, for this you will have to assign different code to Menu and Toolbar.
Thanks and Best Regards,
Faisal