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: 

PF Status Modification in Blacl ALV

Former Member
0 Kudos
1,160

Hi All,

In one of our requirements we need all the Standard Menus and Functions of the Output Status of an ALV.

But we want the Download to Local File to behave differently. Instead of an Usual Download we would like the EXcel with the Prepopulated data (Same as in Output Display of ALV) to OPEN up and then the User can SAVE it to any desired location.

I have copied the Status using the SE41 and the set the PF status in my Program.I have used the Parameter I_CALLBACK_PF_STATUS_SET in the FM - REUSE_ALV_BLOCK_LIST_INIT. The Routine sets the PF Status.

And the PF status is correct.But in the Menu I have Changed the FUnction Code of LOcal Downloa d'%PC' to '%PA' to point to my New USER_COMMAND (Subroutine).

But on execution of the Function Code in output the USER_COMMAND Form Routine is not getting Called.But the Other Codes (which were copied from the Standard PF Status) is working Fine.

How Do I make my NEW FUNCTION CODE WORK ?What are the steps I need to do?

Thanks in Advance.

Arunava

3 REPLIES 3

Former Member
0 Kudos
69

HI,

The event trigger by standard alv buttons can not be handled in user_commnad module, beccause they r special type of event.For example if put /h to debug any alv program and press a button (say filter or sum) of alv toolbar you never will see the debugging.try it out.

why dont you simply create a different button in the toolbar and attach the function code to it.it can call the function you want to download xls sheet.

you can handle it in user_command module

0 Kudos
69

Hi Anid,

I am not much sure as to the different way I have done than u have asked me to. I have COPIED the Standard Output STATUS and Added this new Button(Excel Open). But still the USER COMMAND is not triggering the Module within my program but goes to Standard SAP Program handling the Other Function Codes.

Can you be a bit more elaborative as to waht I need to do. Should I copy the STATSU and ADD or CREATE an absolutely new Status(As I need most of the Functions from Standard ALV OUtput Status).

Thanks and Regards,

Arunav

0 Kudos
69

Hi,

First of all try removing '%' in your function code and see whether it works..normally function codes starting with '%' are system function codes..

If that does not work then check whether your callback program is properly filled while calling REUSE_ALV_BLOCK_LIST_INIT and make sure the GUI Status you see is really the one you created. Put a break-point in your callback_pf_status_set routine and check.

If it is fine till this point then check whether the events table that you are filling and passing to REUSE_ALV_BLOCK_LIST_APPEND fm calls is properly filled.

Like,

t_events-name = slis_ev_user_command.

t_events-form = 'USER_COMMAND'.

APPEND t_events.

Hope this helps..

Sri