Where will i use SET-PF-STATUS?

HOW TO CREATE MENUBAR,TITILE BAR,APPLICATION? IN MY PROGRAM BELOW.......
REPORT YINTERACTIVEPROGRAM02 NO STANDARD PAGE HEADING.
TABLES:YEMPLOYEE,YEMPLOYEEDB.
TYPES: BEGIN OF TY_EMPLOYEE,
        EMP_ID TYPE YEMPLOYEE-EMP_ID,
        EMP_NAME TYPE YEMPLOYEE-EMP_NAME,
        EMP_ADDR TYPE YEMPLOYEE-EMP_ADDR,
        EMP_PROFILE TYPE YEMPLOYEE-EMP_PROFILE,
      END OF TY_EMPLOYEE.
DATA:I_EMPLOYEE TYPE STANDARD TABLE OF TY_EMPLOYEE WITH HEADER LINE.
START-OF-SELECTION.
  SELECT * FROM YEMPLOYEE INTO CORRESPONDING FIELDS OF TABLE I_EMPLOYEE.
  LOOP AT i_EMPLOYEE.
    WRITE: I_EMPLOYEE-EMP_ID,'               ',
           I_EMPLOYEE-EMP_NAME,'        ',
           I_EMPLOYEE-EMP_ADDR,'       ',
           I_EMPLOYEE-EMP_PROFILE.
           HIDE:I_EMPLOYEE-EMP_ID.
           SKIP.
  ENDLOOP.
TOP-OF-PAGE.
  WRITE: 'PRODUCT INFORMATION'.
  SKIP.
  WRITE: 'EMPLOYEE ID      ',
         'EMPLOYEE NAME    ',
         'EMPLOYEE ADDR                        ',
         'EMPLOYEE PROFILE'.
  ULINE.
END-OF-PAGE.
  WRITE: 'ENJOY'.
END-OF-SELECTION.
AT LINE-SELECTION.
  CHECK SY-LSIND = 1.
  WINDOW STARTING AT 10 5
         ENDING AT   99 12.
  WRITE: 'YOU HAVE SELECTED ITEM:'.
  ULINE.
  WRITE: 'EMPLOYEE ID      ',
         'EMPLOYEE NAME    ',
         'EMPLOYEE ADDR                  ',
         'EMPLOYEE PROFILE'.
  ULINE.
  SKIP.
  WRITE:SY-LISEL.
  ULINE.
  SELECT * FROM YEMPLOYEEDB WHERE EMP_ID = I_EMPLOYEE-EMP_ID.
    WRITE:'EMP_AGE  '.
    WRITE:'EMP_GENDER'.
    SKIP.
    WRITE:YEMPLOYEEDB-EMP_AGE.
    WRITE:'         '.
    WRITE:YEMPLOYEEDB-EMP_GENDER.
  ENDSELECT.
  IF SY-SUBRC <> 0.
    WRITE:  'NO DATA FOR SELECTED ITEM'.
  ENDIF.

Hi,
Sets a GUI (Graphical User Interface) status pfstat which can be up to 20 characters long. There are many of these statuses in the GUI of a program. Each one describes which functions are available and how you can select these via menus and menu bars or by pressing function keys or pushbuttons. For further information about this, refer to the Menu Painter documentation.
Each status has a name which may be up to 8 characters long.
Setting a status makes the functions contained therein selectable.
This method allows you to vary the available functions according to the current screen, list level and/or previous program flow.
The current status is stored in the system field SY-PFKEY.
A status remains valid for the duration of a transaction or until you set a new status.
Note
You can use a namespace prefix with status names.
Example
Event in program:
START-OF-SELECTION.
  SET PF-STATUS 'MAIN'.
  WRITE SY-PFKEY.
AT USER-COMMAND.
  CASE SY-UCOMM.
    WHEN 'F001'.
      SET PF-STATUS '0001'.
      WRITE SY-PFKEY.
  ENDCASE.
Produces a list (contents MAIN) with a GUI framework which allows you to select functions assigned to the the status MAIN. If you choose the function code F001 (e.g. from the menu or by pressing a pushbutton), you trigger the event AT USER-COMMAND. This generates a secondary list (contents 0001) with a GUI framework which allows you to select functions assigned to the status 0001. On returning from the secondary list to the basic list the status MAIN is reactivated.
Example
PBO module:
MODULE PBO_100 OUTPUT.
  SET PF-STATUS 'S001'.
