Skip to Content
author's profile photo Former Member
Former Member

Problem with PF_STATUS in ALV

Hi

I have the following code written in my report to set PF_STATUS in ALV.But its not working

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = g_repid

i_callback_pf_status_set = 'PF_STATUS_SET'

  • I_CALLBACK_USER_COMMAND = ''

  • i_structure_name = 'I_BOLACT'

  • i_grid_title = 'BOL Action Report'(031)

  • is_layout = gs_layout

i_save = 'A'

it_fieldcat = gt_fieldcat[]

FORM PF_STATUS_SET USING rt_extab TYPE slis_t_extab.

set PF-STATUS 'ZPF_STAT'.

ENDFORM.

Please help where am I going wrong.

Regards

Ishita

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

13 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 09:28 AM

    Hi,

    It should work.

    Is it a case that buttons are shown but not catched in the user command?

    Regards,

    Manoj Kumar P

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 09:31 AM

    FORM PF_STATUS_SET USING rt_extab TYPE slis_t_extab.

    set PF-STATUS 'ZPF_STAT' excluding rt_extab.----


    > specify this

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 09:31 AM

    Double click on ZPF_STAT and it will take you to the pf status screen. Check whether its activated and is filled with correct values. The problem seems to be here.

    Thanks,

    Kirti.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 09:32 AM

    Hi,

    Please look at this thread:

    Pf-status not working

    You Can Go through one more link which will solve your problem i guess:

    own-pf-status-for-reusealvgriddisplay

    Regards,

    Rahul

    Edited by: Rahul Kumar Sinha on Dec 18, 2008 10:35 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 18, 2008 at 09:51 AM

    Hi ,

    Please check if :

    - g_repid contains your report name

    - your pf-status exists or it it is activated.

    Regards,

    Dev.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 18, 2008 at 10:22 AM

    Hello Ishita,

    For PF-Status in ALV, use:-

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = rep_id "report id
        i_callback_pf_status_set          = 'PF' "subroutine in which we set pf-status
      TABLES
        t_outtab                          = it_ekpo "internal table whose records are to be displayed
      EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2.
    
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'Z_PF_ALV'.
    ENDFORM.                    "pf
    

    Hope this solves your problem.

    Thanks & Regards,

    Tarun Gambhir

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 18, 2008 at 10:34 AM

    Hello Ishita,

    As you said that there are two screen, one for input and output.

    As per the name suggests input screen should take some set of parameters from user based on which the output screen will be displayed in an ALV Grid.

    The FM 'REUSE_ALV_GRID_DISPLAY' will be executed when the data is being displayed in the grid view, so the PF will be set in the output screen.

    So give it a try.

    Thanks & Regards,

    Tarun Gambhir

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 10:37 AM

    Hii

    Yes you are correct but still the above mentioned code doesnt work.Am not able to track where the problem is.PF status is also functioning correctly.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 10:47 AM

    Hi,

    write like this it will work for you.

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = g_repid

    i_callback_pf_status_set = 'ZPF_STAT'

    I_CALLBACK_USER_COMMAND = ''

    i_structure_name = 'I_BOLACT'

    i_grid_title = 'BOL Action Report'(031)

    is_layout = gs_layout

    i_save = 'A'

    it_fieldcat = gt_fieldcat[]

    FORM PF_STATUS_SET USING rt_extab TYPE slis_t_extab.

    set PF-STATUS 'ZPF_STAT'.

    ENDFORM.

    Thanks,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 11:03 AM

    If any of the above solution in not working, you can use EVENTS to handle it.

    using

    * TO Get all the ALV Events
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = it_events
        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.
    
    * FOR THE PF-STATUS EVENT
      read table it_events into wa_event with key name = slis_ev_pf_status_set.
      if sy-subrc eq 0.
    
        wa_event-form = 'PF_STATUS_SET'.
        modify it_events from wa_event
                         transporting form
                         where name = wa_event-name.
      endif.

    and then set your PF Status in Form 'PF_STATUS_SET'

    hope this solves your problem.

    Jinson.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.