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: 

in selection screen

Former Member
0 Kudos
176

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'.

hey in the above program , how to keep the icons and text for the push buttons using the structure smp_dyntxt.

its very urgent . help me out.

6 REPLIES 6

Former Member
0 Kudos
68

Hi,

try like this.

TABLES sscrfields.

TYPE-POOLS:icon.

PARAMETERS: p_carrid TYPE s_carr_id,

p_cityfr TYPE s_from_cit.

SELECTION-SCREEN: FUNCTION KEY 1,

FUNCTION KEY 2.

INITIALIZATION.

CONCATENATE ICON_CHECKED 'LH' INTO sscrfields-functxt_01 separated by space.

CONCATENATE ICON_INCOMPLETE 'UA' INTO sscrfields-functxt_02 separated by space.

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'.

rgds,

bharat.

0 Kudos
68

hi

thank u , for giving that answer.

and can u tell me how to use that structure smp_dyntxt along with the function key.

0 Kudos
68

hi

thank u , for giving that answer.

and can u tell me how to use that structure smp_dyntxt along with the function key.

Former Member
0 Kudos
68

Hi,

There is no need to check another structure,,

in your current program ,do the following changes,

INITIALIZATION.

sscrfields-functxt_01 = '@o1@' " give icon id.

sscrfields-functxt_02 = '@02@'.

Regards,

Talwinder

Former Member
0 Kudos
68

Hi,

see the example.

REPORT DEMO.

TABLES SSCRFIELDS.

DATA FLAG.

SELECTION-SCREEN:

BEGIN OF SCREEN 500 AS WINDOW TITLE TIT,

BEGIN OF LINE,

PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1,

PUSHBUTTON 12(10) TEXT-020 USER-COMMAND CLI2,

END OF LINE,

BEGIN OF LINE,

PUSHBUTTON 2(10) BUT3 USER-COMMAND CLI3,

PUSHBUTTON 12(10) TEXT-040 USER-COMMAND CLI4,

END OF LINE,

END OF SCREEN 500.

AT SELECTION-SCREEN.

CASE SSCRFIELDS.

WHEN 'CLI1'.

FLAG = '1'.

WHEN 'CLI2'.

FLAG = '2'.

WHEN 'CLI3'.

FLAG = '3'.

WHEN 'CLI4'.

FLAG = '4'.

ENDCASE.

START-OF-SELECTION.

TIT = 'Four Buttons'.

BUT1 = 'Button 1'.

BUT3 = 'Button 3'.

CALL SELECTION-SCREEN 500 STARTING AT 10 10.

CASE FLAG.

WHEN '1'.

WRITE / 'Button 1 was clicked'.

WHEN '2'.

WRITE / 'Button 2 was clicked'.

WHEN '3'.

WRITE / 'Button 3 was clicked'.

WHEN '4'.

WRITE / 'Button 4 was clicked'.

WHEN OTHERS.

WRITE / 'No Button was clicked'.

ENDCASE.