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

excluding application toolbar buttons

herzelhaimharel_gilor
Participant
0 Likes
3,991

Hi folks ,

can anyone tell me if i could to exclude some application toolbar buttons from pf-status ?

1 ACCEPTED SOLUTION
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,700

Hi Herzel

That is possible for "application toolbar". Hope you do not mean the standard toolbar.

To exclude a single function from the application toolbar you can use:

SET PF-STATUS 'STAT_0100' EXCLUDING 'ABCD' .

To exclude multiple user commands, collect them in an internal table and use EXCLUDING addition giving the name of the internal name.

<u><b>e.g.</b></u>


DATA: BEGIN OF lt_exclude OCCURS 0,
        fcode LIKE sy-ucomm ,
      END OF lt_exclude .

lt_exclude-fcode = 'ABCD' .
APPEND lt_exclude .
lt_exclude-fcode = 'EFGH' .
APPEND lt_exclude .

SET PF-STATUS 'STAT_0100' EXCLUDING lt_exclude .

*--Serdar

8 REPLIES 8
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,701

Hi Herzel

That is possible for "application toolbar". Hope you do not mean the standard toolbar.

To exclude a single function from the application toolbar you can use:

SET PF-STATUS 'STAT_0100' EXCLUDING 'ABCD' .

To exclude multiple user commands, collect them in an internal table and use EXCLUDING addition giving the name of the internal name.

<u><b>e.g.</b></u>


DATA: BEGIN OF lt_exclude OCCURS 0,
        fcode LIKE sy-ucomm ,
      END OF lt_exclude .

lt_exclude-fcode = 'ABCD' .
APPEND lt_exclude .
lt_exclude-fcode = 'EFGH' .
APPEND lt_exclude .

SET PF-STATUS 'STAT_0100' EXCLUDING lt_exclude .

*--Serdar

Read only

0 Likes
2,700

i know for sure that it's work , but i don't know why it doesn't work on my screen.

i wrote it in the PBO and i don't see the results .

Read only

0 Likes
2,700

Hello Herzel,

You have mentioned 'PBO', are you talking about a normal screen or a selection screen? Just to remind you, in case of a selection-screen, you would have to do set the GUI status in the AT SELECTION-SCREEN OUTPUT event.

That said, did you try using the statement <b>SET PF-STATUS SPACE.</b>? This statement is supposed to initialize the GUI status of the screen.

Regards,

Anand Mandalika.

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,700

Hi Herzel

You should describe your case more since your question just asks whether it is possible and the answer is yes.

Anyways, I can think of three possibilities.

i. You give wrong function code(s) at EXCLUDING addition.

ii. You set the PF-STATUS somewhere else for a second time.

iii. There is a conditional sentence preventing execution of the 'SET' statement.

Please check out these and if your problem still persists describe the case more extensively.

*--Serdar

Read only

0 Likes
2,700

take a look at my code :

MODULE pbo_0100 OUTPUT.

DATA temp LIKE LINE OF tb_pf_status .

IF flag2comp = 1 .

temp-code = 'COMPARE'.

APPEND temp TO tb_pf_status.

LOOP AT SCREEN .

CASE screen-name.

WHEN 'PROF1'. screen-input = 0 .

WHEN 'PROF2'. screen-input = 0 .

ENDCASE.

MODIFY SCREEN .

ENDLOOP.

ELSE.

temp-code = 'UNCOMPARE'.

APPEND temp TO tb_pf_status.

LOOP AT SCREEN .

CASE screen-name.

WHEN 'PROF1'. screen-input = 1 .

WHEN 'PROF2'. screen-input = 1 .

ENDCASE.

MODIFY SCREEN .

ENDLOOP.

ENDIF.

SET PF-STATUS 'STATUS100' EXCLUDING tb_pf_status .

CHECK NOT grid IS INITIAL .

CREATE OBJECT grid.

PERFORM db_str_load_all.

ENDMODULE. " pbo_0100 OUTPUT

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,700

Hi Herzel

The problem should be that: Since in modules your variable declarations are always GLOBAL. Whether your condition changes, your internal table content always includes previous user commands appended. So do a refresh.

<u><b>e.g.</b></u>

MODULE pbo_0100 OUTPUT.
DATA temp LIKE LINE OF tb_pf_status .

REFRESH tb_pf_status . "Insert this line"

IF flag2comp = 1 .
...

OR

Take your PBO code into a form and just call this form at your PBO, put a break-point at the statement:

SET PF-STATUS 'STATUS100' EXCLUDING tb_pf_status .

Be sure you have the GUI status with the name 'STATUS100' with function codes 'COMPARE' and 'UNCOMPARE', then while debugging check whether the content of the internal table "tb_pf_status" is as you want.

*--Serdar

Read only

Former Member
0 Likes
2,700

Define Itab of type SY-UCOMM

DATA : BEGIN OF ITAB OCCURS 0,

IT1 LIKE SY-UCOMM,

END OF ITAB.

ITAB-IT1 = 'AAA'.

APPEND ITAB.

ITAB-IT1 = 'BBB'.

APPEND ITAB.

SET PF-STATUS 'TOOLBAR' EXCLUDING ITAB.

Read only

Former Member
0 Likes
2,700

Define Itab of type SY-UCOMM

DATA : BEGIN OF ITAB OCCURS 0,

IT1 LIKE SY-UCOMM,

END OF ITAB.

ITAB-IT1 = 'AAA'.

APPEND ITAB.

ITAB-IT1 = 'BBB'.

APPEND ITAB.

SET PF-STATUS 'TOOLBAR' EXCLUDING ITAB.