2011 Jun 14 12:40 PM
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
2011 Jun 14 1:15 PM
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
2011 Jun 14 3:21 PM
2011 Jun 14 4:32 PM
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
2011 Jun 15 7:02 AM
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
2011 Jun 15 8:33 AM
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
2011 Jun 15 8:50 AM
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
2011 Jun 15 9:09 AM
Try to change the function code associated with SAVE button in custom GUI status and activate it.
Regards, Vinod
2011 Jun 16 4:11 AM
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
2011 Jun 16 5:01 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |