Application Development and Automation 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: 
Read only

'Save' function inactive in user defined PF for CL_SALV*

shalabh_jain
Product and Topic Expert
Product and Topic Expert
0 Likes
1,628

Hello,

I've implemented OOPS ALV using CL_SALV* classes and defined a PF Status with 'Save' functionality copied from the Standard PF Status SALV_TABLE_STANDARD of the function group SALV_METADATA_STATUS.

However, the said SAVE function button is not active on execution of the report. I've checked the activation/visibility of the function using methods get_function(), is_active() and is_visible () but everything seems fine.

Please help.

Thanks,

Shalabh Jain

Hello,

I've implemented OOPS ALV using CL_SALV* classes and defined a PF Status with 'Save' functionality copied from the Standard PF Status SALV_TABLE_STANDARD of the function group SALV_METADATA_STATUS.

However, the said SAVE function button is not active on execution of the report. I've checked the activation/visibility of the function using methods get_function(), is_active() and is_visible () but everything seems fine.

Please help.

Thanks,

Shalabh Jain

9 REPLIES 9
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,312

Hello Shalabh,

Did you set the GUI status using the method SET_SCREEN_STATUS( ) of the CL_SALV* class?

N.B.: You cannot use this method to set the UI status for displays using containers. You need to use the SET PF-STATUS command in the PBO.

BR,

Suhas

PS: Posting relevant portions of the code will help you get better responses

Read only

Kiran_Valluru
Active Contributor
0 Likes
1,312

Hi.,

As suhas sir suggested you have to create a Z Gui Status and set PF-status.,

Also you can copy the standard PF Status and assign Function Codes: check my reply in this thread [Gui Status |;

hope this helps u.,

Thanks & Regards,

Kiran

Read only

shalabh_jain
Product and Topic Expert
Product and Topic Expert
0 Likes
1,312

Hi Suhas/ Kiran,

Thanks for your replies.

I've already done all of these things i.e. creating new PF status, using SET_SCREEN_STATUS method. Also, please note that I'm using FULLSCREEN mode of the ALV Object Model which does not require creation of a custom container. So I believe SET PF status statement is not applicable in this case.

But, still it doesn't show the SAVE option.

One thing I noticed is that, when I add more options to the PF Status, they are visible. But the ones copied from the standard PF status(as mentioned in my first reply) are not visible.

Thanks,

Shalabh Jain

Read only

0 Likes
1,312

I tried with the way Suhas mentioned and it worked perfectly !!. It works well with SET_SCREEN_STATUS method of CL_SALV_TABLE (with SET_FUNCTIONS parameter set to C_FUNCTIONS_ALL).

- Have you modified the custom GUI status by assigning the Function code to the SAVE button ?

- Have you attached the activated GUI status with the program ?

Regards, Vinod

Read only

shalabh_jain
Product and Topic Expert
Product and Topic Expert
0 Likes
1,312

Hi Vinod,

Yes I've assigned a Function code to the SAVE button. In fact, it already had it as I copied it from a Standard. Also, I've attached it to the program through method SET_SCREEN_STATUS.

Is there anything else that I can check?

Thanks,

Shalabh

Edited by: Shalabh Jain on Jun 15, 2011 9:34 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,312

Hello,

One thing I noticed is that, when I add more options to the PF Status, they are visible. But the ones copied from the standard PF status(as mentioned in my first reply) are not visible.

The new functions are visible, where ? By 'where' i mean which area of the screen viz., Menu area, Application area etc.

Edited by: Suhas Saha on Jun 15, 2011 1:52 PM

BTW when you say the function is inactive, do you mean that it is greyed out or you're not the + event handler+ method is not getting triggered?

BR,

Suhas

Read only

0 Likes
1,312

Try to change the function code associated with SAVE button in custom GUI status and activate it.

Regards, Vinod

Read only

shalabh_jain
Product and Topic Expert
Product and Topic Expert
0 Likes
1,312

Hi Suhas/ Vinod,

By 'Where' I mean the Standard Tool bar where we get Back, Up and Cancel options.

The Save button is greyed out there. I even tried changing the F code and activating it but it didn't work.

As an alternative, I tried using the classical ALV approach using RESUSE_ALV_GRID* function modules with the same PF Status and it worked perfectly fine.

Don't know why the ALV Object Model is not supporting it.

Thanks,

Shalabh Jain

Read only

0 Likes
1,312

I don' think anything wrong with SALV Class. I tried the same by copying standard GUI Status "SALV_TABLE_STANDARD" to a Z GUI Status and it worked perfectly. I followed below steps

- Copy standard GUI status "SALV_TABLE_STANDARD" to "ZSALV_TABLE_STANDARD"

- Changed the Function code of SAVE button to "SAVE"

- Activated GUI Status.

- Attached the GUI status to the Z program

- Call method SET_SCREEN_STATUS

DATA : lv_sypfkey  TYPE sypfkey.
    lv_sypfkey = 'ZSALV_TABLE_STANDARD'.
    TRY.
        lr_table->set_screen_status(
          EXPORTING
            report        = sy-repid
            pfstatus      = lv_sypfkey
            set_functions = lr_table->c_functions_all ).
      ENDTRY.

Regards, Vinod