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

Module pool

Former Member
0 Likes
850

Hi friends , i want to give push button in my screen . when ever i press F8 , it has to work . how to do it ? Please respond me.

Regards

Ajay

1 ACCEPTED SOLUTION
Read only

varma_narayana
Active Contributor
0 Likes
825

Hi..

While creating the GUI status in SE41.

Create a Button on the Application toolbar.

Assign the Fcode EG: 'EXEC'. and Function Text : <Label>

After that it will prompt you to select the Function Key .

<b>There you assign the F8 as the Function key for this button.</b>

So it will be selected either by clicking or pressing F8.

<b>reward if Helfpul.</b>

8 REPLIES 8
Read only

Former Member
0 Likes
825

Hi,

you have to assign the function code for that code

and after that

in the pai event you have to write a module

module user_clik.

then

case sy-ucomm.

when 'CLIK'.

concatenate 'you have cliked the button' sy-ucomm into v_char.

  • declare this v_char.

endcase.

thanks & regards,

Venkatesh

Read only

0 Likes
825

Hi venkatesh , thanks for your response . but i want to select the push button by clicking on that as well as by selecting F8 also it has to work . if you know the aswer please help me.

Regards

Ajay

Read only

Former Member
0 Likes
825

HI TRY THIS CODE

data: v_char(100) type c.

CALL SCREEN 1.

&----


*& Module USER_COMMAND_0001 INPUT

&----


  • text

----


module USER_COMMAND_0001 input.

CASE SY-UCOMM.

WHEN 'CLIK'.

CONCATENATE 'YOU HAVE CLIKED ' SY-UCOMM INTO V_CHAR SEPARATED BY SPACE.

WHEN OTHERS.

LEAVE TO SCREEN 0.

ENDCASE.

endmodule. " USER_COMMAND_0001 INPUT

thanks & regards,

Venkatesh

Read only

0 Likes
825

hi,

define one push button with function code 'ENTER' or whatever u want.

then in PAI enter code...

CASE SY-UCOMM.

WHEN 'ENTER' OR 'EXEC'.

  • CALL SCREEN '100'

..

..

..

..

..

ENDCASE.

it wl work for both button F8 and user difine.

regards,

Paras

Read only

Former Member
0 Likes
825

HI,

do like this.

write the same code form the function ocde pf the button and in the event AT PF08(this is for function key F8).here 08 indicate code for F8.

at PF08.

<b>assigning function key F8(some codes like this say F3 are reserved) is not possible for the function code of the button.</b>

write:/ 'abcd'.

................

case okcode.

when 'BUTT'.

write:/ 'abcd'.

................

endcase.

<b>reward if helpful</b>

rgds,

bharat.

Read only

Former Member
0 Likes
825

hi ajay

<b>

while creating gui status assign a function key to the button in the Function Keys by expanding it.it will be done</b>

regards

ravish

<b>reward points if useful</b>

Read only

varma_narayana
Active Contributor
0 Likes
826

Hi..

While creating the GUI status in SE41.

Create a Button on the Application toolbar.

Assign the Fcode EG: 'EXEC'. and Function Text : <Label>

After that it will prompt you to select the Function Key .

<b>There you assign the F8 as the Function key for this button.</b>

So it will be selected either by clicking or pressing F8.

<b>reward if Helfpul.</b>

Read only

Former Member
0 Likes
825

Suppose on the screen number 100 u have puted the button with the FCODE 'XYZ'

now go in the pf-status of the screen 100 -

go into the Function key

and write this fcode (XYZ) besides F8 and also give short description of it.

There is no diff in coding in PAI of screen 100,

when 'XYZ'.

call screen '1000'.

this new screen will displayed when either u click on the button or u press the F8.

Try this out,