Skip to Content
0
Former Member
Jul 31, 2007 at 06:29 PM

Checked records are not comming properly.

15 Views

Hi,

I have check box checked for records 9 and 10, but it is reading 7 and 8 as checked and the data of records 7 and 8 are comming in to gt2_zprice. Can you please help me find out what I am doing wrong.

TYPES: BEGIN OF ty_zprice,

mandt TYPE mandt,

vkorg TYPE vkorg,

vtweg TYPE vtweg,

spart TYPE spart,

kunnr TYPE kunnr,

matnr TYPE matnr,

crdate TYPE zcrdate,

efdate TYPE zefdate,

sprice TYPE zprice3,

eprice TYPE zprice4,

eohqty TYPE zquantity1,

aohqty TYPE zquantity2,

auart TYPE auart,

bstkd TYPE bstkd,

werks TYPE werks_d,

augru TYPE augru,

xblnr TYPE xblnr,

crmemo TYPE vbeln,

index TYPE sy-index,

END OF ty_zprice.

DATA:gt_zprice TYPE TABLE OF zppprice WITH HEADER LINE,

gs_zprice1 TYPE ty_zprice,

gt2_zprice TYPE TABLE OF ty_zprice.

DATA : lv_index TYPE sy-index.

DATA: lv_cnt TYPE i.

DESCRIBE TABLE gt_zprice LINES lv_cnt.

lv_index = 2.

DO lv_cnt TIMES.

lv_index = sy-index + 2.

READ LINE lv_index FIELD VALUE chbox.

IF chbox = 'X'.

READ TABLE gt_zprice INTO gs_zprice1 INDEX sy-index.

IF sy-subrc EQ 0.

gs_zprice1-index = sy-index.

APPEND gs_zprice1 TO gt2_zprice.

CLEAR gs_zprice1.

ENDIF.

ENDIF.

ENDDO.

Thanks,

Neelu.