Skip to Content
0
Former Member
Aug 30, 2007 at 10:02 AM

COPA0005

80 Views

Hi,

Iam working one userexit COPA0005 which having function module EXIT_SAPLKEII_002.

Import parameters is I_ERKRS

Table T_ITEM

The table is not refering any tables.

My requirement is below

1.Check if operating concern(I_ERKRS) is 0001 than go to step 2 else go to step

2.Read each record of T_Item which is of structure CE10001 table and verify

the value for item category(CE10001-PSTYV) .

3. If the item Category (CE10001-PSTYV) is TAS Than change Warehouse cost value field (CE10001-VV504) value to 0.00 irrespective of its current value).

Else don’t change value of warehouse cost value field(CE10001-VV504).

4.Exit from the function module.

I write the code

DATA: ce1_0001 type ce10001.

data : wa_item type ce10001.

IF i_erkrs EQ '0001'.

LOOP AT t_item into wa_item.

MOVE-CORRESPONDING t_item TO ce1_0001.

IF ce1_0001-pstyv = 'TAS'.

ce1_0001-vv504 = '0.00'.

ENDIF.

MOVE-CORRESPONDING ce1_0001 TO t_item.

MODIFY t_item from wa_item index sy-index.

ENDLOOP.

ELSE.

EXIT.

ENDIF.

Is it correct code?Or any changes.

Thanks,

sudhakar