Skip to Content
0
Former Member
Dec 04, 2006 at 10:36 AM

wat is wrong in this code..

28 Views

hi

CASE sy-ucomm.

WHEN 'BACK' .

LEAVE PROGRAM.

WHEN 'RESET'.

  • get selected rows

REFRESH gt_selected_rows.

CALL METHOD g_alv->get_selected_rows

IMPORTING et_index_rows = gt_selected_rows.

IF gt_selected_rows[] IS INITIAL.

  • MESSAGE WHEN NO LINES SELECTED!!!

****

  • MESSAGE ID 'Z2' TYPE 'I' NUMBER 028 .

ELSE.

PERFORM selected_rows USING gt_selected_rows[]

changing gt_ztsd2marc[].

ENDIF. "IF gt_selected_rows[] IS INITIAL

ENDCASE.

FORM selected_rows USING ut_selected_rows TYPE lvc_t_row

changing ct_ztsd2marc type tt_ztsd2marc.

DATA : ls_selected_rows TYPE lvc_s_row,

ls_ztsd2marc TYPE ts_ztsd2marc.

select ordnr

from ztsd2marc

into table ct_ztsd2marc.

LOOP AT ut_selected_rows INTO ls_selected_rows.

READ TABLE ct_ztsd2marc INTO ls_ztsd2marc

INDEX ls_selected_rows-index.

delete from ztsd2marc

where ztsd2marc-ordnr eq ls_ztsd2marc-ordnr.

ENDLOOP.

it is not recognizing my ztsd2marc table...

ENDFORM. " selected_rows