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: 

default value to a column while displaying the GRID

Former Member
0 Kudos

Hi all,

I have the scenario like

i want to display the default value to field while displaying the GRID.

anyway i am having the f4 help for that field, as though the field is in EDIT mode .

But before displaying the grid, it should display default value .

like how we do in PBO for module pool programing.

thanks in advance

1 REPLY 1

uwe_schieferstein
Active Contributor
0 Kudos

Hello Madhavi

A default value in the ALV grid simply means a default value in the itab used for displaying.

DATA:
  ls_outtab    LIKE LINE OF gt_outtab.  " itab for ALV display
 
  ls_outtab-fieldx = '<default value>'.
  MODIFY gt_outtab FROM ls_outtab
    TRANSPORTING fieldx
  WHERE ( fieldx <> ls_outtab-fieldx ).
 
...
  go_grid->set_table_for_first_display(...)

Regards

Uwe