Use of at PF AND AT USER COMMAND EVENTS

can i know the use of at pf and at usercommand

hi,
pf-status.
for example : i am displaying ouput using function module 'REUSE_ALV_LIST_DISPLAY' when u see the output of this there u will find standarad pf status. if requirement is not necesary to display all these buttons means u will create ur own pf status and keep required buttons insideit.
at user command :
for example u have one button in ur pf status : select_all
when u click this button necessary action has to perform. this code u will write under this command.
hope u got the point.
thanks,
maheedhar.t

Similar Messages

  • How to use AT LINE-SELECTION and AT USER-COMMAND in one report????

    Dear all,
    I have a problem in reports I want to use AT USER-COMMAND.and AT LINE-SELECTION.both in the one report.
    But as soon as I use SET PF-STATUS my AT LINE-SELECTION event stop workingand only AT USER-COMMAND is working.
    How can I use both of them in one report for your reference I am giving my test program below.
    REPORT ZTEST111 .
    SET PF-STATUS '100'.
    DO 10 TIMES.
    WRITE:/ SY-INDEX.
    HIDE SY-INDEX.
    ENDDO.
    START-OF-SELECTION.
    AT LINE-SELECTION.
    MESSAGE I002(SY) WITH SY-INDEX.
    AT USER-COMMAND.
    MESSAGE I002(SY) WITH 'USER COMMAND'.
    END-OF-SELECTION.
    Thanks in advance
    Sachin Gautam

    hi
    Syntax
    AT USER-COMMAND.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
    Note
    Self-defined function codes are all those that include character combinations, except for the following:
    The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
    All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
    The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
    Table 1
    Function code Function
    %CTX Call a context menu
    %EX Exit
    %PC Save to file
    %PRI Print
    %SC Search for ...
    %SC+ Find next
    %SL Search in office
    %ST Save to report tree
    Table 2
    Function code Function
    BACK Back
    P- Scroll to previous page
    P-- Scroll to first page
    P+ Scroll to next page
    P++ Scroll to last page
    PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
    PL- Scroll to first line of the page
    PL-n Scroll n lines back
    PL+ Scroll to last line of the page
    PL+n Scroll n lines up
    PNOP No effect
    PP- Scroll back one page
    PP-n Scroll n pages back
    PP+ Scroll one page forward
    PP+n Scroll n pages forwad
    PPn Scroll to beginning of page n
    PRI, PRINT Print
    PS-- Scroll to first column
    PS++ Scroll to last column
    PS- Scroll one column to the left
    PS-n Scroll n columns to the left
    PS+ Scroll one column to the right
    PS+n Scroll n columns to the right
    PSn Scroll to column n
    PZn Scroll to line n
    RW Cancel

  • Refresh Report and At Line-Selection and At User-Command

    Hi All
    I have 2 querries
    1) I want to use At Line-selection and At user-command in the same report. But At line-selection is not getting triggered why? When I remove Set pf-status 'xxx' and at user command , then at line selection works . I want to user both at a time.
    2) I am giving user ability to edit the report shown and when he comes back by exiting the editing I want to refresh the report which is shown already to him to give effect of his editing.
    Thanks in anticipation
    pM.

    i just tried, and no problem at all.
    In the <b>Recommended Function Key Settings</b>  for  F2 key add command "PICK"
    Regards
    Raja
    since you are new to the forum, have a look at this weblog.
    /people/mark.finnern/blog/2004/08/10/spread-the-love

  • At line-selection and At-user command

    Hi friends,
    Can we use both those events at a time in report?
    If so can any body provide me sample code?
    Regards

    <b>Example for AT LINE-SELECTION</b>
    REPORT demo_list_at_line_selection.
    START-OF-SELECTION.
      WRITE  'Basic List'.
    AT LINE-SELECTION.
      WRITE: 'Secondary List by Line-Selection',
           / 'SY-UCOMM =', sy-ucomm.
    When you run the program, the basic list appears with the standard list status. The detail list shows that SY-UCOMM has the value PICK.
    <b>Example for AT USER-COMMAND</b>
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
      WRITE: 'Basic List',
           / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
      WRITE 'Top-of-Page'.
      ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE sy-pfkey.
        WHEN 'TEST'.
          WRITE 'Self-defined GUI for Function Codes'.
          ULINE.
      ENDCASE.
    AT LINE-SELECTION.
      SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
      PERFORM out.
      sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'FC1'.
          PERFORM out.
          WRITE / 'Button FUN 1 was pressed'.
        WHEN 'FC2'.
          PERFORM out.
          WRITE / 'Button FUN 2 was pressed'.
        WHEN 'FC3'.
          PERFORM out.
          WRITE / 'Button FUN 3 was pressed'.
        WHEN 'FC4'.
          PERFORM out.
          WRITE / 'Button FUN 4 was pressed'.
        WHEN 'FC5'.
          PERFORM out.
          WRITE / 'Button FUN 5 was pressed'.
      ENDCASE.
      sy-lsind = sy-lsind - 1.
    FORM out.
      WRITE: 'Secondary List',
           / 'SY-LSIND:', sy-lsind,
           / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    I hope it helps.
    For more details have a look at below link.
    http://help.sap.com/saphelp_di471/helpdata/EN/9f/dba3ae35c111d1829f0000e829fbfe/content.htm
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • How to use 'AT PF' and 'AT USER-COMMAND' is used in reports...?

    HI,
    I AM SIVA,
    I AM NEW TO ABAP,
    I HAVE NOT CLARY ON 'AT PF' AND 'AT USER-COMMAND'....
    I DONT KNOW HOW AND WHEN TO USE ABOVE TWO EVENTS..
    SEND ME ANY SOURCE CODE OF USING ABOVE TWO EVENTS...
    IF U KNOW THE ANSWER...
    PLEASE SEND ME...
    REGUARS,
    SIVA.

    hi ,
    the on;y diference b/w At User-command and PF Status is that in At user-command we create a menu but in PF Ststus we define the f1 to f12 keys.
    eg; for at User Command.
    let us take tables such as mara, marc, mard.
    data : itab like mara occurs 0 with header line,
             jtab like marc occurs 0 with hl,
             ktab like mard occurs 0 with hl.
    select-options matnr for mara-matnr.
    initialization.
    matnr-low = '0'.
    amtnr-high = '1000'.
    matnr-sign = 'i'.
    matnr-option = 'bt'.
    append matnr.
    start-of-selection.
    write :/ 'menu bar creation'.
    set Pf Status 'MENU'.
    at user-command.
    case sy-ucomm.
    when 'mm01'.
    select * from mara into table itab where matnr in matnr.
    loop at itab.
    write :/ itab-matnr, itab-ernam, itab-ersda, itab-mbrsh.
    hide itab-matnr.
    endloop.
    when 'mm02'.
    select * from marc into table jtab where matnr = itab- matnr.
    loop at jtab.
    write :/ jtab-matnr, jtab-werks, itab-pstat.
    hide itab-matnr.
    hide jtab-werks.
    endloop.
    when 'mm03'.
    select * from mard into table ktab where matnr  = itab- matnr werks = jtab-werks.
    loop at ktab.
    write :/ ktab-matnr, ktab-werks, ktab-lgort.
    endloop.
    when 'mm04'.
    do 10 times.
    write :/ 'hi'.
    enddo.
    when 'mm05'.
    write "/ 'u pressed enter'.
    endcase.
    now go to set pf status 'menu' n double click on it.
    then press yes.
    then again yes.
    then u will find 6 tabstrips tht r blank in menu bar.
    now go to the first tabstrip n name it as table...then in the code give mm01 n text as mara.then again give code as mm02 n text same with mm03.
    then go to second tabstrip n give details n then i nt tht u give mm04 as code n text as hi.then mm05 as code n text....save check n activate,
    then go to function keys n thre u will find save back error tabstrips name them s,c,activate.
    then come back n activate.
    then same thing is wit pf but there is no menu bar creation for it n instead of when 'mm01' we will give at pf04, at pf05....
    one more thing we should always give pf keys from 04 as o1,o2,o3 r used help errors n activation.
    if  u found ur answer n if it is helpful to u then dont forget to reward with points,
    with regards,
    madhuri.

  • Using both at line-selection and at user-command

    hellow friends ,
    to use both  at line-selection and at user-command in the same report.

    Hello,
    U can do it like this.
    AT LINE-SELECTION.
      PERFORM at_line_selection.
    AT USER-COMMAND.
      PERFORM at_user_command.
    FORM AT_LINE_SELECTION.
      DATA: LV_CURSOR_FIELD(30).
      DATA: LV_MATNR TYPE MATNR.
      CLEAR H_UCOMM.
      GET CURSOR FIELD LV_CURSOR_FIELD.
      CASE LV_CURSOR_FIELD.
        WHEN 'PSPNR'.
          PERFORM LAGER_AN_PSP USING WA_MATNR-M1-RSNUM
                                     WA_MATNR-M1-RSPOS.
        WHEN 'PSPNR2'.
          H_UCOMM = 'PSPNR2'.
          IF NOT PSPNR2 IS INITIAL AND IT_VKBEL-VBELN CN '0123456789'.
            PERFORM LAGER_AN_PSP_VKBEL USING IT_VKBEL
                                             0
                                             PSPNR2
                                             H_MAKTX
                                             ' '.     "keine Blindbuchung
          ENDIF.
    ENDCASE.
    CASE SY-UCOMM.
        WHEN 'BACK_NEW'.
          PERFORM NEU_START USING 'X'.
        WHEN 'EXIT'.
          PERFORM NEU_START USING 'X'.
        WHEN 'CANC'.
          PERFORM NEU_START USING 'X'.
        WHEN 'CHECK'.
          PERFORM NEU_START USING SPACE.
    ENDCASE.
    Vasanth

  • HT4314 I have tried to log into clash of clans on my iPad and it just keeps going to a new game rather than the one saved on my iPhone. I have been using the game centre and same user name and password ?

    I have tried to log into clash of clans on my iPad and it just keeps going to a new game rather than the one saved on my iPhone. I have been using the game centre and same user name and password ?

    I have the same problem.. EXACTLY. .  When phoning Apple Support they had trouble understanding my problem and couldnt find any type of solution. No one seems to take responsibility for GameCenter issues. The assistant escalated the problem but no one could find an answer. .
    The only idea was to set up a new apple id, hence a new GameCenter account. . But that would loose all the itunes data. Anyone got ideas ?

  • AT USER COMMAND event in interactive reports

    hi experts,
    Can anyone explain me about AT USER COMMAND event with one practical ex.
    thanks in advance
    R.vijai

    Hi vijaya kumar,
        If the user chooses a function code during list processing that is neither processed by the system, or PICK or PF<nn>, the system triggers the event AT USER-COMMAND. For this event, you must define your own GUI status for a list. To react to your own function codes in a program, you must define the following event block:
    AT USER-COMMAND.
    <statements>.
    In this event block, you can use an IF or CASE structure to tell the function codes apart. They are available in the system field SY-UCOMM. There are further system fields that are filled in list events, such as SY-LSIND and SY-PFKEY, that allow you to make further case distinctions.
    REPORT Test_program.
    START-OF-SELECTION.
      SET PF-STATUS 'TEST'.
      WRITE:  'Basic list, SY-LSIND =', sy-lsind.
    AT LINE-SELECTION.
      WRITE:  'LINE-SELECTION, SY-LSIND =', sy-lsind.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'TEST'.
          WRITE:  'TEST, SY-LSIND =', sy-lsind.
      ENDCASE.
    With this code double click on 'TEST' and define your own PF status and give user command as TEST and check out this useful programe.
    All the very best to you.
    Regards,
    Mohan Vamsi Krishna.A

  • At line-selection & at user-command event issue

    hi
    i am working on a interactive report,with at line & at user command event,on list 3 i have used a pf status,to trigger the at user command event,till that i was working with at line selection,which are working fine,but on list 3,i am able to see my pf status,but at user command event is not working properly,its still working like at line selection event,if i clk on record,it take to for nxt action,which i want to do through the action button of pf status.
    In debugging i checked that it coming to at user command,but the action in sy-user is 'PICK' & its doing the operation.
    WHEN '3'.
          IF itab4[] IS NOT INITIAL.
            SET PF-STATUS 'Z203'.
            LOOP AT itab4.
              AT FIRST.
                WRITE:/1 'Material' ,18 'Name'.
              ENDAT.
              WRITE:/1 itab4-matnr,8 itab4-maktx.
              HIDE:itab4-matnr.
            ENDLOOP.
          ELSE.
            WRITE:/ 'No Data Found'.
          ENDIF.
      ENDCASE.
      BREAK-POINT.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'CALL'.
          PERFORM bdc_mm02.
      ENDCASE.
    pls tel me how to use at line selection & at user command in same report to make both events working efficiently.
    regds
    vipin

    Check whether you have assigned Function Key F2 to your function code 'CALL'. If so change that function key. The function key F2 is always linked to function code 'PICK'.
    Regards
    Sathar

  • ITS URGENT QUES ON AT LINE-SELECTION AND AT USER-COMMAND

    ITS URGENT...WHEN I SELECT MULTIPUL VALUES IN BASIC LIST ,I HAVE TO GET THOSE SELECTED MULTIPUL VALUES IN SECONDARY LIST THAT CAN BE AFTER(AT LINE-SELECTION OR AT USER-COMMAND)............?

    hey
    this code modify's simlarly u can read n  display secondary window
        DO .
    Reading the internal table whose data is displayed into wrk area.....
          READ LINE SY-INDEX FIELD VALUE INT_DISPLAY-SHIPMENT_ID INTO WF_SHIPMENT_ID.
    Reading the check box value
          READ LINE SY-INDEX FIELD VALUE WG_CHK.
    If all the records are read and there is no code left to read
          IF SY-SUBRC <> 0 .
            EXIT.
          ENDIF.
    To highlight the line which is selected by the user
          IF WG_CHK = WL_X.
            MODIFY CURRENT LINE
            LINE FORMAT COLOR COL_NEGATIVE INVERSE
            FIELD VALUE WG_CHK FROM WL_SPACE.
            MODIFY CURRENT LINE
            LINE FORMAT INPUT OFF.
    Also append the record read into new internal table which u will display in secondary window.......
          ENDIF.
        ENDDO.
    AT USER-COMMAND. or AT LINE SELECTION . u can write this code.........
    DISPLAYING A POP-UP WINDOW .
          WINDOW STARTING AT 10 50
                 ENDING AT 120 70.
    and then write the table into which u have stored the read entry which user had selected
    reward points if useful

  • Export and Import User Command Line

    Hi,
    I would like to export a user on my Xserver via command line. I know it's the nidump command but not sure how to use it for a proper export. After the export I want to import that user on a second macosx server with niload or whatever command is needed.
    Please can somebody post some examples for me.
    Thanks heaps,
    Christian

    I would like to export a user on my Xserver via
    command line. I know it's the nidump command but not
    sure how to use it for a proper export. After the
    export I want to import that user on a second macosx
    server with niload or whatever command is needed.
    To export all users on the old server:
    sudo nidump passwd . > myExportFile
    Then open the file with TextEdit (or the like) and clear out all the users you do not want to import. Then copy the file to your new server and do:
    sudo niload passwd . < myExportFile
    Note: this only works with local NetInfo users, not LDAP ones.<br>
    MacBook Pro   Mac OS X (10.4.6)  

  • What is the best practice for formatting ext drives to be used by both Mac and PC users?

    I have scanned what is available in the community about this issue and wondering if anyone has anything new to add.  I need to create backup drives of department files (large photo and video) that both we Mac and the other PC users can access.  The only consistent rec I see is FAT32, but that seems to have size limitations.  Any other suggestions?  Thanks.

    The problem with FAT32 is that 4 GB or bigger files can't be stored. In this case, and as you have a Mac OS X version that supports it (10.6.5), you can use exFAT, compatible with Windows XP, Vista, 7, 8 and Mac OS X (10.6.5 and later).
    To format a drive with exFAT, do this on a PC. If you do it on a Mac, a PC won't be able to read it. Apart from this, you will be able to store the files you need onto external drives, as exFAT hasn't got the limitations that FAT32 has.
    Another option is to use NTFS, but you will need a third-party application on your Mac to be able to write on your external drives

  • Can Adobe Acrobat and/or Formscentral be used to individually collect and save user data? Can user data be used to populate other forms?

    I want to collect individual user data through my site and then use that data to subsequently populate PDF forms. Can Formscentral or Acrobat Pro do this?

    There's not a built-in feature in either for this. With both FormsCentral and Acrobat, you have access to the form data, which can be used to populate a different form using Acrobat, but this is a workflow that you would have to customize and would involve some manual steps.

  • AT SELECTION-SCREEN and AT USER-COMMAND.

    Hi everyone,
    I am a newbie in ABAP programming please help me out on this problem.
    I need to display a screen dialog (Window) with search results immediately after I entered the search parameter in another dialog box after i clicked the 'execute' icon/button which is on the search screen dialog.
    Any code snippet(s) would be really appreciated, thank you.

    hi
    good
    check out this events
    AT SELECTION-SCREEN-ON FIELD.
    AT SELECTION-SCREEN-ON OUTPUT.
    AT SELECTION-SCREEN-ON HELP REQUEST( F1).
    AT SELECTION-SCREEN-ON VALUE REQUEST(F4).
    thanks
    mrutyun^

  • User command event is not working ........

    Hi ,
    class event_class definition.
      public section.
        methods:
           handle_user_command
               for event after_user_command of cl_gui_alv_grid
                   importing e_ucomm.
        methods:handle_hotspot
          for event  hotspot_click of cl_gui_alv_grid
               importing e_row_id.
    endclass.                    "event_class DEFINITION
    ******selection screen**************************
    call screen 100.
          CLASS event_class IMPLEMENTATION
    ********class implimentations********************
    class event_class implementation.
      method handle_user_command.
        case e_ucomm.
          when 'SAVE'.
       wa_default-checkbox = 'X'.
    ENDCASE.
      endmethod.            "handle_user_command
      method  handle_hotspot.
        wa_default-checkbox = 'X'.
        lv_layout-zebra = 'X'.
        lv_hotspot = lv_hotspot + 1.
        modify       lit_default
        index        e_row_id
        from         wa_default
        transporting checkbox.
        lv_id = e_row_id.
    *************refreshing tables************
        call method wa_alv->refresh_table_display
         EXPORTING
           is_stable      =
           i_soft_refresh =
         EXCEPTIONS
           finished       = 1
           others         = 2
        if sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
      endmethod.       
                "handle_user_command
    method user_command.
    *****some code i will write with help of e_ucomm**********(   control not comming here)
    endmethod.
    endclass.  
    Hi,Here i have one alv grid display if i click on grid checkbox method (hotspot) will triggers properly,,,,but if i select any button like save ,modify i have created on screen method user_command is not triggering ,control is going to pai of that screen.my question is it shold trigger usr_command right??????
    any help appriciated.
    Thanks

    Hi, Lingaraj.
    Check your events handlers is registered
    SET HANDLER go_event_receiver->handle_double_click FOR go_grid.
    SET HANDLER go_event_receiver->handle_toolbar      FOR go_grid.
    SET HANDLER go_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER go_event_receiver->handle_menu_button  FOR go_grid.
    SET HANDLER go_event_receiver->handle_context_menu FOR go_grid.
    SET HANDLER go_event_receiver->on_f4               FOR go_grid.
    SET HANDLER go_event_receiver->handle_data_changed FOR go_grid.
    before calling an ALV:
    go_grid->set_table_for_first_display(
         EXPORTING  is_layout        = ls_layout
                    is_variant       = ls_variant
                    i_save           = 'A'
          CHANGING  it_outtab        = gt_outtab
                    it_fieldcatalog  = lt_fieldcat
    Hope it will be helpful for you.
    Best regards,
    George Shlyahov.

Maybe you are looking for