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: 

add icon on the top near F8 -first screen

Former Member
0 Kudos

i create simple prog, at the first screen i need to add icon near f8..

how can i do it???

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

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_0<i> 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 FC0<i> 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.

Here's an example:

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.

Hope it helps.

Regards,

Arnab.

4 REPLIES 4

Former Member
0 Kudos

Hi sikken,

are you talking about creating GUI Status ?

IF yes, then check this link,

http://help.sap.com/search/highlightContent.jsp

And check this link also, it will guide you to create Icons and buttons on GUI Status

http://help.sap.com/saphelp_nw70/helpdata/EN/d1/801cf5454211d189710000e8322d00/frameset.htm

Former Member
0 Kudos

Hi,

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_0<i> 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 FC0<i> 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.

Here's an example:

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.

Hope it helps.

Regards,

Arnab.

former_member229729
Active Participant
0 Kudos

Hi,

You need to create a PF-STATUS to your program and have to be assigned.

The <F8> can be assigned to the user defined Function-Code of the Status.

Rgds,

Ramani N.

Former Member
0 Kudos

Hi Sikkin,

adding the icons means first you go tranx code SE41 which called menu painter. here you have to create icon and save ,acitvate, comes to abap editor, here we need insert the code . you have to must call the events ..

Note : Menubar can uses to create a icons and toolbars,menubars

Thanks

Siva