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

user command

Former Member
0 Likes
1,060

hi

how to use the user command in report.i have used in alv format.but i need in report

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,032

Hi,

START-OF-SELECTION.

SET PF-STATUS."where you assign the various function code to keys 

AT USER-COMMAND."in this event you capture the event triggered by the user.

CASE SY-UCOMM. "this will give the  function code of the respective keys or the action performed 
WHEN ' <function code assigned above during setting of the PF STATUS>'.
ENDCASE.

Hope this will help you.

Pooja

8 REPLIES 8
Read only

0 Likes
1,032

Hi,

Use SET SET PF-STATUS < >.

After setting PF-Status.

Use AT USER-COMMAND.

Regards,

Surendar Reddy.

Read only

Former Member
0 Likes
1,032

Check this program ... DEMO_LIST_MENU_PAINTER

Read only

Former Member
0 Likes
1,032

Hi,

You have to use

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN ' '

.......

WHEN ' '

........

ENSCASE.

Regards,

jaya

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
1,032

Hi,

You can use it this way:-


START-OF-SELECTION.
  SET PF-STATUS 'ZPF_STAT'.
  "select query to fill the internal table

AT USER-COMMAND.
  CASE SY-UCOMM.
    WHEN '<f_code1>'.
      "code
    WHEN '<f_code2>'.
      "code
    WHEN '<f_code3>'.
      "code
    WHEN OTHERS.
      "code
  ENDCASE.

Hope this helps you.

Thanks & Regards,

Tarun

Read only

Former Member
0 Likes
1,032

Hi,

Go through this link:

[http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/content.htm]

You will get everything, even how to implement.

Regards.

Read only

Former Member
0 Likes
1,032

Hi,

Use like this

SET PF-STATUS.

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN '<f_code>'.

code

WHEN OTHERS.

ENDCASE.

Regards,

Jyothi CH.

Edited by: Jyothi Chinnabathuni on Feb 27, 2009 9:37 AM

Read only

Former Member
0 Likes
1,033

Hi,

START-OF-SELECTION.

SET PF-STATUS."where you assign the various function code to keys 

AT USER-COMMAND."in this event you capture the event triggered by the user.

CASE SY-UCOMM. "this will give the  function code of the respective keys or the action performed 
WHEN ' <function code assigned above during setting of the PF STATUS>'.
ENDCASE.

Hope this will help you.

Pooja

Read only

Former Member
0 Likes
1,032

Hi,

Check the below code,

Write the set pf-status under start-of-selection,

In the set pf-status under the function keys give

F2 Pick Choose.

u can validate the at line-selection by taking..

At line-selection.

case sy-lsind.

when 1.

message....

when 2.

message....

endcase.

similarly, for At user-command.

case sy-ucomm.

when 'back'.

message...

when...

endcase.

Regards,

Anki reddy