Edit a Particular Column in an ALV Report

How to edit a particular column in an alv report output?

Enable edit field in fieldcatalog.

When you want to do edit only for particular column and not for the entire grid then you need to perform fieldcat in that particular column only.

For example:

form build_fieldcat changing pt_fieldcat type lvc_t_fcat.

data ls_fcat type lvc_s_fcat.
loop at pt_fieldcat into ls_fcat.

if ls_fcat-fieldname EQ 'Curr'.

ls_fcat-scrtext_s = 'CURRENCY'.
ls_fcat-scrtext_m = 'CURRENCY'.
ls_fcat-scrtext_l = 'CURRENCY'.
ls_fcat-reptext = 'CURRENCY'.
Ls_fcat-seltext = 'CURRENCY'.
ls_fcat-edit = 'X'.
modify pt_fieldcat from ls_fcat.
endif.
endloop.

In this way you can give editable option to that particular column only.
 

What is the use of reuse_alv_events_ get fm?

This is used to call ALV display type i.e. which type display you want in your report. You can pass five types value (0-4), which are under.

0 = simple list                                      REUSE_ALV_LIST_DISPLAY

1 = hierarchcal-sequential list             REUSE_ALV_HIERSEQ_LIST_DISPLAY

2 = simple block list                            REUSE_ALV_BLOCK_LIST_APPEND

3 = hierarchical-sequential block list  REUSE_ALV_BLOCK_LIST_HS_APPEND

4 = Fullscreen                                      REUSE_ALV_GRID_DISPLAY

ABAP

Read Also
ALV Sample Using Inner Join

ABAP Books List
ABAP/4 Certification, Programming, Smartforms, Sapscripts and Object Oriented Programming Books

Smart Forms
SAP Smartforms

ABAP Menu:
ABAP Example Hints and Tips

Return to Index:-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.