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: 

cl_salv_table - How to set grid ready for input

Former Member
0 Kudos

Hi,

I am using the class "cl_salv_table" on a 6.40 system to display an ALV grid. How can I set the grid cells are ready for input/editing?

( Something similar to slis_layout_alv-edit parameter

use in the REUSE_ALV_GRID_DISPLAY function )

I have looked at the demo programs SALV_TEST_TABLE* and

SALV_DEMO_TABLE*. Unless I am blind I cannot find a way.

Any suggestions?

Lukas

Message was edited by: van vuuren lukas

7 REPLIES 7

Vinod_Chandran
Active Contributor
0 Kudos

Hi Van,

Hope you are using the method SET_TABLE_FOR_FIRST_DISPLAY. In this there is a parameter called IT_FIELDCATALOG. Set the field EDIT = 'X'.

You can get example from this post

Thanks

Vinod

Message was edited by: Vinod C

0 Kudos

hi,

yes vinod was right. U just have to do that to every field that you want to be editable.

PP.

0 Kudos

Hi,

thanks for the reply,

I do not call the SET_TABLE_FOR_FIRST_DISPLAY,

as far as I can tell SALV does not require this.

Here is in short what my program looks like:

data: lr_salvgrid type ref to cl_salv_table,

lr_columns type ref to cl_salv_columns_table,

lr_column type ref to cl_salv_column,

gt_matdoc type mb_mkpf.

I call method cl_salv_table=>factory to get a reference to my itab:

call method cl_salv_table=>factory

exporting

list_display = if_salv_c_bool_sap=>false

importing

r_salv_table = lr_salvgrid

changing

t_table = gt_matdoc.

Then for fieldcatalogue:

i.e. hide columns etc

lr_columns = lr_salvgrid->get_columns( ).

lr_columns->set_optimize( abap_true ).

lr_column = lr_columns->get_column( 'MANDT' ).

lr_column->set_visible( abap_false ).

Then to display:

lr_salvgrid->display( ).

I would have thought that the edit parameter would be somewhere in the fieldcat ( in class CL_SALV_COLUMN )

but I cannot find it there. Everything else like text/edit mask/currency/visible etc is here but not edit.

0 Kudos

Hi, Lucas,

I have the same problem. Did you solve it?

Thanks, Marko.

Former Member
0 Kudos

Hi,

Please refer this weblog,

/people/thomas.jung3/blog/2005/08/23/bsp-server-side-printing-for-tableviews

cl_salv_table=>factory(

EXPORTING

list_display = abap_true

IMPORTING

r_salv_table = table

CHANGING

t_table = <tab> ).

For ALV refer this link

http://www.sapdevelopment.co.uk/reporting/alvhome.htm

Please reward points for the answer which helped u and if ur problem got solved click on the blue star and close the thread.

Former Member
0 Kudos

Anybody else who have solved this problem?

Plz. Teach the way to me.

0 Kudos

Hoi Lukas,

I just was wanting to try once to use the CL_SALV_TABLE but wanted to be sure one could make fields editable so I came across this thread. In the documentation internaly in SAP on the class there is the folowing remark:

Tables displayed with ALV are not available for input.

So I fear it might not be foreseen so I'll stick to using CL_GUI_ALV_GRID of which I know it is possible.

Dirk