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

Selection-screen?

Former Member
0 Likes
772

Hi all,

I need to create a push-button on selection screen.

If i click that button ...i have to open a POP-UP?

Kishi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
743

Hi,

Use:

SELECTION-SCREEN PUSHBUTTON /10(20) PUSH USER-COMMAND 'ABC'.

you can give name to PUSH in initialization or change at rub-time.

and at selection-screen.

if sy-ucomm eq 'ABC'

call fm pop up

endif.

Thanks

Sandeep

Reward if helpful:)

7 REPLIES 7
Read only

Former Member
0 Likes
743

Hi,

Use this function module 'POPUP_TO_SEARCH_VALUE'.

Reward pls

Read only

Former Member
0 Likes
743

check the program : demo_sel_screen_pushbutton

search in se37 with 'popup_to_*' there are several. u can chose one.

<b><u>please Dont Forget to award points if useful</u></b>

Sudheer

Read only

alex_m
Active Contributor
0 Likes
743

Create a push button using syntax.

SELECTION-SCREEN PUSHBUTTON fmt name USER-COMMAND ucom.

Then if the user command is clicked, call any pop up function u wnat like POPUP_CONTINUE_YES_NO.

Read only

Former Member
0 Likes
743

hi kishore,

for creating push button use this,

'

PUSHBUTTON 2(10) but1 USER-COMMAND cli1,

PUSHBUTTON 12(10) text-020 USER-COMMAND cli2,

for popup use the function mod

DATA: P_TITLEBAR TYPE STRING VALUE 'Report',

P_QUESTION TYPE STRING VALUE 'Do you Wish to Update in Database Table ? '.

  • P_ANSWER TYPE STRING.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

TITLEBAR = P_TITLEBAR

TEXT_QUESTION = P_QUESTION

DEFAULT_BUTTON = '1'

IMPORTING

ANSWER = P_ANSWER.

IF P_ANSWER EQ '2'.

LEAVE PROGRAM.

EXIT.

ELSEIF P_ANSWER EQ 'A'.

CLEAR P_ANSWER.

CALL SELECTION-SCREEN 1000.

ENDIF.

With Regards,

S.Barani

Read only

Former Member
0 Likes
743

hi kishor,

just check the following code,

TABLES sscrfields.

DATA flag(1) TYPE c.

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.

MESSAGE i888(sabapdocu) WITH text-001 sscrfields-ucomm.

CASE sscrfields-ucomm.

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.

regards,

seshu.

Read only

Former Member
0 Likes
744

Hi,

Use:

SELECTION-SCREEN PUSHBUTTON /10(20) PUSH USER-COMMAND 'ABC'.

you can give name to PUSH in initialization or change at rub-time.

and at selection-screen.

if sy-ucomm eq 'ABC'

call fm pop up

endif.

Thanks

Sandeep

Reward if helpful:)

Read only

Former Member
0 Likes
743

Hi Kishore,

YOu have to create the push-button on the pf-status. Create your pf-status and write the command "Set pf-status 'ZZZ' in your program. If you double click on the pf-status name "ZZZ", it will take you to the editor where you can place your push-button. Assign a function code to your push-button. Save and activate the pf-status.

Then, in the report, use the event AT USER-COMMAND . there write following piece of code.

case sy-ucomm.

when '<fcode>'.

logic....(Here call FM 'POPUP_TO_SEARCH_VALUE' to pop-up the screen. enter popup* in se37 to search other relavant Fm. )

endcase.

Hope this helps.

Pls reward some points if helpful.

Regards,

Karan