ENDMODULE.
Displays the screen 100 with a GUI framework which allows you to select functions assigned to the status S001.
Note
If you want to set a status for a screen, you must do so during the PBO event. The system always searches for the status pfstat in the GUI of the main program of the current program group . (However, see also the addition OF PROGRAM progname.)
Example
PROGRAM PROGRAM1.
PERFORM UP1 IN PROGRAM PROGRAM2.
PROGRAM PROGRAM2.
FORM UP1.
SET PF-STATUS 'ABCD'
ENDFORM:
The status ABCD of program PROGRAM1 is activated if PROGRAM1 is the program specified in the transaction definition.
Notes
If no GUI is defined in the list processing (or it is deactivated with SET PF-STATUS SPACE), the system supplies a standard user interface.
This statement converts the contents of the field pfstat to type C. The converted value is used to search for the desired status. Since the conversion employs the standard conversion rules as for MOVE, you should use a field of type C for pfstat to avoid unwanted conversions. In this case, a field of type I with a value of 12 would give the key ' 12 '.
Addition 1
... EXCLUDING f ... EXCLUDING itab
Effect
Deactivates one or more of the status functions, so that they cannot be selected. Specify the appropriate function codes using one of the following:
a field f or a literal which contains a function code
an internal table itab which contains several function codes
This method allows you to modify the selectable functions of a status easily at runtime.
Example
DATA: itab TYPE TABLE OF sy-ucomm.
APPEND 'DELE' TO itab.
APPEND 'PICK' TO itab.
SET PF-STATUS 'STA3' EXCLUDING itab.
Sets the status STA3 which renders the functions with the function codes DELE and PICK inactive.
Addition 2
... IMMEDIATELY
Effect
List processing: The status becomes effective for the last list displayed and is not flagged for the next secondary list. In screen processing, this addition has no effect because every status becomes immediately effective anyway.
Example
Event in program:
START-OF-SELECTION.
  SET PF-STATUS 'MAIN'.
  WRITE SY-PFKEY.
AT USER-COMMAND.
  CASE SY-UCOMM.
    WHEN 'F002'.
      SET PF-STATUS '0002' IMMEDIATELY.
      EXIT.
  ENDCASE.
Selecting the function F002 in the basic list (contents MAIN, status MAIN) redisplays the basic list, but this time with the status 0002.
Note
Without the addition ... IMMEDIATELY, the old status MAIN becomes active again.
Addition 3
... OF PROGRAM progname
Effect
The system does not look for the status pfstat in the GUI of the main program of the current program group, but in the program whose name is specified in the field progname.
Note
Only use this addition if the status contains no dynamic texts.
Since the system searches for the texts in the program to which the status belongs (that is, in program progname) the calling program will not be able to fill the dynamic texts. External statuses containing dynamic texts should be assigned to a function group, and activated by a function module that both fills the dynamic text fields and sets the status.
Example
DATA PROGR LIKE SY-REPID.
MOVE 'TESTPROG' TO PROG.
SET PF-STATUS 'ABCD' OF PROGRAM PROG.
The system activates the status ABCD of program TESTPROG.
Note
You can use the OF PROGRAM addition in conjunction with the EXCLUDING itab and IMMEDIATLEY additions.
Regards,
PRitha.
Reward if helpful

