Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

get ucomm from selection screen

Former Member
0 Likes
3,286

Hi all

I am facing this problem: I have a function module with a selection screen declared in top include. Code of function is simple:

CALL SELECTION SCREEN 13.
PERFORM query.

But user on selection screen can press F8 or ESC. How can I know which command has been sent?

I try to debug sy-ucomm, but it's empty both pressing F8 and ESC.

Can anyone help me please?

regards

Gabriele

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,858

As I said, I am in a FUNCTION MODULE so I cannot use AT SELECTION SCREEN statement.

And I already tested value of sy-ucomm.

thanks

Gabriele

7 REPLIES 7
Read only

0 Likes
1,858

Have you coded for them in your PF-STATUS?

For example F8 could be coded as the execute button and ESC as the exit button.

Read only

rahul_mahajan
Active Participant
0 Likes
1,858

Hi,

Please refere below code :

<Copy & paste content removed by moderator>

Moderator message : Warning! Copy & paste from other sources not allowed, this will lead to deletion of user-id

I hope this will help you.

Regards,

Rahul Mahajan

Edited by: Vinod Kumar on Nov 7, 2011 4:53 PM

Read only

former_member209703
Active Contributor
0 Likes
1,858

Have you included the event AT SELECTION-SCREEN to control the sy-ucomm? As far as I know the corresponding sy-ucomm for F8 is CRET and when you press ESC it comes empty.

Regards

Read only

Kiran_Valluru
Active Contributor
0 Likes
1,858

Hi,

You can write PERFORM query in Start-of-selection Event which executes when u press F8.

Or Check sy-ucomm = 'ONLI' for F8.

hope this helps u.,

Thanks & Regards,

Kiran

Read only

Former Member
0 Likes
1,859

As I said, I am in a FUNCTION MODULE so I cannot use AT SELECTION SCREEN statement.

And I already tested value of sy-ucomm.

thanks

Gabriele

Read only

0 Likes
1,858

I am in a FUNCTION MODULE so I cannot use AT SELECTION SCREEN statement.

Yes, you can.

Just place the event in a new include of the Function Group and it will be fired as usual.

Read only

0 Likes
1,858

GREAT

I was sure I tried to put it an include and it was not working, but probably I made a mistake and put it in function source. I put it in an include and it works: from sy-ucomm in AT-SELECTION SCREEN event I can see CRET when pressin F8.

Thank you very much

Regards

Gabriele