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

Selection Screen

Former Member
0 Likes
1,187

Hi All

can anybody tell me how to set GUI status in case of Selection screens..

In SAP help its mentioned that we can not use SET PF-STATUS in at selection-screen ouput event for setting status.. doing so will not affect the standard status..

but i tried this and its working..

whatz the procedure to set pf status for selection screens..??

Thanks in advance

10 REPLIES 10
Read only

naimesh_patel
Active Contributor
0 Likes
956

Hello Nikita,

If you want to set the Pf-status for selection-screen,

then you have to use,

TABLES: SSCRFIELDS.

  • Button on screen

SELECTION-SCREEN FUNCTION KEY 1.

INITIALIZATION.

SSCRFIELDS-FUNCTXT_01 = 'Test'.

AT SELECTION-SCREEN.

CASE SSCRFIELDS-UCOMM.

WHEN 'FC01'.

      • do what you want.

ENDCASE.

Regards,

Naimesh Patel

Rewards points, if it is useful..!

Read only

athavanraja
Active Contributor
0 Likes
956

where did you read that we cannot use pf-status in sel. screen. (can you provide the link) you can use it at selection-screen output to set your own pf status.

Regards

Raja

Read only

Former Member
0 Likes
956

Hi

Besically in case of selection screen we use the Error message to display the error in the as a warning or a error.

So it would be a better option to set the message for a particular action.

you can se the messge using following syncam

message e004(z353) with 'Message Type Does Not Exist'.

So you can use this process.

I hope this will help you to solve your problem.

Thanks

Mrutyunjaya Tripathy

Read only

Former Member
0 Likes
956

Nikita,

I dont know from where you got that info that PF-STATUS cannot be set. In fact you can use SET PF-STATUS in Selection screen.

you can use SET PF-STATUS in AT SELECTION-SCREEN OUTPUT event, and check the function codes in AT SELECTION-SCREEN event.

AT SELECTION-SCREEN OUTPUT.

SET PF-STATUS 'PPP'.

AT SELECTION-SCREEN.

CASE sy-ucomm.

WHEN 'TEP'.

break insmu1.

ENDCASE.

Tushar

Reward if useful.

Read only

Former Member
0 Likes
956

thats what i am telling

i read this in SAP help that we can not set the status

using pf status..

there they mentioned sm function modules

but i tried this in at selection-screen output event

n its working

Read only

0 Likes
956

nikita whats ur point now,

U want how its to be done, may be i can help or else to be preceise what xactly do u want using SET PF-STATUS.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
956

u can set in INITIALIZATION event.

it works

Read only

0 Likes
956

This simple code will show how you can manipulate the selection screen pf-status and it works. I have a program ZTESTAKS1. I created a pf-status by copying the user interface of standarad program RSSYSTDB. There are two radiobuttons on the selection screen. If the first radiobutton is selected, it will use the standard selection screen status but disable certain functions from it. If the second radiobutton is selected, it will set my pf-status that I created and will enable all the buttons.



DATA: BEGIN OF i_excl_tab OCCURS 0,
       pfkey LIKE sy-pfkey.
DATA: END OF i_excl_tab.

PARAMETERS: p_stdpf RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND rad,
            p_ownpf RADIOBUTTON GROUP rad1,
            p_matnr LIKE mara-matnr.

AT SELECTION-SCREEN OUTPUT.

  PERFORM set_sel_screen_pf_status.

START-OF-SELECTION.

*---------------------------------------------------------------------*
*       FORM SET_SEL_SCREEN_PF_STATUS                                 *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
FORM set_sel_screen_pf_status.

  DATA: l_pf_status LIKE sy-pfkey,
        l_program   LIKE sy-repid.

  REFRESH i_excl_tab.
  IF p_stdpf = 'X'.
*-- change the standard PF status for the selection screen by removing
*   the following functions
    MOVE 'ONLI' TO i_excl_tab-pfkey.
    APPEND i_excl_tab.
    CLEAR i_excl_tab.

    MOVE 'SJOB' TO i_excl_tab-pfkey.
    APPEND i_excl_tab.
    CLEAR i_excl_tab.

    MOVE 'PRIN' TO i_excl_tab-pfkey.
    APPEND i_excl_tab.
    CLEAR i_excl_tab.

    MOVE 'DYNS' TO i_excl_tab-pfkey.
    APPEND i_excl_tab.
    CLEAR i_excl_tab.
    l_pf_status = '%_00'.
    l_program   = 'RSSYSTDB'.
  ELSE.
*-- keep all the standard buttons open
    REFRESH i_excl_tab.
    CLEAR i_excl_tab.
    l_pf_status = '%_00'.
    l_program   = sy-cprog.
  ENDIF.

  CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
      p_status  = l_pf_status
      p_program = l_program
    TABLES
      p_exclude = i_excl_tab.

ENDFORM.                      " SET_SEL_SCREEN_PF_STATUS

Please let me know if it is not what you are looking for,

Srinivas

Read only

0 Likes
956

hi srinivas.....

My Requirement is also similar to urs...

but we have set pf status at output list.

Program (GUI)        RSSYSTDB

GUI status           %_FSDOC_

can u tell me the solution for that

Read only

Former Member
0 Likes
956

Hi,

Check the below link to know how to set the PF Status to the Selection Screen.

<b>http://help.sap.com/saphelp_47x200/helpdata/en/e7/0eb237e29bc368e10000009b38f8cf/content.htm</b>

Regards,

Vara