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: 

ALV : possibility to save/manage layouts

Former Member
0 Kudos

Hi all,

i use FM REUSE_ALV_GRID_DISPLAY and it's work fine. I can change layout (add or delete columns) now i would like to save this changes. I don't have the button to do that, how can i display it ?

Cheers.

1 ACCEPTED SOLUTION

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

In REUSE_ALV_GRID_DISPLAY parameter I_SAVE pass the value 'A'.

Here is the SAP documentatn for this:

' ' = Display variants cannot be saved

Defined display variants (such as delivered display variants) can be selected for presentation regardless of this indicator. However, changes cannot be saved.

'X' = Standard save mode

Display variants can be saved as standard display variants.

Saving display variants as user-specific is not possible.

'U' = User-specific save mode

Display variants can only be saved as user-specific.

'A' = Standard and user-specific save mode

Display variants can be saved both as user-specific and as standard

variants. Users make their choice on the dialog box for saving the

display variant.

Hope this is helpful.

BR,

Suhas

7 REPLIES 7

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

In REUSE_ALV_GRID_DISPLAY parameter I_SAVE pass the value 'A'.

Here is the SAP documentatn for this:

' ' = Display variants cannot be saved

Defined display variants (such as delivered display variants) can be selected for presentation regardless of this indicator. However, changes cannot be saved.

'X' = Standard save mode

Display variants can be saved as standard display variants.

Saving display variants as user-specific is not possible.

'U' = User-specific save mode

Display variants can only be saved as user-specific.

'A' = Standard and user-specific save mode

Display variants can be saved both as user-specific and as standard

variants. Users make their choice on the dialog box for saving the

display variant.

Hope this is helpful.

BR,

Suhas

Former Member
0 Kudos

Sorry it don't work.

0 Kudos

Hello,

Please check the output, there must be a button for "Save Layout" (Ctrl+F10). Ihave used this multiple times & it works.

This is a sample code:


  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM       = SY-REPID
      I_CALLBACK_PF_STATUS_SET = 'F_PF_STATUS'
      I_CALLBACK_USER_COMMAND  = 'F_USER_COMMAND'
      IS_LAYOUT                = FP_ST_LAYOUT
      IT_FIELDCAT              = FP_IT_FIELDCAT
      I_SAVE                   = 'A'
    TABLES
      T_OUTTAB                 = FP_IT_OUTPUT
    EXCEPTIONS
      PROGRAM_ERROR            = 1
      OTHERS                   = 2.
  IF SY-SUBRC <> 0.
*   Error in calling Standard ALV Functional Module
    MESSAGE I019. "Error Occured in ALV Function Module
    LEAVE LIST-PROCESSING.
  ENDIF.

BR,

Suhas

Former Member
0 Kudos

I think it miss one parameter maybe in FP_ST_LAYOUT ?

0 Kudos

Hello,

You asked about the "Save Layout" button & the param for this is

I_SAVE = 'A'

This is sufficient to be able to save layout.

Suhas

Former Member
0 Kudos

<This is sufficient to be able to save layout.

So why the button is not displayed ?

Former Member
0 Kudos

Ok i find... The parameter is_variant must be filled. Now it's ok.

Thanks so much.

Cheers.