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: 

How to enable save button in ALV GRID TOOLKIT

0 Kudos
1,713

Hi i am using an object of cl_gui_alv_grid .

While calling its function SET_TABLE_FOR_FIRST_DISPLAY I have put

i_save = 'A'

is_variant = lv_var

where lv_var-REPORT = sy-repid.

but still cant enable the save button.

Also i tried to run the sample code BCALV_GRID_09 there as well i was not able to find any save button.

Where am i going wrong ?


1 ACCEPTED SOLUTION

former_member205060
Active Participant
0 Kudos
602

Hi,

1. May be your user has not been authorized for  S_ALV_LAYO (Authorization Object) .

2. Check with I_save = 'U'

Regards,

Rahul Singh

14 REPLIES 14

gouravkumar64
Active Contributor
0 Kudos
602

Hi,

At a glance your code is fine.

Hope You wrote code like this with variant & save.

variant type disvariant.

variant-report = sy-repid.

variant-username = sy-uname.

Also look at wiki program for complete help.

http://wiki.sdn.sap.com/wiki/display/Snippets/ALV-Editing+and+saving+the+edited+values+in+Database%2...

Hope it will sove your problem.

Thanks

Gourav.

0 Kudos
602

Yes that is exactly how i am doing it also I ve made my fields editable using field catalog , but its still not working. Anyways thanks for the help ill look into it.

0 Kudos
602

First try to perform The Consistency Check on your ALV grid and check actual values used in the grid for variant, layout and field catalog. You could also check authorizations via SU53.

Regards,

Raymond

Former Member
0 Kudos
602

Hi Prateek

Try the below coding

CALL METHOD ref1->refresh_table_display
     EXPORTING
       i_soft_refresh = 'X'.

   CALL METHOD REF1->SET_VARIANT
     EXPORTING
       IS_VARIANT = LT_VAR
       I_SAVE     = 'X'.

Regards

Suganya

former_member205060
Active Participant
0 Kudos
603

Hi,

1. May be your user has not been authorized for  S_ALV_LAYO (Authorization Object) .

2. Check with I_save = 'U'

Regards,

Rahul Singh

0 Kudos
602

This is SU53 screenshot and i am getting 4 warnings on The Consistency Check

I think you are right. But I_save = 'U' is also not working

0 Kudos
602

Hi Prateek,

The screen you have shown, Shows that you don't have the authorization for object S_ALV_LAYR. That's why the button is invisible . Add this object to your profile and then you can see the "SAVE" button. Or ask Basis to maintain the same for your user profile.

I_SAVE = 'A' Is fine.

Regards,

Rahul Singh

0 Kudos
602

Thanks. I do not know how to add objects to my user profile. I am new to abap. I will try to look for it

Thank you.

0 Kudos
602

Hi,

Go through this link.

http://scn.sap.com/message/5132548

But better ask you basis person to maintain the same.

Regards,

Rahul Singh

0 Kudos
602

Yeah ill do that.

Thanks

0 Kudos
602

If you are not allowed to SU01 and PFCG -> Ask basis, else :

  • SU01 - Check your roles in corresponding tab
  • S_BCE_68001422 (report RSUSR070)- Get list of roles that contains object S_ALV_LAYR

Then look if one of your role has the authorization, if yes -> PFCG reactivate, else add one of the standard roles to your id.

For reference, read Note 1667238 - Introduction of authorization object S_ALV_LAYR.

NB: Also if you had authorization for activity 23 on "generic" object S_ALV_LAYO, no need then of S_ALV_LAYR.

Regards,

Raymond

former_member217544
Active Contributor
0 Kudos
602

Hi,

Please check, if you have set function code for SAVE button in GUI status.

Regards,

Swarna

former_member217544
Active Contributor
0 Kudos
602

compare the GUI status BCALV_EDIT_04 and BCALV_GRID_09. Function code is not set in later program

Regards,

Swarna

Clemenss
Active Contributor
0 Kudos
602

Well,

I hope you are aware that in ALV grid OBJECT you will not have separate buttons but a dropdown menu:

Otherwise: Please never post any code as nobody will understand 🙂

Regards

Clemens