12-18-2008 9:21 AM
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
12-18-2008 9: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
12-18-2008 9:31 AM
FORM PF_STATUS_SET USING rt_extab TYPE slis_t_extab.
set PF-STATUS 'ZPF_STAT' excluding rt_extab.----
> specify this
ENDFORM.
12-18-2008 9: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.
12-18-2008 9:32 AM
12-18-2008 9:51 AM
Hi ,
Please check if :
- g_repid contains your report name
- your pf-status exists or it it is activated.
Regards,
Dev.
12-18-2008 10:26 AM
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
12-18-2008 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
12-18-2008 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
12-18-2008 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.
12-18-2008 10:43 AM
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
12-18-2008 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,
12-18-2008 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.
12-19-2008 8:40 AM
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
12-19-2008 9:12 AM
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.
12-22-2008 7:28 AM
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