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

PF Status

Former Member
0 Likes
496

Hi all

In a PF STATUS objecty i hav created 4 functional keys.Now in my selection screen i have 2 radiobuttons.If i click the 1st radio buttonn then i need to display the 1st two function keys and if click on the second radiobutton then i need to get the remaining 2 function keys.Please help

Vijay

3 REPLIES 3
Read only

prasanth_kasturi
Active Contributor
0 Likes
468

hi,

just create two pf-status its more simpler

when r1 = 'X'.

use one status

if r2 = 'X'.

use other

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

there is another procedure also

if r1 = 'X'.

SET PF-STATUS 'STATUS' EXCLUDING <itab>

if r2 = 'X'

SET PF-STATUS 'STATUS' EXCLUDING <itab1>

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

itab must be an internal table of flat structure of type c,

in first itab populate the fct codes you dont want when r1 is selected

in second populate the reverse

see an example

DATA : BEGIN OF i_tab OCCURS 0,

fcode(10) ,

END OF i_tab.

DATA : BEGIN OF i_tab1 OCCURS 0,

fcode(10),

END OF i_tab1.

itab-fcode = 'CANCEL' .

APPEND i_tab.

itab-fcode = 'EXIT'.

APPEND i_tab.

itab1-fcode = 'BACK' .

APPEND i_tab1.

itab1-fcode = 'PRINT'.

APPEND i_tab1.

SELECTION-SCREEN: BEGIN OF LINE.

PARAMETERS: p_r RADIOBUTTON GROUP group." user-command uc1.

SELECTION-SCREEN: COMMENT 3(15) text-009 FOR FIELD p_r.

PARAMETERS: p_r1 RADIOBUTTON GROUP group.

SELECTION-SCREEN: COMMENT 21(10) text-010 FOR FIELD p_r1.

SELECTION-SCREEN: END OF LINE.

if p_r = 'X'.

SET PF-STATUS 'BASIC' OF PROGRAM excluding i_tab.

endif.

if p_r1 = 'X'.

SET PF-STATUS 'BASIC' OF PROGRAM excluding i_tab1.

Endif.

Start-of-selection.

<Ur code>

hope i am clear

if you need the coding provide me the fct code you designed i will give you the coding

regards

prasanth

Read only

Former Member
0 Likes
468

hai ,

DATA: fcode TYPE TABLE OF sy-ucomm,

wa_fcode TYPE sy-ucomm.

SELECTION-SCREEN BEGIN OF BLOCK BL1.

PARAMETERS P0 RADIOBUTTON GROUP RADI.

PARAMETERS P1 RADIOBUTTON GROUP RADI.

SELECTION-SCREEN END OF BLOCK BL1.

*append the values u dont want to show

wa_fcode = 'FC1 '. APPEND wa_fcode TO fcode.

wa_fcode = 'FC2 '. APPEND wa_fcode TO fcode.

wa_fcode = 'FC3 '. APPEND wa_fcode TO fcode.

wa_fcode = 'FC4 '. APPEND wa_fcode TO fcode.

wa_fcode = 'FC5 '. APPEND wa_fcode TO fcode.

wa_fcode = 'PICK'. APPEND wa_fcode TO fcode.

AT SELECTION-SCREEN ON BLOCK BL1.

if po = 'X'.

SET PF-STATUS 'TEST' EXCLUDING fcode.

endif.

Regards,

vikram

Read only

Former Member
0 Likes
468

Hi Vijay,

Here i done an example with ur requirement plz follow the below code.

DATA : BEGIN OF itab OCCURS 0,

fctcode(10) ,

END OF itab.

DATA : BEGIN OF itab1 OCCURS 0,

fctcode(10),

END OF itab1.

itab-fctcode = 'CANCEL' .

APPEND itab.

itab-fctcode = 'EXIT'.

APPEND itab.

itab1-fctcode = 'BACK' .

APPEND itab1.

itab1-fctcode = 'PRINT'.

APPEND itab1.

SELECTION-SCREEN: BEGIN OF LINE.

PARAMETERS: p_g1 RADIOBUTTON GROUP rb1." user-command uc1.

SELECTION-SCREEN: COMMENT 3(15) text-009 FOR FIELD p_g1.

PARAMETERS: p_g2 RADIOBUTTON GROUP rb1.

SELECTION-SCREEN: COMMENT 21(10) text-010 FOR FIELD p_g2.

SELECTION-SCREEN: END OF LINE.

IF p_g1 = 'X'.

SET PF-STATUS 'BASIC' OF PROGRAM sy-repid EXCLUDING itab.

ELSEIF p_g2 = 'X'.

SET PF-STATUS 'BASIC' OF PROGRAM sy-repid EXCLUDING itab1.

ENDIF.

WRITE : / 'VIJAY'.

don't forget to write WRITE statement.

After executing u will see the screen then check any radio button and again execute it u will find the difference as ur requirement.

Plz rewards points if helpful,

Ganesh.