Application Development and Automation 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: 
Read only

ALV grid

Former Member
0 Likes
355

Hi,

can any one tell me how to do the following scenario in alv

when i give range in the date then according to that the data should display in the alv grid .

Plzz suggest me easy methos for it.

points will be awarded .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
326

Hi,

try this code

MODULE status_0100 OUTPUT.

SET PF-STATUS c_alv_scr.

PERFORM set_titlebar USING w_display.

  • If program executed in foreground.

IF sy-batch IS INITIAL.

  • If g_grid is empty.

IF g_grid IS INITIAL.

  • To create object for instance grid

CREATE OBJECT g_grid

EXPORTING

container_name = g_container.

  • To create object for object grid

CREATE OBJECT g_alv

EXPORTING

i_parent = g_grid.

ELSE.

CALL METHOD g_alv->refresh_table_display.

ENDIF. " IF G_GRID IS INITIAL

ENDIF. " IF SY-BATCH IS INITIAL

REFRESH t_fcat.

  • If w_display eq 'X' .

IF w_display EQ c_boolean_yes.

  • To display all records except saved data

PERFORM display_allrecords.

ENDIF. " IF W_FLAG EQ C_BOOLEAN_YES

IF w_submit EQ c_boolean_yes.

  • To display submitted records

PERFORM submitted_records.

ENDIF. " IF W_SUBMIT EQ C_BOOLEAN_YES

ENDMODULE. " STATUS_0100 OUTPUT

PLzz reward points if it helps.

2 REPLIES 2
Read only

Former Member
0 Likes
327

Hi,

try this code

MODULE status_0100 OUTPUT.

SET PF-STATUS c_alv_scr.

PERFORM set_titlebar USING w_display.

  • If program executed in foreground.

IF sy-batch IS INITIAL.

  • If g_grid is empty.

IF g_grid IS INITIAL.

  • To create object for instance grid

CREATE OBJECT g_grid

EXPORTING

container_name = g_container.

  • To create object for object grid

CREATE OBJECT g_alv

EXPORTING

i_parent = g_grid.

ELSE.

CALL METHOD g_alv->refresh_table_display.

ENDIF. " IF G_GRID IS INITIAL

ENDIF. " IF SY-BATCH IS INITIAL

REFRESH t_fcat.

  • If w_display eq 'X' .

IF w_display EQ c_boolean_yes.

  • To display all records except saved data

PERFORM display_allrecords.

ENDIF. " IF W_FLAG EQ C_BOOLEAN_YES

IF w_submit EQ c_boolean_yes.

  • To display submitted records

PERFORM submitted_records.

ENDIF. " IF W_SUBMIT EQ C_BOOLEAN_YES

ENDMODULE. " STATUS_0100 OUTPUT

PLzz reward points if it helps.

Read only

Former Member
0 Likes
326

Hi manjari,

Thank u very much it solved my problem.