Application Development 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: 

Problem with PF_STATUS in ALV

Former Member
0 Kudos

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

15 REPLIES 15

Former Member
0 Kudos

Hi,

It should work.

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

Regards,

Manoj Kumar P

Former Member
0 Kudos

FORM PF_STATUS_SET USING rt_extab TYPE slis_t_extab.

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


> specify this

ENDFORM.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Please look at this thread:

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

Regards,

Rahul

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

dev_parbutteea
Active Contributor
0 Kudos

Hi ,

Please check if :

- g_repid contains your report name

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

Regards,

Dev.

0 Kudos

Hello Everybody,

Thanks for the imeediate reply.My requirement is that I have an input screen and the output of it is in ALV Grid. and i want the PF_STATUS to be displayed on the output screen.Is the above mentioned code correct for such a requirement.

Regards

Ishita

I355602
Advisor
Advisor
0 Kudos

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

I355602
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Hello Ishita,

Is the PF status applied to first screen (input screen) or not..?

If no, then try debugging the program and see whether the control is going in the form of PF or not.

Thanks & Regards,

Tarun Gambhir

tarangini_katta
Active Contributor
0 Kudos

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,

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hello,

I have written the same code for PF_STATUS in R/3 and it works.But the problem is in CRM system.Thesame code doesnt work in CRM .Please Help

Rgds

Ishita

Former Member
0 Kudos

hi ,

just comment your form endform block and in call function i_callback_pf_status_set = 'ZPF_STAT'

form endform you can write when you are using alv event element.

so try it out as test.

Former Member
0 Kudos

Hello,

Am still not able to SET the PF STATUS.PLease help ...the same code works in a R/3 report...and not in CRM.

Even when i try to add some text in the header area through "Text Elements" it is not displayed.

Regds

Ishita