User defined PF-STATUS in ALV

Hi all,
      I am doing an ALV through an user defined pf-status.But when I am using this pf-status I am unable to find the standard application tool bar and remaining also.I have seen some threads regarding this. These threads are giving me the suggestions to copy the standard pf status of ALV into user defined pf status. How to copy this standard pf status to my program.
Sathish Reddy.

First of all you must copy STANDART status from any ALV example in SLIS Development Class into your report.
You can change this status Properties. (Functions, Buttons)
And you must add this form to Active Your Status in ALV.
*&      Form  set_pf_status
*       text
*  -->  p1        text
*  <--  p2        text
form set_pf_status using rt_extab type slis_t_extab.
  set pf-status 'STANDARD' excluding rt_extab.
endform.
and you must add specified line in your callf of ALV Function.
  call function 'REUSE_ALV_LIST_DISPLAY'
       exporting
            i_callback_program = g_repid
            it_fieldcat        = gt_fieldcat[]
            it_events          = t_events[]
            i_callback_user_command = 'USER_COMMAND'
            i_callback_pf_status_set = 'SET_PF_STATUS'  <<<<<< ADD THIS
       tables
            t_outtab           = mglistoutput.
ibrahim

Similar Messages

  • User defined Project Statuses

    Dear Dina,
    Is it possible to have user defined Project statues in the system like failure/Success like this any??
    pls guide me thanks a lot n advance

    Hi
    Go to Setup menu > Projects > Project Statuses
    You can inquiry existing statuses and create user defined new ones.
    Dina

  • USER DEFINED EVENTS IN ALV

    HI ALL
    JUST WANT TO KNOW CAN WE HANDLE USER DEFINED EVENTS BY SETTING USER DEFINED PF -STATUS IN ALV
    FOR EG :
    call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                I_CALLBACK_PF_STATUS_SET = K_STATUS
               I_CALLBACK_PF_STATUS_SET = 'ZTEST1'
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
               i_callback_u ser_command = 'USER_COMMAND'
                I_CALLBACK_USER_COMMAND  = K_USER_COMMAND
                 IS_LAYOUT                = GD_LAYOUT
                IT_SPECIAL_GROUPS        = KR_SP_GROUP
               i_grid_title           = outtext
               is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               IS_VARIANT               = K_VARIANT
              IT_EVENTS                = KR_EVENTS[]
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 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.
    endform.                    " DISPLAY_ALV_REPORT
    I HAVE MY OWN PF-STATUS IN WHICH I HAVE CREATED 1 BUTTON WHEN I GET THE OUT PUT AND CLICK ON THAT BUTTON THAN IT GOES TO STANDARD PROGRAM ....I WANT WHEN IT CLICK ON THAT BUTTON IT GOES TO MY Z PROGRAM HOW CAN I DO THAT ...
    IF POSSIBLE PLZ PROVIDE CODE OR SOME EXAMPLE .
    THANKS
    TARAN

    U can have button on application toolbar.
    You just have to use the new pf status in your report program.
    You should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
    Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
    Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
    Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality.
    Have a look at below code for using the new status.
    TYPE-POOLS: slis.
    DATA: i_qmel LIKE qmel OCCURS 0.
    data v_repid type repid.
    SELECT * FROM qmel INTO TABLE i_qmel.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = v_repid
    <b>I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'</b>
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    i_structure_name = 'QMEL'
    TABLES
    t_outtab = i_qmel
    EXCEPTIONS
    program_error = 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.
    <b>form set_pf_status using rt_extab type slis_t_extab.
    set pf-status 'TEST'.
    endform.</b>
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    data lv_ucomm type sy-ucomm.
    lv_ucomm
    = sy-ucomm.
    CASE lv_ucomm.
    WHEN 'BUTTON'. "Double Click line Item
    **Write ur functinality here
    endcase.
    endform.
    Also have a look at below links.
    http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm
    ALV report
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • ALV view : Problem with user defined views

    Dear Experts,
    We are facing a problem pertaining to user defined views for a ALV table that we have in SAP eRecruiting application in webdynpro ABAP. The problem is as follows.
    There is a candidate application ABC & only ONE person can edit this at a time.In this application ABC there is a ALV table.
    If the user clicks on this application & navigates to the ALV,this ABC application is in normal/edit mode(no one else has opened this ). So, the user can make changes in ABC. In the ALV, he can click on the 'settings 'button and save the STANDARD view as his own user defined view(by adding or removing columns).
    If the user opens the application ABC in display mode(implying that someone else has alraedy opened ABC for editing), when i navigate to the same ALV,the user CANNOT see the views which were saved in the edit mode.Only the standard view is displayed. The user however has the option to again freshly save a view.
    The views created by a user for this ALV should be seen irrespective of the application being opened in normal or display mode.
    To add to the confusion, this problem is occuring only in some systems & not in others. There is atleast one system where the views are displayed correctly to the user.
    On debugging, the table wdy_conf_user has config ids as different where the user views are stored separately for display & edit mode.
    In systems where the user views are displayed correctly, the config id is one & the same ensuring that the user can see all his views irrespective of the mode of the application.
    Any thoughts on how we can rectify this?
    sorry for the long & tedious explanation
    Thanks in advance,
    Sowmya

    See
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        return {$inputtype}
                     local:test_function("1","2")' returning content) o from dual
    Error at line 5
    ORA-19114: error during parsing the XQuery expression:
    LPX-00801: XQuery syntax error at '{'
    3                       return {$inputtype}
    -                              ^
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        $inputtype
                     local:test_function("1","2")' returning content) o from dual
    O   
    2   
    1 row selected.

  • Hi PF-STATUS in ALV

    Hi,
    How to use custom defines PF-STATUS in ALV Grid.
    Please Give me suggestion this is very imprtant.

    Hi,
    You can create a PF status, say ZPF3 which is an exact copy of STANDARD of program SAPLSALV through transaction SE41 (Menu Painter). You can exclude certain buttons that you do not want and add more also.
    To set the PF status as say ZPF3 for your ALV grid and to handle user-command, you can use the following code piece.
    call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
      I_INTERFACE_CHECK                = ' '
      I_BYPASSING_BUFFER               = ' '
      I_BUFFER_ACTIVE                  = ' '
       i_callback_program                = v_repid
       i_callback_pf_status_set          = 'PF_STATUS_GRID1'
       i_callback_user_command           = 'USER_COMM'
      i_callback_top_of_page           =
      i_callback_html_top_of_page      =
      I_CALLBACK_HTML_END_OF_LIST      = ' '
      i_structure_name                 =
      I_BACKGROUND_ID                  = ' '
      I_GRID_TITLE                     =
      I_GRID_SETTINGS                  =
       is_layout                         = s_layout
       it_fieldcat                       = t_fcat_grid1[]
      IT_EXCLUDING                     =
      IT_SPECIAL_GROUPS                =
       it_sort                           = t_sort_grid1
      IT_FILTER                        =
      IS_SEL_HIDE                      =
      I_DEFAULT                        = 'X'
      I_SAVE                           = ' '
      IS_VARIANT                       =
      it_events                         = t_events
      IT_EVENT_EXIT                    =
      IS_PRINT                         =
      IS_REPREP_ID                     =
      I_SCREEN_START_COLUMN            = 0
      I_SCREEN_START_LINE              = 0
      I_SCREEN_END_COLUMN              = 0
      I_SCREEN_END_LINE                = 0
      IT_ALV_GRAPHICS                  =
      IT_HYPERLINK                     =
      IT_ADD_FIELDCAT                  =
      IT_EXCEPT_QINFO                  =
      I_HTML_HEIGHT_TOP                =
      I_HTML_HEIGHT_END                =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER          =
      ES_EXIT_CAUSED_BY_USER           =
      tables
       t_outtab                          = t_report
      exceptions
       program_error                     = 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.
    endform.                    " report_display
    *&      Form  pf_status_grid1
          Description: Set PF_STATUS for the 1st grid
    form pf_status_grid1 using rt_extab type slis_t_extab.
      set pf-status 'ZPF3'.
    endform. "pf_status_grid1
    *&      Form  USER_COMM
          Description: Handling click on the button 'Grand Total'
    form user_comm using ucomm like sy-ucomm ls_selfield type slis_selfield.
      case ucomm.
        when '&TOT'.
          perform fieldcat_build_grid2.
          perform sort_grid2.
          perform display_grandtotal.
      endcase.
    endform.                    "USER_COMM
    Reward points for useful answers.

  • ALV user defined status

    Hi,
    In hierarchial list display.
    I'm implementing my own user defined status.
    I have copied the standard status and modified for SAVE & BACK functions.
    In the at user command module i have coded for SAVE & BACK.
    for SAVE it's working fine where as for BACK control is not coming to my user command module.it's just going back to the previous screen.how to implement the function code for BACK.
    Regards
    Raghavendra

    Hi Raghavendra,
    in the PAI event of ur screen from where u want to go back to user command.
    sample code:
    <b>PROCESS AFTER INPUT</b>.
      <b>MODULE <modulename> AT EXIT-COMMAND.</b>
    <b>MODULE <modulename> INPUT.</b>
      IF OK-CODE = 'BACK' .
        LEAVE PROGRAM.
      ENDIF.
    <b>ENDMODULE.</b>
    instead of <b>LEAVE PROGRAM</b> u can also use
    <b>LEAVE TO SCREEN 0</b>.
    hope this works fine for u.

  • How to create user defined button in alv report

    how to create user defined button in alv report
    thnks in advance.

    Hi,
    U can define it the the PF-STATUS ( Menu for ALV ).
    For that u have to define it in the EVENTCAT.
    form z_eventcat  using    p_i_eventcat type slis_t_event.
      data: i_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = p_i_eventcat
        exceptions
          list_type_wrong = 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.
      clear i_event.
      read table p_i_eventcat with key name = slis_ev_top_of_page into
      i_event.
      if sy-subrc = 0.
        move 'TOP_OF_PAGE' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      read table p_i_eventcat with key name = slis_ev_pf_status_set into i_event.
      if sy-subrc = 0.
        move 'SET_PF_STATUS' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      clear i_event.
      read table p_i_eventcat into i_event with key name = slis_ev_user_command .
      if sy-subrc = 0.
        move 'USER_COMMAND' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
    And in the DISPLAY
    call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
         i_callback_program                = v_progname
         i_callback_pf_status_set          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = v_gridtitle
         i_save                            = 'A'
         is_layout                         = i_layout
         it_fieldcat                       = i_fieldcat[]
         it_sort                           = i_sortinfo
         it_events                         = i_eventcat
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        tables
          t_outtab                          = it_final
       exceptions
         program_error                     = 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.
    *MENU SETTINGS.
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ALV_MENU'.
    endform.                    "SET_PF_STATUS
    endform.                    " Z_EVENTCAT
    Now double click on ALV MENU nad u can create a button in the application bar.
    Regards,
    Pritha.

  • Problem with ALV and user defined selection screen. please help!

    Hi Experts,
           I have program which has a user defined selection screen 9001. On executing the selection screen i call a ALV using resuse_alv_grid function module.
    What problem I am facing is that when I press back button from ALV page it goes to the se38 editor instead of selection screen.
    How to resolve this?
    Thanks
    Gopal

    Hi,
    This might be due to LEAVE TO TRANSACTION statement. You might be running the program from SE38. Try to run the program using Z-TCode assigned to it.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was edited by: Bharat Reddy V

  • ALV GRID - to include user defined buttons in the output

    Hi,
    Currently I am working on ALV grid output.
    Along with the standard buttons, I need to include my own push buttons.
    When I try to include it using pf-status like this,
    passing parameter  in alv
    I_callback_pf_status_set = G_status
    FORM STANDARD_02 USING EXTAB USING SLIS_T_EXTAB
    set pf-status 'PF_STATUS' EXCLUDING EXTAB.
    ENDFORM
    I have included Confirm and exit buttons
    In the output it shows only the button which I created .
    I want to get both standard buttons which gets displayed when using REUSE_ALV_GRID_DISPLAY and the newly created one .
    Plz help me to resolve this .
    I am just passing my own internal table values to the grid .
    Thanks in advance.
    Regards,
    Uma

    hi
    good
    create ur own GUI status in ur program using SET PF-STATUS '--'. now give that program name and pf status name while u r copying that standard status ie.,of ALV grid Go to transaction SE41 (Menu painter). In the initial screen give the program name SAPLKKBL In the status give STANDARD Then go to the menu bar.in that follow this menu User Interface>Copy--->Status. Then a pop up will appear to give ur program name and the status name.
    thanks
    mrutyun^

  • API for Work Order status from Released to Unreleased or any user defined s

    Dear All
    Is there any API for to change work order status from Released to Unreleased or any user defined status.
    Take care
    Aamir

    Hi Ben,
    As query is resolved, you should close the Thread after rewarding to the Concerned
    Thanks,
    Manish

  • ALV-User defined Toolbars

    Hi Friends,
    How to add a user defined toolbar for ALV programs. Please help me. I need very urgent.
    Regards
    Praveen

    Hi Praveen,
    The following document gives you almost everything that you need to know about an ALV -
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
    Regards,
    Anand Mandalika.

  • Set user Defined Status in the Shopping Cart

    Hello,
    I am facing problem while Setting user defined Status in the shopping cart. Below are the steps which I have followed.
    1. I have created Status profile via Transaction 'BS02' and also created the Status 'On Hold' with Status number 'Exxxxx'.
    2. Entry of this external status is also created in the table TJ30.
    3. Also I tried assigning this Status profile in Transaction type for "BUS2121".
    After making the above configuration for the new User defined status I have used below function module in my program.
    I am using FM "CRM_STATUS_CHANGE_EXTERN" to set the User defined status in the shopping cart.
      CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'
        EXPORTING
          objnr                    = ls_header-guid
          user_status          = lv_stat
        IMPORTING
          stonr                    = lv_stonr
    After this FM I am also using "COMMIT WORK AND WAIT ".
    But still my Status is not updated in the Shopping Cart.
    Expert please suggest if some one has work in this scenario.
    Best Regards,
    Chirag Shah

    Hi Chirag,
    try to initialize Status schema before update.
    CALL FUNCTION 'CRM_STATUS_OBJECT_CREATE'
         EXPORTING
           objnr                        = ls_header-guid
           obtyp                        = 'SCH'
           stsma                        = 'ZHOLD'
         EXCEPTIONS
           obtyp_invalid                = 1
           status_object_already_exists = 2
           stsma_invalid                = 3
           stsma_obtyp_invalid          = 4
           error_ocurred                = 5
           OTHERS                       = 6.
    Regards
    K

  • ALV with user-defined buttons on toolbar in wd abap

    Hi All,
    I have to create an alv with user defined buttons  in wd abap on its toolbar.Could any one tell me in detail about it or provide me with any tutorial based on it.
    Thanking you all in advance.

    DATA: LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    DATA: LR_INTF_ALV TYPE REF TO IWCI_SALV_WD_TABLE.
    LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
    IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) EQ ABAP_FALSE.
       LR_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    LR_INTF_ALV = WD_THIS->WD_CPIFC_ALV( ).
    WD_THIS->M_MODEL = LR_INTF_ALV->GET_MODEL( ).
    DATA: LR_FUNCTION TYPE REF TO CL_SALV_WD_FUNCTION.
    LR_FUNCTION =
    WD_THIS->M_MODEL->IF_SALV_WD_FUNCTION_SETTINGS~CREATE_FUNCTION(
                            ID = 'ISSUE' ).
    DATA: LR_BUTTON TYPE REF TO CL_SALV_WD_FE_BUTTON.
    CREATE OBJECT LR_BUTTON.
    LR_BUTTON->SET_TEXT( 'Issue/Receive' ).
    LR_FUNCTION->SET_EDITOR( LR_BUTTON ).
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/101df93f-4b5c-2910-14aa-9eb0338c2110
    Abhi

  • User defined total in ALV

    Hi all ,
         my requirement is to calculate an user defined subtotal in ALV .
    thanks
    senthil

    Hi senthil,
         This is ALV list display or Grid display. if it is list display then you can use the following event SLIS_EV_AFTER_LINE_OUTPUT and write the subtotal using write statement simply... but this method should only be used in justified cases because it costs a lot of performance.

  • Enable User Defined toolbar button on click -  editable alv grid using oops

    Hi all,
    I  have created editable alv using  oops concept.
    created 2 user defined toolbar button save and print using method toolbar
      ls_toolbar-text      = 'Print'.                         "#EC NOTEXT
        ls_toolbar-quickinfo = space.
        ls_toolbar-checked   = space.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    requirement is
    initially print button should be disabled, and save enabled
    when i click save button, print button should be enabled.
    I want coding in editable alv oops concept
    kindly help
    regards
    senthil kumar

    Halo Senthil,
    You should call set_toolbar_interactive method of cl_gui_alv_grid in the on_user_command( ie the event handler for event user command) .
    method on_user_command.
    case e_ucomm.
    when 'SAVE'. or whatever your function code is .
    my_save_flag = 'X'.
    call method grid->set_toolbar_interactive.
    endmethod.
    This triggers the toolbar event of the
    cl_gui_alv_grid. Inside the eventhandler method ( ie the on_toolbar method ) you should set the toolbar.
    if my_save_flag = 'X'.
    read table e_object->mt_toolbar
    clear l_toolbar-disabled.
    modify e_object->mt_toolbar.
    endif.
    e_ucomm will not have  the function code if the save button is not in the toolbar area.
    then you can set the my_save_flag in the data_changed event handler of the Cl_gui_alv_grid.
    Regards
    Arshad

Maybe you are looking for

  • ALE:SAP to non-SAP using Bussines connector

    Hi The business connector has been set up. I've created two logical systems. Transaction SALE LS: DEVCLNT500 Assigned  LS: DEVCLNT500 to SAP client 500 LS: DEVCLNT900 Defined RFC Target system: DEVCLNT900 connection type 'T' Program id SAPBC Created

  • How do I get back my files from an erased hard drive? (disk utility)

    Under the advice of another Mac user, I used the Disk Utility application to 'erase' and reformat my MacBook Pro to 'Mac OS Extended (Journaled)' so that I could copy files that were on my MB to my hard drive and it erased everything on my hard drive

  • Why has my itunes id been disabled on my iphone?

    still works on my pc, just cant download apps, why?

  • Recent victim of slow evening speed....

    Hi all Over the last few years BT have tentatively held onto my business. Speed has gradually increased and it once reached the heady heights of 7.5mb. Then over the last 6 months or so it has slowed down to about 5-6 generally with a line profile of

  • How to fix no of question for specific test

    Under the Test Sections, there is field "no of question", although i have map no of question with the question bank is 100 but i just want it to display on 10 every time . could you pls advice, how to do this.