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

calling a screen at pushbutton in selection screen

Former Member
0 Likes
2,044

hii all,

please provide me the suitable code for calling a screen on pushbutton in selection screen....

thanks

babbal

7 REPLIES 7
Read only

Former Member
0 Likes
1,113
case sy-ucomm.
when 'ABC'"your push button function code
call screen <number>.
endcase.
Read only

peter_ruiz2
Active Contributor
0 Likes
1,113

hi,

use this CALL SELECTION-SCREEN <screen number> STARTING AT 10 5 or this CALL SELECTION-SCREEN <screen number>

regards,

Peter

Read only

Former Member
0 Likes
1,113

Hi,

Provide one function code at the push-button level assume that as 'PUSH'.

In the program level

trigger the event

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'PUSH'.

CALL SCREEN <screen number>.

endcase.

Read only

Former Member
0 Likes
1,113

Hi,

I hope the below link can help you.

Thanks,

Khushboo.

Read only

former_member451655
Active Participant
0 Likes
1,113

hi ,

AT SELECTION-SCREEN.

CASE sscrfields-ucomm.

WHEN 'FC01'.

Call screen 100.

ENDCASE.

cheers ,

Dilum

Read only

Former Member
0 Likes
1,113

TABLES: SSCRFIELDS.

TYPE-POOLS ICON.

DATA: FUNCTXT TYPE SMP_DYNTXT.

PARAMETERS: P_VBELN LIKE VBAK-VBELN.

SELECTION-SCREEN: FUNCTION KEY 1.

INITIALIZATION.

FUNCTXT-ICON_ID = ICON_NEXT_OBJECT.

FUNCTXT-ICON_TEXT = 'PUSHBUTTON'.

SSCRFIELDS-FUNCTXT_01 = FUNCTXT.

AT SELECTION-SCREEN.

CASE SSCRFIELDS-UCOMM.

WHEN 'FC01'.

CALL SCREEN 100.

ENDCASE.

regards,

prakash reddy .s

Read only

0 Likes
1,113

1. Create your custom button by copying standard GUI Status and add below code

Pass 'SET_PF_STATUS' and 'USER_COMMAND' to the FM as below:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

i_callback_pf_status_set = 'SET_PF_STATUS'

i_callback_user_command = 'USER_COMMAND'

is_layout = lwa_layout

it_fieldcat = ti_fieldcat[]

TABLES

t_outtab = gi_output[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

FORM set_pf_status USING rt_extab TYPE slis_t_extab.

SET PF-STATUS 'STANDARD'.

ENDFORM.

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN 'Your condition'.

ENDCASE.

ENDFORM.