‎2005 Jan 02 6:40 PM
Hi folks ,
can anyone tell me if i could to exclude some application toolbar buttons from pf-status ?
‎2005 Jan 02 10:58 PM
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
‎2005 Jan 02 10:58 PM
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
‎2005 Jan 02 11:58 PM
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 .
‎2005 Jan 03 5:55 AM
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.
‎2005 Jan 03 9:13 AM
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
‎2005 Jan 03 9:37 AM
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
‎2005 Jan 03 9:52 AM
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
‎2005 Jan 04 3:36 AM
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.
‎2005 Jan 04 3:36 AM
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.