Skip to Content
-1

Issue in Layout save using CL_SALV_TABLE

Aug 28, 2017 at 03:15 AM

64

avatar image
Former Member

Hello All,

We are using CL_SALV_TABLE to display ALV grid. We have written the functionality of CL_SALV_TABLE in a local wrapper class to use it every where in our developments.

While saving the layouts, I have found an issue, that the layout is saved with the name of the wrapper class, instead of the REPORT name I have specified.

Also, the layout restriction is always of type user, even though I kept it NONE.

DATA( CO_LAYO ) = CO_ALV->GET_LAYOUT( ).

LS_KEY-REPORT = IMP_REPORT.

LS_KEY-HANDLE = IMP_HANDLE.

CO_LAYO->SET_KEY( VALUE = LS_KEY ).

CO_LAYO->SET_SAVE_RESTRICTION( VALUE = IMP_RESTRICTION ).

To the import parameters, I am passing the respective values.

While debugging I have seen the values I passed , flow into SET_TABLE_FOR_FIRST_DISPLAY of CL_GUI_ALV_GRID and also to the class CL_ALV_VARIANT that encapsulates variant functionalities.

Am I missing anything here?

10 |10000 characters needed characters left characters exceeded

What is the symptom please? (for instance, "when I display the list of layout variants, the one I have previously saved is not shown")

0
Former Member
Sandra Rossi

Hello Sandra,

The layout details are saved properly. But in the table V_LTDX where the layouts are stored the field REPORT is filled with the wrapper class that I have used, instead of the report name that I have passed to SET_KEY method of class CL_SALV_LAYOUT, using my import parameters of the wrapper class.

So, while retrieving the layouts using my report name I am unable to get the layouts.

1
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi
Aug 28, 2017 at 07:48 AM
0

In debug check current value of IMP_REPORT. Did you use sy-repid for any parameter in some method call in the wrapper or external program/class?

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello Raymond,

All the parameters are checked. I am passing external report name to IMP_REPORT.

I am not using any sy-repid anywhere in my wrapper class.

0

And in the class/program(s) that call the wrapper class?

0
Former Member

I passed the program name using sy-repid which tkaes the right program name to pass it to wrapper class.

0