Application Development 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: 

USER COMMAND

Former Member
0 Kudos

DEAR FRIENDS,

WHAT IS USER COMMAND ? WHAT'S ITS USE ? HOW TO USE THIS IN APPLICATION, IS WE USE MORE THAN ONE TIME IN THE SAME APPLICATION.

THANK U.

4 REPLIES 4

Former Member
0 Kudos

User Command, is the function code attached to the puchbuttons or any button you press on the screen.

Based on the user command value.. we program the code so that.. if the user presses one button for help.. she shoulf get help screen. else if he presses save button the data should be saved in the database table or any such actions

kiran_k8
Active Contributor
0 Kudos

Reena,

At User Command facilitates the action needs to be taken on clicking a particular button.

K.Kiran.

Former Member
0 Kudos

hi,

user command are the the functions that got triggered when the user click on some keys.... and do some job as writen the program logic we use user command to make the program <b>more customize</b> so that he has more option of his own we can use more it more than one time in an particular screen but only thing is that we must write the logic for that.

if this helps u reward points

ravi

Former Member
0 Kudos

Hi reena

User command is basically related to the user intereaction,for suppose in a output list of report you want to do some more manipulations,there your interaction with the screen will be taken care by the event at user command.

and also you will have to assign name for the user command say like u have to print the list for this you are putting one print button.

This you will be designing in the menu painter where u l set the pf-status and maintain this command.

a basic example here for ur reference.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = v_repid

i_callback_user_command = 'USER_COMMAND' <-----here you will give command

is_layout = wa_layout

it_fieldcat = i_fcat

i_default = c_chk

i_save = c_save

is_variant = wa_variant

it_events = i_events

is_print = wa_print

TABLES

t_outtab = i_table

EXCEPTIONS

program_error = 1

OTHERS = 2

Form user_command using rs_selfield type slis_selfield

case sy-ucomm.

when 'PRINT'

print the list.

when 'exit'

leave program.

endcase.

hope its clear

Reward poitns if ehlpful.

Regards

Zarina