Skip to Content
avatar image
Former Member

Get deleted operations through code

Hello all!

I was needing to retrieve operations that have been deleted in IW32 with an REL status. It seems that I could use the bapi BAPI_ALM_ORDER_GET_DETAIL by requesting use of the ET_OPERATIONS parameter. However the code hits a FM called CO_MK_DISTRIBUTION_FLAG_GET to determine a Boolean on the variable lv_distribution. This determines whether or not the deleted operations will be retrieved as part of the return results. It is currently always returns false which means ultimately that it will not return any deleted operations if any.

Is there another way to return deleted operations through this bapi or is there an alternative?

Thanks!

Rene

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 10 at 07:54 PM

    I found an alternative that I thought I would pass along in case someone needs it.

    TYPES: BEGIN OF t_deleted_ops, 
    	aufpl TYPE co_aufpl,
    	ops TYPE vornr, 
           END OF t_deleted_ops.
    DATA: lt_deleted_ops TYPE TABLE OF t_deleted_ops.
    DATA: lt_ops TYPE <your itab>.
    
    SELECT aufpl vornr 
      FROM afvc INTO TABLE lt_deleted_ops 
    FOR ALL ENTRIES IN lt_ops 
     WHERE aufpl = lt_ops-aufpl 
       AND phflg = 'X'.
    

    lt_deleted_ops now has the deleted operations for the aufpl from the AFVC table.

    Rene

    Add comment
    10|10000 characters needed characters exceeded