Application Development 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: 

Dynamic PF-Status.

Former Member
0 Kudos

Hi,

I want to create a Dynamic PF-Status,

for example in a report SELECTION SCREEN if you enter some inputs and click on SAVE, We will get a VARIANT button in the application tool bar.

Could some one exlpain how to obtain the same in my ZProgram, I want to bring some other button in the application tool bar dynamically.

regards,

Prabhu

Points assured.

3 REPLIES 3

Former Member
0 Kudos

AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'BTCI'.         "Have your own User Commands
*  Code necessary
    WHEN 'RETR'.        "Have your own User Commands
*  Code necessary
  ENDCASE.


* In Output (where u have write statement or calling ALV display)
  SET PF-STATUS 'MAIN'.

Create a PF status with the Buttons u want with user commands

Handle them in the event AT USER-COMMAND.

Reward points please

0 Kudos

Hi Shriram,

I Want to know how to create a dynamic PF-Status,

For ex: if u go to any report selection screen you will find PF status as RSSYSTDB - %_00, when you create a variant a new button will be added to the same Selection screen in the APLLICATON TOOLBAR (where u click and get a variant), but If u check the PF- Status remains the same, I want to know how to do that.

Regards,

Prabhu

Points assured

0 Kudos

Hi Prabhu,

you can not add buttons at runtime, but you can hide buttons at runtime.

So you have to define a PF-status with all buttons and you can then

hide the buttons you don't want to see.

The command for this functionality is

SET PF-STATUS 'STATUS' EXCLUDING 'VARIANT'.

For the usage of this command, check this link: [Deactivating Functions at Runtime|http://help.sap.com/saphelp_crm60/helpdata/en/d1/801e2d454211d189710000e8322d00/frameset.htm]

Regards,

Karsten