Skip to Content
0
Former Member
Sep 16, 2010 at 10:20 AM

PO requisition etc

53 Views

Hi,

i want to change the cost center while creating purchase order, me21n,me51n,migo etc and

when tried to change the kostl field of the table im_t_ebkn in include:ZXM02U12

i get the error :The field "IM_T_EBKN" cannot be changed. .

And here is my code:

Data: mat1 type marc-matnr,
           prctr type marc-prctr,
           eban like LINE OF im_t_eban,
           ebkn like LINE OF im_t_ebkn.



loop at im_t_eban INTO eban.
        mat1 = eban-matnr.

    SHIFT mat1 LEFT DELETING LEADING '0'.
     if ( mat1(1) eq '6' or mat1(1) eq '7' ).

     data:i2(2),s2(2),i3(3),s3(3).
     SELECT SINGLE prctr from marc into (prctr) WHERE
               matnr eq eban-matnr and werks eq eban-werks.

     i2 = prctr(2).
     s2 = prctr+2(2).
     i3 = prctr+4(3).
     s3 = prctr+7(3).

     if i2 = 'TY'.i2 = '00'.endif.

     CONCATENATE '3033' i2 '0' s3 INTO ebkn-kostl.
          MODIFY im_t_ebkn FROM ebkn.
     endif.


  ENDLOOP.

Why i can not change the im_t_ebkn table or how can i do that?

Also i need the same thing while creating the sales order and i get the same error in sales order too, there i can not change the it_xlips in badi.

How can i change this record?

Thanks.