Similar Messages

  • AT LINE-SELECTION won't be triggered when I use SET PF-STATUS?

    Dear All,
    I have a simple program that shows a list. My program has AT LINE-SELECTION event. I also use a GUI status for my list.
    When I ran my program and double clicked a line, the AT LINE-SELECTION event was never triggered. Later, I deleted the line that registers the GUI status (SET PF-STATUS.... ). When I ran it again and double clicked a line, the AT LINE-SELECTION was triggered.
    Therefore, I conclude that AT LINE-SELECTION won't be triggered when I use SET PF-STATUS. Is it true?
    If so, is there any way to make my list responds to double click event when I also use GUI status?
    Thanks in advance,
    Haris

    Hi Harris,
    Check this link. I think it will answer your question.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba34635c111d1829f0000e829fbfe/content.htm
    Regards,
    Madhu.

  • Problem While Using SET PF-STATUS

    Hi friends,
    Here im doing a ALV interactive report , in which two buttons are placed DISPLAY  and CHANGE by using SET PF-STATUS ,when ever the user select a record on output and clicks on those button it ill navigate to corresponding transaction, all works fine but here im using Customised application toolbar in which im placing Two Customised Buttons(DISPLAY,CHANGE),standard functions like SORT,PRINT,SEARCH,TOTAL,SUBTOTAL... in the STATUS defined for my program.
    The problem is when Bulk data there in output TOTALSigma) not working and displays a message and another one is SUBTOTAL icon to be displayed after total is done in standard reports but here with Total icon the Subtotal icon is displaying in output.
    i need to get the SUBTOTAL icon only after the TOTAL is done,
    One Solution for this is we can Copy the Staus of Standard program into our customised Status in SE41 tcode, but im not able to get any  Status of STANDARD program along with my Customised icons(DISPLAY and CHANGE)..
    i hope i information provoded for the issue is enough to resolve the problem
    if not let met know for further clarifications needed.
    Regards,
    Niranjan. G

    Hi Niranjan,
    First copy standard status using program SAPLKKBL and status STANDARD_FULLSCREEN into your customized program and add your two buttons and code accordingly. It works.
    Regards
    Venkat

  • Where-Clause-Question using "sets of values"

    Hello,
    I'm using 10gR2
    Is it possible to filter rows by using sets of values in the where-clause?
    E.g. like:
    SELECT a, b, c
      FROM mytable
      WHERE (b,c) IN
          (3,4),
          (6,7),
          (9,1),
          (0,2)
        )...should only retrieve rows from mytable with the sets (pairs) of above list

    Here is a link to the docs: [Expression Lists|http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/expressions014.htm#i1033664]
    !http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/img/expression_list.gif!
    The number of expressions in each set must match the number of expressions before the operator in the comparison condition or before the IN keyword in the membership condition.

  • Can not use 'AT LINE-SELECTION' with SET PF-STATUS

    Hi experts,
    my code is like below:
    PARAMATERS: .....
    SET PF-STATUS 'st_nam'.
    Perform Load_data . ' For list display
    START-OF-SELECTION.
    AT LINE-SELECTION.
      Perform list_detail.
    AT USER-COMMAND.
      CALL SCREEN '1001'.
    END-OF-SELECTION.
    When I execute the report , the basic was displayed , but when then i double click on the list to call the next screen '1001'. It did not work , but if i omit the SET PF-STATUS m AT LINE-SELECTION worked week , so in this case what has happened i how can i solve this problem,
    Thaks,
    PS: Reward immediately

    Hi,
    Thank you very much for your helpful answers, I have copied the report downto my system and test it , When i used SET PF-STATUS , i can not use AT LINE-SELECTION to capture events ...May be we can not use these 2 statements in parallel,...:D
    Thanks,

  • Set PF status in popup screen

    Hi ,
    I m creating a ALV report ,in that using set PF status i created push button , in alv output list if i click the push button pop up screen will come in that popup screen it displays the previous PF status, how to add my own PF status in that popup screen
    thanks

    Hi,
    You must have created other screen for the pop up say suppose 9002.
    then we need to write the code in 9002 PBO.
    *&      Module  STATUS_9002  OUTPUT
    *       text
    MODULE status_9002 OUTPUT.
      SET PF-STATUS 'ZNOT3'.
      SET TITLEBAR 'ZTNOT3'.
    ENDMODULE.                 " STATUS_9002  OUTPUT
    Here 'ZNOT3' is is the PF STATUS that ius made according to our need.
    It is recommend that you copy standard status'STANDARD' from function group SALV and modify it accordingly. ALV standard function codes always start with '&'.
    Hope this will help you.
    Thanks,
    Dhanashri.

  • Setting pf-status on selection screen isue...

    Hello Gurus,
    I have a sample code as below. Now when I execute this one system automotically creates a default application tool bar, menu bar, etc.
    Now, I have a requirement where I have to add a custom button in application toolbar but the other default stuff should work as it is like back buttin, variant button.
    How can I do this ? I defined a pf-status creating anew program and tried to use as follows but it does not show the new pf-status.
    SELECTION-SCREEN COMMENT /1(50) COMM1.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
        parameters:
                max_res(8) default '20'.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK tab_block FOR 5 LINES,
      TAB (20) tab1 USER-COMMAND tabpush1
      DEFAULT SCREEN 100,
      END OF BLOCK tab_block.
    start-of-selection.
    set pf-status 'INDEXSCREEN' OF PROGRAM 'ZINDEX'.
    Please help.
    Regards,
    Rajesh.

    hi,
    In your program, just use
    Set PF-STATUS 'TEST'.
    Double click on TEST, it forward navigates to a new screen where you need to give values for function keys i.e. if any required application tool bar buttons, you have icons over there which show BACK , CANCEL  and exit.
    Just fill the blanks with the above values.
    In your program use the statement AT USER-COMMAND.
    check for sy-ucomm value using.
    CASE sy-ucomm.
    WHEN 'FC05'. " This is ex. function code you assign to a key in the application toolbar for custome button
    PROCESS.
    when 'BACK' OR 'CANCEL' OR 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    Thanks and regards
    Sharath

  • At line-selection... SET pf 'status'.

    hi abapers !
    i  am working with interactive reports !
    my problem ...i s
    when am using
    SET PF 'STATUS'.
    At line-selection event is not getting triggered..!
    i.e, when am double cllicking on the list ...
    its showing choose a valid function.
    am able to implement my tool bar .. status.
    using
    AT user-command.
    case sy-ucomm.
    endcase.
    but  i want to genrerate secondary list... with out ,using tool bar..
    how can i trigger at line-selection event....!
    pls can any one help me.. with an simple example...!

    If you do not want any button then use GET CURSOR instead of SET PF status.
    Try ir in this way
    TYPES: BEGIN OF x_mara,
      matnr TYPE matnr,
      END OF x_mara.
    DATA : i_mara TYPE STANDARD TABLE OF x_mara INITIAL SIZE 0,
           i_marc TYPE STANDARD TABLE OF marc INITIAL SIZE 0,
           l_value TYPE string,
           l_field TYPE string,
           wa_marc TYPE marc,
           wa_mara TYPE x_mara.
    SELECT matnr FROM mara  INTO TABLE i_mara.
    LOOP at i_mara INTO wa_mara.
      WRITE: / wa_mara-matnr.
      ENDLOOP.
    AT LINE-SELECTION.
      GET CURSOR FIELD l_field VALUE l_value.
      IF l_field = 'WA_MARA-MATNR'.
        SELECT * FROM marc INTO TABLE i_marc WHERE matnr = l_value.
          LOOP AT i_marc INTO wa_marc.
            WRITE: / wa_marc-matnr , wa_marc-werks.
          ENDLOOP.
      ENDIF.

  • Set PF Status and At-Line Selection & At User-Command

    Hi All
    I've used set PF status, at user command and at-line selection in my program. initially when i click on the material number it was not drilling further that is it was not taking to secondary list. i commented the PF status and tried. then it was working fine. Later, after checking on couple of doc i added F.code PICK in my PF status and uncommented the set-PF status in my program it was working fine. Now my question is why this kind of behaviour. When i uncomment the PF status  and run the program without the f.code PICK in my PF status(se41)  it was not working but after inlcuding the F.code in my PF it is working. Any good explanation?
    thks   
    Prabhu

    hi,
    generally fuction code is useful for the system to find on which button or in which area the user has clicked in. based on the function code the system executes the satatements that are in user command.  in your case i think u didnt gave any functionality in user-command. when at-user command is a event in interactive reporting which is triggered based on the button u had clicked.
    at line-selection event uses two system variables
       1. sy-lsind [ current list index number ]
       2. sy-lisel  [ contains the current area in which user ckicked ].
       3. sy-ucomm [ function code of clicked button ].
    using these 3 vars we can drill down to 21 lists [ including 1st list ]
    if helpful reward some points.
    with regards,
    suresh.

  • How to get the set pf-status and call Transaction work together in SA

    hi,
    I am using Set pf-status to display the details screen and the same time using call transaction va03 leave screen 0 to display the corresponing sales order.
    The issue is both of them are not workin together properly.
    it could be helpfull if you give some code which deals the issue in detail...
    can you please give details how to get the previous screen once the new screen is obtained thru set pf-status
    thanks and regards
    Edited by: san dep on Jul 10, 2008 6:25 PM

    Hi,
    Try this code ---
    SET PF-STATUS 'STATUS_NAME' OF PROGRAM 'ZPROGRAM_NAME'.
    Regards
    Pinaki

  • Set PF-STATUS and use SY-UCOMM in an Exit FM

    Hi,
    I am working on an Exit function, and I am trying to read the screen status and then the user's actions, so that I could code for the SY-UCOMM. For some reason, my program is not working. Is it possible to add the PF-STATUS and SY-UCOMM to the Exit function to process the user's actions? Please advise.
    Thanks,
    RT

    Hi Ravikumar,
    I was able to use the parameters in the Exit provided in the Exit FM to process the necessary data. I have other requirements where I would have to code in the Exit FM to detect the user's actions and process them within the Exit to manipulate the tables. I added some code specified in the previous post, but it doesn't seem to get the OK_CODE; therefore, no processing of the data was happening when I tested by clicking on the yellow arrow to exit. I am able to determine the OK_CODE though.
    Would you have any sample code suggestions when using the Exit for SET PF-STATUS and SY-UCOMM?
    Thanks so much.
    RT

  • What function can I use set Product Master status = LOCKED?

    I have several Product Master records that the business would like to set Product Status = I1103-LOCKED.  Is there a function I can use to set product status?

    Hi,
    You can make lock objects via sm12. Your lock object name start with E.
    Every lock object is having two function module.
    enque_lock_object_name
    deque_lock_object_name
    hope it will useful.
    thanks
    Hemant

  • What is Split valuation? why and where it will be useful?

    Dear Frndz,
    Kindly explain What is Split valuation? why and where it will be useful?
    Regards,
    SRini

    Hi,
    Split Valuation
    Use
    For certain materials, it is necessary to valuate the various stocks in a particular valuation area separately. Reasons for this include:
    Different origins of the material
    Different grades of quality for the material
    Different statuses for the material
    Differentiation between in-house production and external procurement
    Differentiation between different deliveries
    Features
    If a material is subject to split valuation, the material is managed as several partial stocks, each partial stock is valuated separately.
    Each transaction that is relevant for valuation, be it a goods receipt, goods issue, invoice receipt or physical inventory, is carried out at the level of the partial stock. When you process one of these transactions, you must always specify which partial stock is involved. This means that only the partial stock in question is affected by a change in value, the other partial stocks remain unaffected.
    Alongside the partial stocks, the total stock is also updated. The calculation of the value of the total stock results from the total of the stock values and stock quantities of the partial stocks.
    You define whether the material is subject to split valuation on the accounting view of the material master record. There are two fields for this:
    The valuation category specifies which criterion should be used as the basis for differentiating between the various partial stocks.
    The valuation type specifies an individual characteristic of a partial stock.
    Prerequisites
    The valuation category is defined in the master record of a material. It determines whether the material is subject to split valuation. The specified material type must also be maintained in the material master record.
    Activities
    To specify the valuation type of a material for which valuation types have been defined in the material master record, proceed as follows:
    Branch to the purchase order item detail screen.
    Enter a predefined valuation type in the field Val. type.
    Save the purchase order.
    For more details , pls go through the following link :
    [Split Valuation  |http://help.sap.com/erp2005_ehp_04/helpdata/EN/8a/d1de34e4cb2300e10000009b38f83b/frameset.htm]
    Hope this helps.
    Regards,
    Tejas
    Edited by: Tejas  Pujara on Dec 19, 2008 7:22 AM

  • HT4400 I'm looking for a Braille note system that interacts with IPAD. This will be use in a classroom settings where you see both the braille & text communicated simultaneously.

    I'm looking for a Braille note system that interacts with IPAD. This will be use in a classroom settings where you see both the braille & text communicated simultaneously.

    This should be able to help ya out -> Support for wireless braille displays in iOS 6

  • I have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?

    i have the djay app on my ipad and i want to record the set i'm playing on my iphone through garageband. i need to take the sound from the headphone jack of the ipad, as the 30pin connector will be used to connect to the DJLive accessory. Is this possibl?reco

    You may get a better response in this community:
    https://discussions.apple.com/community/app_store/garageband_for_ios

Maybe you are looking for

  • Cannot find BI master system

    Hi everyone, we are developing bex queries in our BI (NW2004s) system. However, when we create an iview in our Enterprise portal containing such queries we always get the following error when trying to run them. "The initial exception that caused the

  • How to add attributed string to JTextPane

    Hi all, Could you tell me how to add an attributed string into a Textpane. Textpane only takes a styledDocument. Is there any way to convert attributed string into a styled document. Are there any components , which we can include attributed string ,

  • The Red PCI slot

    K9N Sli Plat : the red PCI slot is written to be a reserved for communication slot.  What does that mean ? Most importantly, can I treat it like any other PCI slots ?

  • For Material Master

    Hi All We have a maintain a seprate text (Drawing No) for each material. We needs to pick the same in PO along with the material Discription Where we can maintain the same. As we can not maintain in MAKTX. Please Help Regards Niti Narayan

  • Installing HBR for UNIX

    I am trying to upgrade my Hyperion Business Rules application from 3.5 to 4.0.1 but unfortunately I cannot find an installation guide for UNIX anywhere. Has anyone successfully installed HBR 4.0.1 for UNIX?<img src="i/expressions/face-icon-small-blus