Skip to Content
0
Former Member
Jun 15, 2006 at 05:13 PM

Row Selection For ALV grid

1490 Views

Hi ,

Am looking for a particullar row selections in an ALV grid and click on the icon &DELL (deallocate icon) on the ALV SO THT IT commits the data to data base ..my code is like this ..can any one help me with this ?? Am using REUSE_ALV_GRID_DISPLAY function module

-


FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN '&DEALL'.

*Check for the allocation quantity

*if not error message out

LOOP at itab_display.

IF itab_display-kalab LE 0.

MESSAGE i101(/kingspan/pp).

EXIT.

ELSE.

  • Check field clicked on within ALVgrid report

IF

rs_selfield-fieldname = 'VKORG'. "sales org

rs_selfield-fieldname = 'SPART'. "division

rs_selfield-fieldname = 'VTWEG'. "distribution channel

rs_selfield-fieldname = 'VBELN'. "sales doc no

rs_selfield-fieldname = 'POSNR'. "sales doc item

rs_selfield-fieldname = 'WERKS'. "plant

rs_selfield-fieldname = 'EDATU'. "delivery date

rs_selfield-fieldname = 'MATNR'. "finished goods

rs_selfield-fieldname = 'MATNR1'. "coil material

rs_selfield-fieldname = 'CHARG1'. "coil batch

rs_selfield-fieldname = 'BEZEI'. "order status

rs_selfield-fieldname = 'KALAB'. "allocation quantity

  • Read data table, using index of row user clicked on

READ TABLE itab_display INTO wa_display INDEX rs_selfield-tabindex.

REFRESH itab_display.

ENDIF.

ENDIF.

ENDLOOP.

ENDCASE.

ENDFORM.