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

Hide the Execute Button

ann_fernando
Explorer
0 Likes
4,092

Dear all,

Im writing a report for reading details from a barcode reader.

My requirement is in At seletion screen I do the necessary processing and want to hide the execute button.

Please could any one help me.

Thanks

ann

5 REPLIES 5
Read only

Former Member
0 Likes
1,979

Hi Ann,

Create a new GUI Status for your program.. put whatever button you require for it..

In the AT SELECTION-SCREEN OUTPUT event..

SET pf-status xxx.

Thanks and Best Regards,

Vikas Bittera.

**Reward if useful**

Read only

Former Member
0 Likes
1,979

Hi,

first execute ur program and goto selection screen.select in the menu as system->status.

one window will appear in that in SAP DATA block GUI STATUS field will be there double click on the value(menu name) it will take u to menu painter(say menu name is ABC).expand application toolbar see the function code for the execute button(say it is %ONLI)

now come back to ur program and write like below.

AT SELECTION-SCREEN OUTPUT.

SET PF-STATUS 'ABC' EXCLUDING '%ONLI'.

<b>reward if helpful</b>

rgds,

bharat.

Read only

Former Member
1,979

Hi Ann,

Function Module 'RS_SET_SELSCREEN_STATUS' will hide the Execute button.

Function Code for Execute button is 'ONLI'.I am sending you a test program.

pls try this.

DATA itab TYPE TABLE OF sy-ucomm.

PARAMETERS test(10) TYPE c.

AT SELECTION-SCREEN OUTPUT.

APPEND 'ONLI' TO itab.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = sy-pfkey

TABLES

p_exclude = itab.

Regards

Naveen Rana

Read only

0 Likes
1,979

this works!

Read only

jordi_escodaruiz
Active Participant
1,979

Hi Ann:

It's late for my answer, but I send this post. May be useful.

I faced the same problem for other reasons.

I solved the problem by doing:

AT SELECTION-SCREEN OUTPUT.

DATA gt_ucomm TYPE TABLE OF sy-ucomm.

APPEND: 'ONLI' TO gt_ucomm.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = sy-pfkey

TABLES

p_exclude = gt_ucomm.

This works well if your selection screen is number 1000 (default).

But if you define a selection selection screen with another number, like this:

SELECTION-SCREEN BEGIN OF SCREEN 100.

PARAMETERS:

p_examle like sy-datum.

SELECTION-SCREEN BEGIN OF SCREEN 100.

And you don't define a Status GUI for screen 100, then the solution does not work because sy-pfkey is not informed.

Then I solved by changing the call to the Function Module in this way:

AT SELECTION-SCREEN OUTPUT.

DATA gt_ucomm TYPE TABLE OF sy-ucomm.

APPEND: 'ONLI' TO gt_ucomm.

CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

EXPORTING

p_status = '%_00' "Status GUI for screen 1000

TABLES

p_exclude = gt_ucomm.