2007 Nov 17 6:22 AM
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.
2007 Nov 17 6:25 AM
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
2007 Nov 17 6:27 AM
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.
2007 Nov 17 6:27 AM
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
2007 Nov 17 6:31 AM
2007 Nov 17 6:35 AM
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
2007 Nov 17 6:53 AM
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'.
2007 Nov 17 7:21 AM
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
2007 Nov 17 6:29 AM
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 '&'.
2007 Nov 17 7:24 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |