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

Dynamic PF- Status

Former Member
0 Likes
1,152

Hi Experts,

How to set the PF status dynamically?

thanks

Dany

Hi Experts,

How to set the PF status dynamically?

thanks

Dany

6 REPLIES 6
Read only

Former Member
0 Likes
841

Hi,

Dynamicall y.. u can set conditionally

Sudha

Read only

Former Member
0 Likes
841

Hello Dan,

you can't create it dynamically, but you can change the pf-status dynamically at runtime.

by excluding the function code from it.

like this.

TYPES: BEGIN OF TAB_TYPE, 
        FCODE LIKE RSMPE-FUNC, 
      END OF TAB_TYPE. 
 
DATA: TAB TYPE STANDARD TABLE OF TAB_TYPE WITH 
               NON-UNIQUE DEFAULT KEY INITIAL SIZE 10, 
      WA_TAB TYPE TAB_TYPE.
 
CLEAR TAB. 
MOVE 'DELE' TO WA_TAB-FCODE. 
APPEND WA_TAB TO TAB. 
MOVE 'AUSW' TO WA_TAB-FCODE. 
APPEND WA_TAB TO TAB. 
 
<b>SET PF-STATUS 'STA3' EXCLUDING TAB.

Regards,

Vasanth

Read only

0 Likes
841

Hi,

What is 'AUSW' that you had mentioned?

Thanks

Dany

Read only

0 Likes
841

Hello,

Here AUSW is a fcode for a button. If I move this the table then that button will not be shown in the appicaltion tool bar.

Thanks !!

Vasanth

Read only

Former Member
0 Likes
841

Hi,

By writing some conditions we can make our PF-STATUS as dynamic.

For that you do the following steps:

First create the pf-status using ' SET PF-STATUS 'S100' ' by using different fuction code(length 4 characters generally).

Now if you don't want a particular function code, let us say 'BACK' , then you can do it as follows:

First Collect the function code 'BACK' into an internal table(ITAB) and then

write the statement as

SET PF-STATUS 'S100' EXCLUDING ITAB.

Your work is done.

Regards,

Balakrishna.N

Read only

0 Likes
841

Hello,

The statement EXCLUDING is disabling the menu option. But is there a way to hide the option and not only disabling it ?

By disabling, I mean to grey out the option and make it non selectable.

By hiding, I mean completely remove the option from the menu.

Thanks,

Thierry