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

how we can use set Pf-status on selection screen

Former Member
0 Likes
2,593

here i have one requirement i have to cretae a menu on the selection screen for that i want to use a set pf-status correct so where i can cteate a menu, can any one tell me where i will use this pf status statement,

if any code is there pls send to me. its very urgent.

9 REPLIES 9
Read only

naimesh_patel
Active Contributor
1,368

If you want to create a button on the selection-screen you can use like this:

tables: sscrfields
 
SELECTION-SCREEN : FUNCTION KEY 1. " < To create one key
 
inilization.
MOVE TEXT-001 TO SSCRFIELDS-FUNCTXT_01.
 
at selection-screen.
  case sy-ucomm.
     when 'FC01'.
  endcase.

Regards,

Naimesh Patel

Read only

Former Member
1,368

HI

if you had any doubt execute this small program and see how it will be

&----


*& Report ZSSCRAPPBUT *

*& *

&----


*& Adds buttons to application toolbar of selection screen. *

&----


REPORT zsscrappbut NO STANDARD PAGE HEADING.

TABLES: t030, skat, sscrfields.

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME

TITLE text-001.

SELECT-OPTIONS: p_ktopl FOR t030-ktopl,

p_komok FOR t030-komok,

p_ktosl FOR t030-ktosl.

SELECTION-SCREEN SKIP.

  • Add button to application toolbar

SELECTION-SCREEN FUNCTION KEY 1. "Will have a function code of 'FC01'

SELECTION-SCREEN FUNCTION KEY 2. "Will have a function code of 'FC02'

  • .....

SELECTION-SCREEN END OF BLOCK block1.

************************************************************************

*INITIALIZATION.

INITIALIZATION.

  • Add displayed text string to buttons

MOVE 'Application button' to SSCRFIELDS-FUNCTXT_01.

MOVE 'Excecute report ????' to SSCRFIELDS-FUNCTXT_02.

  • .....

************************************************************************

*AT SELECTION-SCREEN.

AT SELECTION-SCREEN.

if sscrfields-ucomm = 'FC01'.

break-point.

elseif sscrfields-ucomm = 'FC02'.

break-point.

endif.

Read only

Former Member
0 Likes
1,368

Hi,

for create a PF Status Tcode is se41. go there and create one PF status.

Now where u want to use this pf status write code..

set pf-status 'XYZ'.

pfstatus name should be in capital .

regards,

paras

Read only

0 Likes
1,368

i wnat to this menu on the selection screen it self...

Read only

0 Likes
1,368

Ok.. Try with this one..

SELECTION-SCREEN BEGIN OF BLOCK BLK_001.
parameters: p_lifnr type lfa1-lifnr.
SELECTION-SCREEN END OF BLOCK BLK_001.
 
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'PFST'.  " < create a PF-status with required menu
 
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'MENU1'.
  message i398(00) with 'it is working'.
ENDCASE.

Regards,

Naimesh Patel

Read only

0 Likes
1,368

That is correct...i m also using like that only...but here is one problem...

Normally in any selection screen, when you double click on the select-options field, you will get a pop-up .( Maintain selection options like = single value,

>= greater than or equl to..)

But in if we use this pf-status like that then our selection screen it does not show up. It gives a message at the bottom stating 'Choose a valid function'.

Read only

0 Likes
1,368

Yes.. you need to maintain standard buttons also in this new PF-status.

Run one report.. on the selection screen.. system > status .. double click on the pf-status.. this will lead you to standard pf status..

maintain those to your PF-status.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
1,368

In order modify PF_STATUS of ALV grid report you need to perform the following steps:

1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include:

i_callback_pf_status_set = 'SET_PF_STATUS' statement.

2. Create 'SET_PF_STATUS' FORM

3. Create pf_status (i.e. 'ZNEWSTATUS').

- It is recommend that you copy standard status'STANDARD' from function group SALV

and modify it accordingly. ALV standard function codes always start with '&'.

Read only

Former Member
0 Likes
1,368

HI

if you add A STATUS screen then for that SCREEN it will apply your new functionality only if you want that old functinality then you need to define that to in your PF_STATUS screen

Reward if usefull