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

AT USER COMMAND is not getting triggerd

former_member190178
Participant
0 Likes
878

Hi Techie's

I have two fields on the selection screen

1) Name: ___________

2) Id: ___________

I have some buttons say on the Application toolbar say::

Save Delete Modify Exit

I have created these buttons in the INITIALIZATION event.

I am using AT Selection Screen OUTPUT for some logic purpose.

Later I am writing AT USER COMMAND and pressing SAVE The function code for SAVE is "SAV".

But the drama is that AT USER COMMAND is not getting triggered at all.

It goes first to Initialization--->At selection Screen OUTPUT


>Then screen appears
> I give the values and press the SAVE button
--


again it goes to the At Selection screen OUTPUT.

Not even getting the hang of it. Please help if anybody know the story of it.

ITS SO URGENT.

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
733

At user command is for list processing, you need something like this:

Pushbuttons in the Application Toolbar

In the application toolbar of the standard GUI status of the selection screen, five pushbuttons are predefined with the function codes FC01 to FC05, but are inactive by default. You can activate them during the definition of the selection screen as follows:

SELECTION-SCREEN FUNCTION KEY i.

The numbering i must be between 1 and 5. The individual function texts must be assigned to the functxt_0i components of structure sscrfields before the selection screen is called. You must declare this structure as an interface work area using the TABLES statement.

If the user chooses one of these buttons, the runtime environment triggers the AT SELECTION-SCREEN event and the function code FC0i is placed into the component ucomm of the structure sscrfields.

After the AT SELECTION-SCREEN event has been processed, the system displays the selection screen again. The only way to exit the selection screen and carry on processing the program is to choose Execute (F8). Consequently, the pushbuttons on the application toolbar are more suitable for controlling dynamic modifications of the selection screen than for controlling the program flow.

REPORT demo_sel_screen_function_key.

TABLES sscrfields.

PARAMETERS: p_carrid TYPE s_carr_id,

p_cityfr TYPE s_from_cit.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.

INITIALIZATION.

sscrfields-functxt_01 = 'LH'.

sscrfields-functxt_02 = 'UA'.

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

WHEN'FC01'.

p_carrid = 'LH'.

p_cityfr = 'Frankfurt'.

WHEN 'FC02'.

p_carrid = 'UA'.

p_cityfr = 'Chicago'.

ENDCASE.

START-OF-SELECTION.

WRITE / 'START-OF-SELECTION'.

This defines a standard selection screen with two parameters. In the application toolbar, two pushbuttons are assigned the texts LH and UA and activated.

When the user clicks one of the buttons, the AT SELECTION-SCREEN event is triggered and there the input fields are preassigned correspondingly.

1 REPLY 1
Read only

Sm1tje
Active Contributor
0 Likes
734

At user command is for list processing, you need something like this:

Pushbuttons in the Application Toolbar

In the application toolbar of the standard GUI status of the selection screen, five pushbuttons are predefined with the function codes FC01 to FC05, but are inactive by default. You can activate them during the definition of the selection screen as follows:

SELECTION-SCREEN FUNCTION KEY i.

The numbering i must be between 1 and 5. The individual function texts must be assigned to the functxt_0i components of structure sscrfields before the selection screen is called. You must declare this structure as an interface work area using the TABLES statement.

If the user chooses one of these buttons, the runtime environment triggers the AT SELECTION-SCREEN event and the function code FC0i is placed into the component ucomm of the structure sscrfields.

After the AT SELECTION-SCREEN event has been processed, the system displays the selection screen again. The only way to exit the selection screen and carry on processing the program is to choose Execute (F8). Consequently, the pushbuttons on the application toolbar are more suitable for controlling dynamic modifications of the selection screen than for controlling the program flow.

REPORT demo_sel_screen_function_key.

TABLES sscrfields.

PARAMETERS: p_carrid TYPE s_carr_id,

p_cityfr TYPE s_from_cit.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.

INITIALIZATION.

sscrfields-functxt_01 = 'LH'.

sscrfields-functxt_02 = 'UA'.

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

WHEN'FC01'.

p_carrid = 'LH'.

p_cityfr = 'Frankfurt'.

WHEN 'FC02'.

p_carrid = 'UA'.

p_cityfr = 'Chicago'.

ENDCASE.

START-OF-SELECTION.

WRITE / 'START-OF-SELECTION'.

This defines a standard selection screen with two parameters. In the application toolbar, two pushbuttons are assigned the texts LH and UA and activated.

When the user clicks one of the buttons, the AT SELECTION-SCREEN event is triggered and there the input fields are preassigned correspondingly.