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 VALUES ON CLIKC OF APPEND ROWS IN OO ALV ( NOT WEB DYNPRO )

Former Member
0 Kudos

Hi Gurus,

Im using object orient alv program to display alv table grid.

When i click append rows , i need to get some default values to appended rows to oo alv table list.

Kindly suggest me how to do this preferrably with complete sample code.

It would be great if you could respond asap.

Thanks in advance for all your helps.

Regards

Mady

1 REPLY 1

Former Member
0 Kudos

Hi!

With Standard Append button you may not achieve the functionality of adding rows with default values.

Instead you can create an append button in your custom PF-Status and add the code over there.

Ex:

MODULE user_command_0100 INPUT.

CASE sy-ucomm.

WHEN 'APPEND'.

CLEAR gs_outtab1.

gs_outtab1-checkbox = 'X'. "Adding default values in the new row.

APPEND gs_outtab1 TO gt_outtab.

CALL METHOD g_grid->refresh_table_display.

ENDCASE.

ENDMODULE.

Don't forget to suppress the standard Append button.

Ex:

DATA: lt_exclude TYPE ui_functions.

APPEND '&LOCAL&APPEND' TO lt_exclude.

CALL METHOD g_grid->set_table_for_first_display

EXPORTING

is_layout = gs_layout

it_toolbar_excluding = lt_exclude <=======

CHANGING

it_fieldcatalog = gt_fieldcat

it_outtab = gt_outtab[].